patch from Reiner Herrman clamping man page date to latest changelog entry
authorBdale Garbee <bdale@gag.com>
Sun, 23 Aug 2015 17:37:39 +0000 (19:37 +0200)
committerBdale Garbee <bdale@gag.com>
Sun, 23 Aug 2015 17:37:39 +0000 (19:37 +0200)
debian/changelog
debian/rules
debian/tarman

index f3816b35b32294dc76bb61e4232ce08fd8df7d0c..23f86dc68c9bbe60ea4cc890042bee1c6ddca31c 100644 (file)
@@ -1,3 +1,10 @@
+tar (1.27.1-2.0~reproducible1) UNRELEASED; urgency=low
+
+  * Set timestamp in generated manpage to latest changelog date
+    to make building the package reproducible.
+
+ -- Reiner Herrmann <reiner@reiner-h.de>  Sat, 03 Jan 2015 02:30:39 +0100
+
 tar (1.27.1-2) unstable; urgency=low
 
   * patch from David Gilman adds watch file with signature verification, 
index 8adc9887943d67aca801430f85ba31df790a0469..28c6dedb22faac463e440e8d90ba4e5f17c045db 100755 (executable)
@@ -11,6 +11,8 @@ CFLAGS += -Wall
 LDFLAGS += `dpkg-buildflags --get LDFLAGS`
 CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
+export BUILD_DATE = $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p')
+
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   MAKEFLAGS += -j$(NUMJOBS)
index 70169311191018dfb5dc1ea131b86b509a2798ea..10928a356349b8230fa22b6b59a8c6e2d87fe3fc 100644 (file)
@@ -4,9 +4,10 @@
 #
 
 use strict;
+use POSIX qw(strftime);
 
-my $t = "".localtime(time);
-my $datestr = substr($t,4,3)." ".substr($t,8,2).", ".substr($t,20,4);
+my $t = $ENV{'BUILD_DATE'} // strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time));
+my $datestr = substr($t,8,3)." ".substr($t,5,2).", ".substr($t,12,4);
 
 @ARGV=qw(src/tar.c);
 my $mode;