Source: python-pathlib
Version: 1.0.1-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 Debian's “reproducible builds” effort [1], we have
noticed that python-pathlib doesn't build reproducibly.
It embeds the current date into the manpage.

The attached patch fixes this by using the latest changelog date
as a timestamp that will be embedded.

Regards,
 Reiner

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



diff --git a/debian/rules b/debian/rules
index 7c64264..388ace9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,9 @@
 
 export PYBUILD_NAME=pathlib
 
+LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
+BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
+
 %:
 	dh $@ --with python2,sphinxdoc --buildsystem=pybuild
 
@@ -11,7 +14,7 @@ override_dh_auto_clean:
 
 override_dh_auto_build:
 	dh_auto_build
-	make -C docs html man text
+	make -C docs html man text SPHINXOPTS="-D today=\"$(BUILD_DATE)\""
 
 override_dh_auto_test:
 	PYBUILD_TEST_ARGS="-s $(CURDIR)" dh_auto_test

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