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

Package: src:bplay; Maintainer for src:bplay is Carlos Laviola <claviola@debian.org>;

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

Date: Tue, 27 Sep 2022 22:33:05 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, Carlos Laviola <claviola@debian.org>:
Bug#1020884; Package src:bplay. (Tue, 27 Sep 2022 22:33:07 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, Carlos Laviola <claviola@debian.org>. (Tue, 27 Sep 2022 22:33:07 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: bplay: reproducible-builds: build path embedded in /usr/bin/bplay
Date: Tue, 27 Sep 2022 15:31:10 -0700
[Message part 1 (text/plain, inline)]
Source: bplay
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/bplay:

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

  /build/1st/bplay-0.991/bplay.c:111
  vs.
  /build/2/bplay-0.991/2nd/bplay.c:111

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

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

Thanks for maintaining bplay!

live well,
  vagrant
[0001-debian-rules-Add-ffile-prefix-map-to-CFLAGS-to-avoid.patch (text/x-diff, inline)]
From 7a2950b0734809ceab2ce3f578f775aa23699049 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 27 Sep 2022 22:28:11 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix-map to CFLAGS to avoid
 embedding build paths.

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

diff --git a/debian/rules b/debian/rules
index 6d0aca4..299e8c2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,9 @@
 
 CFLAGS = -Wall -g
 
+# Avoid embedding the build path for reproducible builds
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
+
 INSTALL = install
 INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
 INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
-- 
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 13:28:13 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.