Source: integrit
Version: 4.1-1
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 integrit 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 integrit-4.1/debian/changelog integrit-4.1/debian/changelog
--- integrit-4.1/debian/changelog
+++ integrit-4.1/debian/changelog
@@ -1,3 +1,10 @@
+integrit (4.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output 
+
+ -- akira <marival...@gmail.com>  Sun, 19 Jul 2015 14:26:24 +0200
+
 integrit (4.1-1) unstable; urgency=low
 
   * new upstream release.
diff -u integrit-4.1/debian/rules integrit-4.1/debian/rules
--- integrit-4.1/debian/rules
+++ integrit-4.1/debian/rules
@@ -7,6 +7,7 @@
 DEB_HOST_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_ARCH ?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
 
 DIET_ARCHS =alpha amd64 arm hppa i386 ia64 mips mipsel powerpc ppc64 s390 sparc
 ifeq (,$(findstring $(DEB_HOST_ARCH),$(DIET_ARCHS)))
@@ -101,6 +102,8 @@
 
 binary-arch: deb-checkdir deb-checkuid install integrit.deb
        dpkg-gencontrol -isp -pintegrit -P'$(DIR)'
+       find '$(DIR)' -newermt '$(BUILD_DATE)' -print0 | \
+xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg -b '$(DIR)' ..
 
 binary: binary-indep binary-arch
_______________________________________________
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