Source: lomiri-action-api
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@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
From 84bc9ecaacf07da59a4e7e0dd7a8c60870431e91 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@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

From a27be3c625f2103b8a7efd1718ae3455fc8bb699 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@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

Attachment: signature.asc
Description: PGP signature

Reply via email to