Source: libnbd Version: 1.0.0-1 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 libnbd could not be built reproducibly. This is because it shipped a ".pod" generation wrapper that does not respect/use SOURCE_DATE_EPOCH [1]. Patch attached. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/docs/source-date-epoch/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2019-09-06 08:46:15.792081807 +0100 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2019-09-06 + +--- libnbd-1.0.0.orig/podwrapper.pl.in ++++ libnbd-1.0.0/podwrapper.pl.in +@@ -227,7 +227,7 @@ if (!$date && -d $filename) { + $date = $1 if /^(\d+-\d+-\d+)\s/; + } + if (!$date) { +- my ($day, $month, $year) = (localtime)[3,4,5]; ++ my ($day, $month, $year) = (gmtime($ENV{SOURCE_DATE_EPOCH} || time))[3,4,5]; + $date = sprintf ("%04d-%02d-%02d", $year+1900, $month+1, $day); + } + --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2019-09-06 08:46:14.824072014 +0100 @@ -0,0 +1 @@ +reproducible-build.patch