Bug#1007760: chemical-structures: please make the build reproducible

Chris Lamb lamby at debian.org
Wed Mar 16 11:32:25 GMT 2022


Source: chemical-structures
Version: 2.2.dfsg.0-19
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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

This is because the generated HTML files were not correctly sorted
within identical chemical forumalas.

A patch is attached that uses the formula name as a secondary sort
if the chemical formula is identical.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch	2022-03-16 11:29:02.233886135 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2022-03-16
+
+--- chemical-structures-2.2.dfsg.0.orig/tools/make_index_files.py
++++ chemical-structures-2.2.dfsg.0/tools/make_index_files.py
+@@ -38,7 +38,7 @@ def formulaCmp(tuple1, tuple2):
+   formula1 = tuple1[0][0]
+   formula2 = tuple2[0][0]
+   if formula1 == formula2:
+-    return 0
++    return cmp(tuple1, tuple2)
+   count = min( len(formula1), len(formula2) )
+   for i in range(0, count):
+     if i%2:
--- a/debian/patches/series	2022-03-16 11:10:01.336140449 +0000
--- b/debian/patches/series	2022-03-16 11:28:31.437711938 +0000
@@ -10,3 +10,4 @@
 apache.conf.patch
 privacy.patch
 python3-conformity.patch
+reproducible-build.patch


More information about the Reproducible-bugs mailing list