Debian Bug report logs - #1021512
yersinia: reproducible-builds: build path embedded in /usr/bin/yersinia

Package: src:yersinia; Maintainer for src:yersinia is Noël Köthe <noel@debian.org>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Sun, 9 Oct 2022 22:09:02 UTC

Severity: normal

Tags: patch

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Noël Köthe <noel@debian.org>:
Bug#1021512; Package src:yersinia. (Sun, 09 Oct 2022 22:09:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Noël Köthe <noel@debian.org>. (Sun, 09 Oct 2022 22:09:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: yersinia: reproducible-builds: build path embedded in /usr/bin/yersinia
Date: Sun, 09 Oct 2022 15:07:08 -0700
[Message part 1 (text/plain, inline)]
Source: yersinia
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build path is embedded in /usr/bin/yersinia:

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

  /build/1st/yersinia-0.8.2/src/yersinia.c:104
  vs.
  /build/2/yersinia-0.8.2/2nd/src/yersinia.c:104

The attached patch to debian/rules fixes this by passing CFLAGS directly
to make, and adding -ffile-prefix-map to CFLAGS to avoid embedding build
paths.

According to my local tests, with this patch applied, yersinia should build
reproducibly on tests.reproducible-builds.org!

Thanks for maintaining yersinia!

live well,
  vagrant
[0001-debian-rules-Pass-CFLAGS-directly-to-make-and-add-ff.patch (text/x-diff, inline)]
From 07a0c305ca6db96371243184b2c4469fd30c3d11 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 9 Oct 2022 22:03:45 +0000
Subject: [PATCH] debian/rules: Pass CFLAGS directly to make, and add
 -ffile-prefix-map to CFLAGS to avoid embedding build paths.

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

diff --git a/debian/rules b/debian/rules
index 5e53fa6..c2f3893 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,8 @@ endif
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 CFLAGS = -Wall -g
+# Avoid embedding build path for reproducible builds
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
 
 config.status:
 	dh_testdir
@@ -37,7 +39,7 @@ build-stamp:  config.status
 	dh_testdir
 
 	# Add here commands to compile the package.
-	$(MAKE)
+	$(MAKE) CFLAGS="$(CFLAGS)"
 	#docbook-to-man debian/yersinia.sgml > yersinia.1
 
 	touch build-stamp
-- 
2.37.2

[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 12:43:59 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.