Package: txt2man
Version: 1.5.5-2
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps

txt2man embeds a timestamp in its own manuals which is, by default, the current
date. This makes builds deterministic.

The attached patch parses debian/changelog to find the date of the current
package version and passes that to the call to txt2man instead.

For hopefully obvious reasons this is not suitable for inclusion upstream since
it relies on dpkg-parsechangelog.


-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (500, 
'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Subject: reproducible builds
 Use the date of the latest entry in debian/changelog for the date headers
 in man pages, so that builds are reproducible.
Author: Jonathan Wiltshire <j...@debian.org>
Forwarded: not-needed
Last-Update: 2015-04-12

--- txt2man-1.5.6.orig/Makefile
+++ txt2man-1.5.6/Makefile
@@ -1,6 +1,7 @@
 # Makefile
 prefix ?= $(DESTDIR)/usr
 version = txt2man-1.5.6
+date = $(shell dpkg-parsechangelog -c1 -S date | date +"%b %d %Y" -f -)
 BIN = src2man bookman txt2man
 MAN1 = src2man.1 txt2man.1 bookman.1
 
@@ -14,7 +15,7 @@
 clean:
 	rm -f *.1 *.txt *.ps *.pdf *.html
 
-%.1:%.txt; ./txt2man -s 1 -t $* -r $(version) $< > $@
+%.1:%.txt; ./txt2man -s 1 -t $* -r $(version) -d "$(date)" $< > $@
 %.txt:%; ./$< -h 2>&1 > $@
 %.html:%.1; rman -f HTML $< > $@
 %.ps:%.1; groff -man $< > $@
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to