Source: flower
Version: 0.7.0+dfsg-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-CC: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on Debian's “reproducible builds” effort [1], we have
noticed that flower 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 f97276d..aa71972 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,9 @@
 export PYBUILD_NAME=flower
 export PYBUILD_DISABLE_python3=1
 
+LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
+BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
+
 %:
 	dh $@ --with python2 --buildsystem=pybuild
 
@@ -12,7 +15,7 @@ override_dh_auto_clean:
 
 override_dh_auto_build:
 	dh_auto_build
-	make -C docs man
+	make -C docs man SPHINXOPTS="-D today=\"$(BUILD_DATE)\""
 
 override_dh_auto_install:
 	dh_auto_install

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to