Bug#1121141: spopt: please make the build reproducible

Chris Lamb lamby at debian.org
Fri Nov 21 18:29:39 GMT 2025


Source: spopt
Version: 0.6.1-4
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: nocheck
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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

This was because it ships a different binary package depending
on whether the tests are run or not, which was caused in turn by the
testsuite not cleaning up the "data" directory and some (or all)
of that was ending up in the binary package ... but only if the tests
were run.

Patch attached. However, if the binary package really does need these
files at runtime (eg. for autopkgtests), then the package will need
rejigging.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/rules	2025-11-21 10:08:45.220937678 -0800
--- b/debian/rules	2025-11-21 10:12:22.416285681 -0800
@@ -7,7 +7,8 @@
 export HOME=$(CURDIR)
 export PYBUILD_NAME=spopt
 export PYBUILD_TEST_ARGS=-s -v
-export PYBUILD_BEFORE_TEST=cp -r {dir}/spopt/tests/data {build_dir}/spopt/tests \
+export PYBUILD_BEFORE_TEST=cp -r {dir}/spopt/tests/data {build_dir}/spopt/tests
+export PYBUILD_AFTER_TEST=rm -rf {build_dir}/spopt/tests/data
 
 %:
 	dh $@ --with sphinxdoc  --buildsystem=pybuild


More information about the debian-science-maintainers mailing list