Source: ccze Version: 0.2.1-2 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 the “reproducible builds” effort [1], we have noticed that ccze could not be built reproducibly. The attached patch sets the mtimes of all files which are modified during the built to the date of the last changelog entry in order to produce files with reproducible metadata. Cheers, akira [1]: https://wiki.debian.org/ReproducibleBuilds
diff -u ccze-0.2.1/debian/changelog ccze-0.2.1/debian/changelog --- ccze-0.2.1/debian/changelog +++ ccze-0.2.1/debian/changelog @@ -1,3 +1,10 @@ +ccze (0.2.1-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix mtimes before building binary packages to produce reproducible output + + -- akira <marival...@gmail.com> Thu, 16 Jul 2015 23:52:43 +0200 + ccze (0.2.1-2) unstable; urgency=low * Add myself as Maintainer, as Gergely seems to be MIA diff -u ccze-0.2.1/debian/rules ccze-0.2.1/debian/rules --- ccze-0.2.1/debian/rules +++ ccze-0.2.1/debian/rules @@ -8,6 +8,7 @@ CFLAGS ?= -g BGT := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) HGT := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) ifneq (,$(findstring noopt,${DEB_BUILD_OPTIONS})) CFLAGS += -O0 @@ -81,6 +82,9 @@ ## Generate DEBIAN/control dpkg-gencontrol -isp -p${PACKAGE} -Tdebian/${PACKAGE}.substvars \ -P${PKGDIR} +## Fix mtimes before building binary packages + find ${PKGDIR} -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' ## Build the binary package dpkg --build ${PKGDIR} ..
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds