Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make the build reproducible
Whilst working on the Reproducible Builds effort [0] we noticed
that libnbd could not be built reproducibly.

This is due to it shipping a pod generation wrapper that
does not use/respect SOURCE_DATE_EPOCH [1] and additionally
varies the output depending on the build user's current
timezone.

(This was originally filed in Debian as #939546 [2].)

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/docs/source-date-epoch/
 [2] https://bugs.debian.org/939546

Signed-off-by: Chris Lamb <lamby@debian.org>
  • Loading branch information
lamby authored and rwmjones committed Sep 6, 2019
1 parent 8490694 commit b485ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion podwrapper.pl.in
Expand Up @@ -217,7 +217,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);
}

Expand Down

0 comments on commit b485ade

Please sign in to comment.