Source: python-tuskarclient
Version: 0.1.4-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-tuskarclient doesn't build reproducibly.
It embeds the current date into the manpage.

The attached patch fixes this by using the last 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 91961e1..4ffab30 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,9 @@ UPSTREAM_GIT = git://github.com/openstack/python-tuskarclient.git
 include /usr/share/openstack-pkg-tools/pkgos.make
 export OSLO_PACKAGE_VERSION=$(VERSION)
 
+export LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
+export BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
+
 %:
 	dh $@ --buildsystem=python_distutils --with python2,sphinxdoc
 
@@ -29,13 +32,13 @@ endif
 
 override_dh_sphinxdoc:
 ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
-	sphinx-build -b html doc/source $(CURDIR)/debian/python-tuskarclient-doc/usr/share/doc/python-tuskarclient-doc/html
+	sphinx-build -D today="$(BUILD_DATE)" -b html doc/source $(CURDIR)/debian/python-tuskarclient-doc/usr/share/doc/python-tuskarclient-doc/html
 	dh_sphinxdoc -O--buildsystem=python_distutils
 endif
 
 override_dh_installman:
 ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
-	sphinx-build -b man doc/source doc/man
+	sphinx-build -D today="$(BUILD_DATE)" -b man doc/source doc/man
 	dh_installman -O--buildsystem=python_distutils
 endif
 

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