Bug#1144409: pybdsf: please make the build reproducible

Chris Lamb lamby at debian.org
Fri Aug 14 19:11:28 BST 2026


Source: pybdsf
Version: 1.14.1-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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

This is because it calls f2py without specifying a --build-dir, which
results in f2py defaulting to the nondeterminstic output of the
tempfile.mkdtemp(...) method. This directory ends up embdedded in the
binary .so file.

Patch attached that instructs f2py to use a build directory that is
a determinstic subdirectory of the Debian build dir.


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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/Remove-rpath-from-_cbdsm-module.patch	2026-08-14 10:03:29.309719623 -0700
--- b/debian/patches/Remove-rpath-from-_cbdsm-module.patch	2026-08-14 11:02:29.982839580 -0700
@@ -6,10 +6,8 @@
  CMakeLists.txt | 1 -
  1 file changed, 1 deletion(-)
 
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c1eeb1e..95cceda 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
+--- pybdsf-1.14.1.orig/CMakeLists.txt
++++ pybdsf-1.14.1/CMakeLists.txt
 @@ -122,7 +122,6 @@ add_library(_cbdsm MODULE ${CBDSM_SRC})
  target_compile_definitions(_cbdsm PRIVATE NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION)
  target_include_directories(_cbdsm PRIVATE src/c++)
--- a/debian/patches/Reproducible-build.patch	1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/Reproducible-build.patch	2026-08-14 11:06:55.601523181 -0700
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2026-08-14
+
+--- pybdsf-1.14.1.orig/CMakeLists.txt
++++ pybdsf-1.14.1/CMakeLists.txt
+@@ -102,7 +102,7 @@ add_custom_target(${F2PY_MODULE_NAME} AL
+ )
+ add_custom_command(
+     OUTPUT ${F2PY_MODULE_FILE}
+-    COMMAND ${F2PY_EXECUTABLE} -m ${F2PY_MODULE_NAME} -c ${PYTESSELATE_SRC}
++    COMMAND ${F2PY_EXECUTABLE} -m ${F2PY_MODULE_NAME} -c --build-dir tmp ${PYTESSELATE_SRC}
+     COMMENT "[F2PY] Building python extension module ${F2PY_MODULE_NAME}"
+ )
+ install(FILES ${F2PY_MODULE_FILE} DESTINATION bdsf)
--- a/debian/patches/series	2026-08-14 10:03:29.309719623 -0700
--- b/debian/patches/series	2026-08-14 11:03:31.643492606 -0700
@@ -2,3 +2,4 @@
 Adjust-f2py-executable-name.patch
 0004-Find-python-version-specific-boost.patch
 Remove-rpath-from-_cbdsm-module.patch
+Reproducible-build.patch


More information about the Reproducible-bugs mailing list