Source: gcc-riscv64-unknown-elf
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: usrmerge shell
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org, kei...@keithp.com

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-riscv64-unknown-elf.html

  /usr/lib/gcc/riscv64-unknown-elf/8.3.0/install-tools/fixincl

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

  /usr/lib/gcc/riscv64-unknown-elf/8.3.0/install-tools/mkheaders

  mkinstalldirs="/bin/bash·${itoolsdir}/mkinstalldirs"
  vs.
  mkinstalldirs="/bin/sh·${itoolsdir}/mkinstalldirs"

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
build reproducibly in bookworm/testing once binutils-riscv64-unknown-elf
is built with deterministic archives enabled.


Thanks for maintaining gcc-riscv64-unknown-elf!


live well,
  vagrant

p.s. more deja-vu?
From 6e8817705e2734392483bc332f1ba1df0eeee212 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Wed, 1 Dec 2021 03:13:30 +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 86fbda13298..c54382b8e4b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -57,6 +57,10 @@ configure_flags = \
 	--with-gnu-ld \
 	--with-as=$(target_bin)as \
 	--with-ld=$(target_bin)ld \
+        SED=/bin/sed \
+        SHELL=/bin/sh \
+        BASH=/bin/bash \
+        CONFIG_SHELL=/bin/bash \
 	$(target_tools) \
 	$(build_flags) \
 	CFLAGS_FOR_TARGET='-Os -mcmodel=medany' CXXFLAGS_FOR_TARGET='-Os -mcmodel=medany'
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature

Reply via email to