Source: mailfront
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 triggers different buildid in /usr/lib/mailfront/*.so:

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

  ./usr/lib/mailfront/backend-echo.so

  
...NT_GNU_BUILD_ID·(unique·build·ID·bitstring)»...Build·ID:·018da3a354a5af384c85c7ec0a93f96d596038bc
  vs.
  
...NT_GNU_BUILD_ID·(unique·build·ID·bitstring)»...Build·ID:·9e821d0b9661312dde9181fc7619275241606d73

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

Alternately, updating to "dh" build system and updating debhelper compat
level might also fix the issue.


There is another outstanding reproducibility issue(sort order of md5sum
files), but applying this patch should significantly reduce the
differences when tested on tests.reproducible-builds.org.


live well,
  vagrant
From d54ca93264cde955a9b60646a0b796936c0813cb Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Sun, 15 May 2022 20:05:44 +0000
Subject: [PATCH] debian/rules: Pass -ffile-prefix-map via CFLAGS to avoid
 embedding build path.

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

diff --git a/debian/rules b/debian/rules
index 0662d3f..b9257ab 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 CC =gcc
-CFLAGS =-W -Wall -Wshadow -O2 -g
+CFLAGS =-W -Wall -Wshadow -O2 -g -ffile-prefix-map=$(CURDIR)=.
 STRIP =strip
 
 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-- 
2.36.1

Attachment: signature.asc
Description: PGP signature

Reply via email to