Debian Bug report logs - #1024288
apcupsd: reproducible-builds: embedded path to "sh" may differ

Package: src:apcupsd; Maintainer for src:apcupsd is Thorsten Alteholz <debian@alteholz.de>;

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

Date: Thu, 17 Nov 2022 02:45:01 UTC

Severity: important

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, Thorsten Alteholz <debian@alteholz.de>:
Bug#1024288; Package src:apcupsd. (Thu, 17 Nov 2022 02:45: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, Thorsten Alteholz <debian@alteholz.de>. (Thu, 17 Nov 2022 02:45: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: apcupsd: reproducible-builds: embedded path to "sh" may differ
Date: Wed, 16 Nov 2022 18:40:47 -0800
[Message part 1 (text/plain, inline)]
Source: apcupsd
Severity: important
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: usrmerge
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

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
[0001-debian-rules-Pass-SCRIPTSHELL-to-configure.patch (text/x-diff, inline)]
From 38b81790cdf81fff2480f72c104dea371250ab11 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
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

[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:32:06 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.