Debian Bug report logs - #1034129
lomiri-action-api: reproducible-builds: build paths trigger differences

Package: src:lomiri-action-api; Maintainer for src:lomiri-action-api is Debian UBports Team <team+ubports@tracker.debian.org>;

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

Date: Mon, 10 Apr 2023 00:42: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 UBports Team <team+ubports@tracker.debian.org>:
Bug#1034129; Package src:lomiri-action-api. (Mon, 10 Apr 2023 00:42: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 UBports Team <team+ubports@tracker.debian.org>. (Mon, 10 Apr 2023 00:42: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: lomiri-action-api: reproducible-builds: build paths trigger differences
Date: Sun, 09 Apr 2023 17:38:48 -0700
[Message part 1 (text/plain, inline)]
Source: lomiri-action-api
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The RPATH contains the build path resulting in different buildid, as
well as some build paths embedded in documentation:

  https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/lomiri-action-api.html

  /usr/share/doc/lomiri-action-doc/qml/lomiri-action-qml-api.index.gz

  ... filepath="/build/1st/lomiri-action-api-1.1.2/documentation/qml/qml-api/Action.qml
  vs.
  ... filepath="/build/2/lomiri-action-api-1.1.2/2nd/documentation/qml/qml-api/Action.qml

The attached patches to debian/rules fix this by passing
-DCMAKE_BUILD_RPATH_USE_ORIGIN=ON via a dh_auto_configure override and
adds a dh_installdocs override to strip the build path from the
documentation.


With these patches applied, based on my local tests, lomiri-action-api
should build reproducibly on tests.reproducible-builds.org!


Thanks for maintaining lomiri-action-api!

live well,
  vagrant
[0001-debian-rules-Pass-DCMAKE_BUILD_RPATH_USE_ORIGIN-ON-v.patch (text/x-diff, inline)]
From 84bc9ecaacf07da59a4e7e0dd7a8c60870431e91 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 9 Apr 2023 17:17:57 -0700
Subject: [PATCH 1/2] debian/rules: Pass -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON via
 dh_auto_configure override.

This avoids embedding the full path in RPATH, which triggers BuildId
differences.

https://tests.reproducible-builds.org/debian/issues/unstable/cmake_rpath_contains_build_path_issue.html
---
 debian/rules | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/rules b/debian/rules
index aacdcde..5d593a5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,7 @@ include /usr/share/dpkg/buildflags.mk
 override_dh_auto_configure:
 	dh_auto_configure -- -DGENERATE_DOCUMENTATION=ON	\
 	                     -Duse_libhud2=OFF			\
+	                     -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON	\
 	                     $(NULL)
 
 override_dh_install:
-- 
2.39.2

[0002-debian-rules-Add-dh_installdocs-override-to-remove-b.patch (text/x-diff, inline)]
From a27be3c625f2103b8a7efd1718ae3455fc8bb699 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 9 Apr 2023 17:20:24 -0700
Subject: [PATCH 2/2] debian/rules: Add dh_installdocs override to remove build
 path from lomiri-action-qml-api.index.

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

diff --git a/debian/rules b/debian/rules
index 5d593a5..2de6115 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,6 +25,11 @@ override_dh_install:
 	symlinks -rc "debian/tmp/usr/share/doc/lomiri-action-doc/"
 	dh_install
 
+override_dh_installdocs:
+	dh_installdocs
+	# Remove the build directory from the generated documentation for reproducible builds
+	sed -i -e "s,$(CURDIR),,g" debian/lomiri-action-doc/usr/share/doc/lomiri-action-doc/qml/lomiri-action-qml-api.index
+
 override_dh_missing:
 	dh_missing --fail-missing
 
-- 
2.39.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 11:44:00 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.