Source: libksba
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 of is embedded in libksba:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/libksba.html
  
                 vs.
l.c./build/1st/l     l.c./build/2/lib
ibksba-1.6.0/bui         ksba-1.6.0/2nd/b
ld-i686-w64-ming         uild-i686-w64-mi

This is because the default CFLAGS from dpkg-buildpackage are not
applied to the w64-ming32 builds.

The attached patch to debian/rules adds
"CFLAGS=... -ffile-prefix-map=$(CURDIR)=." to the WIN_FLAGS variable.


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


Thanks for maintaining libksba!


live well,
  vagrant
 
From 78df538fa2877502c3381496ac82acb595217fa1 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Wed, 19 Jan 2022 03:36:50 +0000
Subject: [PATCH] debian/rules: Pass -ffile-prefix-map via CFLAGS in WIN_FLAGS.

WIN_FLAGS does not include the standard CFLAGS from dpkg-buildflags,
which includes -ffile-prefix-map to avoid embedding the build paths in
the binaries. Adding it makes the package build reproducibly
regardless of build path.
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 21ed9a5..f7f311f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,7 +15,7 @@ override_dh_auto_configure:
 
 ### "arch-independent" Windows builds: ###
 
-WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os" CPPFLAGS=
+WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os -ffile-prefix-map=$(CURDIR)=." CPPFLAGS=
 
 override_dh_auto_build-indep:
 	for cpu in i686 x86_64; do \
-- 
2.34.1

Attachment: signature.asc
Description: PGP signature

Reply via email to