Debian Bug report logs - #1020650
tmpreaper: reproducible-builds: Embedded build path in /usr/sbin/tmpreaper

Package: src:tmpreaper; Maintainer for src:tmpreaper is Paul Slootman <paul@debian.org>;

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

Date: Sat, 24 Sep 2022 20:21: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, Paul Slootman <paul@debian.org>:
Bug#1020650; Package src:tmpreaper. (Sat, 24 Sep 2022 20:21: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, Paul Slootman <paul@debian.org>. (Sat, 24 Sep 2022 20:21: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: tmpreaper: reproducible-builds: Embedded build path in /usr/sbin/tmpreaper
Date: Sat, 24 Sep 2022 13:18:00 -0700
[Message part 1 (text/plain, inline)]
Source: tmpreaper
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/sbin/tmpreaper:

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

  /build/1st/tmpreaper-1.6.17/tmpreaper.c:752
  vs.
  /build/2/tmpreaper-1.6.17/2nd/tmpreaper.c:752

The attached patch fixes this by passing the -ffile-prefix-map argument
via CFLAGS in debian/rules. Another option that *might* fix this and
other issues would be to fully switch to dh and a recent debhelper
compat level.


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


Thanks for maintaining tmpreaper!


live well,
  vagrant
[0001-debian-rules-Pass-ffile-prefix-map-via-CFLAGS-to-avo.patch (text/x-diff, inline)]
From 2595a8d2a0a4dfe496b44f5f45200d7131d06cf9 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sat, 24 Sep 2022 20:05:03 +0000
Subject: [PATCH] debian/rules: Pass -ffile-prefix-map via CFLAGS to avoid
 embedding the build directory.

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

diff --git a/debian/rules b/debian/rules
index e106bb2..911e331 100755
--- a/debian/rules
+++ b/debian/rules
@@ -40,7 +40,7 @@ build: build-stamp
 build-stamp:
 	dh_testdir
 	./configure --prefix=/usr --mandir=/usr/share/man
-	make CPPFLAGS="-DDEBIAN" tmpreaper
+	make CFLAGS="-ffile-prefix-map=$(CURDIR)=." CPPFLAGS="-DDEBIAN" tmpreaper
 	./tmpreaper -h 2>&1 | grep 'tmpreaper -- Version: '$(debian_version)-DEB || (echo "You forgot to fix the VERSION in configure.ac!"; exit 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 13:28:57 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.