[Reproducible-builds] Bug#796527: vserver-debiantools: please make the build reproducible

Dhole dhole at openmailbox.org
Sat Aug 22 11:55:30 UTC 2015


Source: vserver-debiantools
Version: 0.8.1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at 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
-------------- next part --------------
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 <dhole at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150822/ebfa9678/attachment.sig>


More information about the Reproducible-builds mailing list