Source: gcc-sh-elf
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 are embedded which differs on a usrmerge
vs. non-usrmerge system.

  
https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/gcc-sh-elf.html

  ./usr/libexec/gcc/sh-elf/11/install-tools/fixincl

  /bin/sed      
vs.
  /usr/bin/sed

  ./usr/libexec/gcc/sh-elf/11/install-tools/mkheaders

  for·shell·in·$CONFIG_SHELL·$SHELL·/bin/bash·/bin/sh·"";·do
vs.
  for·shell·in·$CONFIG_SHELL·$SHELL·/bin/sh·/bin/sh·"";·do

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, which are only tested on unstable and experimental), but should
significantly improve the reproducibility, especially in
bookworm/testing.


Thanks for maintaining gcc-sh-elf!


live well,
  vagrant
From e7ec028450dc49dad26cdeca13e6ae22f0747765 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 11 Jan 2022 03:31:46 +0000
Subject: [PATCH] debian/rules: Pass variables to configure to make the package
 build reproducibly regardless of usrmerge.

The variables SED, SHELL, BASH and CONFIG_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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/rules b/debian/rules
index 3bc85ae..0c06730 100755
--- a/debian/rules
+++ b/debian/rules
@@ -47,6 +47,10 @@ CONFIG_OPTS = \
 	--build=$(DEB_BUILD_GNU_TYPE) \
 	--host=$(DEB_HOST_GNU_TYPE) \
 	--target=$(gnu_type) \
+	SED=/bin/sed \
+	SHELL=/bin/sh \
+	BASH=/bin/bash \
+	CONFIG_SHELL=/bin/bash \
 	--prefix=/usr \
 	--disable-gdb \
 	--disable-libcc1 \
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature

Reply via email to