[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1011480: libxsettings-client: reproducible-builds: embedded build paths



Source: libxsettings-client
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 /usr/lib/libXsettings-client.so.0.0.0:

  https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/libxsettings-client.html

  /build/1st/libxsettings-client-0.17/xsettings-client.c:340
  vs.
  /build/2/libxsettings-client-0.17/2nd/xsettings-client.c:340

The attached patch fixes this by setting -ffile-prefix-map in CFLAGS in
debian/rules, which avoids embedding the absolute build path.

Alternately, switching to use a newer debhelper compat level and the dh
build system would likely also fix this, as it includes -ffile-prefix-map
by default.


With this patch applied, libxsettings-client should build reproducibly on
tests.reproducible-builds.org!


live well,
  vagrant
From d6c7a37cac9771a19cb4131d92970f5812e1cdce Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 23 May 2022 20:18:03 +0000
Subject: [PATCH] debian/rules: Pass -ffile-prefix-map via CFLAGS.

---
 debian/rules | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/rules b/debian/rules
index 69c4f21..2ae7593 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,9 @@ else
 	CFLAGS += -O2
 endif
 
+# Avoid embedding build path
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
+
 # shared library versions, option 1
 version=1.0.0
 major=1
-- 
2.36.1

Attachment: signature.asc
Description: PGP signature


Reply to: