Source: live-build
Version: 1:20151215
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps toolchain
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

I'm working on the "reproducible builds" effort [0]. One first step for
reproducible ISO images is to set --modification-time to xorrisofs:

  \fB--modification-date=YYYYMMDDhhmmsscc\fR
  Set a timestring that overrides ISO image creation and modification timestamps
  literally.
  It must consist of 16 decimal digits which form YYYYMMDDhhmmsscc, with
  YYYY between 1970 and 2999. Time zone is GMT.
  It is supposed to match this GRUB line:
  .br
   search \-\-fs\-uuid \-\-set YYYY\-MM\-DD\-hh\-mm\-ss\-cc
  .br
  E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).

Patch attached that sets it to the value of SOURCE_DATE_EPOCH[1].

 [0] https://wiki.debian.org/ReproducibleBuilds
 [1] https://reproducible-builds.org/specs/source-date-epoch/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso
index d8b1553..c495d81 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)"
+
 LB_PRIMARY_BOOTLOADER=$(echo "${LB_BOOTLOADERS}" | awk -F, '{ print $1 }')
 
 # Handle xorriso architecture specific options
diff --git a/scripts/build/source_iso b/scripts/build/source_iso
index 0a8848d..c280d30 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
 
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to