All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] expat: fix build on and for kernel older than 3.17
@ 2017-07-17  4:11 Baruch Siach
  2017-07-17  7:07 ` Peter Korsgaard
  2017-07-19 18:43 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Baruch Siach @ 2017-07-17  4:11 UTC (permalink / raw)
  To: buildroot

The expat build system now fails when the getrandom() system call is not
supported. This affect both host and target builds. Define XML_POOR_ENTROPY
for target kernels older than 3.17 to fix the build. For the host package
define XML_POOR_ENTROPY unconditionally since we have no easy way to know the
host kernel version. Note that expat will still use getrandom() on the host
when it is available, we don't make security any worse.

Fixes (host):
http://autobuild.buildroot.net/results/928/928dc2b56d931da84055fdfe78929d1f956de53b/
http://autobuild.buildroot.net/results/ee9/ee90d0a456cbce4c7f22e5f61006612bd9ba30d5/
http://autobuild.buildroot.net/results/dac/dac7231242123ae3dcaa6bbdd65b44fe8d8cb20c/

Fixes (target):
http://autobuild.buildroot.net/results/308/308e830219fdfebb5aa6aef51c1dc784254998f6/
http://autobuild.buildroot.net/results/73f/73fa946b0a2205e946ad414079f88e4bdb416f00/
http://autobuild.buildroot.net/results/9d7/9d7bad22ace7fa211b31d752a2255e07cede68be/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/expat/expat.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/expat/expat.mk b/package/expat/expat.mk
index a10f2c974aa6..60e6d5b9582e 100644
--- a/package/expat/expat.mk
+++ b/package/expat/expat.mk
@@ -15,5 +15,14 @@ HOST_EXPAT_DEPENDENCIES = host-pkgconf
 EXPAT_LICENSE = MIT
 EXPAT_LICENSE_FILES = COPYING
 
+# Kernel versions older than 3.17 do not support getrandom()
+ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17),)
+EXPAT_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DXML_POOR_ENTROPY"
+endif
+
+# Make build succeed on host kernel older than 3.17. getrandom() will still
+# be used on newer kernels.
+HOST_EXPAT_CONF_ENV += CPPFLAGS=-DXML_POOR_ENTROPY
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.13.2

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

* [Buildroot] [PATCH] expat: fix build on and for kernel older than 3.17
  2017-07-17  4:11 [Buildroot] [PATCH] expat: fix build on and for kernel older than 3.17 Baruch Siach
@ 2017-07-17  7:07 ` Peter Korsgaard
  2017-07-19 18:43 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2017-07-17  7:07 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > The expat build system now fails when the getrandom() system call is not
 > supported. This affect both host and target builds. Define XML_POOR_ENTROPY
 > for target kernels older than 3.17 to fix the build. For the host package
 > define XML_POOR_ENTROPY unconditionally since we have no easy way to know the
 > host kernel version. Note that expat will still use getrandom() on the host
 > when it is available, we don't make security any worse.

 > Fixes (host):
 > http://autobuild.buildroot.net/results/928/928dc2b56d931da84055fdfe78929d1f956de53b/
 > http://autobuild.buildroot.net/results/ee9/ee90d0a456cbce4c7f22e5f61006612bd9ba30d5/
 > http://autobuild.buildroot.net/results/dac/dac7231242123ae3dcaa6bbdd65b44fe8d8cb20c/

 > Fixes (target):
 > http://autobuild.buildroot.net/results/308/308e830219fdfebb5aa6aef51c1dc784254998f6/
 > http://autobuild.buildroot.net/results/73f/73fa946b0a2205e946ad414079f88e4bdb416f00/
 > http://autobuild.buildroot.net/results/9d7/9d7bad22ace7fa211b31d752a2255e07cede68be/

 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 > ---
 >  package/expat/expat.mk | 9 +++++++++
 >  1 file changed, 9 insertions(+)

 > diff --git a/package/expat/expat.mk b/package/expat/expat.mk
 > index a10f2c974aa6..60e6d5b9582e 100644
 > --- a/package/expat/expat.mk
 > +++ b/package/expat/expat.mk
 > @@ -15,5 +15,14 @@ HOST_EXPAT_DEPENDENCIES = host-pkgconf
 >  EXPAT_LICENSE = MIT
 >  EXPAT_LICENSE_FILES = COPYING
 
 > +# Kernel versions older than 3.17 do not support getrandom()
 > +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17),)
 > +EXPAT_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DXML_POOR_ENTROPY"
 > +endif
 > +
 > +# Make build succeed on host kernel older than 3.17. getrandom() will still
 > +# be used on newer kernels.
 > +HOST_EXPAT_CONF_ENV += CPPFLAGS=-DXML_POOR_ENTROPY

Committed after changing this to also pass HOST_CPPFLAGS, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] expat: fix build on and for kernel older than 3.17
  2017-07-17  4:11 [Buildroot] [PATCH] expat: fix build on and for kernel older than 3.17 Baruch Siach
  2017-07-17  7:07 ` Peter Korsgaard
@ 2017-07-19 18:43 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2017-07-19 18:43 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > The expat build system now fails when the getrandom() system call is not
 > supported. This affect both host and target builds. Define XML_POOR_ENTROPY
 > for target kernels older than 3.17 to fix the build. For the host package
 > define XML_POOR_ENTROPY unconditionally since we have no easy way to know the
 > host kernel version. Note that expat will still use getrandom() on the host
 > when it is available, we don't make security any worse.

 > Fixes (host):
 > http://autobuild.buildroot.net/results/928/928dc2b56d931da84055fdfe78929d1f956de53b/
 > http://autobuild.buildroot.net/results/ee9/ee90d0a456cbce4c7f22e5f61006612bd9ba30d5/
 > http://autobuild.buildroot.net/results/dac/dac7231242123ae3dcaa6bbdd65b44fe8d8cb20c/

 > Fixes (target):
 > http://autobuild.buildroot.net/results/308/308e830219fdfebb5aa6aef51c1dc784254998f6/
 > http://autobuild.buildroot.net/results/73f/73fa946b0a2205e946ad414079f88e4bdb416f00/
 > http://autobuild.buildroot.net/results/9d7/9d7bad22ace7fa211b31d752a2255e07cede68be/

 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Committed to 2017.02.x and 2017.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2017-07-19 18:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17  4:11 [Buildroot] [PATCH] expat: fix build on and for kernel older than 3.17 Baruch Siach
2017-07-17  7:07 ` Peter Korsgaard
2017-07-19 18:43 ` Peter Korsgaard

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.