From 4b28b409a64166946dd9b27b4e56c2d206d958ac Mon Sep 17 00:00:00 2001 From: Raphaƫl Hertzog Date: Mon, 28 Nov 2016 16:20:29 +0100 Subject: Export SOURCE_DATE_EPOCH when running chroot commands Thanks to Chris Lamb for the patch. Closes: #832998 --- debian/changelog | 2 ++ functions/chroot.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6f9f19936..c1d768585 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,8 @@ live-build (1:20160105) UNRELEASED; urgency=medium Thanks to Sjoerd Simons for the patch. * Fix behaviour of (undocumented) "#nif" conditional test. Closes: #801379 Thanks to Erik Cumps for the patch. + * Export SOURCE_DATE_EPOCH when running chroot commands. Closes: #832998 + Thanks to Chris Lamb for the patch. [ Kristian Klausen ] * Include ext{3,4} journal size when calculating image size. Closes: #801712 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 "${?}" -- cgit v1.2.3