Debian Bug report logs - #1011491
getstream: reproducible-builds: embedded build paths in /usr/bin/getstream

Package: src:getstream; Maintainer for src:getstream is Debian QA Group <packages@qa.debian.org>;

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

Date: Mon, 23 May 2022 22:24:01 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, Debian QA Group <packages@qa.debian.org>:
Bug#1011491; Package src:getstream. (Mon, 23 May 2022 22:24:03 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, Debian QA Group <packages@qa.debian.org>. (Mon, 23 May 2022 22:24: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: getstream: reproducible-builds: embedded build paths in /usr/bin/getstream
Date: Mon, 23 May 2022 15:20:42 -0700
[Message part 1 (text/plain, inline)]
Source: getstream
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/getstream:

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

  /build/1st/getstream-20100616/getstream.c:30
  vs.
  /build/2/getstream-20100616/2nd/getstream.c:30

The attached patches fix this by passing CFLAGS via EXTRA_CFLAGS in a
dh_auto_build override in debian/rules, and adjusting the upstream
Makefile to append EXTRA_CFLAGS to CFLAGS. This allows passing the
default build flags including -ffile-prefix-map, which avoids embedding
the absolute path in compiled files.


With these patches applied, getstream should build reproducibly on
tests.reproducible-builds.org!


live well,
  vagrant
[0001-Makefile-Append-EXTRA_CFLAGS-to-CFLAGS.patch (text/x-diff, inline)]
From c0b0fc68cec2a532dcdfe134271623fceb3813c3 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 23 May 2022 22:16:24 +0000
Subject: [PATCH 1/2] Makefile: Append EXTRA_CFLAGS to CFLAGS.

---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 501467f..53b05c0 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,8 @@ else
 CFLAGS+=-O0 -g
 endif
 
+CFLAGS += $(EXTRA_CFLAGS)
+
 LDFLAGS=-lpthread
 
 MDEFS := $(shell sh Makefile.defs.sh >Makefile.defs)
-- 
2.36.1

[0002-debian-rules-Pass-CFLAGS-via-EXTRA_CFLAGS-in-dh_auto.patch (text/x-diff, inline)]
From 20a63cf51a2cea9a9086fe4a3222a7e2f90aef37 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 23 May 2022 22:16:46 +0000
Subject: [PATCH 2/2] debian/rules: Pass CFLAGS via EXTRA_CFLAGS in
 dh_auto_build override.

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

diff --git a/debian/rules b/debian/rules
index bf3f0e8..5883c49 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,3 +9,6 @@ include /usr/share/dpkg/buildtools.mk
 
 %:
 	dh $@
+
+override_dh_auto_build:
+	dh_auto_build -- EXTRA_CFLAGS="$(CFLAGS)"
-- 
2.36.1

[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:38:49 2023; Machine Name: bembo

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.