Export SOURCE_DATE_EPOCH when running chroot commands

Thanks to Chris Lamb <lamby@debian.org> for the patch.

Closes: #832998
This commit is contained in:
Raphaël Hertzog 2016-11-28 16:20:29 +01:00
parent b8f55caa14
commit 4b28b409a6
2 changed files with 8 additions and 0 deletions

2
debian/changelog vendored
View File

@ -21,6 +21,8 @@ live-build (1:20160105) UNRELEASED; urgency=medium
Thanks to Sjoerd Simons <sjoerd.simons@collabora.co.uk> for the patch.
* Fix behaviour of (undocumented) "#nif" conditional test. Closes: #801379
Thanks to Erik Cumps <erik.cumps@esaturnus.com> for the patch.
* Export SOURCE_DATE_EPOCH when running chroot commands. Closes: #832998
Thanks to Chris Lamb <lamby@debian.org> for the patch.
[ Kristian Klausen ]
* Include ext{3,4} journal size when calculating image size. Closes: #801712

View File

@ -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 "${?}"