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

2023-11-24 Thread Neil Roeth
It is not clear to me how to test if the path is embedded in the 
libraries and whether the fix for this is still needed.  I did a simple 
grep for part of my local build path in the libraries of this package 
and got no hits.  Maybe something has changed since this bug was filed 
so that this is no longer a problem?




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

2022-09-26 Thread Vagrant Cascadian
Source: aplus-fsf
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@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
From 34cab0768b5a6e69a21a4f9384cb24f42a839333 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian 
Date: Tue, 27 Sep 2022 02:17:29 +
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
Description: PGP signature