Source: jenkins-job-builder
Version: 0.9.0-0.2
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 jenkins-job-builder 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 b054163..0bea5d6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,12 +6,15 @@
 # https://bugs.launchpad.net/openstack-ci/+bug/1322882
 export PBR_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d '-')
 
+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
 
 override_dh_auto_build:
 	dh_auto_build
-	$(MAKE) -C doc html man BUILDDIR=$(CURDIR)/build/docs
+	$(MAKE) -C doc html man BUILDDIR=$(CURDIR)/build/docs SPHINXOPTS="-D today=\"$(BUILD_DATE)\""
 
 override_dh_auto_clean:
 	dh_auto_clean

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to