Source: ruby3.0
Severity: normal
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

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
From de27359318d25a4f5d1fea3bcecc11ef94ed29d7 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
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

Attachment: signature.asc
Description: PGP signature

Reply via email to