GNU bug report logs - #70484
Fix compatibility of build-aux/make-info-dir script

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Felix Janda <felix.janda@HIDDEN>; Done: Ulrich Mueller <ulm@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 29.4, send any further explanations to 70484 <at> debbugs.gnu.org and Felix Janda <felix.janda@HIDDEN> Request was from Ulrich Mueller <ulm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 70484 <at> debbugs.gnu.org:


Received: (at 70484) by debbugs.gnu.org; 23 Apr 2024 17:57:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 23 13:57:45 2024
Received: from localhost ([127.0.0.1]:53537 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzKOj-0008A9-6h
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 13:57:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48600)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rzKOX-000876-Of
 for 70484 <at> debbugs.gnu.org; Tue, 23 Apr 2024 13:57:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rzKO9-0008QN-Uz; Tue, 23 Apr 2024 13:57:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=8G5CzhryrGYlIYoZvimH9fsT2uhBlI/aussIC5zqeLE=; b=TW3Yfr7RAt+d
 Gt2boBSxngBamjrs8feQz7Vfex8JWkn9JpkrFdfmNZ+NlHD1qeh6SoauAZ+y7vAPcbDCH24Qd3G/K
 ILc0xh3x+TZne7bMyp8ar9m6qAaDrzeUd/mGX7+ix3HQ/0YAgRFSGVGH0v9iOxObSHkhxUItr9d0v
 32GZfSUjVZx+Wp2MuNh4Z0cLNR9SO+J4r/z/l8KZdAoluMzJEX7oJIGoQamjDIOYVP+MMZM2y5Ze7
 a8pA/d5zcL2troUH3WwrHepIvvZBk92qwbAkSB+FqkWhzv5c8mTcyh+bCHq79xzykqlbhwv38aJqj
 OAB5zK5PJ3iLqcyidviq4A==;
Date: Tue, 23 Apr 2024 20:57:01 +0300
Message-Id: <868r143qtu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ulrich Mueller <ulm@HIDDEN>
In-Reply-To: <u34rcrnex@HIDDEN> (message from Ulrich Mueller on Tue, 23
 Apr 2024 19:36:54 +0200)
Subject: Re: bug#70484: Fix compatibility of build-aux/make-info-dir script
References: <ZiQSFS4PxRoZmXZJ@localhost> <u34rcrnex@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70484
Cc: 70484 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ulrich Mueller <ulm@HIDDEN>
> Date: Tue, 23 Apr 2024 19:36:54 +0200
> 
> Attached patch fixes the problem for me. It applies cleanly to both
> emacs-29 and master.

Thanks, please install on the emacs-29 branch.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70484; Package emacs. Full text available.

Message received at 70484 <at> debbugs.gnu.org:


Received: (at 70484) by debbugs.gnu.org; 23 Apr 2024 17:37:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 23 13:37:28 2024
Received: from localhost ([127.0.0.1]:53444 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzK58-0004eJ-Da
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 13:37:28 -0400
Received: from mail.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:38559
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ulm@HIDDEN>) id 1rzK54-0004c9-NI
 for 70484 <at> debbugs.gnu.org; Tue, 23 Apr 2024 13:37:24 -0400
From: Ulrich Mueller <ulm@HIDDEN>
To: 70484 <at> debbugs.gnu.org
Subject: Re: Fix compatibility of build-aux/make-info-dir script
Date: Tue, 23 Apr 2024 19:36:54 +0200
Message-ID: <u34rcrnex@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 70484
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Attached patch fixes the problem for me. It applies cleanly to both
emacs-29 and master.

--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-build-aux-make-info-dir-Avoid-bashism-bug-70484.patch

