[Reproducible-builds] Bug#832998: live-build: please expose SOURCE_DATE_EPOCH when running chroot commands
Chris Lamb
lamby at debian.org
Sat Jul 30 17:11:24 UTC 2016
Source: live-build
Version: 1:20151215
Severity: wishlist
Tags: patch
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Hi,
The attached patch exposes the SOURCE_DATE_EPOCH variable when running
scripts inside the chroot, otherwise the chroot operation resets the
environment.
This is needed to generate reproducible images when using the S_D_E
patchset for libisofs and libisoburn.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
diff --git a/functions/chroot.sh b/functions/chroot.sh
index 23c5046..88c5466 100755
--- a/functions/chroot.sh
+++ b/functions/chroot.sh
@@ -26,6 +26,12 @@ Chroot ()
fi
done
+ # Only pass SOURCE_DATE_EPOCH if its already set
+ if [ "${SOURCE_DATE_EPOCH:-}" != "" ]
+ then
+ ENV="${ENV} SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
+ fi
+
${_LINUX32} chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" DEBIAN_FRONTEND="${LB_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LB_DEBCONF_PRIORITY}" DEBCONF_NONINTERACTIVE_SEEN="true" DEBCONF_NOWARNINGS="true" ${ENV} ${COMMANDS}
return "${?}"
More information about the Reproducible-builds
mailing list