Source: knot-resolver
Version: 5.2.0-2
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
knot-resolver could not be built reproducibly. Patch attached that uses
SOURCE_DATE_EPOCH to populate its manpages.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/0002-reproducible-build.patch      1970-01-01 
01:00:00.000000000 +0100
--- b/debian/patches/0002-reproducible-build.patch      2020-12-08 
10:56:45.766248348 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2020-12-08
+
+--- knot-resolver-5.2.0.orig/scripts/get-date.sh
++++ knot-resolver-5.2.0/scripts/get-date.sh
+@@ -8,7 +8,7 @@ DATE=$(head -n1 < NEWS | sed 's/.*(\(.*\
+ 
+ if [[ $? -ne 0 ]]; then
+     # or use last modification time of NEWS (dev versions)
+-    DATE=$(date -u -r NEWS +%F)
++    DATE=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date -r NEWS +%s)}" +%F)
+ fi
+ 
+ echo -n $DATE
--- a/debian/patches/series     2020-12-08 10:48:22.619122179 +0000
--- b/debian/patches/series     2020-12-08 10:56:44.842235485 +0000
@@ -1 +1,2 @@
 0001-fix-map-command-on-32-bit-platforms-regressed-in-5.2.patch
+0002-reproducible-build.patch

Reply via email to