Debian Bug report logs - #1020817
aplus-fsf: reproducible-builds: Embedded build paths in binaries

Package: src:aplus-fsf; Maintainer for src:aplus-fsf is Neil Roeth <neil@debian.org>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Tue, 27 Sep 2022 02:24:02 UTC

Severity: normal

Tags: patch

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Neil Roeth <neil@debian.org>:
Bug#1020817; Package src:aplus-fsf. (Tue, 27 Sep 2022 02:24: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, Neil Roeth <neil@debian.org>. (Tue, 27 Sep 2022 02:24:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: aplus-fsf: reproducible-builds: Embedded build paths in binaries
Date: Mon, 26 Sep 2022 19:21:23 -0700
[Message part 1 (text/plain, inline)]
Source: aplus-fsf
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/aplus-fsf.html

  /usr/lib/aplus-fsf/libAplusGUI.so.0.0.0

  /build/1st/aplus-fsf-4.22.1/src/AplusGUI/../MSGUI/MSGC.H:58
  vs.
  /build/2/aplus-fsf-4.22.1/2nd/src/AplusGUI/../MSGUI/MSGC.H:58

The attached patch to debian/rules fixes this by adding adding
-ffile-prefix-map to CFLAGS and CXXFLAGS.

According to my local tests, with this patch applied aplus-fsf should
build reproducibly on tests.reproducible-builds.org!

Thanks for maintaining aplus-fsf!

live well,
  vagrant
[0001-debian-rules-Add-ffile-prefix-map-to-CFLAGS-and-CXXF.patch (text/x-diff, inline)]
From 34cab0768b5a6e69a21a4f9384cb24f42a839333 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 27 Sep 2022 02:17:29 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix-map to CFLAGS and CXXFLAGS to
 avoid embedding build paths.

https://reproducible-builds.org/docs/build-path/
---
 debian/rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules b/debian/rules
index 84f8fd4..dd6e933 100755
--- a/debian/rules
+++ b/debian/rules
@@ -56,6 +56,8 @@ else
   CFLAGS += -O2
   CXXFLAGS += -O2
 endif
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
+CXXFLAGS += -ffile-prefix-map=$(CURDIR)=.
 export CFLAGS
 export CXXFLAGS
 export LDFLAGS
-- 
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 13:27:47 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.