[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



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
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

Attachment: signature.asc
Description: PGP signature


Reply to: