Source: sdaps
Version: 1.9.7-0.1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed
that sdaps could not be built reproducibly.

This is because its "setup.py" iterated over the keys of a dictionary
(to generate translations), an operation which, in Python, is
nondeterministic.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.000000000 
+0100
--- b/debian/patches/reproducible-build.patch   2019-09-06 08:41:45.349294604 
+0100
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2019-09-06
+
+--- sdaps-1.9.7.orig/setup.py
++++ sdaps-1.9.7/setup.py
+@@ -132,7 +132,7 @@ class sdaps_build_i18n(build_i18n.build_
+             f.write('%\n\n')
+             
f.write('\\ProvidesDictionary{translator-sdaps-dictionary}{%s}\n\n' % name)
+ 
+-            for key in keys:
++            for key in sorted(keys):
+                 if lang is not None:
+                     k = "%s[%s]" % (key, lang)
+                 else:
--- a/debian/patches/series     1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series     2019-09-06 08:41:44.301283564 +0100
@@ -0,0 +1 @@
+reproducible-build.patch

Reply via email to