Source: vserver-debiantools
Version: 0.8.1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that vserver-debiantools could not be built reproducibly.

The attached patch sets the embedded date in the man pages generated by
podman to the latest debian/changelog entry timestamp instead of local
date. Once applied, vserver-debiantools can be built reproducibly in our
current experimental framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds


Regards,
-- 
Dhole
diff -Nru vserver-debiantools-0.8.1/debian/changelog 
vserver-debiantools-0.8.1+nmu1/debian/changelog
--- vserver-debiantools-0.8.1/debian/changelog  2011-08-02 08:00:05.000000000 
+0200
+++ vserver-debiantools-0.8.1+nmu1/debian/changelog     2015-08-21 
17:35:47.000000000 +0200
@@ -1,3 +1,11 @@
+vserver-debiantools (0.8.1+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Replace date embedded in man pages by the latest debian/changelog entry
+    timestamp to make the package build reproducibly.
+
+ -- Eduard Sanou <dh...@openmailbox.org>  Fri, 21 Aug 2015 17:35:14 +0200
+
 vserver-debiantools (0.8.1) unstable; urgency=low
 
   * Debian is spelled with a capital D. Closes: #627624.
diff -Nru vserver-debiantools-0.8.1/debian/rules 
vserver-debiantools-0.8.1+nmu1/debian/rules
--- vserver-debiantools-0.8.1/debian/rules      2009-04-21 06:52:32.000000000 
+0200
+++ vserver-debiantools-0.8.1+nmu1/debian/rules 2015-08-21 17:35:01.000000000 
+0200
@@ -6,7 +6,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-
+export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 
-SDate)" +%s)
 
 
 CFLAGS = -Wall -g
diff -Nru vserver-debiantools-0.8.1/Makefile 
vserver-debiantools-0.8.1+nmu1/Makefile
--- vserver-debiantools-0.8.1/Makefile  2009-04-21 06:52:32.000000000 +0200
+++ vserver-debiantools-0.8.1+nmu1/Makefile     2015-08-21 17:34:29.000000000 
+0200
@@ -1,5 +1,11 @@
 MANFILES=newvserver.1 newnfsvserver.1 dupvserver.1 stripserver.1
 
+ifdef SOURCE_DATE_EPOCH
+    POD_DATE  ?= $$(date -u -d @${SOURCE_DATE_EPOCH})
+else
+    POD_DATE  ?= $$(LANG=C date")
+endif
+
 all: build-man
 
 build-man: $(MANFILES)
@@ -7,25 +13,25 @@
 newvserver.1: newvserver.pod
        pod2man --section=1 \
                 --release="Vserver " \
-                --date="`LANG=C date`" \
+                --date="$(POD_DATE)" \
                 $^ > $@
 
 newnfsvserver.1: newnfsvserver.pod
        pod2man --section=1 \
                 --release="Vserver " \
-                --date="`LANG=C date`" \
+                --date="$(POD_DATE)" \
                 $^ > $@
 
 dupvserver.1: dupvserver.pod
        pod2man --section=1 \
                 --release="Vserver " \
-                --date="`LANG=C date`" \
+                --date="$(POD_DATE)" \
                 $^ > $@
 
 stripserver.1: stripserver.pod
        pod2man --section=1 \
                 --release="Vserver " \
-                --date="`LANG=C date`" \
+                --date="$(POD_DATE)" \
                 $^ > $@
 
 install: install-sbin install-man install-conf install-var

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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