summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2016-11-28 16:29:06 +0100
committerRaphaël Hertzog <hertzog@debian.org>2016-11-28 20:58:19 +0100
commit822459c7b25589f4065c25bcd8b3ab440ae0e4cd (patch)
treed28c88676dfb4bc9730e8ab82ca34779a5aa4006
parent4b28b409a64166946dd9b27b4e56c2d206d958ac (diff)
downloadvyos-live-build-822459c7b25589f4065c25bcd8b3ab440ae0e4cd.tar.gz
vyos-live-build-822459c7b25589f4065c25bcd8b3ab440ae0e4cd.zip
Set xorriso's "modification time" to SOURCE_DATE_EPOCH
Thanks to Chris Lamb <lamby@debian.org> for the patch. Closes: #831379
-rw-r--r--debian/changelog2
-rwxr-xr-xscripts/build/binary_iso3
-rwxr-xr-xscripts/build/source_iso3
3 files changed, 8 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index c1d768585..d0adf37a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ live-build (1:20160105) UNRELEASED; urgency=medium
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.
+ * Set xorriso's "modification time" to SOURCE_DATE_EPOCH. Closes: #831379
+ Thanks to Chris Lamb <lamby@debian.org> for the patch.
[ Kristian Klausen ]
* Include ext{3,4} journal size when calculating image size. Closes: #801712
diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso
index d4a872eb2..2b381622a 100755
--- a/scripts/build/binary_iso
+++ b/scripts/build/binary_iso
@@ -107,6 +107,9 @@ then
XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
fi
+# Set an explicit modification date
+XORRISO_OPTIONS="${XORRISO_OPTIONS} --modification-date=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d%H%m%S00)"
+
OLDIFS="$IFS"
IFS=","
BOOTLOADER_NUMBER=0
diff --git a/scripts/build/source_iso b/scripts/build/source_iso
index 0a8848d53..c280d30be 100755
--- a/scripts/build/source_iso
+++ b/scripts/build/source_iso
@@ -98,6 +98,9 @@ then
XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
fi
+# Set an explicit modification date
+XORRISO_OPTIONS="${XORRISO_OPTIONS} --modification-date=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d%H%m%S00)"
+
# Moving image
mv source chroot