Bug#1041842: guidata: please make the build reproducible

Chris Lamb lamby at debian.org
Mon Jul 24 09:18:42 BST 2023


Source: guidata
Version: 3.0.0+dfsg1-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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

This is because the testsuite generates two files (test.h5 and
test.json) which contain unreproducible contents. These files are then
shipped in the binary package and thereby make the package
reproducible.

As an aside, these were shipped directly under
/usr/lib/python3/dist-packages. This is definitely wrong and possibly
violates some policy or other. (Indeed, I thought I had once expanded
Lintian to complain about these.)

A patch is attached that makes the testsuite correctly cleanup after
itself.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/0002-Cleanup-after-tests.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/0002-Cleanup-after-tests.patch	2023-07-24 09:14:08.232984650 +0100
@@ -0,0 +1,24 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-07-24
+
+--- guidata-3.0.0+dfsg1.orig/guidata/tests/test_loadsave_hdf5.py
++++ guidata-3.0.0+dfsg1/guidata/tests/test_loadsave_hdf5.py
+@@ -39,6 +39,7 @@ def test_loadsave_hdf5():
+             reader.close()
+             e.edit()
+         execenv.print("OK")
++        os.unlink("test.h5")
+ 
+ 
+ if __name__ == "__main__":
+--- guidata-3.0.0+dfsg1.orig/guidata/tests/test_loadsave_json.py
++++ guidata-3.0.0+dfsg1/guidata/tests/test_loadsave_json.py
+@@ -37,6 +37,7 @@ def test_loadsave_json():
+             e.deserialize(reader)
+             e.edit()
+         execenv.print("OK")
++        os.unlink("test.json")
+ 
+ 
+ if __name__ == "__main__":
--- a/debian/patches/series	2023-07-24 09:08:51.603862883 +0100
--- b/debian/patches/series	2023-07-24 09:14:07.352982068 +0100
@@ -1 +1,2 @@
 0001-Added-missing-dependencies.patch
+0002-Cleanup-after-tests.patch


More information about the Reproducible-bugs mailing list