[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#879169: live-build: please make the build reproducible



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

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that live-build could not be built reproducibly.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
--- a/manpages/bin/update-version.sh	2017-10-19 19:56:06.157097181 -0400
--- b/manpages/bin/update-version.sh	2017-10-19 20:05:31.212431783 -0400
@@ -13,11 +13,11 @@
 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..."
 

Reply to: