Source: angband-doc
Version: 3.0.3.5
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 angband-doc 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. Once applied, angband-doc can
be built reproducibly in our current experimental framework.


Cheers,
akira

[1]: https://wiki.debian.org/ReproducibleBuilds



diff -Nru angband-doc-3.0.3.5/debian/changelog 
angband-doc-3.0.3.5+nmu1/debian/changelog
--- angband-doc-3.0.3.5/debian/changelog        2009-06-25 16:25:54.000000000 
+0200
+++ angband-doc-3.0.3.5+nmu1/debian/changelog   2015-07-14 15:23:55.000000000 
+0200
@@ -1,3 +1,10 @@
+angband-doc (3.0.3.5+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to make reproducible output
+
+ -- akira <marival...@gmail.com>  Tue, 14 Jul 2015 15:23:14 +0200
+
 angband-doc (3.0.3.5) unstable; urgency=low
 
   * New bug fixing release
diff -Nru angband-doc-3.0.3.5/debian/local.mk 
angband-doc-3.0.3.5+nmu1/debian/local.mk
--- angband-doc-3.0.3.5/debian/local.mk 2008-11-30 04:51:09.000000000 +0100
+++ angband-doc-3.0.3.5+nmu1/debian/local.mk    2015-07-14 15:23:12.000000000 
+0200
@@ -21,10 +21,11 @@
 debian/stamp/INST/angband-doc: debian/stamp/install/angband-doc
 debian/stamp/BIN/angband-doc:  debian/stamp/binary/angband-doc
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 CLEAN/angband-doc::
        -rm -rf $(TMPTOP)
 
-
 debian/stamp/install/angband-doc:
        $(checkdir)
        $(REASON)
@@ -59,6 +60,8 @@
        $(create_md5sum)     $(TMPTOP)
        chown -R root        $(TMPTOP)
        chmod -R u+w,go=rX   $(TMPTOP)
+       find $(TMPTOP) -newermt '$(BUILD_DATE)' -print0 | \
+               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg --build         $(TMPTOP) ..
        @test -d debian/stamp/binary || mkdir -p debian/stamp/binary
        @echo done > $@
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to