Bug#952493: xavs2: please make the build reproducible
Source: xavs2
Version: 1.3-1~exp2
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
xavs2 could not be built reproducibly.
Patch attached, although that xavs2 will still vary due to the
embedding the path in calls to assert(...).
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
--- a/debian/patches/1003_reproducible_build.patch 1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/1003_reproducible_build.patch 2020-02-24 15:38:11.940987381 -0800
@@ -0,0 +1,17 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Last-Update: 2020-02-24
+
+--- xavs2-1.3.orig/version.sh
++++ xavs2-1.3/version.sh
+@@ -24,7 +24,9 @@ VER_MAJOR=`echo $(($api / 10))`
+ VER_MINOR=`echo $(($api % 10))`
+
+ # date and time information
+-BUILD_TIME=`date "+%Y-%m-%d %H:%M:%S"`
++DATE_FMT="+%Y-%m-%d %H:%M:%S"
++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
++BUILD_TIME=$(date -u -d "@$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u "$DATE_FMT")
+
+ # generate the file version.h
+ echo "// ===========================================================================" > version.h
--- a/debian/patches/series 2020-02-24 15:30:28.338962779 -0800
--- b/debian/patches/series 2020-02-24 15:38:10.548980153 -0800
@@ -2,3 +2,4 @@
020181225~ffa8095.patch
1001_allow_preseeded_revision.patch
1002_fix_arch_optimizations.patch
+1003_reproducible_build.patch
Reply to: