Source: bglibs
Severity: serious
Justification: TC resolution #994388
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: usrmerge
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The path to perl is embedded differently in /usr/bin/cli-generate
depending on if it was built on a usrmerge vs. non-usrmerge system.

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

  /usr/bin/cli-generate

  #!·/usr/bin/perl
  vs.
  #!·/bin/perl

The attached patch fixes this by explicitly specifying the path as
/usr/bin/perl instead of using 'which' to detect the path, which is
compatible with both usrmerge and non-usrmerge systems.


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


Thanks for maintaining bglibs!

live well,
  vagrant
From c62fcbde299245ffcd027fd524f2fd2419d874c4 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Fri, 9 Jun 2023 18:44:06 -0700
Subject: Makefile: Ensure perl path is set to '/usr/bin/perl'.

Using 'which' to detect the path to perl may result in /bin/perl,
which is only typically available on usrmerge systems. /usr/bin/perl
is where perl has actually been installed for quite some time, and is
unlikely to change.

https://tests.reproducible-builds.org/debian/issues/unstable/paths_vary_due_to_usrmerge_issue.html
---
 Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 2600365..8a87feb 100644
--- a/Makefile
+++ b/Makefile
@@ -864,8 +864,7 @@ path/mktemp.lo path/mktemp.o: ltcompile path/mktemp.c systime.h include/bglibs/p
 
 perl-head.pl: 
 	( set -e; PATH="/bin:/usr/bin:/usr/local/bin:$$PATH"; export PATH; \
-	  perl=`which perl`; \
-	  echo "#! $$perl"; \
+	  echo "#! /usr/bin/perl"; \
 	  echo "# WARNING: This file was auto-generated. Do not edit!"; \
 	  echo ) >perl-head.pl
 
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature

Reply via email to