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

Bug#1011488: stymulator: reproducible-builds: embedded build paths in various binaries



Source: stymulator
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/ym2wav and /usr/bin/ymplayer:

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

  /build/1st/stymulator-0.21a~dfsg/src/stsoundlib/YmUserInterface.cpp:40·(discriminator·1)
  vs.
  /build/2/stymulator-0.21a~dfsg/2nd/src/stsoundlib/YmUserInterface.cpp:40·(discriminator·1)

The attached patch fixes this by setting -ffile-prefix-map in CXXFLAGS
in debian/rules, which avoids embedding the absolute path in compiled
files.

Alternately, switching to use the default CXXFLAGS from dpkg-buildflags
(possibly through using a newer debhelper compat version) also would
include -ffile-prefix-map by default.


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


live well,
  vagrant
From f84eea4a324d31d3c3b6a16847e412984361d067 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 23 May 2022 21:25:59 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix-map to CXXFLAGS.

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

diff --git a/debian/rules b/debian/rules
index 06c429f..0702ecd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,9 @@ else
 	CXXFLAGS += -O2
 endif
 
+# Avoid embedding the build path
+CXXFLAGS += -ffile-prefix-map=$(CURDIR)=.
+
 build: build-stamp
 build-stamp:
 	dh_testdir
-- 
2.36.1

Attachment: signature.asc
Description: PGP signature


Reply to: