From 79dfd2cf704d1f884c63332c664a76c117c91b11 Mon Sep 17 00:00:00 2001 From: fly_fzc <2385803914@qq.com> Date: Wed, 16 Jul 2025 13:52:02 +0800 Subject: [PATCH] sync patches from bash community --- ...dates-fix-for-null-commands-with-red.patch | 39 +++++++++++++++++++ ...-redisplay-issue-in-C-locale-fix-for.patch | 31 +++++++++++++++ bash.spec | 9 ++++- 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 backport-documentation-updates-fix-for-null-commands-with-red.patch create mode 100644 backport-fix-for-readline-redisplay-issue-in-C-locale-fix-for.patch diff --git a/backport-documentation-updates-fix-for-null-commands-with-red.patch b/backport-documentation-updates-fix-for-null-commands-with-red.patch new file mode 100644 index 0000000..cd761e5 --- /dev/null +++ b/backport-documentation-updates-fix-for-null-commands-with-red.patch @@ -0,0 +1,39 @@ +From 2610d40b32301cd7256bf1dfc49c9f8bfe0dcd53 Mon Sep 17 00:00:00 2001 +From: Chet Ramey +Date: Wed, 28 Aug 2024 11:42:10 -0400 +Subject: [PATCH] documentation updates; fix for null commands with redirection expansion errors; changes to job notifications for interactive shells sourcing files; fix underflow issue with word_top + +Conflict:only the modified content of execute_cmd.c is rounded. +Reference:https://git.savannah.gnu.org/cgit/bash.git/commit/?id=2610d40b32301cd7256bf1dfc49c9f8bfe0dcd53 + +--- + execute_cmd.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/execute_cmd.c b/execute_cmd.c +index 1e3354c..4416f39 100644 +--- a/execute_cmd.c ++++ b/execute_cmd.c +@@ -4089,7 +4089,7 @@ execute_null_command (redirects, pipe_in, pipe_out, async) + REDIRECT *redirects; + int pipe_in, pipe_out, async; + { +- int r; ++ int r,code; + int forcefork; + REDIRECT *rd; + +@@ -4123,6 +4123,10 @@ execute_null_command (redirects, pipe_in, pipe_out, async) + subshell_environment |= SUBSHELL_ASYNC; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + subshell_environment |= SUBSHELL_PIPE; ++ ++ code = setjmp_nosigs(top_level); ++ if (code) ++ exit(EXECUTION_FAILURE); + + if (do_redirections (redirects, RX_ACTIVE) == 0) + exit (EXECUTION_SUCCESS); +-- +2.43.0 + diff --git a/backport-fix-for-readline-redisplay-issue-in-C-locale-fix-for.patch b/backport-fix-for-readline-redisplay-issue-in-C-locale-fix-for.patch new file mode 100644 index 0000000..7390ad2 --- /dev/null +++ b/backport-fix-for-readline-redisplay-issue-in-C-locale-fix-for.patch @@ -0,0 +1,31 @@ +From b116cfe57df2c061cd953b77a0fc1b738dd5fe94 Mon Sep 17 00:00:00 2001 +From: Chet Ramey +Date: Fri, 8 Nov 2024 11:13:57 -0500 +Subject: [PATCH] fix for readline redisplay issue in C locale; fix for small memory leak in termcap replacement library; updates to formatted documentation; fix problem with distclean and y.tab.h; Makefile clean targets updates + +Conflict:only the modified content of lib/termcap/termcap.c is rounded. +Reference:https://git.savannah.gnu.org/cgit/bash.git/commit/?id=b116cfe57df2c061cd953b77a0fc1b738dd5fe94 + +--- + lib/termcap/termcap.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lib/termcap/termcap.c b/lib/termcap/termcap.c +index 87fae05..9ce932f 100644 +--- a/lib/termcap/termcap.c ++++ b/lib/termcap/termcap.c +@@ -536,7 +536,10 @@ tgetent (bp, name) + fd = open (termcap_name, O_RDONLY, 0); + #endif + if (fd < 0) +- return -1; ++ { ++ free(indirect); ++ return -1; ++ } + + buf.size = BUFSIZE; + /* Add 1 to size to ensure room for terminating null. */ +-- +2.43.0 + diff --git a/bash.spec b/bash.spec index 966723e..186899a 100644 --- a/bash.spec +++ b/bash.spec @@ -1,6 +1,6 @@ Name: bash Version: 5.0 -Release: 22 +Release: 23 Summary: It is the Bourne Again Shell License: GPLv3 URL: https://www.gnu.org/software/bash @@ -52,6 +52,8 @@ Patch6004: backport-fix-small-memleak-in-globbing.patch Patch6005: backport-fix-for-leak-when-completing-command-word-with-glob-.patch Patch6006: backport-revert-change-that-suppressed-array-subscript-expans.patch Patch6007: backport-documentation-updates-for-arithmetic-expansion-and-a.patch +Patch6008: backport-documentation-updates-fix-for-null-commands-with-red.patch +Patch6009: backport-fix-for-readline-redisplay-issue-in-C-locale-fix-for.patch BuildRequires: gcc bison texinfo autoconf ncurses-devel @@ -138,6 +140,11 @@ make check %exclude %{_infodir}/dir %changelog +* Wed Jul 16 2025 fuanan - 5.0-23 +- sync patches from bash community + add backport-documentation-updates-fix-for-null-commands-with-red.patch + add backport-fix-for-readline-redisplay-issue-in-C-locale-fix-for.patch + * Thu Jun 12 2025 yixiangzhike - 5.0-22 - sync patches from bash community: fix default file descriptor for <> redirection when printing command -- Gitee