Bug#834735: filepp: please make the output (and build) reproducible

2016-10-17 Thread Chris Lamb
Dear Maintainer,

> Source: filepp
> Version: 1.8.0-3
> Tags: patch

There hasn't seem to be any update on this bug in 59 days, in which
time the Reproducible Builds effort has come on a long way. :)

Would you consider applying this patch and uploading?


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#834735: filepp: please make the output (and build) reproducible

2016-08-18 Thread Chris Lamb
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.0 +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 
+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