Debian Bug report logs - #1021331
cclive: reproducible-builds: build path embedded in /usr/bin/cclive

Package: src:cclive; Maintainer for src:cclive is Alejandro Garrido Mota <alejandro@debian.org>;

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

Date: Thu, 6 Oct 2022 00: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, Alejandro Garrido Mota <alejandro@debian.org>:
Bug#1021331; Package src:cclive. (Thu, 06 Oct 2022 00:51:03 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, Alejandro Garrido Mota <alejandro@debian.org>. (Thu, 06 Oct 2022 00:51:03 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: cclive: reproducible-builds: build path embedded in /usr/bin/cclive
Date: Wed, 05 Oct 2022 17:47:22 -0700
[Message part 1 (text/plain, inline)]
Source: cclive
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/cclive:

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

  g++,·-g·-O2·-ffile-prefix-map=/build/1st/cclive-0.9.3=.·-fstack-protector-strong ...
  vs.
  g++,·-g·-O2·-ffile-prefix-map=/build/2/cclive-0.9.3/2nd=.·-fstack-protector-strong ...

The attached proof-of-concept patch to src/cc/options.h fixes this by
not embedding CXXFLAGS in the resulting binaries.

A better fix would be to adjust the included CXXFLAGS and replace the
build path with a placeholder string (e.g. BUILDPATH), but maybe someone
who knows cclive specifically would have a better idea where would be
best to do that.

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

Thanks for maintaining cclive!

live well,
  vagrant
[0001-src-cc-options.h-Avoid-recording-the-build-flags.patch (text/x-diff, inline)]
From cb92801bf7abb55ba8af60a804aebe401f13717a Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Thu, 6 Oct 2022 00:37:11 +0000
Subject: [PATCH] src/cc/options.h: Avoid recording the build flags.

These flags embed the build path, which may vary between builds.

https://tests.reproducible-builds.org/debian/issues/unstable/records_build_flags_issue.html
---
 src/cc/options.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cc/options.h b/src/cc/options.h
index c8df39b..49ea333 100644
--- a/src/cc/options.h
+++ b/src/cc/options.h
@@ -747,7 +747,7 @@ private:
 #endif
               << "\n  built on " << BUILD_TIME
               << " for "         << CANONICAL_TARGET
-              << "\n    with "   << CXX", "CXXFLAGS
+              << "\n    with "   << CXX
               << "\n  libquvi "  << quvi::version()
               << "\n  libquvi-scripts "
               << quvi_version(QUVI_VERSION_SCRIPTS)
-- 
2.30.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 12:43:04 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.