From 1f1dce740ec271b21d88fcad7c7b40ea2e57a2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Mon, 20 Nov 2017 22:03:38 +0100 Subject: [PATCH] Use $SOURCE_DATE_EPOCH when updating timestamps of manual pages This makes the package reproducible at build time. Closes: #879169 --- debian/changelog | 8 ++++++++ manpages/bin/update-version.sh | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 544297f6f..81dee65c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +live-build (1:20170921) UNRELEASED; urgency=medium + + * Use $SOURCE_DATE_EPOCH when updating timestamps of manual pages in order + to make the package reproducible at build time. Closes: #879169 + Thanks to Chris Lamb for the patch. + + -- Raphaƫl Hertzog Mon, 20 Nov 2017 22:02:22 +0100 + live-build (1:20170920) unstable; urgency=medium * Auto-update version strings in manual pages. diff --git a/manpages/bin/update-version.sh b/manpages/bin/update-version.sh index d1d699429..53c440be9 100755 --- a/manpages/bin/update-version.sh +++ b/manpages/bin/update-version.sh @@ -13,11 +13,11 @@ set -e PROGRAM="LIVE\\\-BUILD" VERSION="$(cd .. && dpkg-parsechangelog -S Version)" -DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)" +DATE="$(LC_ALL=C date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y\\\\-%m\\\\-%d)" -DAY="$(LC_ALL=C date +%d)" -MONTH="$(LC_ALL=C date +%m)" -YEAR="$(LC_ALL=C date +%Y)" +DAY="$(LC_ALL=C date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%d)" +MONTH="$(LC_ALL=C date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%m)" +YEAR="$(LC_ALL=C date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)" echo "Updating version headers..."