summaryrefslogtreecommitdiff
path: root/manpages
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 /manpages
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
Diffstat (limited to 'manpages')
-rwxr-xr-xmanpages/bin/update-version.sh8
1 files changed, 4 insertions, 4 deletions
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..."