unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70484: Fix compatibility of build-aux/make-info-dir script
@ 2024-04-20 19:05 Felix Janda
  2024-04-23 17:36 ` Ulrich Mueller
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Janda @ 2024-04-20 19:05 UTC (permalink / raw)
  To: 70484

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#70484: Fix compatibility of build-aux/make-info-dir script
  2024-04-20 19:05 bug#70484: Fix compatibility of build-aux/make-info-dir script Felix Janda
@ 2024-04-23 17:36 ` Ulrich Mueller
  2024-04-23 17:57   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Mueller @ 2024-04-23 17:36 UTC (permalink / raw)
  To: 70484

[-- Attachment #1: Type: text/plain, Size: 89 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-aux-make-info-dir-Avoid-bashism-bug-70484.patch --]
[-- Type: text/x-patch, Size: 840 bytes --]

From cb490ee7a8365c6375dc6c7a5f6d8202ab381219 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#70484: Fix compatibility of build-aux/make-info-dir script
  2024-04-23 17:36 ` Ulrich Mueller
@ 2024-04-23 17:57   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2024-04-23 17:57 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 70484

> From: Ulrich Mueller <ulm@gentoo.org>
> 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-23 17:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-20 19:05 bug#70484: Fix compatibility of build-aux/make-info-dir script Felix Janda
2024-04-23 17:36 ` Ulrich Mueller
2024-04-23 17:57   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).