Source: xaw3d
Severity: normal
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

The build path is embedded in various places in libXaw3d.so.*:

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

  ./usr/lib/x86_64-linux-gnu/libXaw3d.so.6.1

  /build/1st/xaw3d-1.5+F/xc/lib/Xaw3d/AsciiSrc.c:263
  vs.
  /build/2/xaw3d-1.5+F/2nd/xc/lib/Xaw3d/AsciiSrc.c:263

The attached patch fixes this by passing -ffile-prefix-map and -I. to
CFLAGS in debian/rules to avoid embedding the build path.


Thanks for maintaining xaw3d!


live well,
  vagrant
From 5f84216e4f3fce385a5e27317f521aa89637c63f Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Fri, 16 Jul 2021 14:43:18 +0000
Subject: [PATCH] debian/rules: Pass CFLAGS with file-prefix-map in
 dh_auto_build.

Without file-prefix-map, the build path is embedded in the resulting
binaries. This converts it into a relative path. This also requires
passing "-I." to ensure the headers in the source are available under
a relative path.

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

diff --git a/debian/rules b/debian/rules
index f8f65f3..d88124b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,8 @@ override_dh_auto_build:
 	rm -rf $(SOURCE)/X11 && install -m755 -d $(SOURCE)/X11
 	cd $(SOURCE) && ln -sf ../ X11/Xaw3d && xmkmf
 	$(MAKE) -C $(SOURCE) \
-          EXTRA_DEFINES="-D_REENTRANT -DARROW_SCROLLBAR" SHLIBDEF="-D_REENTRANT -DARROW_SCROLLBAR"
+          EXTRA_DEFINES="-D_REENTRANT -DARROW_SCROLLBAR" SHLIBDEF="-D_REENTRANT -DARROW_SCROLLBAR" \
+          CFLAGS="-ffile-prefix-map=$(CURDIR)=. -I."
 
 override_dh_auto_clean:
 	rm -rf $(SOURCE)/X11 $(COMPAT) lib/Xaw3d/laygram.h
-- 
2.32.0

Attachment: signature.asc
Description: PGP signature

Reply via email to