Source: live-build Version: 1:20151215 Severity: wishlist Tags: patch X-Debbugs-Cc: reproducible-bui...@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 `. `'` la...@debian.org / chris-lamb.co.uk `-
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 "${?}"