From cb490ee7a8365c6375dc6c7a5f6d8202ab381219 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@HIDDEN>
Date: Tue, 23 Apr 2024 07:37:17 +0200
Subject: [PATCH] * build-aux/make-info-dir: Avoid bashism (bug#70484).

---
 build-aux/make-info-dir | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/build-aux/make-info-dir b/build-aux/make-info-dir
index e5f4972902f..631fe533e69 100755
--- a/build-aux/make-info-dir
+++ b/build-aux/make-info-dir
@@ -33,7 +33,8 @@
 
 ## Header contains non-printing characters, so this is more
 ## reliable than using awk.
-cat <"${1?}" || exit
+test $# -ge 2 || exit 1
+cat <"$1"
 shift
 
 exec "${AWK-awk}" '
@@ -101,4 +102,4 @@       detexinfo()
       if (data[dircat])
         printf "\n%s\n%s", topic[dircat], data[dircat]
   }
-' "${@?}"
+' "$@"
-- 
2.44.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70484; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Apr 2024 21:16:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 20 17:16:25 2024
Received: from localhost ([127.0.0.1]:38227 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ryI4O-0007JR-Rn
	for submit <at> debbugs.gnu.org; Sat, 20 Apr 2024 17:16:25 -0400
Received: from lists.gnu.org ([2001:470:142::17]:60626)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <felix.janda@HIDDEN>) id 1ryG2i-0006B7-S2
 for submit <at> debbugs.gnu.org; Sat, 20 Apr 2024 15:06:34 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <felix.janda@HIDDEN>)
 id 1ryG2N-00047h-Q2
 for bug-gnu-emacs@HIDDEN; Sat, 20 Apr 2024 15:06:12 -0400
Received: from mout02.posteo.de ([185.67.36.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <felix.janda@HIDDEN>)
 id 1ryG2J-0001GR-Cu
 for bug-gnu-emacs@HIDDEN; Sat, 20 Apr 2024 15:06:11 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id A0DC0240101
 for <bug-gnu-emacs@HIDDEN>; Sat, 20 Apr 2024 21:06:03 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017;
 t=1713639963; bh=XJbB8hUQTdaHo6hGNaD3+otd//sSMhSQdPbrNs00Phs=;
 h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:
 Content-Disposition:From;
 b=QA2bHIBKuE/tcNWmCQZb8J0Gbl4DWKhNAL6AaCvxMLEaKefRR1IHM3O46wsfpj904
 y4GsDoKx3A/TXfnNPnKiyV3+u52306UT7wf6ahM/ihguhKMRydhMfejBb/2eQQThvj
 eBdDjm6qsE0T09eedU1bSARaXC8U276qH4z3+SalbguWW5pH7zDgZ4svOPmz6xnfMb
 ZL4q0a7RqYx4UIOimMd9t8LJvKxrXxHvsWK0V/PaznM/qmm5xk5lERxEd4w+AM+fft
 0mbwG+pE69PNtWcKIFwFrUDd6RTvqv215ZiDK9YKgsyQQiRo6DgNyK3V34G1TRBjko
 O1jcGrr2Bzybg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VMLZf1N4sz9rxL
 for <bug-gnu-emacs@HIDDEN>; Sat, 20 Apr 2024 21:06:01 +0200 (CEST)
Date: Sat, 20 Apr 2024 19:05:57 +0000
From: Felix Janda <felix.janda@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Fix compatibility of build-aux/make-info-dir script
Message-ID: <ZiQSFS4PxRoZmXZJ@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Received-SPF: pass client-ip=185.67.36.66; envelope-from=felix.janda@HIDDEN;
 helo=mout02.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 20 Apr 2024 17:16:24 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi,

I'm reporting the bug in the build scripts:

https://bugs.gentoo.org/930086

To summarize, the build-aux/make-info-dir script uses the substitution
${@?}, which is incompatible with mksh (and possibly other shells) and
undefined behavior in the proposed next POSIX standard.

A possible fix is to check $# at the beginning of the script, and then
simplify the rest of the script.

Felix




Acknowledgement sent to Felix Janda <felix.janda@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70484; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 23 Apr 2024 19:15:05 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.