Source: xdmf Severity: normal Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: cpu uname X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
The processor type and number of processors is embedded in /usr/lib/x86_64-linux-gnu/cmake/Xdmf/XdmfConfig.cmake, which cause reproducibility issues. https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/i386/diffoscope-results/xdmf.html set(XDMF_CMAKE_HOST_SYSTEM_PROCESSOR» » "x86_64") vs. set(XDMF_CMAKE_HOST_SYSTEM_PROCESSOR» » "i686") set(XDMF_CMAKE_SYSTEM_PROCESSOR»»"x86_64") vs. set(XDMF_CMAKE_SYSTEM_PROCESSOR»»"i686") set(XDMF_MPIEXEC_MAX_NUMPROCS» » "9") vs. set(XDMF_MPIEXEC_MAX_NUMPROCS» » "10") The attached patch to debian/rules fixes this by removing these values from the XdmfConfig.cmake file. Without knowing xdmf well, I am NOT sure if it is ok to remove these values from XdmfConfig.cmake, though in order to use the .cmake file it would seem best to regenerate it in the environment in which is used rather than the environment where the package happened to be built. So it is also unclear if XdmfConfig.cmake actually needs to be included in the package; a better course of action *might* be to remove the file entirely. With this patch applied(or removing XdmfConfig.cmake from the package), xdmf should (really this time!) become reproducible on tests.reproducible-builds.org. Thanks for maintaining xdmf! live well, vagrant
From fa766ebd467308ba91f8fedaf03901a51dfe09a7 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagr...@reproducible-builds.org> Date: Fri, 15 Oct 2021 22:05:14 +0000 Subject: [PATCH] debian/rules: Sanitize XdmfConfig.cmake to fix reproducibility issues due to processor. Remove XDMF_CMAKE_SYSTEM_PROCESSOR, XDMF_CMAKE_HOST_SYSTEM_PROCESSOR and XDMF_MPIEXEC_MAX_NUMPROCS. The number and type of CPU may not be consistent with the environment that the package is built for, and make it hard to build reproducibly. https://tests.reproducible-builds.org/debian/issues/unstable/captures_kernel_version_via_CMAKE_SYSTEM_issue.html --- debian/rules | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index f7f3f42..6399a86 100755 --- a/debian/rules +++ b/debian/rules @@ -91,11 +91,15 @@ override_dh_auto_install: cp debian/build-serial-$$p/lib/__*.so $(PY3DEST)/usr/lib/$$p/dist-packages/xdmf/NoMpi ; \ cp debian/build-mpi-$$p/lib/__*.so $(PY3DEST)/usr/lib/$$p/dist-packages/xdmf ; \ done - # Remove build path and kernel version, and adjust path to - # uname to make build reproducible + # Remove build path and kernel version, adjust path to uname, + # and remove sytem processor and number of processors to make + # build reproducible sed -i -e "s,$(CURDIR),BUILDDIR,g" \ -e "s,/usr/bin/uname,/bin/uname,g" \ -e "s,$(shell uname -r),,g" \ + -e "/XDMF_CMAKE_SYSTEM_PROCESSOR/d" \ + -e "/XDMF_CMAKE_HOST_SYSTEM_PROCESSOR/d" \ + -e "/XDMF_MPIEXEC_MAX_NUMPROCS/d" \ debian/tmp/$(LIBDIR)/cmake/Xdmf/XdmfConfig.cmake override_dh_auto_fixperms: -- 2.33.0
signature.asc
Description: PGP signature