summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2025-10-19 23:54:44 +0900
committerLudovic Courtès <ludo@gnu.org>2026-04-02 12:54:44 +0200
commite88bb11646e9eab9518ccab1dd388e179ded5f8a (patch)
treed592d42e36c049462f4c9728e8849ddbc5dd0afb
parentd0ff93c699f5b7d65dd9e4bef6fa99db0e179a7f (diff)
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>
-rw-r--r--gnu/packages/commencement.scm3
-rw-r--r--gnu/packages/gawk.scm8
-rw-r--r--gnu/packages/patches/gawk-shell.patch40
3 files changed, 36 insertions, 15 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d387abb92ef..86f3ba10703 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2194,7 +2194,8 @@ exec " gcc-bin "/" program
2194 #:implicit-inputs? #f 2194 #:implicit-inputs? #f
2195 #:guile ,%bootstrap-guile 2195 #:guile ,%bootstrap-guile
2196 #:strip-binaries? #f 2196 #:strip-binaries? #f
2197 #:validate-runpath? #f)))) 2197 #:validate-runpath? #f
2198 ,@(package-arguments gawk)))))
2198 2199
2199(define patch-boot0 2200(define patch-boot0
2200 (package 2201 (package
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 6223fd0273c..d87afdb4ef5 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -41,13 +41,13 @@
41(define-public gawk 41(define-public gawk
42 (package 42 (package
43 (name "gawk") 43 (name "gawk")
44 (version "5.3.0") 44 (version "5.3.2")
45 (source (origin 45 (source (origin
46 (method url-fetch) 46 (method url-fetch)
47 (uri (string-append "mirror://gnu/gawk/gawk-" version 47 (uri (string-append "mirror://gnu/gawk/gawk-" version
48 ".tar.xz")) 48 ".tar.xz"))
49 (sha256 49 (sha256
50 (base32 "02x97iyl9v84as4rkdrrkfk2j4vy4r3hpp3rkp3gh3qxs79id76a")))) 50 (base32 "1k699kfajwzw4dyw1m9h9kld1gdv00nfy04b2f952w6y15jlihzq"))))
51 (build-system gnu-build-system) 51 (build-system gnu-build-system)
52 (arguments 52 (arguments
53 (list #:phases 53 (list #:phases
@@ -56,7 +56,7 @@
56 (lambda* (#:key inputs #:allow-other-keys) 56 (lambda* (#:key inputs #:allow-other-keys)
57 ;; Refer to the right shell. 57 ;; Refer to the right shell.
58 (let ((/bin/sh (search-input-file inputs "bin/sh"))) 58 (let ((/bin/sh (search-input-file inputs "bin/sh")))
59 (substitute* "io.c" 59 (substitute* '("io.c" "builtin.c")
60 (("/bin/sh") /bin/sh)) 60 (("/bin/sh") /bin/sh))
61 61
62 ;; When cross-compiling, remove dependencies on the 62 ;; When cross-compiling, remove dependencies on the
@@ -73,7 +73,7 @@
73 ;; Remove dependency on 'more' (from util-linux), which 73 ;; Remove dependency on 'more' (from util-linux), which
74 ;; would needlessly complicate bootstrapping. 74 ;; would needlessly complicate bootstrapping.
75 (substitute* "test/Makefile" 75 (substitute* "test/Makefile"
76 (("\\| more") "")) 76 (("\\| \\$\\$\\{PAGER:-more\\}") ""))
77 77
78 ;; Adjust the shebang in that file since it is then diff'd 78 ;; Adjust the shebang in that file since it is then diff'd
79 ;; against the actual test output. 79 ;; against the actual test output.
diff --git a/gnu/packages/patches/gawk-shell.patch b/gnu/packages/patches/gawk-shell.patch
index 46ca5e451f3..0fe3e14a2be 100644
--- a/gnu/packages/patches/gawk-shell.patch
+++ b/gnu/packages/patches/gawk-shell.patch
@@ -2,9 +2,20 @@ As for libc's `system', change Awk to look for `sh' in $PATH. This patch is
2only meant to be used during bootstrapping, where we don't know in advance the 2only meant to be used during bootstrapping, where we don't know in advance the
3absolute file name of `sh'. 3absolute file name of `sh'.
4 4
5--- gawk-4.1.3/io.c 2015-05-19 15:37:20.000000000 +0200 5--- gawk-5.3.2/builtin.c
6+++ gawk-4.1.3/io.c 2015-06-09 18:39:36.918414881 +0200 6+++ gawk-5.3.2/builtin.c
7@@ -2025,7 +2025,7 @@ 7@@ -3341,7 +3341,7 @@ gawk_system(const char *command)
8 if ((childpid = fork()) == 0) {
9 // child
10 set_sigpipe_to_default();
11- execl("/bin/sh", "sh", "-c", command, NULL);
12+ execlp("sh", "sh", "-c", command, NULL);
13 _exit(errno == ENOENT ? 127 : 126);
14 } else {
15 // parent
16--- gawk-5.3.2/io.c
17+++ gawk-5.3.2/io.c
18@@ -2084,7 +2084,7 @@ fork_and_open_slave_pty(const char *slavenam, int master, const char *command, p
8 19
9 set_sigpipe_to_default(); 20 set_sigpipe_to_default();
10 21
@@ -13,7 +24,7 @@ absolute file name of `sh'.
13 _exit(errno == ENOENT ? 127 : 126); 24 _exit(errno == ENOENT ? 127 : 126);
14 25
15 case -1: 26 case -1:
16@@ -2077,7 +2077,7 @@ 27@@ -2136,7 +2136,7 @@ fork_and_open_slave_pty(const char *slavenam, int master, const char *command, p
17 28
18 signal(SIGPIPE, SIG_DFL); 29 signal(SIGPIPE, SIG_DFL);
19 30
@@ -22,21 +33,30 @@ absolute file name of `sh'.
22 _exit(errno == ENOENT ? 127 : 126); 33 _exit(errno == ENOENT ? 127 : 126);
23 34
24 case -1: 35 case -1:
25@@ -2422,7 +2422,7 @@ 36@@ -2475,7 +2475,7 @@ use_pipes:
26 fatal(_("close of pipe failed (%s)"), strerror(errno)); 37 fatal(_("close of pipe failed: %s"), strerror(errno));
27 /* stderr does NOT get dup'ed onto child's stdout */ 38 /* stderr does NOT get dup'ed onto child's stdout */
28 set_sigpipe_to_default(); 39 set_sigpipe_to_default();
29- execl("/bin/sh", "sh", "-c", str, NULL); 40- execl("/bin/sh", "sh", "-c", str, NULL);
30+ execlp("sh", "sh", "-c", str, NULL); 41+ execlp("sh", "sh", "-c", str, NULL);
31 _exit(errno == ENOENT ? 127 : 126); 42 _exit(errno == ENOENT ? 127 : 126);
32 } 43 }
33 #endif /* NOT __EMX__, NOT __MINGW32__ */ 44 #endif /* NOT __MINGW32__ */
34@@ -2659,7 +2659,7 @@ 45@@ -2706,7 +2706,7 @@ gawk_popen(const char *cmd, struct redirect *rp)
35 if (close(p[0]) == -1 || close(p[1]) == -1) 46 if (close(p[0]) == -1 || close(p[1]) == -1)
36 fatal(_("close of pipe failed (%s)"), strerror(errno)); 47 fatal(_("close of pipe failed: %s"), strerror(errno));
37 set_sigpipe_to_default(); 48 set_sigpipe_to_default();
38- execl("/bin/sh", "sh", "-c", cmd, NULL); 49- execl("/bin/sh", "sh", "-c", cmd, NULL);
39+ execlp("sh", "sh", "-c", cmd, NULL); 50+ execlp("sh", "sh", "-c", cmd, NULL);
40 _exit(errno == ENOENT ? 127 : 126); 51 _exit(errno == ENOENT ? 127 : 126);
41 } 52 }
42 #endif /* NOT __EMX__, NOT __MINGW32__ */ 53 #endif /* NOT __MINGW32__ */
54@@ -4642,7 +4642,7 @@ gawk_popen_write(const char *cmd)
55 fatal(_("gawk_popen_write: failed to move pipe fd to standard input"));
56 (void) close(pipefds[0]);
57 set_sigpipe_to_default();
58- execl("/bin/sh", "sh", "-c", cmd, NULL);
59+ execlp("sh", "sh", "-c", cmd, NULL);
60 _exit(errno == ENOENT ? 127 : 126);
61 } else if (childpid < 0) {
62 (void) close(pipefds[0]);