Source: filepp Version: 1.8.0-4 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps toolchain X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], I noticed that filepp generates unreproducible output. Patch attached that uses SOURCE_DATE_EPOCH[1] when set. This also makes the build of filepp itself reproducible. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/specs/source-date-epoch/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/02-reproducible-output-and-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/02-reproducible-output-and-build.patch 2016-08-18 13:55:58.353514045 +0100 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2016-08-18 + +--- filepp-1.8.0.orig/filepp.in ++++ filepp-1.8.0/filepp.in +@@ -222,7 +222,7 @@ GenerateDefinesKeys(); + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); + #prepare standard defines + my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isbst) = +- localtime(time()); ++ defined($ENV{SOURCE_DATE_EPOCH}) ? gmtime($ENV{SOURCE_DATE_EPOCH}) : localtime(time()); + $year += 1900; + $sec = sprintf("%02d", $sec); + $min = sprintf("%02d", $min); --- a/debian/patches/series 2016-08-18 13:47:56.517074297 +0100 --- b/debian/patches/series 2016-08-18 13:53:36.740219216 +0100 @@ -1 +1,2 @@ 01-manpage-fixup.patch +02-reproducible-output-and-build.patch