Debian Bug report logs -
#1011478
scsitools: reproducible-builds: embedded build paths in various binaries
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Debian QA Group <packages@qa.debian.org>:
Bug#1011478; Package src:scsitools.
(Mon, 23 May 2022 19:30:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Debian QA Group <packages@qa.debian.org>.
(Mon, 23 May 2022 19:30:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Source: scsitools
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org
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
[0001-debian-rules-Pass-ffile-prefix-map-via-CFLAGS.patch (text/x-diff, inline)]
From 271eb71f9c87d7bab1080b5db52f3468f7acec52 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
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
[signature.asc (application/pgp-signature, inline)]
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed May 17 12:39:07 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.