[Reproducible-builds] Bug#834957: flashrom: please make the build reproducible

Chris Lamb lamby at debian.org
Sat Aug 20 23:34:08 UTC 2016


Source: flashrom
Version: 0.9.9+r1954-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], I noticed
that flashrom could not be built reproducibly.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible_build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible_build.patch	2016-08-21 00:31:50.946279306 +0100
@@ -0,0 +1,17 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-08-21
+
+--- flashrom-0.9.9+r1954.orig/util/getrevision.sh
++++ flashrom-0.9.9+r1954/util/getrevision.sh
+@@ -116,7 +116,9 @@ timestamp() {
+ 	# freebsd	date [-jnu]  [-d dst] [-r seconds] [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] [...]
+ 	# dragonflybsd	date [-jnu]  [-d dst] [-r seconds] [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] [...]
+ 	# openbsd	date [-aju]  [-d dst] [-r seconds] [+format] [[[[[[cc]yy]mm]dd]HH]MM[.SS]] [...]
+-	if svn_is_file_tracked "$2" ; then
++	if [ -n "$SOURCE_DATE_EPOCH" ] ; then
++		t=$(date -u -d "@$SOURCE_DATE_EPOCH" "$1")
++	elif svn_is_file_tracked "$2" ; then
+ 		if svn_has_local_changes "$2"; then
+ 			t=$(date -u "$1")
+ 		else
--- a/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series	2016-08-21 00:19:29.846542413 +0100
@@ -0,0 +1 @@
+reproducible_build.patch


More information about the Reproducible-builds mailing list