Debian Bug report logs - #1020872
xvier: reproducible-builds: buildid differences in /usr/games/xvier*

Package: src:xvier; Maintainer for src:xvier is Josip Rodin <joy-packages@debian.org>;

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

Date: Tue, 27 Sep 2022 19:51:01 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, Josip Rodin <joy-packages@debian.org>:
Bug#1020872; Package src:xvier. (Tue, 27 Sep 2022 19:51: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, Josip Rodin <joy-packages@debian.org>. (Tue, 27 Sep 2022 19:51: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: xvier: reproducible-builds: buildid differences in /usr/games/xvier*
Date: Tue, 27 Sep 2022 12:49:07 -0700
[Message part 1 (text/plain, inline)]
Source: xvier
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

When the build path differs it results in a different buildid in
/usr/games/xvier*:

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

The attached patch to debian/rules fixes this by adding
-ffile-prefix-map to CFLAGS.

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

Thanks for maintaining xvier!

live well,
  vagrant
[0001-debian-rules-Add-ffile-prefix-map-to-CFLAGS-to-avoid.patch (text/x-diff, inline)]
From a0f90b9905671ca1dcf5aed9c41af76f99ee00cc Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 27 Sep 2022 19:45:45 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix-map to CFLAGS to avoid
 embedding the build path.

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

diff --git a/debian/rules b/debian/rules
index 45388d2..c7e4544 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,9 @@ ifeq "$(findstring noopt,$(DEB_BUILD_OPTIONS))" ""
 CFLAGS += -O2
 endif
 
+# Avoid embedding build path for reproducible builds
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
+
 build: xvier debian/rules
 xvier: xvier.c
 	xmkmf
-- 
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:27:50 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.