Source: sofia-sip
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 through various uses of __FILE__ in the
sofia-sip code.

The attached patch fixes this by setting CFLAGS in debian/rules using
dpkg-buildflags, which passes the -ffile-prefix-map argument in recent
versions of dpkg. Alternately, upgrading to a recent debhelper compat
level and dh would also probably fix this issue.


Unfortunately, this patch does not resolve all reproducibility issues in
sofia-sip, but the arch:any packages should be fixed by this change,
leaving only sofia-sip-doc unreproducible.

Applying the patch may also make the diffoscope output more reliable, as
it frequently times out comparing builds from unstable:

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


Thanks for maintaining sofia-sip!


live well,
  vagrant
From f4dbfb48ebf6e51af19102aa58bc27b3e59153be Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 9 Mar 2021 03:47:11 +0000
Subject: [PATCH] debian/rules: Set CFLAGS with dpkg-buildflags.

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

diff --git a/debian/rules b/debian/rules
index a3bf4ce..75a9cc2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,8 @@ NUM_CPUS = $(shell getconf _NPROCESSORS_ONLN 2>/dev/null)
 PARALLEL = $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 NJOBS    = -j$(or $(PARALLEL),$(NUM_CPUS),1)
 
+export CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
+
 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to