summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2017-11-20 22:03:38 +0100
committerRaphaël Hertzog <hertzog@debian.org>2017-11-20 22:04:35 +0100
commit1f1dce740ec271b21d88fcad7c7b40ea2e57a2d2 (patch)
tree9b5cc076068185068fbf25f98957d75615c5223c
parentee3e8be5b79d9aa6504e2f5b38c1f88e31a769f3 (diff)
downloadvyos-live-build-1f1dce740ec271b21d88fcad7c7b40ea2e57a2d2.tar.gz
vyos-live-build-1f1dce740ec271b21d88fcad7c7b40ea2e57a2d2.zip
Use $SOURCE_DATE_EPOCH when updating timestamps of manual pages
This makes the package reproducible at build time. Closes: #879169
-rw-r--r--debian/changelog8
-rwxr-xr-xmanpages/bin/update-version.sh8
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 <lamby@debian.org> for the patch.
+
+ -- Raphaël Hertzog <hertzog@debian.org> 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..."