1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

gnu: gawk: Update to 5.3.2.

* gnu/packages/gawk.scm (gawk): Update to 5.3.2.
[arguments]: In ‘set-shell-file-name’ phase, also modify ‘builtin.c’.  Change
pager substitution to honor $PAGER.
* gnu/packages/commencement.scm (gawk-boot0)[arguments]: Inherit arguments
from gawk.
* gnu/packages/patches/gawk-shell.patch: Update for gawk 5.3.2.

Change-Id: Icb398e0a72bcdf9cd371514d1ca486dc8781b7e5
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Maxim Cournoyer
2025-10-19 23:54:44 +09:00
committed by Ludovic Courtès
parent d0ff93c699
commit e88bb11646
3 changed files with 36 additions and 15 deletions

View File

@@ -2194,7 +2194,8 @@ exec " gcc-bin "/" program
#:implicit-inputs? #f
#:guile ,%bootstrap-guile
#:strip-binaries? #f
#:validate-runpath? #f))))
#:validate-runpath? #f
,@(package-arguments gawk)))))
(define patch-boot0
(package

View File

@@ -41,13 +41,13 @@
(define-public gawk
(package
(name "gawk")
(version "5.3.0")
(version "5.3.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gawk/gawk-" version
".tar.xz"))
(sha256
(base32 "02x97iyl9v84as4rkdrrkfk2j4vy4r3hpp3rkp3gh3qxs79id76a"))))
(base32 "1k699kfajwzw4dyw1m9h9kld1gdv00nfy04b2f952w6y15jlihzq"))))
(build-system gnu-build-system)
(arguments
(list #:phases
@@ -56,7 +56,7 @@
(lambda* (#:key inputs #:allow-other-keys)
;; Refer to the right shell.
(let ((/bin/sh (search-input-file inputs "bin/sh")))
(substitute* "io.c"
(substitute* '("io.c" "builtin.c")
(("/bin/sh") /bin/sh))
;; When cross-compiling, remove dependencies on the
@@ -73,7 +73,7 @@
;; Remove dependency on 'more' (from util-linux), which
;; would needlessly complicate bootstrapping.
(substitute* "test/Makefile"
(("\\| more") ""))
(("\\| \\$\\$\\{PAGER:-more\\}") ""))
;; Adjust the shebang in that file since it is then diff'd
;; against the actual test output.

View File

@@ -2,9 +2,20 @@ As for libc's `system', change Awk to look for `sh' in $PATH. This patch is
only meant to be used during bootstrapping, where we don't know in advance the
absolute file name of `sh'.
--- gawk-4.1.3/io.c 2015-05-19 15:37:20.000000000 +0200
+++ gawk-4.1.3/io.c 2015-06-09 18:39:36.918414881 +0200
@@ -2025,7 +2025,7 @@
--- gawk-5.3.2/builtin.c
+++ gawk-5.3.2/builtin.c
@@ -3341,7 +3341,7 @@ gawk_system(const char *command)
if ((childpid = fork()) == 0) {
// child
set_sigpipe_to_default();
- execl("/bin/sh", "sh", "-c", command, NULL);
+ execlp("sh", "sh", "-c", command, NULL);
_exit(errno == ENOENT ? 127 : 126);
} else {
// parent
--- gawk-5.3.2/io.c
+++ gawk-5.3.2/io.c
@@ -2084,7 +2084,7 @@ fork_and_open_slave_pty(const char *slavenam, int master, const char *command, p
set_sigpipe_to_default();
@@ -13,7 +24,7 @@ absolute file name of `sh'.
_exit(errno == ENOENT ? 127 : 126);
case -1:
@@ -2077,7 +2077,7 @@
@@ -2136,7 +2136,7 @@ fork_and_open_slave_pty(const char *slavenam, int master, const char *command, p
signal(SIGPIPE, SIG_DFL);
@@ -22,21 +33,30 @@ absolute file name of `sh'.
_exit(errno == ENOENT ? 127 : 126);
case -1:
@@ -2422,7 +2422,7 @@
fatal(_("close of pipe failed (%s)"), strerror(errno));
@@ -2475,7 +2475,7 @@ use_pipes:
fatal(_("close of pipe failed: %s"), strerror(errno));
/* stderr does NOT get dup'ed onto child's stdout */
set_sigpipe_to_default();
- execl("/bin/sh", "sh", "-c", str, NULL);
+ execlp("sh", "sh", "-c", str, NULL);
_exit(errno == ENOENT ? 127 : 126);
}
#endif /* NOT __EMX__, NOT __MINGW32__ */
@@ -2659,7 +2659,7 @@
#endif /* NOT __MINGW32__ */
@@ -2706,7 +2706,7 @@ gawk_popen(const char *cmd, struct redirect *rp)
if (close(p[0]) == -1 || close(p[1]) == -1)
fatal(_("close of pipe failed (%s)"), strerror(errno));
fatal(_("close of pipe failed: %s"), strerror(errno));
set_sigpipe_to_default();
- execl("/bin/sh", "sh", "-c", cmd, NULL);
+ execlp("sh", "sh", "-c", cmd, NULL);
_exit(errno == ENOENT ? 127 : 126);
}
#endif /* NOT __EMX__, NOT __MINGW32__ */
#endif /* NOT __MINGW32__ */
@@ -4642,7 +4642,7 @@ gawk_popen_write(const char *cmd)
fatal(_("gawk_popen_write: failed to move pipe fd to standard input"));
(void) close(pipefds[0]);
set_sigpipe_to_default();
- execl("/bin/sh", "sh", "-c", cmd, NULL);
+ execlp("sh", "sh", "-c", cmd, NULL);
_exit(errno == ENOENT ? 127 : 126);
} else if (childpid < 0) {
(void) close(pipefds[0]);