Debian Bug report logs - #1011486
tdfsb: reproducible-builds: embedded build paths in /usr/games/tdfsb

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

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

Date: Mon, 23 May 2022 21:15:04 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#1011486; Package src:tdfsb. (Mon, 23 May 2022 21:15:06 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 21:15:06 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: tdfsb: reproducible-builds: embedded build paths in /usr/games/tdfsb
Date: Mon, 23 May 2022 14:11:22 -0700
[Message part 1 (text/plain, inline)]
Source: tdfsb
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/games/tdfsb:

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

  /build/1st/tdfsb-0.0.10/tdfsb.c:2909
  vs.
  /build/2/tdfsb-0.0.10/2nd/tdfsb.c:2909


The attached patch fixes this by adjusting compile.sh to include
-ffile-prefix-map in CFLAGS to avoid embedding the absolute path in
compiled files.

Alternately, updating to a newer version of debhelper-compat and dh, and
adjusting debian/patches/set_cflags.diff to only allow setting CFLAGS
would allow using the default CFLAGS from dpkg-buildflags.


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


live well,
  vagrant
[0001-compile.sh-Add-ffile-prefix-map-to-CFLAGS.patch (text/x-diff, inline)]
From cbb0273f0e3bc4264610158b4894d7418a6d1674 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 23 May 2022 20:46:06 +0000
Subject: [PATCH 1/4] compile.sh: Add -ffile-prefix-map to CFLAGS.

This avoids embedding the build path in the resulting binaries.

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

diff --git a/compile.sh b/compile.sh
index f957eb2..740b227 100755
--- a/compile.sh
+++ b/compile.sh
@@ -11,7 +11,7 @@ execfind ()
     done;
 }
 
-CFLAGS="-O2 -Wall -g"
+CFLAGS="-O2 -Wall -g -ffile-prefix-map=$(pwd)=."
 SDL_CONFIG=$(execfind sdl-config sdl11-config sdl10-config sdl12-config \/boot\/develop\/tools/gnupro\/bin\/sdl-config);
 
 if ! "$SDL_CONFIG" --version > /dev/null; then
-- 
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:35 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.