Debian Bug report logs -
#1021461
icon: reproducible-builds: buildid differences in /usr/bin/icon*
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#1021461; Package src:icon.
(Sat, 08 Oct 2022 23:21:07 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>.
(Sat, 08 Oct 2022 23:21:07 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Source: icon
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org
The buildid varies when built from a different path for /usr/bin/icont
and /usr/bin/iconx:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/icon.html
The attached patch to debian/rules fixes this by adding
-ffile-prefix-map to CFLAGS, and adjusting a call to sed to handle "/"
in the expression.
According to my local tests, with this patch applied, icon should build
reproducibly on tests.reproducible-builds.org!
Thanks for maintaining icon!
live well,
vagrant
[0001-debian-rules-Add-ffile-prefix-map-to-CFLAGS-to-avoid.patch (text/x-diff, inline)]
From 0235dc52092db96208f3e0c051a10b0dbccf127d Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sat, 8 Oct 2022 23:12:15 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix-map to CFLAGS to avoid
embedded build paths. Adjust call to sed to handle "/" in the expression.
While the build path doesn't directly show up in the binaries, the
buildid may differs dependent on the build path.
---
debian/rules | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/debian/rules b/debian/rules
index 006ceb1..e5377bd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,9 +30,12 @@ endif
CFLAGS = -Wall -g $(CFLAGS_OPT)
+# Avoid embedding build paths for reproducible builds
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
+
configure:
$(MAKE) X-Configure name=$(system)
- sed "s/CFLAGS = .*/CFLAGS = $(CFLAGS)/" Makedefs > Makedefs.tmp
+ sed "s%CFLAGS = .*%CFLAGS = $(CFLAGS)%" Makedefs > Makedefs.tmp
echo "ASFLAGS = -Wa,--noexecstack" >> Makedefs.tmp
mv Makedefs.tmp Makedefs
touch $@
--
2.37.2
[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:44:23 2023;
Machine Name:
bembo
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.