summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-08-09 10:48:26 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-16 00:03:15 +0100
commit01d82ea619f7067b10808ae868a6dda65a19f08d (patch)
tree160f3d667a8c0185f4ecb6c2d0b4d556283f7ff9 /meta
parent6fd0e23dbd47bee2cd6debc4c8234375aa0e0e27 (diff)
downloadpoky-01d82ea619f7067b10808ae868a6dda65a19f08d.tar.gz
busybox.inc: improve reproducibility
For reproducible builds do not generate build timestamp as part of the version string. Remove host tools references from .config file. With this patch all eight busybox packages are built as binary reproducible. (From OE-Core rev: fad94cdb02be86b463e691ca2598b393e7875919) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/busybox/busybox.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index b8edd3942c..735b1f6881 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -102,6 +102,9 @@ python () {
102} 102}
103 103
104do_prepare_config () { 104do_prepare_config () {
105 if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
106 export KCONFIG_NOTIMESTAMP=1
107 fi
105 sed -e '/CONFIG_STATIC/d' \ 108 sed -e '/CONFIG_STATIC/d' \
106 < ${WORKDIR}/defconfig > ${S}/.config 109 < ${WORKDIR}/defconfig > ${S}/.config
107 echo "# CONFIG_STATIC is not set" >> .config 110 echo "# CONFIG_STATIC is not set" >> .config
@@ -118,6 +121,7 @@ do_prepare_config () {
118 ${S}/.config.oe-tmp > ${S}/.config 121 ${S}/.config.oe-tmp > ${S}/.config
119 fi 122 fi
120 sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"/' ${S}/.config 123 sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"/' ${S}/.config
124 sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config
121} 125}
122 126
123# returns all the elements from the src uri that are .cfg files 127# returns all the elements from the src uri that are .cfg files
@@ -138,6 +142,9 @@ do_configure () {
138 142
139do_compile() { 143do_compile() {
140 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 144 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
145 if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
146 export KCONFIG_NOTIMESTAMP=1
147 fi
141 if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then 148 if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then
142 # split the .config into two parts, and make two busybox binaries 149 # split the .config into two parts, and make two busybox binaries
143 if [ -e .config.orig ]; then 150 if [ -e .config.orig ]; then