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

Bug#980295: davs2: please make the build reproducible



Source: davs2
Version: 1.6-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
davs2 could not be built reproducibly.

This is because it embeds the build time via the XBUILD_TIME macro. A
patch is attached that uses SOURCE_DATE_EPOCH [1].

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/1003_reproducible_build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/1003_reproducible_build.patch	2021-01-17 12:50:09.947620440 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Last-Update: 2021-01-17
+
+--- davs2-1.6.orig/version.sh
++++ davs2-1.6/version.sh
+@@ -24,7 +24,7 @@ VER_MAJOR=`echo $(($api / 10))`
+ VER_MINOR=`echo $(($api % 10))`
+ 
+ # date and time information
+-BUILD_TIME=`date "+%Y-%m-%d %H:%M:%S"`
++BUILD_TIME=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S"`
+ 
+ # generate the file version.h
+ echo "// ==========================================================================="  > version.h
--- a/debian/patches/series	2021-01-17 12:45:19.141640553 +0000
--- b/debian/patches/series	2021-01-17 12:50:08.675611780 +0000
@@ -4,3 +4,4 @@
 020181224~5645e27.patch
 1001_allow_preseeded_revision.patch
 1002_fix_arch_optimizations.patch
+1003_reproducible_build.patch

Reply to: