Debian Bug report logs - #1006476
ruby3.0: reproducible builds: embeds build path in rbconfig.rb

version graph

Package: src:ruby3.0; Maintainer for src:ruby3.0 is (unknown);

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

Date: Sat, 26 Feb 2022 01:48:02 UTC

Severity: normal

Tags: patch

Fixed in version ruby3.0/3.0.4-8

Done: Antonio Terceiro <terceiro@debian.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, Debian Ruby Team <pkg-ruby-extras-maintainers@lists.alioth.debian.org>:
Bug#1006476; Package src:ruby3.0. (Sat, 26 Feb 2022 01:48: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, Debian Ruby Team <pkg-ruby-extras-maintainers@lists.alioth.debian.org>. (Sat, 26 Feb 2022 01:48: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: ruby3.0: reproducible builds: embeds build path in rbconfig.rb
Date: Fri, 25 Feb 2022 17:44:56 -0800
[Message part 1 (text/plain, inline)]
Source: ruby3.0
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build path is embedded in rbconfig.rb:

  https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/ruby3.0.html

  /usr/lib/x86_64-linux-gnu/ruby/3.0.0/rbconfig.rb

  CONFIG["CFLAGS"]·=·"-g·-O2·-ffile-prefix-map=/build/1st/ruby3.0-3.0.2=.·-fstack- ..."
  
  vs.
  CONFIG["CFLAGS"]·=·"-g·-O2·-ffile-prefix-map=/build/2/ruby3.0-3.0.2/2nd=.·-fstack- ..."

The attached patch fixes this by sanitizing rbconfig.rb in debian/rules
to replace occurances of the build path with "BUILDDIR".


An alternate approach might be to avoid shipping this file at all if
possible; I do not know if that is a reasonable thing for ruby.


With this patch and the patch submitted in #1006471 applied, ruby3.0
should build reproducibly on tests.reproducible-builds.org!


Thanks for maintaining ruby3.0!


live well,
  vagrant
[0002-debian-rules-Strip-the-build-path-from-rbconfig.rb.patch (text/x-diff, inline)]
From de27359318d25a4f5d1fea3bcecc11ef94ed29d7 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sat, 26 Feb 2022 01:36:04 +0000
Subject: [PATCH 2/2] debian/rules: Strip the build path from rbconfig.rb

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

diff --git a/debian/rules b/debian/rules
index 2d2c086..1e29738 100755
--- a/debian/rules
+++ b/debian/rules
@@ -114,6 +114,7 @@ override_dh_auto_clean:
 
 override_dh_auto_build-arch:
 	dh_auto_build -- main V=1
+	sed -i -e "s,$(CURDIR),BUILDDIR,g" ./rbconfig.rb
 
 # see full list in common.mk (search for /^check:/)
 TEST_TARGETS := test test-tool test-all # missing test-spec
-- 
2.35.1

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

Message sent on to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug#1006476. (Sun, 11 Sep 2022 02:27:03 GMT) (full text, mbox, link).


Message #8 received at 1006476-submitter@bugs.debian.org (full text, mbox, reply):

From: Antonio Terceiro <noreply@salsa.debian.org>
To: 1006476-submitter@bugs.debian.org
Subject: Bug#1006476 marked as pending in ruby
Date: Sun, 11 Sep 2022 02:26:27 +0000
Control: tag -1 pending

Hello,

Bug #1006476 in ruby reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/ruby-team/ruby/-/commit/3562fdc8c40fd13da8aaa9a60d1ed4e031fa3d12

------------------------------------------------------------------------
debian/rules: Strip the build path from rbconfig.rb

https://reproducible-builds.org/docs/build-path/

Closes: #1006476
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1006476



Added tag(s) pending. Request was from Antonio Terceiro <noreply@salsa.debian.org> to 1006476-submitter@bugs.debian.org. (Sun, 11 Sep 2022 02:27:03 GMT) (full text, mbox, link).


Reply sent to Antonio Terceiro <terceiro@debian.org>:
You have taken responsibility. (Sun, 11 Sep 2022 02:45:05 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Sun, 11 Sep 2022 02:45:06 GMT) (full text, mbox, link).


Message #15 received at 1006476-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 1006476-close@bugs.debian.org
Subject: Bug#1006476: fixed in ruby3.0 3.0.4-8
Date: Sun, 11 Sep 2022 02:42:28 +0000
Source: ruby3.0
Source-Version: 3.0.4-8
Done: Antonio Terceiro <terceiro@debian.org>

We believe that the bug you reported is fixed in the latest version of
ruby3.0, 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 1006476@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Antonio Terceiro <terceiro@debian.org> (supplier of updated ruby3.0 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 ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 10 Sep 2022 23:02:54 -0300
Source: ruby3.0
Architecture: source
Version: 3.0.4-8
Distribution: unstable
Urgency: medium
Maintainer: Debian Ruby Team <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Changed-By: Antonio Terceiro <terceiro@debian.org>
Closes: 1006471 1006476 1018230
Changes:
 ruby3.0 (3.0.4-8) unstable; urgency=medium
 .
   [ Vagrant Cascadian ]
   * debian/rules: ensure rbconfig.rb is reproducible regardless of usr-merge
     (Closes: #1006471)
   * debian/rules: Strip the build path from rbconfig.rb (Closes: #1006476)
 .
   [ Antonio Terceiro ]
   * libruby3.0: depend on packages that used to be provided by ruby2.7.
     This allows *ruby2.7 to be removed after upgrades from bullseye where
     the user has installed packages that depend on either ruby-webrick or
     ruby-sdbm.
   * rbconfig, mkmf: call foreign pkg-config when cross compiling
     (Closes: #1018230)
Checksums-Sha1:
 353a7e98bb89ee0c7747eb159e04b35dc9033b4d 2509 ruby3.0_3.0.4-8.dsc
 a022126967ae8a38e2ecf1b6cc383a5055907b69 162128 ruby3.0_3.0.4-8.debian.tar.xz
 006f167e71c9e4451380bfb839774a45de621481 7872 ruby3.0_3.0.4-8_source.buildinfo
Checksums-Sha256:
 67c72c380157a8df024db7a83b9998f839eb08b58f0dfb0bea36c6477c1be941 2509 ruby3.0_3.0.4-8.dsc
 a4dc02a5ebee13a920232cc950a66169e1e7c5924db74841319aa433816e10d2 162128 ruby3.0_3.0.4-8.debian.tar.xz
 be4a7749ad48258ec61ab4294d3a856a711be8814f3e9cc4ce81f8018b23f0da 7872 ruby3.0_3.0.4-8_source.buildinfo
Files:
 573b7fbeb7346ec36bcc971d8621e478 2509 ruby optional ruby3.0_3.0.4-8.dsc
 33895a89f751e39ca13f6cb56c970706 162128 ruby optional ruby3.0_3.0.4-8.debian.tar.xz
 21fbec4fbfd8ea12f1b4c4a591c3ac37 7872 ruby optional ruby3.0_3.0.4-8_source.buildinfo

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

iQIzBAEBCAAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmMdRz0ACgkQ/A2xu81G
C96ICw//f3yq6vBlcA3PfilDdXJbuTPeU2cFtLiMiE59S7o1Xl5WJmXPOexaeRHf
F+WvrKjTGB3alEe24ywVkwjm0Qrv6I2sQEI2fVUJOz/sVq7YgceGQT4+bXF9x46b
5NqJvjBGfXbzQrBxUiNH4rB3KdOtUbv27xbYAqM/ejNQXioEp8GmsmWFZLjBeTaW
lb1sPSb3jvj76KYtMhIHEpxuIQlaJ+aGNbd1s80baFU0eeeW4qbaLTPh+MSWSD1R
HJMg5HwV3BQAEEVVfNbeMTaEhJkCa4BONIl1zYlFN+j6iuiBYC49FkIcbuHwqD9P
3AjOPDnv74zZEM0VHNB9Mhv+LEgqMj4pvXUPyHqZ+rXXd3SghgKOrD8UdGABje2u
9JmLQAbbBi0Pptu6qruca5l9v4H8o7ic4QebXsyRS3OkJARgzHaz/BK8wD6JY8+x
ISxaseEO1BSIVfkl8CrUuLvoQ3ISRHi49A4JgVdh8RtZaMvEzdzk2nAEpXYOEwW2
qSnG/kPg4H1k47lpvy8Ar3bzx8DrYxgQYQU963W1/CskfRFbQkFbvrPL+254sdDS
hhA9L4k1k8oTvgeZK+ZWsxRKYl+0QfbS4w3QuqeccQ7JeC4I2SVHNl0SnPk738Wo
sUhGbkWQlXo98U+iXDJzAJZNH0EJcDWvw2bsHLPfsJ65cAJ3Anc=
=1IA2
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 13 Oct 2022 07:27:53 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 10:19:26 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.