[Reproducible-builds] Bug#787125: pachi: please make the build	reproducible
    Dhole 
    dhole at openmailbox.org
       
    Thu May 28 21:06:46 UTC 2015
    
    
  
Source: pachi
Version: 1:1.0-7
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
Hi!
While working on the “reproducible builds” effort [1], we have noticed
that pachi could not be built reproducibly.
The attached patch fixes the files mtime before building the binary
packages. Once applied, pachi can be built reproducibly in our current
experimental framework.
 [1]: https://wiki.debian.org/ReproducibleBuilds
-- 
Dhole
-------------- next part --------------
diff --git a/pachi-1.0/debian/rules b/pachi-1.0/debian/rules
index 007b608..a6c09f1 100755
--- a/pachi-1.0/debian/rules
+++ b/pachi-1.0/debian/rules
@@ -17,6 +17,8 @@ export CPPFLAGS
 export CXXFLAGS
 export LDFLAGS
 
+BUILD_DATE=$(shell dpkg-parsechangelog --show-field Date)
+
 clean:
 	$(testdir)
 	rm -f build-stamp debian/files debian/substvars
@@ -69,6 +71,8 @@ endif
 	chmod -R go=u-w debian/pachi
 	chown root:games debian/pachi/usr/games/pachi
 	chmod 2755 debian/pachi/usr/games/pachi
+	find debian/pachi -depth -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/pachi ..
 
 binary-indep: build
@@ -92,6 +96,8 @@ binary-indep: build
 	dpkg-gencontrol -isp -ppachi-data -Pdebian/pachi-data
 	chown -R root:root debian/pachi-data
 	chmod -R go=u-w debian/pachi-data
+	find debian/pachi-data -depth -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/pachi-data ..
 
 .PHONY: clean build build-arch build-indep binary binary-arch binary-indep
    
    
More information about the Reproducible-builds
mailing list