guix_mirror_bot pushed a commit to branch core-packages-team
in repository guix.

commit 13a4c451684f25e3c71785062260a773c3f4de25
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Sun Oct 19 23:54:44 2025 +0900

    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 <[email protected]>
---
 gnu/packages/commencement.scm         |  3 ++-
 gnu/packages/gawk.scm                 |  8 +++----
 gnu/packages/patches/gawk-shell.patch | 40 ++++++++++++++++++++++++++---------
 3 files changed, 36 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 6f8e9c9b24b..cadc0126a7f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2211,7 +2211,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
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 @@
 (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.
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
 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]);

Reply via email to