From: Juro Bystricky Date: Thu, 16 Nov 2017 19:48:50 +0000 (-0800) Subject: sudo: improve reproducibility X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~19480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=090eb9efdb2204673b1d569582813ea8860c8570;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Juro Bystricky Signed-off-by: Ross Burton --- diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc index 8c16d837b37..80ec0ae8568 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 " # mksigname/mksiglist are used on build host to generate source files do_compile_prepend () { + # Remove build host references from sudo_usage.h + sed -i \ + -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's,--build=${BUILD_SYS},,g' \ + -e 's,--host=${HOST_SYS},,g' \ + ${B}/src/sudo_usage.h 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 }