Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11
@ 2016-07-10 20:34 Yann E. MORIN
  2016-07-11 19:57 ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2016-07-10 20:34 UTC (permalink / raw)
  To: buildroot

... since it uses O_TMPFILE as an open(2) flag, and it was only
introduced in 3.11.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gabe Evans <gabe@hashrabbit.co>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 package/systemd/Config.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index ddaf3e2..4a2aa33 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -144,6 +144,7 @@ config BR2_PACKAGE_SYSTEMD_HWDB
 config BR2_PACKAGE_SYSTEMD_IMPORTD
 	bool "enable import daemon"
 	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 # O_TMPFILE
 	select BR2_PACKAGE_LIBCURL
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_BZIP2
@@ -157,6 +158,10 @@ config BR2_PACKAGE_SYSTEMD_IMPORTD
 
 	  http://www.freedesktop.org/software/systemd/man/machinectl.html#Image%20Transfer%20Commands
 
+comment "import daemon needs a toolchain w/ headers >= 3.11"
+	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
+
 config BR2_PACKAGE_SYSTEMD_KDBUS
 	bool "enable kdbus support"
 	help
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11
  2016-07-10 20:34 [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11 Yann E. MORIN
@ 2016-07-11 19:57 ` Peter Korsgaard
  2016-07-11 20:23   ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2016-07-11 19:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > ... since it uses O_TMPFILE as an open(2) flag, and it was only
 > introduced in 3.11.

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Gabe Evans <gabe@hashrabbit.co>
 > Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11
  2016-07-11 19:57 ` Peter Korsgaard
@ 2016-07-11 20:23   ` Yann E. MORIN
  2016-07-12  8:47     ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2016-07-11 20:23 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2016-07-11 21:57 +0200, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
>  > ... since it uses O_TMPFILE as an open(2) flag, and it was only
>  > introduced in 3.11.
> 
>  > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  > Cc: Gabe Evans <gabe@hashrabbit.co>
>  > Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> Committed, thanks.

Had you seen the other patch a bit later, with comments from Thomas,
before applying this one?

https://patchwork.ozlabs.org/patch/646796/

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11
  2016-07-11 20:23   ` Yann E. MORIN
@ 2016-07-12  8:47     ` Peter Korsgaard
  2016-07-16 12:26       ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2016-07-12  8:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Peter, All,
 > On 2016-07-11 21:57 +0200, Peter Korsgaard spake thusly:
 >> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
 >> > ... since it uses O_TMPFILE as an open(2) flag, and it was only
 >> > introduced in 3.11.
 >> 
 >> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 >> > Cc: Gabe Evans <gabe@hashrabbit.co>
 >> > Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
 >> Committed, thanks.

 > Had you seen the other patch a bit later, with comments from Thomas,
 > before applying this one?

 > https://patchwork.ozlabs.org/patch/646796/

I hadn't, no. I just did a test build with 3.10 headers and glibc 2.22,
and it built without problems - So I've dropped this patch.

-- 
Venlig hilsen,
Peter Korsgaard 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11
  2016-07-12  8:47     ` Peter Korsgaard
@ 2016-07-16 12:26       ` Thomas Petazzoni
  2016-07-16 18:28         ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2016-07-16 12:26 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 12 Jul 2016 10:47:31 +0200, Peter Korsgaard wrote:

> I hadn't, no. I just did a test build with 3.10 headers and glibc 2.22,
> and it built without problems - So I've dropped this patch.

So the comment from Yann in https://patchwork.ozlabs.org/patch/646796/
that both were needed is incorrect?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11
  2016-07-16 12:26       ` Thomas Petazzoni
@ 2016-07-16 18:28         ` Yann E. MORIN
  2016-07-17  7:02           ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2016-07-16 18:28 UTC (permalink / raw)
  To: buildroot

Thomas, Peter, All,

On 2016-07-16 14:26 +0200, Thomas Petazzoni spake thusly:
> On Tue, 12 Jul 2016 10:47:31 +0200, Peter Korsgaard wrote:
> 
> > I hadn't, no. I just did a test build with 3.10 headers and glibc 2.22,
> > and it built without problems - So I've dropped this patch.

Yes, it works because glibc 2.22 (which is >= 2.19) defines it even if
not available in the kernel headers).

> So the comment from Yann in https://patchwork.ozlabs.org/patch/646796/
> that both were needed is incorrect?

So, I built a toolchain with Linux headers 3.10 and glibc 2.18. And
systemd-importd does not build:

    src/import/export-raw.c: In function 'reflink_snapshot':
    src/import/export-raw.c:271:26: error: 'O_TMPFILE' undeclared (first use in this function)
             new_fd = open(d, O_TMPFILE|O_CLOEXEC|O_NOCTTY|O_RDWR, 0600);
                              ^
    src/import/export-raw.c:271:26: note: each undeclared identifier is reported only once for each function it appears in
    Makefile:16515: recipe for target 'src/import/systemd_export-export-raw.o' failed

O_TMPFILE was added in Linux 3.11; glibc added the corresponding
definition in glib-2.19.

    glibc \ linux   | <= 3.10   | >= 3.11   |
    ----------------+-----------+-----------+
    <= 2.18         | No        | No*       |
    >= 2.19         | Yes       | Yes       |

*: headers 3.12

So, not sure where to go from there...

Note: I have not tested uClibc or musl, because,well, systemd depends on
glibc...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11
  2016-07-16 18:28         ` Yann E. MORIN
@ 2016-07-17  7:02           ` Peter Korsgaard
  2016-07-17  7:18             ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2016-07-17  7:02 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 > So, I built a toolchain with Linux headers 3.10 and glibc 2.18. And
 > systemd-importd does not build:

 >     src/import/export-raw.c: In function 'reflink_snapshot':
 >     src/import/export-raw.c:271:26: error: 'O_TMPFILE' undeclared (first use in this function)
 >              new_fd = open(d, O_TMPFILE|O_CLOEXEC|O_NOCTTY|O_RDWR, 0600);
 >                               ^
 >     src/import/export-raw.c:271:26: note: each undeclared identifier is reported only once for each function it appears in
 >     Makefile:16515: recipe for target 'src/import/systemd_export-export-raw.o' failed

 > O_TMPFILE was added in Linux 3.11; glibc added the corresponding
 > definition in glib-2.19.

 >     glibc \ linux   | <= 3.10   | >= 3.11   |
 >     ----------------+-----------+-----------+
 >     <= 2.18         | No        | No*       |
 >> = 2.19         | Yes       | Yes       |

 > *: headers 3.12

 > So, not sure where to go from there...

 > Note: I have not tested uClibc or musl, because,well, systemd depends on
 > glibc...

I would just go for  >= glibc 2.19. People are unlikely to use old glibc
with new kernel headers (and it cannot be built with buildroot).

-- 
Venlig hilsen,
Peter Korsgaard 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11
  2016-07-17  7:02           ` Peter Korsgaard
@ 2016-07-17  7:18             ` Yann E. MORIN
  0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2016-07-17  7:18 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2016-07-17 09:02 +0200, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
>  > So, I built a toolchain with Linux headers 3.10 and glibc 2.18. And
>  > systemd-importd does not build:
> 
>  >     src/import/export-raw.c: In function 'reflink_snapshot':
>  >     src/import/export-raw.c:271:26: error: 'O_TMPFILE' undeclared (first use in this function)
>  >              new_fd = open(d, O_TMPFILE|O_CLOEXEC|O_NOCTTY|O_RDWR, 0600);
>  >                               ^
>  >     src/import/export-raw.c:271:26: note: each undeclared identifier is reported only once for each function it appears in
>  >     Makefile:16515: recipe for target 'src/import/systemd_export-export-raw.o' failed
> 
>  > O_TMPFILE was added in Linux 3.11; glibc added the corresponding
>  > definition in glib-2.19.
> 
>  >     glibc \ linux   | <= 3.10   | >= 3.11   |
>  >     ----------------+-----------+-----------+
>  >     <= 2.18         | No        | No*       |
>  >> = 2.19         | Yes       | Yes       |
> 
>  > *: headers 3.12
> 
>  > So, not sure where to go from there...
> 
>  > Note: I have not tested uClibc or musl, because,well, systemd depends on
>  > glibc...
> 
> I would just go for  >= glibc 2.19. People are unlikely to use old glibc
> with new kernel headers (and it cannot be built with buildroot).

So, should we add GLIBC_AT_LEAST_X_Y symbols?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-17  7:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-10 20:34 [Buildroot] [PATCH] package/systemd: import daemon needs headers >= 3.11 Yann E. MORIN
2016-07-11 19:57 ` Peter Korsgaard
2016-07-11 20:23   ` Yann E. MORIN
2016-07-12  8:47     ` Peter Korsgaard
2016-07-16 12:26       ` Thomas Petazzoni
2016-07-16 18:28         ` Yann E. MORIN
2016-07-17  7:02           ` Peter Korsgaard
2016-07-17  7:18             ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox