Your message dated Fri, 07 Oct 2022 19:49:36 +0000
with message-id <[email protected]>
and subject line Bug#1009931: fixed in gmp 2:6.2.1+dfsg1-1.1
has caused the Debian Bug report #1009931,
regarding gmp: reproducible-builds: Embedded build paths in various files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1009931: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009931
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: gmp
Severity: normal
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

The build path is embedded in various files:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/gmp.html

  /usr/include/x86_64-linux-gnu/gmp.h

  
#define·__GMP_CFLAGS·"-g·-O2·-ffile-prefix-map=/build/1st/gmp-6.2.1+dfsg=.·-fstack-..."
  vs.
  
#define·__GMP_CFLAGS·"-g·-O2·-ffile-prefix-map=/build/2/gmp-6.2.1+dfsg/2nd=.·-fstack-..."

  /usr/lib/x86_64-linux-gnu/libgmp.so.10.4.1

  /build/1st/gmp-6.2.1+dfsg/build/mpn/tmp-add_n.s:97
  vs.
  /build/2/gmp-6.2.1+dfsg/2nd/build/mpn/tmp-add_n.s:97

The attached patches fix this by replacing the build path with
"BUILDPATH" from in debian/rules, and passing a --debug-prefix-map
argument to use relative paths via ASMFLAGS in configure.


With these patches applied gmp should build reproducibly on
tests.reproducible-builds.org!


Thanks for maintaining gmp!


live well,
  vagrant
From df942b2fed320e95465625870e8832574a37ab5e Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Wed, 20 Apr 2022 21:33:25 +0000
Subject: [PATCH 1/2] debian/rules: Pass ASMFLAGS with debug-prefix-map to
 configure.

The absolute build path can be embedded in generated assembly
code. Instead, passing --debug-prefix-map is used to adjust the
absolute paths to relative paths within the source code.

https://tests.reproducible-builds.org/debian/issues/build_path_captured_in_assembly_objects_issue.html
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 164d9e3..905d95b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -89,7 +89,7 @@ configure-stamp:
 	mkdir -p build
 	cd build && ../configure $(confflags_ma) \
 	    AR=$(AR) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-	    CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)"
+	    CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" ASMFLAGS="--debug-prefix-map=$(CURDIR)=."
 	touch $@
 
 build: build-stamp
-- 
2.35.2

From df301d96468c6248f103b6c16270aeb379e3b3fd Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Wed, 20 Apr 2022 21:38:46 +0000
Subject: [PATCH 2/2] debian/rules: Replace embedded build path in gmp.h with a
 placeholder string.

Frequently builds of debian packages are done in a randomized
directory path which is unlikely to be present on the end-user
system.

https://reproducible-builds.org/docs/build-path/
---
 debian/rules | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/rules b/debian/rules
index 905d95b..9304487 100755
--- a/debian/rules
+++ b/debian/rules
@@ -117,6 +117,9 @@ install: build-stamp install-prep
 	# so override it at install.
 	$(MAKE) DESTDIR=`pwd`/debian/tmp includeexecdir=/usr/include/$(DEB_HOST_MULTIARCH) -C build install
 
+	# Replace embedded build path with a placeholder string
+	sed -i -e "s,$(CURDIR),BUILDPATH,g" debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/gmp.h
+
 	dh_install -plibgmp10 usr/lib/*/libgmp.so.*
 	dh_install -plibgmpxx4ldbl usr/lib/*/libgmpxx.so.*
 
-- 
2.35.2

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: gmp
Source-Version: 2:6.2.1+dfsg1-1.1
Done: Holger Levsen <[email protected]>

