Source: ruby3.0
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: usrmerge shell
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The paths to various binaries, which differs on a usrmerge
vs. non-usrmerge system, are 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["EGREP"]·=·"/bin/grep·-E"
  vs.
  CONFIG["EGREP"]·=·"/usr/bin/grep·-E"

Patch attached which passes variables to configure to use the
non-usrmerge locations, as usrmerge installations typically have
compatibility symlinks, but not vice-versa. The patch also sets
variables to ensure consistent values for bash, which can be triggered
when /bin/sh points to bash.

This patch alone does not fix all reproducibility issues (e.g. build
paths on unstable and experimental), but should build reproducibly once
it migrates to bookworm/testing!


Thanks for maintaining ruby3.0!


live well,
  vagrant
From d0a1365cba685b8ab22be92463d28fb79d55a03b Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Fri, 25 Feb 2022 23:17:08 +0000
Subject: [PATCH] debian/rules: Pass variables to configure to make the package
 build reproducibly regardless of usrmerge.

The variables EGREP, GREP, MAKEDIRS, MKDIR_P and SHELL should all
point to their non-usrmerge locations.

https://tests.reproducible-builds.org/debian/issues/paths_vary_due_to_usrmerge_issue.html
---
 debian/rules | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/rules b/debian/rules
index 76fa0b6..2d2c086 100755
--- a/debian/rules
+++ b/debian/rules
@@ -64,6 +64,14 @@ configure_options += --with-compress-debug-sections=no
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow optimize=-lto
 configure_options += $(shell dpkg-buildflags --export=configure)
 
+# Pass variables to ensure consistent values when built on a usrmerge
+# or non-usrmerge system.
+configure_options += EGREP='/bin/grep -E'
+configure_options += GREP='/bin/grep'
+configure_options += MAKEDIRS='/bin/mkdir -p'
+configure_options += MKDIR_P='/bin/mkdir -p'
+configure_options += SHELL='/bin/sh'
+
 # For more info see #999351
 ifneq (,$(filter $(DEB_HOST_ARCH),alpha))
 export DEB_CFLAGS_MAINT_APPEND += -O1
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature

Reply via email to