Source: simstring
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath usrmerge
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The build path and various binary paths are embedded in
/usr/share/doc/simstring-dev/examples/sample/Makefile.gz:

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

  ACLOCAL·=·${SHELL}·/build/1st/simstring-1.0/missing·--run·aclocal-1.11
  vs.
  ACLOCAL·=·${SHELL}·/build/2/simstring-1.0/2nd/missing·--run·aclocal-1.11

  EGREP·=·/bin/grep·-E  
  vs.
  EGREP·=·/usr/bin/grep·-E

The attached patch fixes this by removing the example Makefile, which
would have to be regenerated anyways to match the running system.

If removing the example Makefile is not viable, it might be possible to
sanitize the build paths, and add relevent arguments to configure
(e.g. EGREP='/bin/grep -e') to use the specified paths.

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

Thanks for maintaining simstring!

live well,
  vagrant
From 80fdda4c12a5fe135f85cc40dd75c774838e8f67 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Fri, 9 Jun 2023 21:19:16 -0700
Subject: [PATCH] debian/rules: Remove example Makefile in dh_installexamples
 override.

The Makefile contains build paths and usrmerge paths that would not
work on a non-usrmerge system, so may have to be regenerated on the
running system anyways.

https://reproducible-builds.org/docs/build-path/
https://tests.reproducible-builds.org/debian/issues/unstable/paths_vary_due_to_usrmerge_issue.html
---
 debian/rules | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/rules b/debian/rules
index f997dbb..2333bf8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,3 +13,7 @@ export DEB_BUILD_MAINT_OPTIONS := hardening=+all
 
 %:
 	dh $@
+
+override_dh_installexamples:
+	dh_installexamples
+	rm -vf debian/simstring-dev/usr/share/doc/simstring-dev/examples/sample/Makefile
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature

Reply via email to