Source: lightproof
Version: 1.5+git20140515-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: randomness
Hi!
While working on the “reproducible builds” effort [1], we have noticed
that your package failed to build reproducibly.
The source of variation is the random order of the list of locales as
written by make.py. The attached patch makes the order stable and enable
the package to build reproducibly according to my tests.
[1]: https://wiki.debian.org/ReproducibleBuilds
--
Lunar .''`.
lunar@debian.org : :Ⓐ : # apt-get install anarchism
`. `'`
`-
diff -Nru lightproof-1.5+git20140515/debian/changelog lightproof-1.5+git20140515/debian/changelog
--- lightproof-1.5+git20140515/debian/changelog 2014-05-15 13:28:38.000000000 +0000
+++ lightproof-1.5+git20140515/debian/changelog 2014-12-25 16:07:15.000000000 +0000
@@ -1,3 +1,9 @@
+lightproof (1.5+git20140515-1.0~reproducible1) UNRELEASED; urgency=low
+
+ * Make the build reproducible by sorting the locales in make.py.
+
+ -- Jérémy Bobbio <lunar@debian.org> Thu, 25 Dec 2014 16:06:03 +0000
+
lightproof (1.5+git20140515-1) unstable; urgency=low
* new upstream snapshot
diff -Nru lightproof-1.5+git20140515/debian/patches/output_locales_in_sorted_order.diff lightproof-1.5+git20140515/debian/patches/output_locales_in_sorted_order.diff
--- lightproof-1.5+git20140515/debian/patches/output_locales_in_sorted_order.diff 1970-01-01 00:00:00.000000000 +0000
+++ lightproof-1.5+git20140515/debian/patches/output_locales_in_sorted_order.diff 2014-12-25 16:49:09.000000000 +0000
@@ -0,0 +1,22 @@
+Description: Output locales in sorted order
+ To make the package build reproducibly, we output the list of locales
+ in sorted order.
+Author: Jérémy Bobbio <lunar@debian.org>
+
+--- lightproof-1.5+git20140515.orig/make.py
++++ lightproof-1.5+git20140515/make.py
+@@ -2,11 +2,13 @@
+ import sys, os, zipfile, traceback, Dialog
+ import configparser as cp
+ import pythonpath.lightproof_compile___implname__
++from collections import OrderedDict
++import json
+ from string import Template
+
+ def dist(fn, a):
+ a['locales'] = a["locales"].replace("_", "-")
+- a['loc'] = str(dict([[i, [i[0:2], i[3:5], ""]] for i in a["locales"].split(" ")]))
++ a['loc'] = json.dumps(OrderedDict([[i, [i[0:2], i[3:5], ""]] for i in sorted(a["locales"].split(" "))]))
+ distname = a['implname'] + "-" + a['version'] + '.oxt'
+ z = zipfile.ZipFile(distname, mode='w', compression = zipfile.ZIP_DEFLATED)
+ f = open(fn + ".dat", 'r', encoding="utf-8")
diff -Nru lightproof-1.5+git20140515/debian/patches/series lightproof-1.5+git20140515/debian/patches/series
--- lightproof-1.5+git20140515/debian/patches/series 1970-01-01 00:00:00.000000000 +0000
+++ lightproof-1.5+git20140515/debian/patches/series 2014-12-25 16:08:47.000000000 +0000
@@ -0,0 +1 @@
+output_locales_in_sorted_order.diff
Attachment:
signature.asc
Description: Digital signature