summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-11-16 11:48:50 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-30 10:49:21 +0000
commit4f2b00b67373aed2029b11f1753b0c59107d27fb (patch)
treeca1b220a997a6fbef5df0a37f5ca766e5a28891e
parent3a344df89a176ff29cf23b615fdf8a25526c44ec (diff)
downloadpoky-4f2b00b67373aed2029b11f1753b0c59107d27fb.tar.gz
sudo: improve reproducibility
Delete various build host references from the internally generated file sudo_usage.h. The references get compiled into executables, which leads to non-reproducible builds. The removed references (configure options) were only used as part of the sudo "usage", and even then only when ran as root. (From OE-Core rev: 090eb9efdb2204673b1d569582813ea8860c8570) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/sudo/sudo.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
index 8c16d837b3..80ec0ae856 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -27,6 +27,12 @@ EXTRA_OECONF_append_libc-musl = " --disable-hardening "
27 27
28# mksigname/mksiglist are used on build host to generate source files 28# mksigname/mksiglist are used on build host to generate source files
29do_compile_prepend () { 29do_compile_prepend () {
30 # Remove build host references from sudo_usage.h
31 sed -i \
32 -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
33 -e 's,--build=${BUILD_SYS},,g' \
34 -e 's,--host=${HOST_SYS},,g' \
35 ${B}/src/sudo_usage.h
30 oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C lib/util mksigname mksiglist 36 oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C lib/util mksigname mksiglist
31} 37}
32 38