Your message dated Wed, 11 Nov 2026 13:20:32 -0800
with message-id <87wlqjkqu7.fsf@wireframe>
and subject line Re: Bug#1011478: scsitools: reproducible-builds: embedded 
build paths in various binaries
has caused the Debian Bug report #1011478,
regarding scsitools: reproducible-builds: embedded build paths in various 
binaries
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1011478: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011478
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: scsitools
Severity: normal
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

The build path is embedded in various binaries:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/scsitools.html

  /sbin/scsi-spin

  /build/1st/scsitools-0.12/debian/scsi-spin.c:290
  vs.
  /build/2/scsitools-0.12/2nd/debian/scsi-spin.c:290

The attached patch fixes this by setting -ffile-prefix-map in CFLAGS,
and explicitly passing CFLAGS to make in debian/rules. The
-ffile-prefix-map compiler flag is used to avoid embedding the absolute
path in compiled files.

Alternately, switching to use the default CFLAGS from dpkg-buildflags
(possibly through using a newer debhelper compat version) also would
include -ffile-prefix-map by default.


With this patch applied, scsitools should build reproducibly on
tests.reproducible-builds.org!


live well,
  vagrant
From 271eb71f9c87d7bab1080b5db52f3468f7acec52 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Mon, 23 May 2022 19:19:28 +0000
Subject: [PATCH] debian/rules: Pass -ffile-prefix-map via CFLAGS.

---
 debian/rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 2adc025..32ba7b7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,7 @@
 # Derived from debhelper/dh_make example, and Cristoph Lameter's file. -joy
 
 #export DH_VERBOSE=1
-CFLAGS = -g -O2 -Wall -fsigned-char
+CFLAGS = -g -O2 -Wall -fsigned-char -ffile-prefix-map=$(CURDIR)=.
 
 #architecture := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 p = scsitools
@@ -11,7 +11,7 @@ p = scsitools
 	dh $@
 
 override_dh_auto_build:
-	cd scsiinfo && $(MAKE) KERNEL_INCLUDES="-fsigned-char" LDFLAGS=
+	cd scsiinfo && $(MAKE) KERNEL_INCLUDES="-fsigned-char" LDFLAGS= CFLAGS="$(CFLAGS)"
 	cd scsidev && CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
           --mandir='${prefix}'/share/man && $(MAKE)
 	cd sraw && gcc $(CFLAGS) -o sraw srawread.c
-- 
2.36.1

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Version: 0.14

On 2022-05-23, Vagrant Cascadian wrote:
> The build path is embedded in various binaries:
>
>   
> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/scsitools.html
>
>   /sbin/scsi-spin
>
>   /build/1st/scsitools-0.12/debian/scsi-spin.c:290
>   vs.
>   /build/2/scsitools-0.12/2nd/debian/scsi-spin.c:290
>
> The attached patch fixes this by setting -ffile-prefix-map in CFLAGS,
> and explicitly passing CFLAGS to make in debian/rules. The
> -ffile-prefix-map compiler flag is used to avoid embedding the absolute
> path in compiled files.
>
> Alternately, switching to use the default CFLAGS from dpkg-buildflags
> (possibly through using a newer debhelper compat version) also would
> include -ffile-prefix-map by default.

This was partially fixed in 0.12-6 and fully fixed with the
cross-building changes added in 0.14:

scsitools (0.14) unstable; urgency=medium

  * QA upload.

  [ Chris Hofstaedtler ]
  * Complete sraw removal
  * Complete scsifmt removal
  * Complete scsistop removal
  * Remove patch for kernel 2.2.14
  * Remove unnecessary dirs from debian/dirs

  [ Helmut Grohne ]
  * Fix FTCBFS.
    Let dh_auto_* pass cross flags along.
    Use host CC from buildtools.mk. (Closes: #888037)

 -- Chris Hofstaedtler <[email protected]>  Sat, 27 Sep 2025 01:36:11 +0200

Thanks for the fixes!

live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to