summaryrefslogtreecommitdiff
path: root/functions/chroot.sh
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2016-11-28 16:20:29 +0100
committerRaphaël Hertzog <hertzog@debian.org>2016-11-28 20:58:19 +0100
commit4b28b409a64166946dd9b27b4e56c2d206d958ac (patch)
tree2aea50ab27c955f508744791f532e35d3f107e18 /functions/chroot.sh
parentb8f55caa144ae4761e6c69d577a0cd33bfec4961 (diff)
downloadvyos-live-build-4b28b409a64166946dd9b27b4e56c2d206d958ac.tar.gz
vyos-live-build-4b28b409a64166946dd9b27b4e56c2d206d958ac.zip
Export SOURCE_DATE_EPOCH when running chroot commands
Thanks to Chris Lamb <lamby@debian.org> for the patch. Closes: #832998
Diffstat (limited to 'functions/chroot.sh')
-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 "${?}"