Source: apcupsd
Severity: important
Tags: patch
User: [email protected]
Usertags: usrmerge
X-Debbugs-Cc: [email protected]

The path to the "sh" binary differs depending on if it is built in an
environment with or without usrmerge:

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

  /etc/apcupsd/apccontrol

  #!/bin/sh
  vs.
  #!/usr/bin/sh

The attached patch fixes this in debian/rules by passing the SCRIPTSHELL
variable in the dh_auto_configure override, using the most compatible
path.

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

Thanks for maintaining apcupsd!

live well,
  vagrant
From 38b81790cdf81fff2480f72c104dea371250ab11 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Thu, 17 Nov 2022 01:32:46 +0000
Subject: [PATCH 1/2] debian/rules: Pass SCRIPTSHELL to configure.

Otherwise, this gets embedded differently depending on the path of
"sh", such as a usrmerge vs. non-usrmerge environment.
---
 debian/rules | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 9b07b03..609920f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -33,7 +33,8 @@ override_dh_auto_configure:
 		--with-nisip=127.0.0.1 \
 		--with-upstype=usb \
 		--with-upscable=usb \
-		SHUTDOWN=/sbin/shutdown
+		SHUTDOWN=/sbin/shutdown \
+		SCRIPTSHELL=/bin/sh
 # as gconf shall disappear, do not enable gapcom
 #		--enable-gapcmon
 
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature

Reply via email to