[arch-releng] [PATCH 6/7] [mkarchiso] Force all ISO timestamps to SOURCE_DATE_EPOCH if present
Daniel Edgecumbe
git at esotericnonsense.com
Sat Sep 7 11:22:39 UTC 2019
xorrisofs respects SOURCE_DATE_EPOCH but only for its' own
generated fields. We need to replace all other timestamps.
Motivation: https://reproducible-builds.org
Signed-off-by: Daniel Edgecumbe <git at esotericnonsense.com>
---
archiso/mkarchiso | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 383a967..59fa9c4 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -307,7 +307,12 @@ command_iso () {
if [[ ${quiet} == "y" ]]; then
_qflag="-quiet"
fi
+ local _rflag=""
+ if [[ ${SOURCE_DATE_EPOCH:-} ]]; then
+ _rflag="--set_all_file_dates $(date --utc --date="@${SOURCE_DATE_EPOCH}" +%Y%m%d%H%m%S00)"
+ fi
xorriso -as mkisofs ${_qflag} \
+ ${_rflag} \
-iso-level 3 \
-full-iso9660-filenames \
-volid "${iso_label}" \
--
2.23.0
More information about the arch-releng
mailing list