Bug#896867: ccextractor: please make the build reproducible

Chris Lamb lamby at debian.org
Wed Apr 25 08:04:06 BST 2018


Source: ccextractor
Version: 0.86+ds1-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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

This is because it includes the current date/time in the build.

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	2018-04-25 07:58:01.011031475 +0100
@@ -0,0 +1,26 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2018-04-25
+
+--- ccextractor-0.86+ds1.orig/linux/pre-build.sh
++++ ccextractor-0.86+ds1/linux/pre-build.sh
+@@ -21,7 +21,7 @@ fi
+ if [ -z "$commit" ]; then
+ 	commit="Unknown"
+ fi
+-builddate=`date +%Y-%m-%d`
++builddate=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
+ echo "Storing variables in file"
+ echo "Commit: $commit"
+ echo "Date: $builddate"
+--- ccextractor-0.86+ds1.orig/mac/pre-build.sh
++++ ccextractor-0.86+ds1/mac/pre-build.sh
+@@ -21,7 +21,7 @@ fi
+ if [ -z "$commit" ]; then
+ 	commit="Unknown"
+ fi
+-builddate=`date +%Y-%m-%d`
++builddate=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
+ echo "Storing variables in file"
+ echo "Commit: $commit"
+ echo "Date: $builddate"
--- a/debian/patches/series	2018-04-25 07:51:21.713199062 +0100
--- b/debian/patches/series	2018-04-25 07:58:00.003026811 +0100
@@ -4,3 +4,4 @@
 use-correct-name-in-prebuild.patch
 fix-number-version.patch
 fix-typo.patch
+reproducible-build.patch


More information about the Reproducible-bugs mailing list