Skip to contentSkip to conversation

icu-dbg: improve reproducibility

PATCH Superseded Juro Bystricky 2 participants 4 messages Jan 7, 2018 – Jan 8, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 icu-dbg: improve reproducibility

Make sure build host references do not end up being compiled in the image. This only affects libicutu and icu-dbg.

---
 meta/recipes-support/icu/icu.inc | 9 +++++++++
 1 file changed, 9 insertions(+)
meta/recipes-support/icu/icu.inc +9 -0
index 3fb16b0..5cf7b11 100644
@@ -38,6 +38,15 @@ do_configure_prepend_libc-musl () {
     sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' ${S}/configure.ac
 }
 
+do_compile_prepend_class-target () {
+	# Make sure certain build host references do not end up being compiled
+	# in the image. This only affects libicutu and icu-dbg
+	sed  \
+	    -e 's,DU_BUILD=,DU_BUILD_unused=,g' \
+	    -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -i ${B}/tools/toolutil/Makefile
+}
+
 PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
 do_install_append_class-native() {
 	mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 icu-dev: improve reproducibility

Remove all build host references from several distributed files:
Makefile.inc, icu-config, pkgdata.inc

---
 meta/recipes-support/icu/icu.inc | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-support/icu/icu.inc +8 -0
index 5cf7b11..c41ea8a 100644
@@ -64,6 +64,14 @@ do_install_append_class-target() {
         rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
         icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
     fi
+	
+	# Remove build host references...
+	sed -i  \
+	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    ${D}/usr/bin/icu-config ${D}/usr/lib/icu/${PV}/Makefile.inc \
+	    ${D}/usr/lib/icu/${PV}/pkgdata.inc
 }
 
 PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 2/2] icu-dev: improve reproducibility

Quoted 28 lines · Juro Bystricky

Remove all build host references from several distributed files:
Makefile.inc, icu-config, pkgdata.inc

---
 meta/recipes-support/icu/icu.inc | 8 ++++++++

 1 file changed, 8 insertions(+)
meta/recipes- renamed from meta/recipes-support/icu/icu.inc +0 -0

support/icu/icu.inc
index 5cf7b11..c41ea8a 100644

meta/recipes-support/icu/icu.inc +0 -0
@@ -64,6 +64,14 @@ do_install_append_class-target() {

         rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat fi

meta/recipes-support/icu/icu.inc +7 -0
+	
+	# Remove build host references...
+	sed -i  \
+	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    ${D}/usr/bin/icu-config

${D}/usr/lib/icu/${PV}/Makefile.inc \

meta/recipes-support/icu/icu.inc +1 -0
+	    ${D}/usr/lib/icu/${PV}/pkgdata.inc
Quoted 3 lines

 }

 PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"

Hardcoded /usr/lib?

https://autobuilder.yocto.io/builders/nightly-multilib/builds/703/steps/BuildImages_2/logs/stdio

Cheers,

Richard