summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2016-08-01 05:18:56 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-10-31 11:53:30 +0000
commite1cf961bab44eac88f1f93a75cd766e81afeb031 (patch)
treea3d163e1206abf0ffe2c5d49009bc6f2049bad0b
parentMaking config check for https in archive list files silent. (diff)
downloadsystem-build-e1cf961bab44eac88f1f93a75cd766e81afeb031.tar.xz
system-build-e1cf961bab44eac88f1f93a75cd766e81afeb031.zip
Exposing exposes the SOURCE_DATE_EPOCH variable when running scripts inside the chroot, otherwise the chroot operation resets the environment (Closes: #833118).
This is needed to generate reproducible images when using the S_D_E patchset for libisofs and libisoburn. Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xfunctions/chroot.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/functions/chroot.sh b/functions/chroot.sh
index 23c50467d..88c5466b8 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 "${?}"