We believe that the bug you reported is fixed in the latest version of
gmp, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Holger Levsen <[email protected]> (supplier of updated gmp package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 22 Sep 2022 20:43:57 +0200
Source: gmp
Architecture: source
Version: 2:6.2.1+dfsg1-1.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Team 
<[email protected]>
Changed-By: Holger Levsen <[email protected]>
Closes: 1009931
Changes:
 gmp (2:6.2.1+dfsg1-1.1) unstable; urgency=medium
 .
   * Non-maintainer upload by the Reproducible Builds team.
   * debian/rules changes by Vagrant Cascadian:
     - pass ASMFLAGS with debug-prefix-map to configure.
     - replace embedded build path in gmp.h with a placeholder string.
     Closes: #1009931
Checksums-Sha1:
 1aa034a4b586256612fcf9c28b4f9f20a3e40d15 2238 gmp_6.2.1+dfsg1-1.1.dsc
 8c8bda6fc99fc20144835d6451664d2db7e6b7c2 19444 
gmp_6.2.1+dfsg1-1.1.debian.tar.xz
 9bb13f48d67ea84845c6c214371a54354c4d4197 5910 
gmp_6.2.1+dfsg1-1.1_source.buildinfo
Checksums-Sha256:
 2831ed4f83bc3304c2403474b335652ab2dc507cd517de44414d9142171748f0 2238 
gmp_6.2.1+dfsg1-1.1.dsc
 4e3e324d72fe688e409c716d33b35aa8657f6016cc1aabd5d9c7ec137412e5ef 19444 
gmp_6.2.1+dfsg1-1.1.debian.tar.xz
 353e921d58f564e35d9df92886b34da18f2bf6289783e0c4a6eea8c2fb4e9e9c 5910 
gmp_6.2.1+dfsg1-1.1_source.buildinfo
Files:
 2bb7446fb8f884995d77047ab768f255 2238 libs optional gmp_6.2.1+dfsg1-1.1.dsc
 a74973e7c422027b188849d04d698cba 19444 libs optional 
gmp_6.2.1+dfsg1-1.1.debian.tar.xz
 94a450940b578128f222d0ba0811b20e 5910 libs optional 
gmp_6.2.1+dfsg1-1.1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEuL9UE3sJ01zwJv6dCRq4VgaaqhwFAmMsru0ACgkQCRq4Vgaa
qhxgNBAAiLRF+9iZ46Mgk5aSnnfPIWOFrn5aacryRz9rZNvjaGi4AWzHR2t+eYy3
dQmxcNVtFPF3Sfy3kFL+knuBGw2SZSFKHECP64htJb7rSQGRBwULHxLUajlLQVVw
83T1ZYKEAXBc1O1l0VcTkHNpvQrcHxE1/t1suM1BemSNSfWU5wYU4O5BXlcaDJMg
DgDqq2RHtnCtiRHMrcOgxAl7r4eoJyMEJ76/4IYh0oGPUl4vCC7oQwfHX0JxDQny
z9PnfsNM+urj+1IA6V2neVy61XooRi4vQKZzWMCKUEVk4R8RWgipuEksaxmfiUeu
EJaKgMB/tnnms79823j22cV3vy0f3TQOxEg+WJzTVsMu5dSvV+1C8wE3OkMkbTGj
F9FS66Zj8hDbd6/74u1/G0GecWcSgOOj9NqpCTlHgbpaNvdvCVJR1chBQBF6gorK
pHn8J7QsgK3eQkZiUnrGTqOI7P688NgYo0snnoXQJ11MFIBVNAoaumve+EjPCZf5
6Mgaysix5UzZSNfIVDOOCPmcEuohWkZ6G0vubLQdJ+9MHFVfDqrEHto6ZtNg2RTY
5R0YBj8IjMqacahAr7ggHlI6nM3DhjjfgjnTDZI1xNpEe83+9Xf84ClgTlZJAxQT
Y/yHqzIy8EViSFx6qhBDoxmDzI9a9RugtFjunHvHw4KxNqsUoJw=
=GDj+
-----END PGP SIGNATURE-----

--- End Message ---
-- 
debian-science-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to