[OE-core] [PATCH 1/4] gnutls: improve reproducibility

Juro Bystricky juro.bystricky at intel.com
Thu Nov 16 19:48:47 UTC 2017


Sanitize generated config.h containing build host reference such as:

 #define POSIX_SHELL "<builddir>/tmp/hosttools/bash"

The path for POSIX_SHELL is not only wrong for the cross-compiled target,
it also prevents reproducible build.

Prior the compilation we edit the value to:

 #define POSIX_SHELL "bash"

With this change we can build reproducible libgnutls-bin, libgnutls-dev
and libgnutls-dbg packages.

Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
---
 meta/recipes-support/gnutls/gnutls.inc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
index 29b5dd6..5b45b27 100644
--- a/meta/recipes-support/gnutls/gnutls.inc
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -53,6 +53,11 @@ do_configure_prepend() {
 	done
 }
 
+do_configure_append_class-target () {
+	# Remove build host references from config.h
+	sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${B}/config.h
+}
+
 PACKAGES =+ "${PN}-openssl ${PN}-xx"
 
 FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
-- 
2.7.4




More information about the Openembedded-core mailing list