Source: sgmltools-lite Version: 3.0.3.0.cvs.20010909-17 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 the “reproducible builds” effort [1], we have noticed that sgmltools-lite 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. Please also consider this other bug from the reproducible builds team: https://bugs.debian.org/777011 Cheers, akira [1]: https://wiki.debian.org/ReproducibleBuilds
diff -u sgmltools-lite-3.0.3.0.cvs.20010909/debian/rules sgmltools-lite-3.0.3.0.cvs.20010909/debian/rules --- sgmltools-lite-3.0.3.0.cvs.20010909/debian/rules +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/rules @@ -9,6 +9,8 @@ PKGMANDIR=$(PKGDIR)/usr/share/man/$(PKG) DBIMAGEDIR=usr/share/sgml/docbook/stylesheet/dsssl/modular/images/ +export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s) + configure: configure-stamp configure-stamp: sh debian/common/checkdir.sh @@ -141,6 +143,8 @@ dpkg-gencontrol -isp -P$(PKGDIR) (cd $(PKGDIR) >/dev/null && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum >DEBIAN/md5sums) if [ -z $(PKGDIR)/DEBIAN/md5sums ]; then rm -f $(PKGDIR)/DEBIAN/md5sums; else chmod 644 $(PKGDIR)/DEBIAN/md5sums; chown 0.0 $(PKGDIR)/DEBIAN/md5sums; fi + find $(PKGDIR) -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \ + xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH" dpkg --build $(PKGDIR) ../ diff -u sgmltools-lite-3.0.3.0.cvs.20010909/debian/changelog sgmltools-lite-3.0.3.0.cvs.20010909/debian/changelog --- sgmltools-lite-3.0.3.0.cvs.20010909/debian/changelog +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/changelog @@ -1,3 +1,10 @@ +sgmltools-lite (3.0.3.0.cvs.20010909-18) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix mtimes before building binary packages to produce reproducible output + + -- akira <marival...@gmail.com> Sun, 26 Jul 2015 09:43:37 +0200 + sgmltools-lite (3.0.3.0.cvs.20010909-17) unstable; urgency=low * QA upload.
signature.asc
Description: OpenPGP digital signature