Source: aewm++-goodies
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/aewm++-goodies.html

  /usr/bin/aewm++_appbar

  /build/1st/aewm++-goodies-1.0/appbar-1.0/main.cc:40·(discriminator·1)
  vs.
  /build/2/aewm++-goodies-1.0/2nd/appbar-1.0/main.cc:40·(discriminator·1)

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

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

Thanks for maintaining aewm++-goodies!

live well,
  vagrant
From 8ca958bfb659ad434c1909a21e5fa9baca5a77d1 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 27 Sep 2022 00:37:43 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix-map to CFLAGS to avoid
 embedding build paths.

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

diff --git a/debian/rules b/debian/rules
index 8393165..7234be0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,9 @@
 
 CFLAGS = -Wall -Wno-deprecated -g
 
+# Avoid embedding build path for reproducible builds
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
+
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
 	LDFLAGS += -O0
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to