Source: zephyr
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
/usr/lib/x86_64-linux-gnu/libzephyr.so.4.0.0:

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

  /build/1st/zephyr-3.1.2/krb5/lib/zephyr_err.c:61
  vs.
  /build/2/zephyr-3.1.2/2nd/krb5/lib/zephyr_err.c:61

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

According to my local tests, with this patch and the patch for #828867
applied, zephyr should build reproducibly on
tests.reproducible-builds.org!

Thanks for maintaining zephyr!

live well,
  vagrant
 
From c1dd58714b0bf41effbc7ce4162ac2e0d347fc61 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Fri, 7 Oct 2022 00:06:50 +0000
Subject: [PATCH 2/2] debian/rules: Pass -ffile-prefix-map via CFLAGS to avoid
 embedding the 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 f81ecc9..1e8f9ed 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@
 # Uncomment this to turn on verbose mode. 
 #export DH_VERBOSE=1
 VARIETALS=krb5
-CFLAGS=-g -O
+CFLAGS=-g -O -ffile-prefix-map=$(CURDIR)=.
 
 PACKAGES:=-plibzephyr4 -pzephyr-clients -pzephyr-server -plibzephyr-dev $(foreach i,$(VARIETALS),-plibzephyr4-$(i) -pzephyr-server-$(i))
 
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to