Debian Bug report logs - #996599
xdmf: reproducible builds: Embeds number and type of processor

version graph

Package: src:xdmf; Maintainer for src:xdmf is Alastair McKinstry <mckinstry@debian.org>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Fri, 15 Oct 2021 22:24:02 UTC

Severity: normal

Tags: patch

Fixed in version 3.0+git20190531-9

Done: Vagrant Cascadian <vagrant@reproducible-builds.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Alastair McKinstry <mckinstry@debian.org>:
Bug#996599; Package src:xdmf. (Fri, 15 Oct 2021 22:24:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Alastair McKinstry <mckinstry@debian.org>. (Fri, 15 Oct 2021 22:24:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: xdmf: reproducible builds: Embeds number and type of processor
Date: Fri, 15 Oct 2021 15:20:02 -0700
[Message part 1 (text/plain, inline)]
Source: xdmf
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: cpu uname
X-Debbugs-Cc: reproducible-bugs@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
[0001-debian-rules-Sanitize-XdmfConfig.cmake-to-fix-reprod.patch (text/x-diff, inline)]
From fa766ebd467308ba91f8fedaf03901a51dfe09a7 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@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 (application/pgp-signature, inline)]

Reply sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
You have taken responsibility. (Sun, 01 May 2022 00:27:05 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Sun, 01 May 2022 00:27:05 GMT) (full text, mbox, link).


Message #10 received at 996599-done@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: 996599-done@bugs.debian.org
Subject: Re: xdmf: reproducible builds: Embeds number and type of processor
Date: Sat, 30 Apr 2022 17:22:57 -0700
[Message part 1 (text/plain, inline)]
Version: 3.0+git20190531-9

On 2021-10-15, Vagrant Cascadian wrote:
> The processor type and number of processors is embedded in
> /usr/lib/x86_64-linux-gnu/cmake/Xdmf/XdmfConfig.cmake, which cause
> reproducibility issues.

This appears to have been fixed but didn't get recorded in the bug
tracker:

xdmf (3.0+git20190531-9) unstable; urgency=medium

  * More reproducibility fixes thanks to Vagrant C. Closes: #996599

 -- Alastair McKinstry <mckinstry@debian.org>  Sat, 13 Nov 2021 13:54:26 +0000


And tests.reproducible-builds.org also seems to concur that the issue is
resolved:

  https://tests.reproducible-builds.org/debian/history/xdmf.html


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 29 May 2022 07:27:03 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 12:59:54 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.