Debian Bug report logs - #1024279
tolua++: reproducible-builds: build path embedded in tolua++5.1

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

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

Date: Wed, 16 Nov 2022 23:18: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, Debian QA Group <packages@qa.debian.org>:
Bug#1024279; Package src:tolua++. (Wed, 16 Nov 2022 23:18: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, Debian QA Group <packages@qa.debian.org>. (Wed, 16 Nov 2022 23:18: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: tolua++: reproducible-builds: build path embedded in tolua++5.1
Date: Wed, 16 Nov 2022 15:14:55 -0800
[Message part 1 (text/plain, inline)]
Source: tolua++
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/tolua++5.1:

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

  /build/1st/tolua++-1.0.93/src/bin/tolua.c:84
  vs.
  /build/2/tolua++-1.0.93/2nd/src/bin/tolua.c:84

The attached patch to debian/rules fixes this by adding
-ffile-prefix-map to the CCFLAGS included in debian/custom.py.

According to my local tests, with this patch applied tolua++ should build
reproducibly on tests.reproducible-builds.org!

Thanks for maintaining tolua++!

live well,
  vagrant
[0001-debian-rules-Avoid-embedding-build-paths-by-adding-f.patch (text/x-diff, inline)]
From d911d743084b67294d20379c4f9375f75dcac9f1 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Wed, 16 Nov 2022 22:52:46 +0000
Subject: [PATCH] debian/rules: Avoid embedding build paths by adding
 -ffile-prefix-map to CCFLAGS.

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

diff --git a/debian/rules b/debian/rules
index 1f3c3d5..8552863 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,8 @@ override_dh_clean:
 
 override_dh_auto_configure:
 	cp $(CURDIR)/debian/custom.py $(CURDIR)
+	# Add -ffile-prefix-map to CCFLAGS to avoid embedding build paths.
+	sed -i -e "s,CCFLAGS = .,CCFLAGS =['-ffile-prefix-map=$(CURDIR)=.'\,,g" $(CURDIR)/custom.py
 	scons prefix=$(CURDIR)/debian/libtolua++5.1-dev/usr configure
 
 override_dh_auto_build:
-- 
2.38.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 11:32:03 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.