Source: keepassx
Version: 0.4.3+dfsg-0.1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps

Hi!

As part of the “reproducible builds” project [1], we have detected that
keepassx embeds the current date and time when it generates the software
icon in multiple sizes.

This prevents keepassx build from being reproducible:
https://jenkins.debian.net//userContent/diffp/keepassx_0.4.3+dfsg-0.1.diffp.html

The attached patch will set the `date:create` and `date:modify` fields
according to the mtime of the source files. keepassx then builds
reproducibly.

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

-- 
Lunar                                .''`. 
lu...@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
diff -Nru keepassx-0.4.3+dfsg/debian/changelog keepassx-0.4.3+dfsg/debian/changelog
--- keepassx-0.4.3+dfsg/debian/changelog	2013-03-20 17:03:52.000000000 +0000
+++ keepassx-0.4.3+dfsg/debian/changelog	2014-10-01 21:55:54.000000000 +0000
@@ -1,3 +1,11 @@
+keepassx (0.4.3+dfsg-0.2~reproducible1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use source file mtime as creation and modfication time while converting
+    icons for build reproducibility.
+
+ -- Jérémy Bobbio <lu...@debian.org>  Wed, 01 Oct 2014 21:54:51 +0000
+
 keepassx (0.4.3+dfsg-0.1) unstable; urgency=high
 
   * Non-maintainer upload.
diff -Nru keepassx-0.4.3+dfsg/debian/rules keepassx-0.4.3+dfsg/debian/rules
--- keepassx-0.4.3+dfsg/debian/rules	2012-04-07 16:14:51.000000000 +0000
+++ keepassx-0.4.3+dfsg/debian/rules	2014-10-01 21:54:44.000000000 +0000
@@ -4,6 +4,11 @@
 %:
 	dh $@ --parallel --buildsystem=qmake_qt4
 
+MEDIUM_ICON = share/keepassx/icons/keepassx.png
+MEDIUM_ICON_DATE = $(shell date '+%Y-%m-%dT%H:%M:%S%:z' --reference='$(MEDIUM_ICON)')
+LARGE_ICON = debian/keepassx.svg
+LARGE_ICON_DATE = $(shell date '+%Y-%m-%dT%H:%M:%S%:z' --reference='$(LARGE_ICON)')
+
 override_dh_auto_install:
 	dh_auto_install
 
@@ -17,15 +22,27 @@
 
 	cp share/keepassx/icons/keepassx_small.png \
 		debian/keepassx/usr/share/icons/hicolor/16x16/apps/keepassx.png
-	convert share/keepassx/icons/keepassx.png -resize 24x24 \
+	convert -resize 24x24 \
+		-set date:create $(MEDIUM_ICON_DATE) \
+		-set date:modify $(MEDIUM_ICON_DATE) \
+		$(MEDIUM_ICON) \
 		debian/keepassx/usr/share/icons/hicolor/24x24/apps/keepassx.png
 	cp share/keepassx/icons/keepassx.png \
 		debian/keepassx/usr/share/icons/hicolor/32x32/apps/keepassx.png
-	convert -density 72 -background none debian/keepassx.svg \
+	convert -density 72 -background none \
+		-set date:create $(LARGE_ICON_DATE) \
+		-set date:modify $(LARGE_ICON_DATE) \
+		$(LARGE_ICON) \
 		debian/keepassx/usr/share/icons/hicolor/48x48/apps/keepassx.png
-	convert -density 96 -background none debian/keepassx.svg \
+	convert -density 96 -background none \
+		-set date:create $(LARGE_ICON_DATE) \
+		-set date:modify $(LARGE_ICON_DATE) \
+		$(LARGE_ICON) \
 		debian/keepassx/usr/share/icons/hicolor/64x64/apps/keepassx.png
-	convert -density 192 -background none debian/keepassx.svg \
+	convert -density 192 -background none \
+		-set date:create $(LARGE_ICON_DATE) \
+		-set date:modify $(LARGE_ICON_DATE) \
+		$(LARGE_ICON) \
 		debian/keepassx/usr/share/icons/hicolor/128x128/apps/keepassx.png
 	cp debian/keepassx.svg \
 		debian/keepassx/usr/share/icons/hicolor/scalable/apps/keepassx.svg

Attachment: signature.asc
Description: Digital signature

_______________________________________________
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