* [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets
@ 2011-07-01 5:38 Khem Raj
2011-07-01 7:01 ` Koen Kooi
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Khem Raj @ 2011-07-01 5:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../systemd/systemd/paper-over-mkostemp.patch | 19 +++++++++++++++++++
meta-oe/recipes-core/systemd/systemd_git.bb | 3 ++-
2 files changed, 21 insertions(+), 1 deletions(-)
create mode 100644 meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
diff --git a/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
new file mode 100644
index 0000000..ca10440
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
@@ -0,0 +1,19 @@
+uclibc does not have mkostemp() so we redefine it to use mkstemp()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: git/src/macro.h
+===================================================================
+--- git.orig/src/macro.h 2011-06-30 10:33:53.000000000 -0700
++++ git/src/macro.h 2011-06-30 15:07:28.285270006 -0700
+@@ -27,6 +27,10 @@
+ #include <sys/uio.h>
+ #include <inttypes.h>
+
++#ifdef __UCLIBC__
++/* uclibc does not implement mkostemp GNU extention */
++#define mkostemp(x,y) mkstemp(x)
++#endif
+ #define _printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
+ #define _sentinel_ __attribute__ ((sentinel))
+ #define _noreturn_ __attribute__((noreturn))
diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb
index 2a313e0..c750b2f 100644
--- a/meta-oe/recipes-core/systemd/systemd_git.bb
+++ b/meta-oe/recipes-core/systemd/systemd_git.bb
@@ -15,7 +15,7 @@ inherit gitpkgv
PKGV = "v${GITPKGVTAG}"
PV = "git"
-PR = "r3"
+PR = "r4"
inherit autotools vala
@@ -23,6 +23,7 @@ SRCREV = "8585357a0e5e9f4d56e999d7cd1a73e77ae0eb80"
SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git \
file://0001-systemd-disable-xml-file-stuff-and-introspection.patch \
+ file://paper-over-mkostemp.patch \
"
S = "${WORKDIR}/git"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets
2011-07-01 5:38 [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets Khem Raj
@ 2011-07-01 7:01 ` Koen Kooi
2011-07-01 8:47 ` Paul Menzel
2011-07-01 9:48 ` Phil Blundell
2 siblings, 0 replies; 8+ messages in thread
From: Koen Kooi @ 2011-07-01 7:01 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks, both are in
On 01-07-11 07:38, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> .../systemd/systemd/paper-over-mkostemp.patch | 19 +++++++++++++++++++
> meta-oe/recipes-core/systemd/systemd_git.bb | 3 ++-
> 2 files changed, 21 insertions(+), 1 deletions(-)
> create mode 100644 meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
>
> diff --git a/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
> new file mode 100644
> index 0000000..ca10440
> --- /dev/null
> +++ b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
> @@ -0,0 +1,19 @@
> +uclibc does not have mkostemp() so we redefine it to use mkstemp()
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +
> +Index: git/src/macro.h
> +===================================================================
> +--- git.orig/src/macro.h 2011-06-30 10:33:53.000000000 -0700
> ++++ git/src/macro.h 2011-06-30 15:07:28.285270006 -0700
> +@@ -27,6 +27,10 @@
> + #include <sys/uio.h>
> + #include <inttypes.h>
> +
> ++#ifdef __UCLIBC__
> ++/* uclibc does not implement mkostemp GNU extention */
> ++#define mkostemp(x,y) mkstemp(x)
> ++#endif
> + #define _printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
> + #define _sentinel_ __attribute__ ((sentinel))
> + #define _noreturn_ __attribute__((noreturn))
> diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb
> index 2a313e0..c750b2f 100644
> --- a/meta-oe/recipes-core/systemd/systemd_git.bb
> +++ b/meta-oe/recipes-core/systemd/systemd_git.bb
> @@ -15,7 +15,7 @@ inherit gitpkgv
> PKGV = "v${GITPKGVTAG}"
>
> PV = "git"
> -PR = "r3"
> +PR = "r4"
>
> inherit autotools vala
>
> @@ -23,6 +23,7 @@ SRCREV = "8585357a0e5e9f4d56e999d7cd1a73e77ae0eb80"
>
> SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git \
> file://0001-systemd-disable-xml-file-stuff-and-introspection.patch \
> + file://paper-over-mkostemp.patch \
> "
>
> S = "${WORKDIR}/git"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFODXCyMkyGM64RGpERAs2xAJkBX+3ccJsW4y9osQSYFq5shzC2LACfe6IX
RN9FH3u/dVImKyDh794PCfg=
=SyuQ
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets
2011-07-01 5:38 [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets Khem Raj
2011-07-01 7:01 ` Koen Kooi
@ 2011-07-01 8:47 ` Paul Menzel
2011-07-01 17:19 ` Khem Raj
2011-07-01 9:48 ` Phil Blundell
2 siblings, 1 reply; 8+ messages in thread
From: Paul Menzel @ 2011-07-01 8:47 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
Am Donnerstag, den 30.06.2011, 22:38 -0700 schrieb Khem Raj:
As far as I know the `bb` extension should be omitted in the commit
summary?
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Does systemd build for you with this patch and uClibc?
> ---
> .../systemd/systemd/paper-over-mkostemp.patch | 19 +++++++++++++++++++
> meta-oe/recipes-core/systemd/systemd_git.bb | 3 ++-
> 2 files changed, 21 insertions(+), 1 deletions(-)
> create mode 100644 meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
>
> diff --git a/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
> new file mode 100644
> index 0000000..ca10440
> --- /dev/null
> +++ b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
> @@ -0,0 +1,19 @@
> +uclibc does not have mkostemp() so we redefine it to use mkstemp()
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
Is that patch for upstream inclusion?
[…]
Thanks,
Paul
[1] http://openembedded.org/index.php/Commit_Patch_Message_Guidelines
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets
2011-07-01 5:38 [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets Khem Raj
2011-07-01 7:01 ` Koen Kooi
2011-07-01 8:47 ` Paul Menzel
@ 2011-07-01 9:48 ` Phil Blundell
2011-07-01 13:48 ` Khem Raj
2 siblings, 1 reply; 8+ messages in thread
From: Phil Blundell @ 2011-07-01 9:48 UTC (permalink / raw)
To: openembedded-devel
On Thu, 2011-06-30 at 22:38 -0700, Khem Raj wrote:
> ++#ifdef __UCLIBC__
> ++/* uclibc does not implement mkostemp GNU extention */
> ++#define mkostemp(x,y) mkstemp(x)
> ++#endif
Is that safe? It would be nice to have some commentary in the patch
explaining why the flags are not required for systemd to operate
correctly. If it genuinely doesn't need to be using mkostemp() then
perhaps this change should just be made upstream for all libcs.
p.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets
2011-07-01 9:48 ` Phil Blundell
@ 2011-07-01 13:48 ` Khem Raj
2011-07-01 14:23 ` Phil Blundell
0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2011-07-01 13:48 UTC (permalink / raw)
To: openembedded-devel@lists.openembedded.org
Cc: openembedded-devel@lists.openembedded.org
On Jul 1, 2011, at 2:48 AM, Phil Blundell <philb@gnu.org> wrote:
> On Thu, 2011-06-30 at 22:38 -0700, Khem Raj wrote:
>> ++#ifdef __UCLIBC__
>> ++/* uclibc does not implement mkostemp GNU extention */
>> ++#define mkostemp(x,y) mkstemp(x)
>> ++#endif
>
> Is that safe? It would be nice to have some commentary in the patch
> explaining why the flags are not required for systemd to operate
> correctly. If it genuinely doesn't need to be using mkostemp() then
> perhaps this change should just be made upstream for all libcs.
>
right
I have to test it eglibc systems
> p.
>
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets
2011-07-01 13:48 ` Khem Raj
@ 2011-07-01 14:23 ` Phil Blundell
2011-07-01 17:11 ` Khem Raj
0 siblings, 1 reply; 8+ messages in thread
From: Phil Blundell @ 2011-07-01 14:23 UTC (permalink / raw)
To: openembedded-devel
On Fri, 2011-07-01 at 06:48 -0700, Khem Raj wrote:
>
> On Jul 1, 2011, at 2:48 AM, Phil Blundell <philb@gnu.org> wrote:
>
> > On Thu, 2011-06-30 at 22:38 -0700, Khem Raj wrote:
> >> ++#ifdef __UCLIBC__
> >> ++/* uclibc does not implement mkostemp GNU extention */
> >> ++#define mkostemp(x,y) mkstemp(x)
> >> ++#endif
> >
> > Is that safe? It would be nice to have some commentary in the patch
> > explaining why the flags are not required for systemd to operate
> > correctly. If it genuinely doesn't need to be using mkostemp() then
> > perhaps this change should just be made upstream for all libcs.
> >
> right
> I have to test it eglibc systems
I'm not sure that's quite the point. What I was trying to say before
was that, if systemd is going to the trouble of using mkostemp() rather
than mkstemp() in the first place, one would normally assume that it is
expecting that extra argument to be respected. So it seems like there
are two possibilities:
a) the standardised semantics of mkstemp() are actually sufficient for
systemd's requirements and there was no need for it to be using
mkostemp() at all. In this case it should just be patched (ideally
upstream) to use mkstemp() unconditionally.
b) the specific semantics of uClibc's mkstemp() implementation are
sufficient for systemd's needs, although the semantics guaranteed by the
standards are not. In this case your patch might be appropriate but
there should be a comment explaining why it is safe and what exactly the
uClibc behaviour is that it depends on. This would still not be an
ideal state of affairs since uClibc might change in the future, but it's
probably acceptable; a better solution might be either to add mkostemp()
into uClibc explicitly, or to patch systemd to obtain the semantics that
it needs by some other route.
I'm not familiar enough with either systemd or uClibc to know which of
the above is true here. Can you clarify?
p.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets
2011-07-01 14:23 ` Phil Blundell
@ 2011-07-01 17:11 ` Khem Raj
0 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2011-07-01 17:11 UTC (permalink / raw)
To: openembedded-devel
On 07/01/2011 07:23 AM, Phil Blundell wrote:
> On Fri, 2011-07-01 at 06:48 -0700, Khem Raj wrote:
>>
>> On Jul 1, 2011, at 2:48 AM, Phil Blundell<philb@gnu.org> wrote:
>>
>>> On Thu, 2011-06-30 at 22:38 -0700, Khem Raj wrote:
>>>> ++#ifdef __UCLIBC__
>>>> ++/* uclibc does not implement mkostemp GNU extention */
>>>> ++#define mkostemp(x,y) mkstemp(x)
>>>> ++#endif
>>>
>>> Is that safe? It would be nice to have some commentary in the patch
>>> explaining why the flags are not required for systemd to operate
>>> correctly. If it genuinely doesn't need to be using mkostemp() then
>>> perhaps this change should just be made upstream for all libcs.
>>>
>> right
>> I have to test it eglibc systems
>
> I'm not sure that's quite the point. What I was trying to say before
> was that, if systemd is going to the trouble of using mkostemp() rather
> than mkstemp() in the first place, one would normally assume that it is
> expecting that extra argument to be respected. So it seems like there
> are two possibilities:
>
> a) the standardised semantics of mkstemp() are actually sufficient for
> systemd's requirements and there was no need for it to be using
> mkostemp() at all. In this case it should just be patched (ideally
> upstream) to use mkstemp() unconditionally.
yes I was using a mobile device did not type too much but this is the
case I am inclined to test.
>
> b) the specific semantics of uClibc's mkstemp() implementation are
> sufficient for systemd's needs, although the semantics guaranteed by the
> standards are not. In this case your patch might be appropriate but
> there should be a comment explaining why it is safe and what exactly the
> uClibc behaviour is that it depends on. This would still not be an
> ideal state of affairs since uClibc might change in the future, but it's
> probably acceptable; a better solution might be either to add mkostemp()
> into uClibc explicitly, or to patch systemd to obtain the semantics that
> it needs by some other route.
no if the flags are needed then uclibc's mkstemp wont work. We have to
provide an implementation of mkostemp or alter the code in systemd so
it uses something else. But this is second choice. Since uclibc does not
like the extentions to be implemented.
>
> I'm not familiar enough with either systemd or uClibc to know which of
> the above is true here. Can you clarify?
>
> p.
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets
2011-07-01 8:47 ` Paul Menzel
@ 2011-07-01 17:19 ` Khem Raj
0 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2011-07-01 17:19 UTC (permalink / raw)
To: openembedded-devel
On 07/01/2011 01:47 AM, Paul Menzel wrote:
> Am Donnerstag, den 30.06.2011, 22:38 -0700 schrieb Khem Raj:
>
> As far as I know the `bb` extension should be omitted in the commit
> summary?
>
>> Signed-off-by: Khem Raj<raj.khem@gmail.com>
>
> Does systemd build for you with this patch and uClibc?
ofcourse
>
>> ---
>> .../systemd/systemd/paper-over-mkostemp.patch | 19 +++++++++++++++++++
>> meta-oe/recipes-core/systemd/systemd_git.bb | 3 ++-
>> 2 files changed, 21 insertions(+), 1 deletions(-)
>> create mode 100644 meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
>>
>> diff --git a/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
>> new file mode 100644
>> index 0000000..ca10440
>> --- /dev/null
>> +++ b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
>> @@ -0,0 +1,19 @@
>> +uclibc does not have mkostemp() so we redefine it to use mkstemp()
>> +
>> +Signed-off-by: Khem Raj<raj.khem@gmail.com>
>
> Is that patch for upstream inclusion?
not yet
>
> […]
>
>
> Thanks,
>
> Paul
>
>
> [1] http://openembedded.org/index.php/Commit_Patch_Message_Guidelines
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-07-01 17:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01 5:38 [meta-oe][PATCH] systemd_git.bb: Alias mkostemp() to mkstemp() for uclibc targets Khem Raj
2011-07-01 7:01 ` Koen Kooi
2011-07-01 8:47 ` Paul Menzel
2011-07-01 17:19 ` Khem Raj
2011-07-01 9:48 ` Phil Blundell
2011-07-01 13:48 ` Khem Raj
2011-07-01 14:23 ` Phil Blundell
2011-07-01 17:11 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.