Source: xtables-addons Version: 2.6-1 Severity: wishlist Tags: patch User: reproducible-builds@lists.alioth.debian.org Usertags: timestamps fileordering
Hi! While working on Debian's “reproducible builds” effort [1], we have noticed that xtables-addons doesn't build reproducibly. The file xtables-addons.tar.bz2 contains timestamps and an unstable file order. The attached patch creates a tarball with a sorted file list and with timestamps set to the date of the last changelog entry. Once applied, xtables-addons can be built reproducibly in our current experimental framework. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/changelog b/debian/changelog index f506cd3..475a2a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xtables-addons (2.6-1.0~reproducible1) UNRELEASED; urgency=low + + * Use last changelog date for timestamps in tar file and + also sort files to get a reproducible order. + + -- Reiner Herrmann <rei...@reiner-h.de> Mon, 02 Feb 2015 20:56:52 +0100 + xtables-addons (2.6-1) unstable; urgency=medium * New upstream version [September 2014]. diff --git a/debian/rules b/debian/rules index 005af1d..af1de4a 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,7 @@ PKD = $(abspath $(dir $(MAKEFILE_LIST))) # Package version pver := $(shell dpkg-parsechangelog -l$(PKD)/changelog | sed -ne 's,^Version: *\([0-9.]*\).*,\1,p') +BUILD_DATE := $(shell dpkg-parsechangelog --show-field=Date) DCFG := debian/xtables-addons-dkms.dkms TMPSRC := debian/temp.src @@ -45,7 +46,7 @@ override_dh_auto_install: $(DCFG) mkdir -p $(SRC_MOD) \ && mv $(TMPSRC) $(SRC_MOD)/xtables-addons \ && cd debian/xtables-addons-source/usr/src \ - && tar cjf xtables-addons.tar.bz2 modules \ + && find modules -print0 | LC_ALL=C sort -z | tar cjf xtables-addons.tar.bz2 --mtime="$(BUILD_DATE)" --no-recursion --null -T - \ && $(RM) -r modules/xtables-addons/debian ## prepare DKMS sources mkdir -p $(SRC_DKMS) \
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