bash ver. bump

This commit is contained in:
Rmys
2025-11-07 18:00:03 +03:00
parent 6cf6be768b
commit a9f15c5610
47 changed files with 344 additions and 7290 deletions
@@ -1,8 +1,7 @@
diff --git a/config.h.in b/config.h.in
index ab316d4..11d1d68 100644
--- a/config.h.in
+++ b/config.h.in
@@ -775,6 +775,9 @@
@@ -805,6 +805,9 @@
/* Define if you have the pselect function. */
#undef HAVE_PSELECT
@@ -12,7 +11,7 @@ index ab316d4..11d1d68 100644
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
@@ -981,6 +984,9 @@
@@ -1032,6 +1035,9 @@
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@@ -23,20 +22,18 @@ index ab316d4..11d1d68 100644
#undef HAVE_GRP_H
diff --git a/configure.ac b/configure.ac
index 2fe3e7d..f1b7f1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -827,7 +827,7 @@ dnl checks for system calls
AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getentropy getgroups \
gethostname getpagesize getpeername getrandom getrlimit \
getrusage gettimeofday kill killpg lstat pselect readlink \
- select setdtablesize setitimer tcgetpgrp uname ulimit waitpid)
+ select setdtablesize setitimer tcgetpgrp uname ulimit waitpid pread)
@@ -878,7 +878,7 @@ AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getentropy getgroups \
getrusage gettimeofday kill killpg lstat nanosleep \
pselect readlink \
select setdtablesize setitimer statfs \
- tcgetpgrp uname ulimit waitpid)
+ tcgetpgrp uname ulimit waitpid pread)
AC_REPLACE_FUNCS(rename)
dnl checks for c library functions
diff --git a/execute_cmd.c b/execute_cmd.c
index d2a0dd7..d2555ad 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -41,6 +41,10 @@
@@ -50,7 +47,7 @@ index d2a0dd7..d2555ad 100644
#include "posixtime.h"
#if defined (HAVE_SYS_RESOURCE_H) && !defined (RLIMTYPE)
@@ -5832,6 +5836,14 @@ shell_execve (command, args, env)
@@ -6162,6 +6166,14 @@ shell_execve (char *command, char **args, char **env)
{
/* The file has the execute bits set, but the kernel refuses to
run it for some reason. See why. */
@@ -65,19 +62,18 @@ index d2a0dd7..d2555ad 100644
#if defined (HAVE_HASH_BANG_EXEC)
READ_SAMPLE_BUF (command, sample, sample_len);
if (sample_len > 0)
@@ -5841,6 +5853,7 @@ shell_execve (command, args, env)
@@ -6171,6 +6183,7 @@ shell_execve (char *command, char **args, char **env)
char *interp;
int ilen;
size_t ilen;
+ close (fd);
interp = getinterp (sample, sample_len, (int *)NULL);
ilen = strlen (interp);
errno = i;
@@ -5856,7 +5869,138 @@ shell_execve (command, args, env)
return (EX_NOEXEC);
@@ -6187,6 +6200,137 @@ shell_execve (char *command, char **args, char **env)
}
else
#endif
- errno = i;
+#if defined (HAVE_ELF_H)
+ if (i == ENOENT
+ && sample_len > EI_NIDENT
@@ -209,7 +205,6 @@ index d2a0dd7..d2555ad 100644
+ close (fd);
+#endif
+
+ errno = i;
file_error (command);
}
return (last_command_exit_value);
if (i == ENOENT)
{
errno = i;
@@ -1,12 +1,12 @@
diff -up bash-4.1/doc/bash.1.manpage_trap bash-4.1/doc/bash.1
--- bash-4.1/doc/bash.1.manpage_trap 2012-08-28 10:06:00.561999092 +0200
+++ bash-4.1/doc/bash.1 2012-08-28 10:06:24.225304505 +0200
@@ -9251,7 +9251,7 @@ being inverted via
diff --git a/doc/bash.1 b/doc/bash.1
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -12621,7 +12621,7 @@ being inverted using
These are the same conditions obeyed by the \fBerrexit\fP (\fB\-e\fP) option.
.if t .sp 0.5
.if n .sp 1
-Signals ignored upon entry to the shell cannot be trapped or reset.
+Signals ignored upon entry to the shell cannot be trapped, reset or listed.
.IP
When the shell is not interactive,
-signals ignored upon entry to the shell cannot be trapped or reset.
+signals ignored upon entry to the shell cannot be trapped, reset or listed.
Interactive shells permit trapping signals ignored on entry.
Trapped signals that are not being ignored are reset to their original
values in a subshell or subshell environment when one is created.
The return status is false if any
@@ -1,8 +1,7 @@
diff --git a/config-top.h b/config-top.h
index 026d4a4..cb0e002 100644
--- a/config-top.h
+++ b/config-top.h
@@ -92,7 +92,7 @@
@@ -97,7 +97,7 @@
/* #define SYS_BASHRC "/etc/bash.bashrc" */
/* System-wide .bash_logout for login shells. */
@@ -12,30 +11,27 @@ index 026d4a4..cb0e002 100644
/* Define this to make non-interactive shells begun with argv[0][0] == '-'
run the startup files when not in posix mode. */
diff --git a/doc/bash.1 b/doc/bash.1
index 04ce845..bfde55e 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -335,8 +335,8 @@ option may be used when the shell is started to inhibit this behavior.
@@ -378,9 +378,8 @@ option may be used when the shell is started to inhibit this behavior.
When an interactive login shell exits,
or a non-interactive login shell executes the \fBexit\fP builtin command,
.B bash
-reads and executes commands from the file \fI~/.bash_logout\fP, if it
-exists.
-reads and executes commands from the file
-.FN \*~/.bash_logout ,
-if it exists.
+reads and executes commands from the files \fI~/.bash_logout\fP
+and \fI/etc/bash.bash_logout\fP, if the files exists.
.PP
When an interactive shell that is not a login shell is started,
.B bash
@@ -10558,6 +10558,9 @@ The \fBbash\fP executable
@@ -13404,6 +13403,9 @@ The \fBbash\fP executable
.FN /etc/profile
The systemwide initialization file, executed for login shells
.TP
+.FN /etc/bash.bash_logout
+The systemwide login shell cleanup file, executed when a login shell exits
+.TP
.FN ~/.bash_profile
.FN \*~/.bash_profile
The personal initialization file, executed for login shells
.TP
--
2.9.3
@@ -1,15 +1,11 @@
diff --git a/Makefile.in b/Makefile.in
index a1f9483..24c646a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -800,7 +800,6 @@ install: .made installdirs
@@ -923,7 +923,6 @@ install: .made installdirs
infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ )
-( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
-( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
- -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
-( cd $(DEFDIR) ; $(MAKE) $(BASH_MAKEFLAGS) DESTDIR=$(DESTDIR) $@ )
-( cd $(PO_DIR) ; $(MAKE) $(BASH_MAKEFLAGS) DESTDIR=$(DESTDIR) $@ )
- -( cd $(LOADABLES_DIR) && $(MAKE) $(BASH_MAKEFLAGS) DESTDIR=$(DESTDIR) $@ )
install-strip:
$(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
--
2.9.3
$(MAKE) $(BASH_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_STRIP_PROGRAM)' \
@@ -12,7 +12,7 @@ diff --git a/builtins.h b/builtins.h
diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
--- a/builtins/mkbuiltins.c
+++ b/builtins/mkbuiltins.c
@@ -69,11 +69,16 @@ extern char *strcpy ();
@@ -62,11 +62,16 @@ static void *xrealloc (void *, size_t);
#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
/* Flag values that builtins can have. */
@@ -29,7 +29,7 @@ diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
#define BASE_INDENT 4
@@ -189,13 +194,21 @@ char *arrayvar_builtins[] =
@@ -183,13 +188,21 @@ char *arrayvar_builtins[] =
"typeset", "unset", "wait", /*]*/
(char *)NULL
};
@@ -43,16 +43,16 @@ diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
+};
+
/* Forward declarations. */
static int is_special_builtin ();
static int is_assignment_builtin ();
static int is_localvar_builtin ();
static int is_posix_builtin ();
static int is_arrayvar_builtin ();
static int is_special_builtin (char *);
static int is_assignment_builtin (char *);
static int is_localvar_builtin (char *);
static int is_posix_builtin (char *);
static int is_arrayvar_builtin (char *);
+static int is_requires_builtin ();
#if !defined (HAVE_RENAME)
static int rename ();
@@ -856,6 +869,8 @@ builtin_handler (self, defs, arg)
static int rename (char *, char *);
@@ -826,6 +839,8 @@ builtin_handler (char *self, DEF_FILE *defs, char *arg)
new->flags |= BUILTIN_FLAG_POSIX_BUILTIN;
if (is_arrayvar_builtin (name))
new->flags |= BUILTIN_FLAG_ARRAYREF_ARG;
@@ -61,7 +61,7 @@ diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
array_add ((char *)new, defs->builtins);
building_builtin = 1;
@@ -1275,13 +1290,14 @@ write_builtins (defs, structfile, externfile)
@@ -1212,13 +1227,14 @@ write_builtins (DEF_FILE *defs, FILE *structfile, FILE *externfile)
else
fprintf (structfile, "(sh_builtin_func_t *)0x0, ");
@@ -77,7 +77,7 @@ diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
document_name (builtin));
/* Don't translate short document summaries that are identical
@@ -1678,6 +1694,13 @@ is_arrayvar_builtin (name)
@@ -1597,6 +1613,13 @@ is_arrayvar_builtin (char *name)
return (_find_in_table (name, arrayvar_builtins));
}
@@ -90,11 +90,11 @@ diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
+
#if !defined (HAVE_RENAME)
static int
rename (from, to)
rename (char *from, char *to)
diff --git a/doc/bash.1 b/doc/bash.1
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -239,6 +239,14 @@ The shell becomes restricted (see
@@ -276,6 +276,14 @@ The shell becomes restricted (see
.B "RESTRICTED SHELL"
below).
.TP
@@ -112,8 +112,8 @@ diff --git a/doc/bash.1 b/doc/bash.1
diff --git a/doc/bashref.texi b/doc/bashref.texi
--- a/doc/bashref.texi
+++ b/doc/bashref.texi
@@ -6927,6 +6927,13 @@ standard. @xref{Bash POSIX Mode}, for a description of the Bash
@item --restricted
@@ -7812,6 +7812,13 @@ standard.
Equivalent to @option{-r}.
Make the shell a restricted shell (@pxref{The Restricted Shell}).
+@item --rpm-requires
@@ -124,12 +124,12 @@ diff --git a/doc/bashref.texi b/doc/bashref.texi
+are not parsed so some dependencies may be missed.
+
@item --verbose
Equivalent to @option{-v}. Print shell input lines as they're read.
Equivalent to @option{-v}.
Print shell input lines as they're read.
diff --git a/eval.c b/eval.c
--- a/eval.c
+++ b/eval.c
@@ -138,7 +138,8 @@ reader_loop ()
@@ -146,7 +146,8 @@ reader_loop (void)
if (read_command () == 0)
{
@@ -142,7 +142,7 @@ diff --git a/eval.c b/eval.c
diff --git a/execute_cmd.c b/execute_cmd.c
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -561,6 +561,8 @@ async_redirect_stdin ()
@@ -612,6 +612,8 @@ async_redirect_stdin (void)
#define DESCRIBE_PID(pid) do { if (interactive) describe_pid (pid); } while (0)
@@ -151,7 +151,7 @@ diff --git a/execute_cmd.c b/execute_cmd.c
/* Execute the command passed in COMMAND, perhaps doing it asynchronously.
COMMAND is exactly what read_command () places into GLOBAL_COMMAND.
ASYNCHRONOUS, if non-zero, says to do this command in the background.
@@ -592,7 +594,13 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
@@ -638,7 +640,13 @@ execute_command_internal (COMMAND *command, int asynchronous, int pipe_in, int p
if (breaking || continuing)
return (last_command_exit_value);
@@ -166,9 +166,9 @@ diff --git a/execute_cmd.c b/execute_cmd.c
return (last_command_exit_value);
if (command == 0)
return (EXECUTION_SUCCESS);
@@ -2883,7 +2891,7 @@ execute_for_command (for_command)
save_line_number = line_number;
if (check_identifier (for_command->name, 1) == 0)
@@ -3505,7 +3513,7 @@ execute_select_command (SELECT_COM *select_command)
if (check_identifier (select_command->name, 1) == 0)
{
- if (posixly_correct && interactive_shell == 0)
+ if (posixly_correct && interactive_shell == 0 && rpm_requires == 0)
@@ -200,7 +200,7 @@ diff --git a/make_cmd.c b/make_cmd.c
#include "execute_cmd.h"
#include "parser.h"
#include "flags.h"
@@ -839,6 +841,30 @@ make_coproc_command (name, command)
@@ -797,6 +799,30 @@ make_coproc_command (char *name, COMMAND *command)
return (make_command (cm_coproc, (SIMPLE_COM *)temp));
}
@@ -231,7 +231,7 @@ diff --git a/make_cmd.c b/make_cmd.c
/* Reverse the word list and redirection list in the simple command
has just been parsed. It seems simpler to do this here the one
time then by any other method that I can think of. */
@@ -856,6 +882,28 @@ clean_simple_command (command)
@@ -813,6 +839,28 @@ clean_simple_command (COMMAND *command)
REVERSE_LIST (command->value.Simple->redirects, REDIRECT *);
}
@@ -263,9 +263,9 @@ diff --git a/make_cmd.c b/make_cmd.c
diff --git a/shell.c b/shell.c
--- a/shell.c
+++ b/shell.c
@@ -196,6 +196,9 @@ int have_devfd = 0;
/* The name of the .(shell)rc file. */
static char *bashrc_file = DEFAULT_BASHRC;
@@ -205,6 +205,9 @@ int have_devfd = 0;
/* The name of the .(shell)rc file, DEFAULT_BASHRC is sourced by default */
static char *bashrc_file;
+/* Non-zero if we are finding the scripts requirements. */
+int rpm_requires;
@@ -273,7 +273,7 @@ diff --git a/shell.c b/shell.c
/* Non-zero means to act more like the Bourne shell on startup. */
static int act_like_sh;
@@ -266,6 +269,7 @@ static const struct {
@@ -272,6 +275,7 @@ static const struct {
{ "protected", Int, &protected_mode, (char **)0x0 },
#endif
{ "rcfile", Charp, (int *)0x0, &bashrc_file },
@@ -281,7 +281,7 @@ diff --git a/shell.c b/shell.c
#if defined (RESTRICTED_SHELL)
{ "restricted", Int, &restricted, (char **)0x0 },
#endif
@@ -510,6 +514,12 @@ main (argc, argv, env)
@@ -510,6 +514,12 @@ main (int argc, char **argv, char **env)
read_but_dont_execute = 1;
#endif
@@ -297,9 +297,9 @@ diff --git a/shell.c b/shell.c
diff --git a/shell.h b/shell.h
--- a/shell.h
+++ b/shell.h
@@ -100,6 +100,7 @@ extern int interactive, interactive_shell;
extern int startup_state;
@@ -105,6 +105,7 @@ extern int startup_state;
extern int reading_shell_script;
extern int ssh_reading_startup_files;
extern int shell_initialized;
+extern int rpm_requires;
extern int bash_argv_initialized;
@@ -1,18 +1,18 @@
diff --git a/tests/exec.right b/tests/exec.right
--- a/tests/exec.right
+++ b/tests/exec.right
@@ -60,7 +60,6 @@ this is ohio-state
0
@@ -79,7 +79,6 @@ this is ohio-state
1
0
testb
-expand_aliases on
-expand_aliases on
1
1
1
diff --git a/tests/execscript b/tests/execscript
--- a/tests/execscript
+++ b/tests/execscript
@@ -108,8 +108,6 @@ ${THIS_SH} ./exec6.sub
@@ -148,8 +148,6 @@ ${THIS_SH} ./exec6.sub
# checks for properly deciding what constitutes an executable file
${THIS_SH} ./exec7.sub
@@ -24,10 +24,10 @@ diff --git a/tests/execscript b/tests/execscript
diff --git a/tests/read.right b/tests/read.right
--- a/tests/read.right
+++ b/tests/read.right
@@ -34,17 +34,6 @@ xyz
a = xyz
a = -xyz 123-
a = abc
@@ -52,18 +52,6 @@ a = abc
<$'spring\375'>
<summer>
<automn>
-timeout 1: ok
-unset or null 1
-timeout 2: ok
@@ -38,6 +38,7 @@ diff --git a/tests/read.right b/tests/read.right
-1
-
-abcde
-abcde
-abcde
./read3.sub: line 17: read: -1: invalid number
abc
@@ -45,7 +46,7 @@ diff --git a/tests/read.right b/tests/read.right
diff --git a/tests/read.tests b/tests/read.tests
--- a/tests/read.tests
+++ b/tests/read.tests
@@ -95,9 +95,6 @@ echo " foo" | { IFS=$':' ; read line; recho "$line"; }
@@ -108,9 +108,6 @@ echo a = $a b = $b c = $c stat = $?
# test read -d delim behavior
${THIS_SH} ./read1.sub
@@ -1,46 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-001
Bug-Reported-by: Emanuele Torre <torreemanuele6@gmail.com>
Bug-Reference-ID: <CAA7hNqeR1eSdiGK8mjQSqJPo815JYoG-Ekz-5PrAJTEYy2e6hg@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00060.html
Bug-Description:
Expanding unset arrays in an arithmetic context can cause a segmentation fault.
Patch (apply with `patch -p0'):
*** ../bash-5.2/subst.c 2022-08-31 17:36:46.000000000 -0400
--- subst.c 2022-09-30 09:12:05.000000000 -0400
***************
*** 10858,10862 ****
t = expand_subscript_string (exp, quoted & ~(Q_ARITH|Q_DOUBLE_QUOTES));
free (exp);
! exp = sh_backslash_quote (t, abstab, 0);
free (t);
--- 10858,10862 ----
t = expand_subscript_string (exp, quoted & ~(Q_ARITH|Q_DOUBLE_QUOTES));
free (exp);
! exp = t ? sh_backslash_quote (t, abstab, 0) : savestring ("");
free (t);
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 0
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 1
#endif /* _PATCHLEVEL_H_ */
@@ -1,46 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-002
Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
Bug-Reference-ID:
Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
Bug-Description:
Starting bash with an invalid locale specification for LC_ALL/LANG/LC_CTYPE
can cause the shell to crash.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/lib/readline/nls.c 2022-08-15 09:38:51.000000000 -0400
--- lib/readline/nls.c 2022-10-05 09:23:22.000000000 -0400
***************
*** 142,145 ****
--- 142,149 ----
lspec = "";
ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
+ if (ret == 0 || *ret == 0)
+ ret = setlocale (LC_CTYPE, (char *)NULL);
+ if (ret == 0 || *ret == 0)
+ ret = RL_DEFAULT_LOCALE;
#else
ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 1
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 2
#endif /* _PATCHLEVEL_H_ */
@@ -1,89 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-003
Bug-Reported-by: D630 <d630@posteo.net>
Bug-Reference-ID: <cf8523d58ac75b9ffba9519faa175618@posteo.de>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00092.html
Bug-Description:
Command substitutions need to preserve newlines instead of replacing them
with semicolons, especially in the presence of multiple here-documents.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/print_cmd.c 2022-07-26 09:16:39.000000000 -0400
--- print_cmd.c 2022-10-17 10:41:06.000000000 -0400
***************
*** 298,305 ****
--- 298,307 ----
{
char c = command->value.Connection->connector;
+ int was_newline;
s[0] = printing_comsub ? c : ';';
s[1] = '\0';
+ was_newline = deferred_heredocs == 0 && was_heredoc == 0 && c == '\n';
if (deferred_heredocs == 0)
{
***************
*** 315,318 ****
--- 317,322 ----
if (inside_function_def)
cprintf ("\n");
+ else if (printing_comsub && c == '\n' && was_newline == 0)
+ cprintf ("\n"); /* preserve newlines in comsubs but don't double them */
else
{
***************
*** 1366,1370 ****
}
else
! newline ("}");
dispose_command (cmdcopy);
--- 1371,1379 ----
}
else
! {
! /* { */
! newline ("}");
! was_heredoc = 0; /* not printing any here-documents now */
! }
dispose_command (cmdcopy);
***************
*** 1443,1447 ****
}
else
! newline ("}");
result = the_printed_command;
--- 1452,1459 ----
}
else
! { /* { */
! newline ("}");
! was_heredoc = 0;
! }
result = the_printed_command;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 2
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 3
#endif /* _PATCHLEVEL_H_ */
@@ -1,70 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-004
Bug-Reported-by: Antoine <bug-bash@glitchimini.net>
Bug-Reference-ID: <8bd59753-05ff-9b09-2337-2c7f52ded650@glitchimini.net>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00022.html
Bug-Description:
Bash needs to keep better track of nested brace expansions to avoid problems
with quoting and POSIX semantics.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/subst.c 2022-10-05 10:22:02.000000000 -0400
--- subst.c 2022-10-06 15:19:08.000000000 -0400
***************
*** 1799,1802 ****
--- 1804,1810 ----
}
+ #define PARAMEXPNEST_MAX 32 // for now
+ static int dbstate[PARAMEXPNEST_MAX];
+
/* Extract a parameter expansion expression within ${ and } from STRING.
Obey the Posix.2 rules for finding the ending `}': count braces while
***************
*** 1829,1832 ****
--- 1837,1842 ----
return (extract_heredoc_dolbrace_string (string, sindex, quoted, flags));
+ dbstate[0] = dolbrace_state;
+
pass_character = 0;
nesting_level = 1;
***************
*** 1853,1856 ****
--- 1863,1868 ----
if (string[i] == '$' && string[i+1] == LBRACE)
{
+ if (nesting_level < PARAMEXPNEST_MAX)
+ dbstate[nesting_level] = dolbrace_state;
nesting_level++;
i += 2;
***************
*** 1865,1868 ****
--- 1877,1881 ----
if (nesting_level == 0)
break;
+ dolbrace_state = (nesting_level < PARAMEXPNEST_MAX) ? dbstate[nesting_level] : dbstate[0]; /* Guess using initial state */
i++;
continue;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 3
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 4
#endif /* _PATCHLEVEL_H_ */
@@ -1,47 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-005
Bug-Reported-by: Justin Wood (Callek) <callek@gmail.com>
Bug-Reference-ID: <CANBDKY9fp2yiXONP7RY4kNuRteuovUebxSJaqePHeu7cyaFS9Q@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00088.html
Bug-Description:
Null pattern substitution replacement strings can cause a crash.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/subst.c 2022-10-05 10:22:02.000000000 -0400
--- subst.c 2022-10-13 16:57:26.000000000 -0400
***************
*** 8966,8970 ****
}
else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
! return ((mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) : savestring (rep));
ret = (char *)xmalloc (rsize = 64);
--- 8966,8971 ----
}
else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
! return (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2)
! : (rep ? savestring (rep) : savestring (""));
ret = (char *)xmalloc (rsize = 64);
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 4
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 5
#endif /* _PATCHLEVEL_H_ */
@@ -1,293 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-006
Bug-Reported-by: feng xiangjun <fengxj325@gmail.com>
Bug-Reference-ID: <CAHH2t87LrCmO=gdyWOmGn5WJt7EucL+iOXzrry34OETe50S6uA@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00089.html
Bug-Description:
In interactive shells, interrupting the shell while entering a command
substitution can inhibit alias expansion.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/parse.y 2022-10-08 13:10:06.000000000 -0400
--- parse.y 2022-10-14 10:03:19.000000000 -0400
***************
*** 3307,3310 ****
--- 3307,3312 ----
extended_glob = global_extglob;
#endif
+ if (parser_state & (PST_CMDSUBST|PST_STRING))
+ expand_aliases = expaliases_flag;
parser_state = 0;
***************
*** 4389,4392 ****
--- 4391,4395 ----
parser_state |= PST_NOERROR;
+ parser_state |= PST_STRING;
expand_aliases = 0;
***************
*** 6402,6406 ****
parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
/* State flags we want to set for this run through the tokenizer. */
! parser_state |= PST_COMPASSIGN|PST_REPARSE;
}
--- 6405,6409 ----
parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
/* State flags we want to set for this run through the tokenizer. */
! parser_state |= PST_COMPASSIGN|PST_REPARSE|PST_STRING;
}
*** ../bash-20221007/parser.h 2022-08-30 11:39:56.000000000 -0400
--- parser.h 2022-10-14 09:56:18.000000000 -0400
***************
*** 51,54 ****
--- 51,55 ----
#define PST_NOEXPAND 0x400000 /* don't expand anything in read_token_word; for command substitution */
#define PST_NOERROR 0x800000 /* don't print error messages in yyerror */
+ #define PST_STRING 0x1000000 /* parsing a string to a command or word list */
/* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */
*** ../bash-20221007/builtins/shopt.def 2022-10-07 10:25:55.000000000 -0400
--- builtins/shopt.def 2022-10-14 09:30:11.000000000 -0400
***************
*** 150,153 ****
--- 150,156 ----
#endif
+ int expaliases_flag = 0;
+ static int shopt_set_expaliases PARAMS((char *, int));
+
static int shopt_set_debug_mode PARAMS((char *, int));
***************
*** 199,203 ****
{ "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
{ "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL },
! { "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL },
#if defined (DEBUGGER)
{ "extdebug", &debugging_mode, shopt_set_debug_mode },
--- 202,206 ----
{ "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
{ "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL },
! { "expand_aliases", &expaliases_flag, shopt_set_expaliases },
#if defined (DEBUGGER)
{ "extdebug", &debugging_mode, shopt_set_debug_mode },
***************
*** 351,355 ****
allow_null_glob_expansion = glob_dot_filenames = 0;
no_exit_on_failed_exec = 0;
! expand_aliases = 0;
extended_quote = 1;
fail_glob_expansion = 0;
--- 354,358 ----
allow_null_glob_expansion = glob_dot_filenames = 0;
no_exit_on_failed_exec = 0;
! expand_aliases = expaliases_flag = 0;
extended_quote = 1;
fail_glob_expansion = 0;
***************
*** 632,635 ****
--- 635,647 ----
}
+ static int
+ shopt_set_expaliases (option_name, mode)
+ char *option_name;
+ int mode;
+ {
+ expand_aliases = expaliases_flag;
+ return 0;
+ }
+
#if defined (READLINE)
static int
*** ../bash-20221007/builtins/common.h 2022-10-07 10:10:17.000000000 -0400
--- builtins/common.h 2022-10-14 09:29:25.000000000 -0400
***************
*** 258,261 ****
--- 258,263 ----
#endif
+ extern int expaliases_flag;
+
/* variables from source.def */
extern int source_searches_cwd;
*** ../bash-20221007/execute_cmd.c 2022-10-10 10:48:54.000000000 -0400
--- execute_cmd.c 2022-10-14 09:32:24.000000000 -0400
***************
*** 1537,1541 ****
aliases. */
if (ois != interactive_shell)
! expand_aliases = 0;
}
--- 1537,1541 ----
aliases. */
if (ois != interactive_shell)
! expand_aliases = expaliases_flag = 0;
}
*** ../bash-20221007/general.c 2021-11-04 14:12:38.000000000 -0400
--- general.c 2022-10-14 09:34:24.000000000 -0400
***************
*** 92,96 ****
&interactive_comments,
&source_uses_path,
! &expand_aliases,
&inherit_errexit,
&print_shift_error,
--- 92,96 ----
&interactive_comments,
&source_uses_path,
! &expaliases_flag,
&inherit_errexit,
&print_shift_error,
***************
*** 107,111 ****
if (on != 0)
{
! interactive_comments = source_uses_path = expand_aliases = 1;
inherit_errexit = 1;
source_searches_cwd = 0;
--- 107,112 ----
if (on != 0)
{
! interactive_comments = source_uses_path = 1;
! expand_aliases = expaliases_flag = 1;
inherit_errexit = 1;
source_searches_cwd = 0;
***************
*** 117,120 ****
--- 118,122 ----
{
set_posix_options (saved_posix_vars);
+ expand_aliases = expaliases_flag;
free (saved_posix_vars);
saved_posix_vars = 0;
***************
*** 123,127 ****
{
source_searches_cwd = 1;
! expand_aliases = interactive_shell;
print_shift_error = 0;
}
--- 125,129 ----
{
source_searches_cwd = 1;
! expand_aliases = expaliases_flag = interactive_shell; /* XXX */
print_shift_error = 0;
}
*** ../bash-5.2-patched/shell.c 2022-03-04 15:13:00.000000000 -0500
--- shell.c 2022-10-14 09:36:19.000000000 -0400
***************
*** 1845,1850 ****
init_interactive ()
{
! expand_aliases = interactive_shell = startup_state = 1;
! interactive = 1;
#if defined (HISTORY)
if (enable_history_list == -1)
--- 1845,1850 ----
init_interactive ()
{
! expand_aliases = expaliases_flag = 1;
! interactive_shell = startup_state = interactive = 1;
#if defined (HISTORY)
if (enable_history_list == -1)
***************
*** 1866,1870 ****
#endif /* HISTORY */
interactive_shell = startup_state = interactive = 0;
! expand_aliases = posixly_correct; /* XXX - was 0 not posixly_correct */
no_line_editing = 1;
#if defined (JOB_CONTROL)
--- 1866,1870 ----
#endif /* HISTORY */
interactive_shell = startup_state = interactive = 0;
! expand_aliases = expaliases_flag = posixly_correct; /* XXX - was 0 not posixly_correct */
no_line_editing = 1;
#if defined (JOB_CONTROL)
***************
*** 1883,1887 ****
#endif
init_noninteractive ();
! expand_aliases = interactive_shell = startup_state = 1;
#if defined (HISTORY)
remember_on_history = enable_history_list; /* XXX */
--- 1883,1887 ----
#endif
init_noninteractive ();
! expand_aliases = expaliases_flag = interactive_shell = startup_state = 1;
#if defined (HISTORY)
remember_on_history = enable_history_list; /* XXX */
***************
*** 2026,2030 ****
forced_interactive = interactive_shell = 0;
subshell_environment = running_in_background = 0;
! expand_aliases = 0;
bash_argv_initialized = 0;
--- 2026,2030 ----
forced_interactive = interactive_shell = 0;
subshell_environment = running_in_background = 0;
! expand_aliases = expaliases_flag = 0;
bash_argv_initialized = 0;
*** ../bash-5.2-patched/y.tab.c 2022-09-23 10:18:27.000000000 -0400
--- y.tab.c 2022-10-14 14:57:26.000000000 -0400
***************
*** 5618,5621 ****
--- 5618,5623 ----
extended_glob = global_extglob;
#endif
+ if (parser_state & (PST_CMDSUBST|PST_STRING))
+ expand_aliases = expaliases_flag;
parser_state = 0;
***************
*** 6700,6703 ****
--- 6702,6706 ----
parser_state |= PST_NOERROR;
+ parser_state |= PST_STRING;
expand_aliases = 0;
***************
*** 8713,8717 ****
parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
/* State flags we want to set for this run through the tokenizer. */
! parser_state |= PST_COMPASSIGN|PST_REPARSE;
}
--- 8716,8720 ----
parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
/* State flags we want to set for this run through the tokenizer. */
! parser_state |= PST_COMPASSIGN|PST_REPARSE|PST_STRING;
}
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 5
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 6
#endif /* _PATCHLEVEL_H_ */
@@ -1,262 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-007
Bug-Reported-by: Bruce Jerrick
Bug-Reference-ID:
Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=2134307
Bug-Description:
This patch fixes several problems with alias expansion inside command
substitutions when in POSIX mode.
Patch (apply with `patch -p0'):
*** /fs1/chet/scratch/bash-5.2.6/parse.y 2022-11-02 10:36:54.000000000 -0400
--- parse.y 2022-10-24 10:53:26.000000000 -0400
***************
*** 3613,3616 ****
--- 3614,3618 ----
#define P_ARRAYSUB 0x0020 /* parsing a [...] array subscript for assignment */
#define P_DOLBRACE 0x0040 /* parsing a ${...} construct */
+ #define P_ARITH 0x0080 /* parsing a $(( )) arithmetic expansion */
/* Lexical state while parsing a grouping construct or $(...). */
***************
*** 3911,3914 ****
--- 3914,3920 ----
else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
goto parse_dollar_word;
+ else if ((flags & P_ARITH) && (tflags & LEX_WASDOL) && ch == '(') /*)*/
+ /* $() inside $(( ))/$[ ] */
+ goto parse_dollar_word;
#if defined (PROCESS_SUBSTITUTION)
/* XXX - technically this should only be recognized at the start of
***************
*** 3941,3945 ****
nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags);
else if (ch == '[') /* ] */
! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
CHECK_NESTRET_ERROR ();
--- 3947,3951 ----
nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags);
else if (ch == '[') /* ] */
! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags|P_ARITH);
CHECK_NESTRET_ERROR ();
***************
*** 4080,4084 ****
shell_ungetc (peekc);
if (peekc == '(') /*)*/
! return (parse_matched_pair (qc, open, close, lenp, 0));
}
--- 4086,4090 ----
shell_ungetc (peekc);
if (peekc == '(') /*)*/
! return (parse_matched_pair (qc, open, close, lenp, P_ARITH));
}
***************
*** 4501,4505 ****
exp_lineno = line_number;
! ttok = parse_matched_pair (0, '(', ')', &ttoklen, 0);
rval = 1;
if (ttok == &matched_pair_error)
--- 4512,4516 ----
exp_lineno = line_number;
! ttok = parse_matched_pair (0, '(', ')', &ttoklen, P_ARITH);
rval = 1;
if (ttok == &matched_pair_error)
***************
*** 5016,5020 ****
}
else
! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
if (ttok == &matched_pair_error)
return -1; /* Bail immediately. */
--- 5030,5034 ----
}
else
! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARITH);
if (ttok == &matched_pair_error)
return -1; /* Bail immediately. */
*** ../bash-5.2.6/y.tab.c 2022-11-02 10:36:54.000000000 -0400
--- y.tab.c 2022-11-02 10:55:58.000000000 -0400
***************
*** 5924,5927 ****
--- 5924,5928 ----
#define P_ARRAYSUB 0x0020 /* parsing a [...] array subscript for assignment */
#define P_DOLBRACE 0x0040 /* parsing a ${...} construct */
+ #define P_ARITH 0x0080 /* parsing a $(( )) arithmetic expansion */
/* Lexical state while parsing a grouping construct or $(...). */
***************
*** 6222,6225 ****
--- 6223,6229 ----
else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
goto parse_dollar_word;
+ else if ((flags & P_ARITH) && (tflags & LEX_WASDOL) && ch == '(') /*)*/
+ /* $() inside $(( ))/$[ ] */
+ goto parse_dollar_word;
#if defined (PROCESS_SUBSTITUTION)
/* XXX - technically this should only be recognized at the start of
***************
*** 6252,6256 ****
nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags);
else if (ch == '[') /* ] */
! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
CHECK_NESTRET_ERROR ();
--- 6256,6260 ----
nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags);
else if (ch == '[') /* ] */
! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags|P_ARITH);
CHECK_NESTRET_ERROR ();
***************
*** 6391,6395 ****
shell_ungetc (peekc);
if (peekc == '(') /*)*/
! return (parse_matched_pair (qc, open, close, lenp, 0));
}
--- 6395,6399 ----
shell_ungetc (peekc);
if (peekc == '(') /*)*/
! return (parse_matched_pair (qc, open, close, lenp, P_ARITH));
}
***************
*** 6812,6816 ****
exp_lineno = line_number;
! ttok = parse_matched_pair (0, '(', ')', &ttoklen, 0);
rval = 1;
if (ttok == &matched_pair_error)
--- 6816,6820 ----
exp_lineno = line_number;
! ttok = parse_matched_pair (0, '(', ')', &ttoklen, P_ARITH);
rval = 1;
if (ttok == &matched_pair_error)
***************
*** 7327,7331 ****
}
else
! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
if (ttok == &matched_pair_error)
return -1; /* Bail immediately. */
--- 7331,7335 ----
}
else
! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARITH);
if (ttok == &matched_pair_error)
return -1; /* Bail immediately. */
*** /fs1/chet/scratch/bash-5.2.6/builtins/evalstring.c 2022-07-18 14:46:56.000000000 -0400
--- builtins/evalstring.c 2022-10-18 10:57:51.000000000 -0400
***************
*** 432,435 ****
--- 432,437 ----
if (parse_command () == 0)
{
+ int local_expalias, local_alflag;
+
if ((flags & SEVAL_PARSEONLY) || (interactive_shell == 0 && read_but_dont_execute))
{
***************
*** 508,511 ****
--- 510,526 ----
#endif /* ONESHOT */
+ /* We play tricks in the parser and command_substitute() turning
+ expand_aliases on and off depending on which parsing pass and
+ whether or not we're in posix mode. This only matters for
+ parsing, and we let the higher layers deal with that. We just
+ want to ensure that expand_aliases is set to the appropriate
+ global value when we go to execute this command, so we save
+ and restore it around the execution (we don't restore it if
+ the global value of the flag (expaliases_flag) changes). */
+ local_expalias = expand_aliases;
+ local_alflag = expaliases_flag;
+ if (subshell_environment & SUBSHELL_COMSUB)
+ expand_aliases = expaliases_flag;
+
/* See if this is a candidate for $( <file ). */
if (startup_state == 2 &&
***************
*** 525,528 ****
--- 540,547 ----
discard_unwind_frame ("pe_dispose");
+ /* If the global value didn't change, we restore what we had. */
+ if ((subshell_environment & SUBSHELL_COMSUB) && local_alflag == expaliases_flag)
+ expand_aliases = local_expalias;
+
if (flags & SEVAL_ONECMD)
{
*** /fs1/chet/scratch/bash-5.2.6/command.h 2021-04-30 15:43:15.000000000 -0400
--- command.h 2022-10-18 11:44:31.000000000 -0400
***************
*** 115,118 ****
--- 115,119 ----
#define PF_EXPANDRHS 0x20 /* same as W_EXPANDRHS */
#define PF_ALLINDS 0x40 /* array, act as if [@] was supplied */
+ #define PF_BACKQUOTE 0x80 /* differentiate `` from $() for command_substitute */
/* Possible values for subshell_environment */
*** /fs1/chet/scratch/bash-5.2.6/subst.c 2022-11-02 10:28:10.000000000 -0400
--- subst.c 2022-10-20 12:41:07.000000000 -0400
***************
*** 7124,7129 ****
/* We want to expand aliases on this pass if we are not in posix mode
! for backwards compatibility. */
! if (expand_aliases)
expand_aliases = posixly_correct == 0;
--- 7133,7142 ----
/* We want to expand aliases on this pass if we are not in posix mode
! for backwards compatibility. parse_and_execute() takes care of
! setting expand_aliases back to the global value when executing the
! parsed string. We only do this for $(...) command substitution,
! since that is what parse_comsub handles; `` comsubs are processed
! using parse.y:parse_matched_pair(). */
! if (expand_aliases && (flags & PF_BACKQUOTE) == 0)
expand_aliases = posixly_correct == 0;
***************
*** 11293,11297 ****
{
de_backslash (temp);
! tword = command_substitute (temp, quoted, 0);
temp1 = tword ? tword->word : (char *)NULL;
if (tword)
--- 11306,11310 ----
{
de_backslash (temp);
! tword = command_substitute (temp, quoted, PF_BACKQUOTE);
temp1 = tword ? tword->word : (char *)NULL;
if (tword)
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 6
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 7
#endif /* _PATCHLEVEL_H_ */
@@ -1,58 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-008
Bug-Reported-by: Glenn Jackman <glenn.jackman@gmail.com>
Bug-Reference-ID: <CAFC8ewQDx7hzNJzveuJ5o4FWo=ij7MzckiJVN_6NXjp504QZeg@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00095.html
Bug-Description:
Array subscript expansion can inappropriately quote brackets if the expression
contains < or >.
Patch (apply with `patch -p0'):
*** ../bash-20221015/subst.c 2022-10-18 10:47:33.000000000 -0500
--- subst.c 2022-10-20 11:41:07.000000000 -0500
***************
*** 3820,3823 ****
--- 3820,3827 ----
#endif
+ /* We don't perform process substitution in arithmetic expressions, so don't
+ bother checking for it. */
+ #define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~')
+
/* If there are any characters in STRING that require full expansion,
then call FUNC to expand STRING; otherwise just perform quote
***************
*** 4029,4033 ****
while (string[i])
{
! if (EXP_CHAR (string[i]))
break;
else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
--- 4033,4037 ----
while (string[i])
{
! if (ARITH_EXP_CHAR (string[i]))
break;
else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 7
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 8
#endif /* _PATCHLEVEL_H_ */
@@ -1,43 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-009
Bug-Reported-by: Corey Hickey <bugfood-ml@fatooh.org>
Bug-Reference-ID: <134330ef-0ead-d73e-68eb-d58fc51efdba@fatooh.org>
Bug-Reference-URL: https://lists.gnu.org/archive/html/help-bash/2022-10/msg00025.html
Bug-Description:
Bash arithmetic expansion should allow `@' and `*' to be used as associative
array keys in expressions.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/expr.c 2022-07-11 10:03:34.000000000 -0400
--- expr.c 2022-10-31 10:51:08.000000000 -0400
***************
*** 1169,1172 ****
--- 1169,1174 ----
#if defined (ARRAY_VARS)
aflag = tflag; /* use a different variable for now */
+ if (shell_compatibility_level > 51)
+ aflag |= AV_ATSTARKEYS;
v = (e == ']') ? array_variable_part (tok, tflag, (char **)0, (int *)0) : find_variable (tok);
#else
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 8
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 9
#endif /* _PATCHLEVEL_H_ */
@@ -1,71 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-010
Bug-Reported-by: larsh@apache.org
Bug-Reference-ID:
Bug-Reference-URL: https://savannah.gnu.org/support/?110744
Bug-Description:
Bash-5.2 checks the first 128 characters of an executable file that execve()
refuses to execute to see whether it's a binary file before trying to
execute it as a shell script. This defeats some previously-supported use
cases like "self-executing" jar files or "self-uncompressing" scripts.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/general.c 2022-11-07 10:31:42.000000000 -0500
--- general.c 2022-11-18 14:48:45.000000000 -0500
***************
*** 684,687 ****
--- 684,688 ----
{
register int i;
+ int nline;
unsigned char c;
***************
*** 690,702 ****
/* Generally we check the first line for NULs. If the first line looks like
! a `#!' interpreter specifier, we just look for NULs anywhere in the
! buffer. */
! if (sample[0] == '#' && sample[1] == '!')
! return (memchr (sample, '\0', sample_len) != NULL);
for (i = 0; i < sample_len; i++)
{
c = sample[i];
! if (c == '\n')
return (0);
if (c == '\0')
--- 691,701 ----
/* Generally we check the first line for NULs. If the first line looks like
! a `#!' interpreter specifier, we look for NULs in the first two lines. */
! nline = (sample[0] == '#' && sample[1] == '!') ? 2 : 1;
for (i = 0; i < sample_len; i++)
{
c = sample[i];
! if (c == '\n' && --nline == 0)
return (0);
if (c == '\0')
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 9
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 10
#endif /* _PATCHLEVEL_H_ */
@@ -1,45 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-011
Bug-Reported-by: Fabien Orjollet <of1@disroot.org>
Bug-Reference-ID:
Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1023776
Bug-Description:
Patch (apply with `patch -p0'):
Using timeouts and readline editing with the `read' builtin (read -e -t) can
leave the readline timeout enabled, potentially resulting in an erroneous
timeout on the next call.
*** ../bash-5.2-patched/builtins/read.def 2022-06-02 14:23:19.000000000 -0400
--- builtins/read.def 2022-11-10 10:27:45.000000000 -0500
***************
*** 168,171 ****
--- 168,174 ----
if (read_timeout)
shtimer_clear (read_timeout);
+ #if defined (READLINE)
+ rl_clear_timeout ();
+ #endif
read_timeout = 0;
}
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 10
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 11
#endif /* _PATCHLEVEL_H_ */
@@ -1,344 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-012
Bug-Reported-by: Kerin Millar <kfm@plushkava.net>
Bug-Reference-ID: <20221002095107.89561bc811e549b55644df11@plushkava.net>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00001.html
Bug-Description:
When running in bash compatibility mode, nested command substitutions can
leave the `extglob' option enabled.
Patch (apply with `patch -p0'):
*** /fs1/chet/scratch/bash-5.2.12/builtins/shopt.def 2022-11-07 10:31:42.000000000 -0500
--- builtins/shopt.def 2022-10-14 09:30:11.000000000 -0400
***************
*** 150,153 ****
--- 150,158 ----
#endif
+ #if defined (EXTENDED_GLOB)
+ int extglob_flag = EXTGLOB_DEFAULT;
+ static int shopt_set_extglob PARAMS((char *, int));
+ #endif
+
int expaliases_flag = 0;
static int shopt_set_expaliases PARAMS((char *, int));
***************
*** 207,211 ****
#endif
#if defined (EXTENDED_GLOB)
! { "extglob", &extended_glob, (shopt_set_func_t *)NULL },
#endif
{ "extquote", &extended_quote, (shopt_set_func_t *)NULL },
--- 212,216 ----
#endif
#if defined (EXTENDED_GLOB)
! { "extglob", &extglob_flag, shopt_set_extglob },
#endif
{ "extquote", &extended_quote, (shopt_set_func_t *)NULL },
***************
*** 378,382 ****
#if defined (EXTENDED_GLOB)
! extended_glob = EXTGLOB_DEFAULT;
#endif
--- 383,387 ----
#if defined (EXTENDED_GLOB)
! extended_glob = extglob_flag = EXTGLOB_DEFAULT;
#endif
***************
*** 644,647 ****
--- 649,663 ----
}
+ #if defined (EXTENDED_GLOB)
+ static int
+ shopt_set_extglob (option_name, mode)
+ char *option_name;
+ int mode;
+ {
+ extended_glob = extglob_flag;
+ return 0;
+ }
+ #endif
+
#if defined (READLINE)
static int
*** /fs1/chet/scratch/bash-5.2.12/builtins/common.h 2022-11-07 10:31:42.000000000 -0500
--- builtins/common.h 2022-10-14 09:29:25.000000000 -0400
***************
*** 258,261 ****
--- 258,265 ----
#endif
+ #if defined (EXTENDED_GLOB)
+ extern int extglob_flag;
+ #endif
+
extern int expaliases_flag;
*** /fs1/chet/scratch/bash-5.2.12/execute_cmd.c 2022-11-07 10:31:42.000000000 -0500
--- execute_cmd.c 2022-11-02 16:32:12.000000000 -0400
***************
*** 3991,4001 ****
#endif /* COND_REGEXP */
{
- int oe;
- oe = extended_glob;
extended_glob = 1;
result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE)
? EXECUTION_SUCCESS
: EXECUTION_FAILURE;
! extended_glob = oe;
}
if (arg1 != nullstr)
--- 4015,4023 ----
#endif /* COND_REGEXP */
{
extended_glob = 1;
result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE)
? EXECUTION_SUCCESS
: EXECUTION_FAILURE;
! extended_glob = extglob_flag;
}
if (arg1 != nullstr)
*** /fs1/chet/scratch/bash-5.2.9/parse.y 2022-11-07 10:31:47.000000000 -0500
--- parse.y 2022-11-14 11:27:22.000000000 -0500
***************
*** 126,130 ****
#if defined (EXTENDED_GLOB)
! extern int extended_glob;
#endif
--- 126,130 ----
#if defined (EXTENDED_GLOB)
! extern int extended_glob, extglob_flag;
#endif
***************
*** 3305,3309 ****
/* Reset to global value of extended glob */
if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
! extended_glob = global_extglob;
#endif
if (parser_state & (PST_CMDSUBST|PST_STRING))
--- 3321,3325 ----
/* Reset to global value of extended glob */
if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
! extended_glob = extglob_flag;
#endif
if (parser_state & (PST_CMDSUBST|PST_STRING))
***************
*** 4125,4132 ****
#if defined (EXTENDED_GLOB)
/* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
! conditional command and have already set global_extglob appropriately. */
if (shell_compatibility_level <= 51 && was_extpat == 0)
{
! local_extglob = global_extglob = extended_glob;
extended_glob = 1;
}
--- 4143,4150 ----
#if defined (EXTENDED_GLOB)
/* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
! conditional command and have already set extended_glob appropriately. */
if (shell_compatibility_level <= 51 && was_extpat == 0)
{
! local_extglob = extended_glob;
extended_glob = 1;
}
***************
*** 4236,4240 ****
sh_parser_state_t ps;
sh_input_line_state_t ls;
! int orig_ind, nc, sflags, start_lineno;
char *ret, *ep, *ostring;
--- 4256,4260 ----
sh_parser_state_t ps;
sh_input_line_state_t ls;
! int orig_ind, nc, sflags, start_lineno, local_extglob;
char *ret, *ep, *ostring;
***************
*** 4279,4283 ****
expand_aliases = 0;
#if defined (EXTENDED_GLOB)
! global_extglob = extended_glob; /* for reset_parser() */
#endif
--- 4299,4303 ----
expand_aliases = 0;
#if defined (EXTENDED_GLOB)
! local_extglob = extended_glob;
#endif
***************
*** 4297,4300 ****
--- 4317,4323 ----
restore_parser_state (&ps);
+ #if defined (EXTENDED_GLOB)
+ extended_glob = local_extglob;
+ #endif
token_to_read = 0;
***************
*** 4732,4741 ****
--- 4755,4768 ----
/* rhs */
+ #if defined (EXTENDED_GLOB)
local_extglob = extended_glob;
if (parser_state & PST_EXTPAT)
extended_glob = 1;
+ #endif
tok = read_token (READ);
+ #if defined (EXTENDED_GLOB)
if (parser_state & PST_EXTPAT)
extended_glob = local_extglob;
+ #endif
parser_state &= ~(PST_REGEXP|PST_EXTPAT);
***************
*** 4784,4788 ****
COND_COM *cexp;
- global_extglob = extended_glob;
cexp = cond_expr ();
return (make_cond_command (cexp));
--- 4811,4814 ----
*** y.tab.c.save 2022-11-07 10:31:47.000000000 -0500
--- y.tab.c 2022-11-18 15:58:03.000000000 -0500
***************
*** 176,180 ****
#if defined (EXTENDED_GLOB)
! extern int extended_glob;
#endif
--- 176,180 ----
#if defined (EXTENDED_GLOB)
! extern int extended_glob, extglob_flag;
#endif
***************
*** 5616,5620 ****
/* Reset to global value of extended glob */
if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
! extended_glob = global_extglob;
#endif
if (parser_state & (PST_CMDSUBST|PST_STRING))
--- 5616,5620 ----
/* Reset to global value of extended glob */
if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
! extended_glob = extglob_flag;
#endif
if (parser_state & (PST_CMDSUBST|PST_STRING))
***************
*** 6436,6443 ****
#if defined (EXTENDED_GLOB)
/* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
! conditional command and have already set global_extglob appropriately. */
if (shell_compatibility_level <= 51 && was_extpat == 0)
{
! local_extglob = global_extglob = extended_glob;
extended_glob = 1;
}
--- 6436,6443 ----
#if defined (EXTENDED_GLOB)
/* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
! conditional command and have already set extended_glob appropriately. */
if (shell_compatibility_level <= 51 && was_extpat == 0)
{
! local_extglob = extended_glob;
extended_glob = 1;
}
***************
*** 6547,6551 ****
sh_parser_state_t ps;
sh_input_line_state_t ls;
! int orig_ind, nc, sflags, start_lineno;
char *ret, *ep, *ostring;
--- 6547,6551 ----
sh_parser_state_t ps;
sh_input_line_state_t ls;
! int orig_ind, nc, sflags, start_lineno, local_extglob;
char *ret, *ep, *ostring;
***************
*** 6590,6594 ****
expand_aliases = 0;
#if defined (EXTENDED_GLOB)
! global_extglob = extended_glob; /* for reset_parser() */
#endif
--- 6590,6594 ----
expand_aliases = 0;
#if defined (EXTENDED_GLOB)
! local_extglob = extended_glob;
#endif
***************
*** 6608,6611 ****
--- 6608,6614 ----
restore_parser_state (&ps);
+ #if defined (EXTENDED_GLOB)
+ extended_glob = local_extglob;
+ #endif
token_to_read = 0;
***************
*** 7043,7052 ****
--- 7046,7059 ----
/* rhs */
+ #if defined (EXTENDED_GLOB)
local_extglob = extended_glob;
if (parser_state & PST_EXTPAT)
extended_glob = 1;
+ #endif
tok = read_token (READ);
+ #if defined (EXTENDED_GLOB)
if (parser_state & PST_EXTPAT)
extended_glob = local_extglob;
+ #endif
parser_state &= ~(PST_REGEXP|PST_EXTPAT);
***************
*** 7095,7099 ****
COND_COM *cexp;
- global_extglob = extended_glob;
cexp = cond_expr ();
return (make_cond_command (cexp));
--- 7102,7105 ----
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 11
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 12
#endif /* _PATCHLEVEL_H_ */
@@ -1,58 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-013
Bug-Reported-by: Ralf Oehler <Ralf@Oehler-Privat.de>
Bug-Reference-ID: <20221120140252.2fc6489b@bilbo>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00082.html
Bug-Description:
Bash can leak memory when referencing a non-existent associative array
element.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/subst.c 2022-11-05 17:27:48.000000000 -0400
--- subst.c 2022-11-21 14:42:59.000000000 -0500
***************
*** 7498,7503 ****
: quote_escapes (temp);
rflags |= W_ARRAYIND;
- if (estatep)
- *estatep = es; /* structure copy */
}
/* Note that array[*] and array[@] expanded to a quoted null string by
--- 7508,7511 ----
***************
*** 7508,7512 ****
rflags |= W_HASQUOTEDNULL;
! if (estatep == 0)
flush_eltstate (&es);
}
--- 7516,7522 ----
rflags |= W_HASQUOTEDNULL;
! if (estatep)
! *estatep = es; /* structure copy */
! else
flush_eltstate (&es);
}
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 12
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 13
#endif /* _PATCHLEVEL_H_ */
@@ -1,119 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-014
Bug-Reported-by: Andreas Schwab <schwab@suse.de>
Bug-Reference-ID: <mvmv8opcbha.fsf@suse.de>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00076.html
Bug-Description:
Bash defers processing additional terminating signals when running the
EXIT trap while exiting due to a terminating signal. This patch allows the
new terminating signal to kill the shell immediately.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/execute_cmd.c 2022-11-23 17:09:18.000000000 -0500
--- execute_cmd.c 2022-11-28 10:36:08.000000000 -0500
***************
*** 3625,3628 ****
--- 3649,3653 ----
dispose_words (es);
+ QUIT;
if (match)
*** ../bash-5.2-patched/sig.c 2021-11-04 14:15:31.000000000 -0400
--- sig.c 2022-12-06 09:45:11.000000000 -0500
***************
*** 95,98 ****
--- 95,99 ----
static void initialize_shell_signals PARAMS((void));
+ static void kill_shell PARAMS((int));
void
***************
*** 487,490 ****
--- 495,500 ----
}
+ static int handling_termsig = 0;
+
sighandler
termsig_sighandler (sig)
***************
*** 533,536 ****
--- 543,554 ----
terminate_immediately = 1;
+ /* If we are currently handling a terminating signal, we have a couple of
+ choices here. We can ignore this second terminating signal and let the
+ shell exit from the first one, or we can exit immediately by killing
+ the shell with this signal. This code implements the latter; to implement
+ the former, replace the kill_shell(sig) with return. */
+ if (handling_termsig)
+ kill_shell (sig); /* just short-circuit now */
+
terminating_signal = sig;
***************
*** 565,572 ****
int sig;
{
- static int handling_termsig = 0;
- int i, core;
- sigset_t mask;
-
/* Simple semaphore to keep this function from being executed multiple
times. Since we no longer are running as a signal handler, we don't
--- 585,588 ----
***************
*** 574,578 ****
if (handling_termsig)
return;
! handling_termsig = 1;
terminating_signal = 0; /* keep macro from re-testing true. */
--- 590,595 ----
if (handling_termsig)
return;
!
! handling_termsig = terminating_signal; /* for termsig_sighandler */
terminating_signal = 0; /* keep macro from re-testing true. */
***************
*** 614,617 ****
--- 631,644 ----
run_exit_trap (); /* XXX - run exit trap possibly in signal context? */
+ kill_shell (sig);
+ }
+
+ static void
+ kill_shell (sig)
+ int sig;
+ {
+ int i, core;
+ sigset_t mask;
+
/* We don't change the set of blocked signals. If a user starts the shell
with a terminating signal blocked, we won't get here (and if by some
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 13
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 14
#endif /* _PATCHLEVEL_H_ */
@@ -1,216 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-015
Bug-Reported-by: Frode Nordahl <frode.nordahl@canonical.com>
Bug-Reference-ID: <20221119070714.351759-1-frode.nordahl@canonical.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00078.html
Bug-Description:
There are several cases where bash is too aggressive when optimizing out forks
in subshells. For example, `eval' and traps should never be optimized.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/builtins/common.h 2022-11-23 17:09:18.000000000 -0500
--- builtins/common.h 2022-11-19 18:03:59.000000000 -0500
***************
*** 52,55 ****
--- 52,56 ----
#define SEVAL_ONECMD 0x100 /* only allow a single command */
#define SEVAL_NOHISTEXP 0x200 /* inhibit history expansion */
+ #define SEVAL_NOOPTIMIZE 0x400 /* don't try to set optimization flags */
/* Flags for describe_command, shared between type.def and command.def */
*** ../bash-5.2-patched/builtins/evalstring.c 2022-11-05 17:27:44.000000000 -0400
--- builtins/evalstring.c 2022-11-19 18:23:21.000000000 -0500
***************
*** 133,138 ****
(command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') &&
(command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) &&
! ((startup_state == 2 && should_suppress_fork (command->value.Connection->second)) ||
! ((subshell_environment & SUBSHELL_PAREN) && should_optimize_fork (command->value.Connection->second, 0))))
{
command->value.Connection->second->flags |= CMD_NO_FORK;
--- 133,138 ----
(command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') &&
(command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) &&
! (should_suppress_fork (command->value.Connection->second) ||
! ((subshell_environment & SUBSHELL_PAREN) && should_optimize_fork (command->value.Connection->second, 0))))
{
command->value.Connection->second->flags |= CMD_NO_FORK;
***************
*** 291,294 ****
--- 291,295 ----
(flags & SEVAL_RESETLINE) -> reset line_number to 1
(flags & SEVAL_NOHISTEXP) -> history_expansion_inhibited -> 1
+ (flags & SEVAL_NOOPTIMIZE) -> don't try to turn on optimizing flags
*/
***************
*** 503,507 ****
series of connection commands is
command->value.Connection->second. */
! else if (command->type == cm_connection && can_optimize_connection (command))
{
command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING;
--- 504,510 ----
series of connection commands is
command->value.Connection->second. */
! else if (command->type == cm_connection &&
! (flags & SEVAL_NOOPTIMIZE) == 0 &&
! can_optimize_connection (command))
{
command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING;
*** ../bash-5.2-patched/builtins/eval.def 2016-01-25 13:28:37.000000000 -0500
--- builtins/eval.def 2022-11-19 18:04:25.000000000 -0500
***************
*** 54,57 ****
list = loptend; /* skip over possible `--' */
! return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
}
--- 54,57 ----
list = loptend; /* skip over possible `--' */
! return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST|SEVAL_NOOPTIMIZE) : EXECUTION_SUCCESS);
}
*** ../bash-5.2-patched/trap.c 2022-08-10 08:59:45.000000000 -0400
--- trap.c 2022-12-12 10:57:51.000000000 -0500
***************
*** 305,308 ****
--- 305,309 ----
volatile int save_return_catch_flag, function_code;
procenv_t save_return_catch;
+ char *trap_command, *old_trap;
#if defined (ARRAY_VARS)
ARRAY *ps;
***************
*** 420,423 ****
--- 421,427 ----
else
{
+ old_trap = trap_list[sig];
+ trap_command = savestring (old_trap);
+
save_parser_state (&pstate);
save_subst_varlist = subst_assign_varlist;
***************
*** 442,446 ****
if (function_code == 0)
! x = parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
else
{
--- 446,451 ----
if (function_code == 0)
! /* XXX is x always last_command_exit_value? */
! x = parse_and_execute (trap_command, "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE);
else
{
***************
*** 1003,1007 ****
{
reset_parser ();
! parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
}
else if (code == ERREXIT)
--- 1008,1012 ----
{
reset_parser ();
! parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE);
}
else if (code == ERREXIT)
***************
*** 1110,1114 ****
}
! flags = SEVAL_NONINT|SEVAL_NOHIST;
if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
flags |= SEVAL_RESETLINE;
--- 1115,1119 ----
}
! flags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE;
if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
flags |= SEVAL_RESETLINE;
*** ../bash-5.2-patched/parse.y 2022-11-23 17:09:18.000000000 -0500
--- parse.y 2022-11-19 18:15:34.000000000 -0500
***************
*** 2828,2832 ****
last_lastarg = savestring (last_lastarg);
! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST);
restore_parser_state (&ps);
--- 2844,2848 ----
last_lastarg = savestring (last_lastarg);
! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE);
restore_parser_state (&ps);
*** ../bash-5.2-patched/jobs.c 2022-07-18 10:19:56.000000000 -0400
--- jobs.c 2022-11-19 18:10:24.000000000 -0500
***************
*** 4221,4225 ****
for (i = 0; i < nchild; i++)
{
! parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE);
}
--- 4243,4247 ----
for (i = 0; i < nchild; i++)
{
! parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE);
}
*** ../bash-5.2-patched/y.tab.c 2022-11-23 17:09:18.000000000 -0500
--- y.tab.c 2022-11-23 17:21:17.000000000 -0500
***************
*** 5139,5143 ****
last_lastarg = savestring (last_lastarg);
! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST);
restore_parser_state (&ps);
--- 5154,5158 ----
last_lastarg = savestring (last_lastarg);
! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE);
restore_parser_state (&ps);
*** ../bash-5.2-patched/execute_cmd.c 2022-11-05 17:27:41.000000000 -0400
--- execute_cmd.c 2022-11-22 17:09:38.000000000 -0500
***************
*** 1655,1659 ****
and set CMD_TRY_OPTIMIZING for simple commands on the right side of an
and-or or `;' list to test for optimizing forks when they are executed. */
! if (user_subshell && command->type == cm_subshell)
optimize_subshell_command (command->value.Subshell->command);
--- 1665,1670 ----
and set CMD_TRY_OPTIMIZING for simple commands on the right side of an
and-or or `;' list to test for optimizing forks when they are executed. */
! if (user_subshell && command->type == cm_subshell &&
! (command->flags & (CMD_TIME_PIPELINE|CMD_INVERT_RETURN)) == 0)
optimize_subshell_command (command->value.Subshell->command);
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 14
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 15
#endif /* _PATCHLEVEL_H_ */
@@ -1,47 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-016
Bug-Reported-by: F G <frank.graziano@gmail.com>
Bug-Reference-ID: <CAOhYt35M5VctK+xAPu=Gy_UzzGmHedWPJE4q+kL4UHF_6Nb1kA@mail.gmail.com>
Bug-Reference-URL:
Bug-Description:
If an expression in an arithmetic for loop expands to NULL, the shell
would crash.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/execute_cmd.c Thu Feb 23 14:15:05 2023
--- execute_cmd.c Mon Feb 27 17:53:08 2023
***************
*** 3051,3055 ****
if (l->next)
free (expr);
! new = make_word_list (make_word (temp), (WORD_LIST *)NULL);
free (temp);
--- 3051,3055 ----
if (l->next)
free (expr);
! new = make_word_list (make_word (temp ? temp : ""), (WORD_LIST *)NULL);
free (temp);
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 15
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 16
#endif /* _PATCHLEVEL_H_ */
@@ -1,47 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-017
Bug-Reported-by: Dan Church <h3xx@gmx.com>
Bug-Reference-ID: <1a8fd1d6-a3ac-9a67-78eb-b9a7435304c8@gmx.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-12/msg00076.html
Bug-Description:
In certain cases, using the `.' builtin in a subshell would optimize away
the rest of the commands in the subshell.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/builtins/evalfile.c 2019-07-20 16:16:08.000000000 -0400
--- builtins/evalfile.c 2022-12-22 12:13:08.000000000 -0500
***************
*** 267,271 ****
/* set the flags to be passed to parse_and_execute */
! pflags = SEVAL_RESETLINE;
pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
--- 267,271 ----
/* set the flags to be passed to parse_and_execute */
! pflags = SEVAL_RESETLINE|SEVAL_NOOPTIMIZE;
pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 16
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 17
#endif /* _PATCHLEVEL_H_ */
File diff suppressed because it is too large Load Diff
@@ -1,66 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-019
Bug-Reported-by: Steffen Nurpmeso <steffen@sdaoden.eu>
Bug-Reference-ID: <20230116233547.2jFxL%steffen@sdaoden.eu>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-01/msg00057.html
Bug-Description:
There are some cases where the shell reaped a background (asynchronous) job
and would incorrectly try to set the terminal's process group back to the
shell's. In these cases it never set the terminal process group to that
jobs's process group initially, so resetting it is incorrect.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/jobs.c 2022-12-13 12:09:02.000000000 -0500
--- jobs.c 2023-10-26 12:12:10.000000000 -0400
***************
*** 3078,3084 ****
subshell. Make sure subst.c:command_substitute uses the same
conditions to determine whether or not it should undo this and
! give the terminal to pipeline_pgrp. */
!
if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 &&
(subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0)
give_terminal_to (shell_pgrp, 0);
--- 3036,3046 ----
subshell. Make sure subst.c:command_substitute uses the same
conditions to determine whether or not it should undo this and
! give the terminal to pipeline_pgrp. We don't give the terminal
! back to shell_pgrp if an async job in the background exits because
! we never gave it to that job in the first place. An async job in
! the foreground is one we started in the background and foregrounded
! with `fg', and gave it the terminal. */
if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 &&
+ (job == NO_JOB || IS_ASYNC (job) == 0 || IS_FOREGROUND (job)) &&
(subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0)
give_terminal_to (shell_pgrp, 0);
***************
*** 3624,3627 ****
--- 3599,3603 ----
get_tty_state ();
save_stty = shell_tty_info;
+ jobs[job]->flags &= ~J_ASYNC; /* no longer async */
/* Give the terminal to this job. */
if (IS_JOBCONTROL (job))
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 18
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 19
#endif /* _PATCHLEVEL_H_ */
@@ -1,53 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-020
Bug-Reported-by: Dima Korobskiy <dkroot2@gmail.com>
Bug-Reference-ID: <16664c2d-40ec-df33-b932-83db06e39a82@gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-08/msg00125.html
Bug-Description:
The parser did not allow `time' to appear as the first reserved word in a
command substitution.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/parse.y Tue Dec 13 12:53:21 2022
--- parse.y Fri Sep 1 10:36:28 2023
***************
*** 3151,3154 ****
--- 3151,3155 ----
case TIMEOPT: /* time -p time pipeline */
case TIMEIGN: /* time -p -- ... */
+ case DOLPAREN:
return 1;
default:
*** ../bash-5.2-patched/y.tab.c Tue Dec 13 12:53:21 2022
--- y.tab.c Fri Sep 1 10:36:44 2023
***************
*** 5466,5469 ****
--- 5466,5470 ----
case TIMEOPT: /* time -p time pipeline */
case TIMEIGN: /* time -p -- ... */
+ case DOLPAREN:
return 1;
default:
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 19
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 20
#endif /* _PATCHLEVEL_H_ */
@@ -1,61 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-021
Bug-Reported-by: Norbert Lange <nolange79@gmail.com>
Bug-Reference-ID: <CADYdroPZFdVZSL6KkhqkAPgKKopbsLQVSm7_TvLCwadL2=UAWw@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-12/msg00046.html
Bug-Description:
There is an off-by-one error that causes command substitutions to fail when
they appear in a word expansion inside a here-document.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/subst.c 2022-12-13 12:08:58.000000000 -0500
--- subst.c 2022-12-14 09:09:53.000000000 -0500
***************
*** 1694,1698 ****
CHECK_STRING_OVERRUN (i, si, slen, c);
! tlen = si - i - 1;
RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
result[result_index++] = c;
--- 1699,1703 ----
CHECK_STRING_OVERRUN (i, si, slen, c);
! tlen = si - i - 2;
RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
result[result_index++] = c;
***************
*** 1714,1718 ****
CHECK_STRING_OVERRUN (i, si, slen, c);
! tlen = si - i - 1;
RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
result[result_index++] = c;
--- 1719,1723 ----
CHECK_STRING_OVERRUN (i, si, slen, c);
! tlen = si - i - 2;
RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
result[result_index++] = c;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 20
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 21
#endif /* _PATCHLEVEL_H_ */
@@ -1,53 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-022
Bug-Reported-by: srobertson@peratonlabs.com
Bug-Reference-ID:
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00049.html
Bug-Description:
It's possible for readline to try to zero out a line that's not null-
terminated, leading to a memory fault.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/lib/readline/display.c 2022-04-05 10:47:31.000000000 -0400
--- lib/readline/display.c 2022-12-13 13:11:22.000000000 -0500
***************
*** 2684,2692 ****
if (visible_line)
! {
! temp = visible_line;
! while (*temp)
! *temp++ = '\0';
! }
rl_on_new_line ();
forced_display++;
--- 2735,2740 ----
if (visible_line)
! memset (visible_line, 0, line_size);
!
rl_on_new_line ();
forced_display++;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 21
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 22
#endif /* _PATCHLEVEL_H_ */
@@ -1,64 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-023
Bug-Reported-by: Emanuele Torre <torreemanuele6@gmail.com>
Bug-Reference-ID: <20230206140824.1710288-1-torreemanuele6@gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00045.html
Bug-Description:
Running `local -' multiple times in a shell function would overwrite the
original saved set of options.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/builtins/declare.def 2023-01-04 20:40:28.000000000 -0500
--- builtins/declare.def 2023-02-08 15:36:49.000000000 -0500
***************
*** 421,429 ****
if (local_var && variable_context && STREQ (name, "-"))
{
var = make_local_variable ("-", 0);
! FREE (value_cell (var)); /* just in case */
! value = get_current_options ();
! var_setvalue (var, value);
! VSETATTR (var, att_invisible);
NEXT_VARIABLE ();
}
--- 421,437 ----
if (local_var && variable_context && STREQ (name, "-"))
{
+ int o;
+
+ o = localvar_inherit;
+ localvar_inherit = 0;
var = make_local_variable ("-", 0);
! localvar_inherit = o;
!
! if (value_cell (var) == NULL) /* no duplicate instances */
! {
! value = get_current_options ();
! var_setvalue (var, value);
! VSETATTR (var, att_invisible);
! }
NEXT_VARIABLE ();
}
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 22
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 23
#endif /* _PATCHLEVEL_H_ */
@@ -1,88 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-024
Bug-Reported-by: Marco <maroloccio@gmail.com>
Bug-Reference-ID: <eaf9af76-c4ed-8b61-c517-22ed980529d3@gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00044.html
Bug-Description:
Fix bug where associative array compound assignment would not expand tildes
in values.
Patch (apply with `patch -p0'):
*** ../bash-20230105/arrayfunc.c Thu Jan 5 14:23:28 2023
--- arrayfunc.c Wed Feb 8 16:27:48 2023
***************
*** 651,655 ****
}
! aval = expand_subscript_string (v, 0);
if (aval == 0)
{
--- 651,655 ----
}
! aval = expand_assignment_string_to_string (v, 0);
if (aval == 0)
{
***************
*** 843,847 ****
if (assoc_p (var))
{
! val = expand_subscript_string (val, 0);
if (val == 0)
{
--- 843,847 ----
if (assoc_p (var))
{
! val = expand_assignment_string_to_string (val, 0);
if (val == 0)
{
***************
*** 1031,1035 ****
nword[i++] = w[ind++];
! t = expand_subscript_string (w+ind, 0);
s = (t && strchr (t, CTLESC)) ? quote_escapes (t) : t;
value = sh_single_quote (s ? s : "");
--- 1031,1035 ----
nword[i++] = w[ind++];
! t = expand_assignment_string_to_string (w+ind, 0);
s = (t && strchr (t, CTLESC)) ? quote_escapes (t) : t;
value = sh_single_quote (s ? s : "");
*** ../bash-20230201/subst.c Mon Jan 30 16:19:46 2023
--- subst.c Mon Feb 6 16:25:22 2023
***************
*** 10803,10807 ****
--- 10803,10811 ----
ret = (char *)NULL;
+ #if 0
td.flags = W_NOPROCSUB|W_NOTILDE|W_NOSPLIT2; /* XXX - W_NOCOMSUB? */
+ #else
+ td.flags = W_NOPROCSUB|W_NOSPLIT2; /* XXX - W_NOCOMSUB? */
+ #endif
td.word = savestring (string); /* in case it's freed on error */
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 23
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 24
#endif /* _PATCHLEVEL_H_ */
@@ -1,46 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-025
Bug-Reported-by: Andrew Neff <andrew.neff@visionsystemsinc.com>
Bug-Reference-ID: <SA1P110MB1357F68AFD51BB225019EFF48D2B9@SA1P110MB1357.NAMP110.PROD.OUTLOOK.COM>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00100.html
Bug-Description:
Make sure a subshell checks for and handles any terminating signals before
exiting (which might have arrived after the command completed) so the parent
and any EXIT trap will see the correct value for $?.
Patch (apply with `patch -p0'):
*** ../bash-5.2.9/execute_cmd.c 2022-11-02 10:36:54.000000000 -0400
--- execute_cmd.c 2022-10-27 16:52:55.000000000 -0400
***************
*** 1726,1729 ****
--- 1726,1732 ----
: EXECUTION_SUCCESS;
+ /* Check for terminating signals before we return to our caller, which we
+ expect to exit immediately anyway. */
+ CHECK_TERMSIG;
/* If we were explicitly placed in a subshell with (), we need
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 24
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 25
#endif /* _PATCHLEVEL_H_ */
@@ -1,48 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-026
Bug-Reported-by: Stefan Klinger <readline-gnu.org@stefan-klinger.de>
Bug-Reference-ID:
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-08/msg00018.html
Bug-Description:
The custom color prefix that readline uses to color possible completions
must have a leading `.'.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/lib/readline/colors.c 2021-12-08 11:38:25.000000000 -0500
--- lib/readline/colors.c 2023-08-28 16:40:04.000000000 -0400
***************
*** 74,78 ****
static void restore_default_color (void);
! #define RL_COLOR_PREFIX_EXTENSION "readline-colored-completion-prefix"
COLOR_EXT_TYPE *_rl_color_ext_list = 0;
--- 74,78 ----
static void restore_default_color (void);
! #define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix"
COLOR_EXT_TYPE *_rl_color_ext_list = 0;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 25
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 26
#endif /* _PATCHLEVEL_H_ */
@@ -1,63 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-027
Bug-Reported-by: Emanuel Haupt <ehaupt@FreeBSD.org>
Bug-Reference-ID: <20221001123841.27e1bfb3bf3ed58ab32ea2b5@FreeBSD.org>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00000.html
Bug-Description:
The configure test for the presence of strtoimax(3) is inverted.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/m4/strtoimax.m4 Mon Apr 11 16:31:52 2022
--- m4/strtoimax.m4 Tue Apr 9 11:12:36 2024
***************
*** 30,34 ****
])
AC_MSG_RESULT($bash_cv_func_strtoimax)
! if test $bash_cv_func_strtoimax = yes; then
AC_LIBOBJ(strtoimax)
fi
--- 30,34 ----
])
AC_MSG_RESULT($bash_cv_func_strtoimax)
! if test $bash_cv_func_strtoimax = no; then
AC_LIBOBJ(strtoimax)
fi
*** ..//bash-5.2-patched/configure Fri Sep 23 10:13:22 2022
--- configure Tue Apr 9 11:13:21 2024
***************
*** 20444,20448 ****
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strtoimax" >&5
printf "%s\n" "$bash_cv_func_strtoimax" >&6; }
! if test $bash_cv_func_strtoimax = yes; then
case " $LIBOBJS " in
*" strtoimax.$ac_objext "* ) ;;
--- 20444,20448 ----
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strtoimax" >&5
printf "%s\n" "$bash_cv_func_strtoimax" >&6; }
! if test $bash_cv_func_strtoimax = no; then
case " $LIBOBJS " in
*" strtoimax.$ac_objext "* ) ;;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 26
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 27
#endif /* _PATCHLEVEL_H_ */
@@ -1,49 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-028
Bug-Reported-by: Mark March <march@systempad.cloud>
Bug-Reference-ID: <834896722.6304071.1718744118467@mail.yahoo.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2024-06/msg00122.html
Bug-Description:
A DEBUG trap in an asynchronous process can steal the controlling terminal
away from the calling shell, causing it to exit.
Patch (apply with `patch -p0'):
*** ../bash-20240609/trap.c Fri May 3 12:12:38 2024
--- trap.c Wed Jun 26 10:41:40 2024
***************
*** 1217,1221 ****
restore_pgrp_pipe (save_pipe);
# endif
! if (pipeline_pgrp > 0 && ((subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0))
give_terminal_to (pipeline_pgrp, 1);
--- 1217,1223 ----
restore_pgrp_pipe (save_pipe);
# endif
! /* If the trap command gave the terminal to another process group,
! restore it. XXX - check running_in_background? */
! if (job_control && pipeline_pgrp > 0 && ((subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0))
give_terminal_to (pipeline_pgrp, 1);
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 27
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 28
#endif /* _PATCHLEVEL_H_ */
@@ -1,137 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-029
Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
Bug-Reference-ID: <CAMu=Brp9QHvLh8vbY45hRgCVaQUNSnU7n8EVjsWKajT7c99K8Q@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-04/msg00072.html
Bug-Description:
There are problems with recovery after parser errors when parsing compound
assignments. For instance, the `local' builtin reports an error but never
cleans up the function context.
Patch (apply with `patch -p0'):
*** ../bash-20230427/parse.y Fri Apr 14 11:50:29 2023
--- parse.y Mon May 1 16:25:14 2023
***************
*** 6471,6478 ****
{
set_exit_status (EXECUTION_FAILURE);
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
! jump_to_top_level (DISCARD);
}
--- 6471,6483 ----
{
set_exit_status (EXECUTION_FAILURE);
+ current_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
! {
! if (executing && parse_and_execute_level == 0)
! top_level_cleanup ();
! jump_to_top_level (DISCARD);
! }
}
***************
*** 6538,6546 ****
{
set_exit_status (EXECUTION_FAILURE);
! last_read_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
! jump_to_top_level (DISCARD);
}
--- 6543,6555 ----
{
set_exit_status (EXECUTION_FAILURE);
! last_read_token = current_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
! {
! if (executing && parse_and_execute_level == 0)
! top_level_cleanup ();
! jump_to_top_level (DISCARD);
! }
}
*** ../bash-20230427/y.tab.c Tue Jul 30 15:19:31 2024
--- y.tab.c Tue Jul 30 15:20:21 2024
***************
*** 8786,8793 ****
{
set_exit_status (EXECUTION_FAILURE);
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
! jump_to_top_level (DISCARD);
}
--- 8786,8798 ----
{
set_exit_status (EXECUTION_FAILURE);
+ current_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
! {
! if (executing && parse_and_execute_level == 0)
! top_level_cleanup ();
! jump_to_top_level (DISCARD);
! }
}
***************
*** 8853,8861 ****
{
set_exit_status (EXECUTION_FAILURE);
! last_read_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
! jump_to_top_level (DISCARD);
}
--- 8858,8870 ----
{
set_exit_status (EXECUTION_FAILURE);
! last_read_token = current_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
! {
! if (executing && parse_and_execute_level == 0)
! top_level_cleanup ();
! jump_to_top_level (DISCARD);
! }
}
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 28
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 29
#endif /* _PATCHLEVEL_H_ */
@@ -1,130 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-030
Bug-Reported-by: Steven Pelley <stevenpelley@gmail.com>
Bug-Reference-ID: <CAGOYURh6CKaE-D0Z8puP-tQknavCQNRHo02vpvgMQqaTG3_cRw@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00104.html
Bug-Description:
`wait -n' can fail to return some jobs if they exit due to signals the shell
does not report to the user.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/jobs.c Thu Nov 9 14:59:14 2023
--- jobs.c Tue Jul 30 15:27:44 2024
***************
*** 4275,4279 ****
((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job)))
continue;
!
/* If job control is disabled, don't print the status messages.
Mark dead jobs as notified so that they get cleaned up. If
--- 4288,4312 ----
((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job)))
continue;
!
! /* Do the same thing and don't print anything or mark as notified
! for the signals we're not going to report on. This is the opposite
! of the first two cases under case JDEAD below. */
! else if (interactive_shell == 0 && DEADJOB (job) && IS_FOREGROUND (job) == 0 &&
! WIFSIGNALED (s) && (termsig == SIGINT
! #if defined (DONT_REPORT_SIGTERM)
! || termsig == SIGTERM
! #endif
! #if defined (DONT_REPORT_SIGPIPE)
! || termsig == SIGPIPE
! #endif
! || signal_is_trapped (termsig)))
! continue;
!
! /* hang onto the status if the shell is running -c command */
! else if (startup_state == 2 && subshell_environment == 0 &&
! WIFSIGNALED (s) == 0 &&
! ((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job)))
! continue;
!
/* If job control is disabled, don't print the status messages.
Mark dead jobs as notified so that they get cleaned up. If
***************
*** 4298,4302 ****
/* Print info on jobs that are running in the background,
and on foreground jobs that were killed by anything
! except SIGINT (and possibly SIGPIPE). */
switch (JOBSTATE (job))
{
--- 4331,4335 ----
/* Print info on jobs that are running in the background,
and on foreground jobs that were killed by anything
! except SIGINT (and possibly SIGTERM and SIGPIPE). */
switch (JOBSTATE (job))
{
***************
*** 4318,4321 ****
--- 4351,4355 ----
else if (IS_FOREGROUND (job))
{
+ /* foreground jobs, interactive and non-interactive shells */
#if !defined (DONT_REPORT_SIGPIPE)
if (termsig && WIFSIGNALED (s) && termsig != SIGINT)
***************
*** 4331,4337 ****
fprintf (stderr, "\n");
}
}
! else if (job_control) /* XXX job control test added */
{
if (dir == 0)
dir = current_working_directory ();
--- 4365,4375 ----
fprintf (stderr, "\n");
}
+ /* foreground jobs that exit cleanly */
+ jobs[job]->flags |= J_NOTIFIED;
}
! else if (job_control)
{
+ /* background jobs with job control, interactive and
+ non-interactive shells */
if (dir == 0)
dir = current_working_directory ();
***************
*** 4342,4346 ****
}
! jobs[job]->flags |= J_NOTIFIED;
break;
--- 4380,4391 ----
}
! /* Interactive shells without job control enabled are handled
! above. */
! /* XXX - this is a catch-all in case we missed a state */
! else
! {
! internal_debug("notify_of_job_status: catch-all setting J_NOTIFIED on job %d (%d), startup state = %d", job, jobs[job]->flags, startup_state);
! jobs[job]->flags |= J_NOTIFIED;
! }
break;
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 29
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 30
#endif /* _PATCHLEVEL_H_ */
@@ -1,46 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-031
Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
Bug-Reference-ID: <CAMu=BrrD52xxF7C9Ke1fosAurHq1kz82t7FcHsrPBw9CbAst6A@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-06/msg00045.html
Bug-Description:
There is a memory leak in the code that implements the optimized $(<file)
expansion for some code paths.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/builtins/evalstring.c Tue Dec 13 12:53:21 2022
--- builtins/evalstring.c Tue Nov 28 17:25:39 2023
***************
*** 763,766 ****
--- 773,779 ----
if (fnp)
*fnp = fn;
+ else
+ free (fn);
+
return fd;
}
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 30
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 31
#endif /* _PATCHLEVEL_H_ */
@@ -1,51 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-032
Bug-Reported-by: Albert Akchurin <ackbeat@gmail.com>
Bug-Reference-ID: Mon, 11 Dec 2023 20:41:58 +0600
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-12/msg00047.html
Bug-Description:
Patch (apply with `patch -p0'):
When printing functions containing coprocesses, the displayed coproc command
has the word COPROC inserted unconditionally, resulting in function bodies
that cannot be re-read as input.
*** ../bash-5.2-patched/print_cmd.c Mon Aug 21 16:09:44 2023
--- print_cmd.c Mon Dec 11 15:34:30 2023
***************
*** 357,361 ****
case cm_coproc:
! cprintf ("coproc %s ", command->value.Coproc->name);
skip_this_indent++;
make_command_string_internal (command->value.Coproc->command);
--- 357,363 ----
case cm_coproc:
! cprintf ("coproc ");
! if (command->value.Coproc->command->type != cm_simple)
! cprintf ("%s ", command->value.Coproc->name);
skip_this_indent++;
make_command_string_internal (command->value.Coproc->command);
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 31
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 32
#endif /* _PATCHLEVEL_H_ */
@@ -1,80 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-033
Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
Bug-Reference-ID: <87leasmvoo.fsf@oldenburg.str.redhat.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-11/msg00104.html
Bug-Description:
A typo in the autoconf test for strtold causes false negatives for strtold
being available and working when compiled with gcc-14.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/configure.ac Fri Aug 11 14:52:31 2023
--- configure.ac Tue Nov 21 12:00:25 2023
***************
*** 899,903 ****
[AC_LANG_PROGRAM(
[[#include <stdlib.h>]],
! [[long double r; char *foo, bar; r = strtold(foo, &bar);]]
)],
[bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
--- 900,904 ----
[AC_LANG_PROGRAM(
[[#include <stdlib.h>]],
! [[long double r; char *foo, *bar; r = strtold(foo, &bar);]]
)],
[bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
*** ../bash-5.2-patched/configure Fri Aug 18 16:27:53 2023
--- configure Tue Nov 21 12:00:30 2023
***************
*** 15923,15927 ****
main (void)
{
! long double r; char *foo, bar; r = strtold(foo, &bar);
;
--- 15932,15936 ----
main (void)
{
! long double r; char *foo, *bar; r = strtold(foo, &bar);
;
*** ../bash-5.2-patched/builtins/printf.def Fri Jun 24 10:09:50 2022
--- builtins/printf.def Tue Aug 13 10:36:55 2024
***************
*** 710,714 ****
p = getfloatmax ();
! f = mklong (start, "L", 1);
PF (f, p);
}
--- 710,714 ----
p = getfloatmax ();
! f = mklong (start, FLOATMAX_CONV, USE_LONG_DOUBLE);
PF (f, p);
}
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 32
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 33
#endif /* _PATCHLEVEL_H_ */
@@ -1,143 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-034
Bug-Reported-by: Wiley Young <wyeth2485@gmail.com>
Bug-Reference-ID: <CAGnujaPrPV9hgbvdtG=fOs+L1zVGEahT9d3Aw0e1y3Qj8D8stw@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-05/msg00146.html
Bug-Description:
If we parse a compound assignment during an alias expansion, it's possible
to have the current input string popped out from underneath the parse. In
this case, we should not restore the input we were using when we began to
parse the compound assignment.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/parse.y Fri May 26 16:57:03 2023
--- parse.y Thu Jun 1 16:30:19 2023
***************
*** 6854,6860 ****
{
WORD_LIST *wl, *rl;
! int tok, orig_line_number, assignok;
sh_parser_state_t ps;
char *ret;
orig_line_number = line_number;
--- 6858,6865 ----
{
WORD_LIST *wl, *rl;
! int tok, orig_line_number, assignok, ea, restore_pushed_strings;
sh_parser_state_t ps;
char *ret;
+ STRING_SAVER *ss;
orig_line_number = line_number;
***************
*** 6879,6882 ****
--- 6884,6893 ----
esacs_needed_count = expecting_in_token = 0;
+ /* We're not pushing any new input here, we're reading from the current input
+ source. If that's an alias, we have to be prepared for the alias to get
+ popped out from underneath us. */
+ ss = (ea = expanding_alias ()) ? pushed_string_list : (STRING_SAVER *)NULL;
+ restore_pushed_strings = 0;
+
while ((tok = read_token (READ)) != ')')
{
***************
*** 6902,6906 ****
--- 6913,6926 ----
}
+ /* Check whether or not an alias got popped out from underneath us and
+ fix up after restore_parser_state. */
+ if (ea && ss && ss != pushed_string_list)
+ {
+ restore_pushed_strings = 1;
+ ss = pushed_string_list;
+ }
restore_parser_state (&ps);
+ if (restore_pushed_strings)
+ pushed_string_list = ss;
if (wl == &parse_string_error)
*** ../bash-5.2-patched/y.tab.c Mon Sep 23 10:02:46 2024
--- y.tab.c Mon Sep 23 10:02:49 2024
***************
*** 8804,8812 ****
int *retlenp;
{
WORD_LIST *wl, *rl;
! int tok, orig_line_number, assignok;
sh_parser_state_t ps;
char *ret;
orig_line_number = line_number;
save_parser_state (&ps);
--- 8804,8813 ----
int *retlenp;
{
WORD_LIST *wl, *rl;
! int tok, orig_line_number, assignok, ea, restore_pushed_strings;
sh_parser_state_t ps;
char *ret;
+ STRING_SAVER *ss;
orig_line_number = line_number;
save_parser_state (&ps);
***************
*** 8829,8834 ****
--- 8830,8841 ----
esacs_needed_count = expecting_in_token = 0;
+ /* We're not pushing any new input here, we're reading from the current input
+ source. If that's an alias, we have to be prepared for the alias to get
+ popped out from underneath us. */
+ ss = (ea = expanding_alias ()) ? pushed_string_list : (STRING_SAVER *)NULL;
+ restore_pushed_strings = 0;
+
while ((tok = read_token (READ)) != ')')
{
if (tok == '\n') /* Allow newlines in compound assignments */
***************
*** 8852,8858 ****
--- 8859,8874 ----
wl = make_word_list (yylval.word, wl);
}
+ /* Check whether or not an alias got popped out from underneath us and
+ fix up after restore_parser_state. */
+ if (ea && ss && ss != pushed_string_list)
+ {
+ restore_pushed_strings = 1;
+ ss = pushed_string_list;
+ }
restore_parser_state (&ps);
+ if (restore_pushed_strings)
+ pushed_string_list = ss;
if (wl == &parse_string_error)
{
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 33
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 34
#endif /* _PATCHLEVEL_H_ */
@@ -1,129 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-035
Bug-Reported-by: Henry Bent <henry.r.bent@gmail.com>
Bug-Reference-ID: <CAEdTPBdD0WOW2n0-y-XyZ_VwhbiG-oS3bXfGkOPPG617rGH-Ww@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00044.html
Bug-Description:
There are systems that supply one of select or pselect, but not both.
Patch (apply with `patch -p0'):
https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00058.html
*** ../bash/bash-5.2-patched/lib/readline/input.c 2022-04-08 15:43:24.000000000 -0400
--- lib/readline/input.c 2022-11-16 09:10:41.000000000 -0500
***************
*** 152,156 ****
--- 152,158 ----
int _rl_timeout_init (void);
int _rl_timeout_sigalrm_handler (void);
+ #if defined (RL_TIMEOUT_USE_SELECT)
int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *);
+ #endif
static void _rl_timeout_handle (void);
***************
*** 249,253 ****
int chars_avail, k;
char input;
! #if defined(HAVE_SELECT)
fd_set readfds, exceptfds;
struct timeval timeout;
--- 251,255 ----
int chars_avail, k;
char input;
! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
fd_set readfds, exceptfds;
struct timeval timeout;
***************
*** 806,810 ****
unsigned char c;
int fd;
! #if defined (HAVE_PSELECT)
sigset_t empty_set;
fd_set readfds;
--- 808,812 ----
unsigned char c;
int fd;
! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
sigset_t empty_set;
fd_set readfds;
*** ../bash-5.2-patched/lib/sh/input_avail.c 2021-05-24 11:16:33.000000000 -0400
--- lib/sh/input_avail.c 2022-11-16 09:12:48.000000000 -0500
***************
*** 34,40 ****
#endif /* HAVE_SYS_FILE_H */
! #if defined (HAVE_PSELECT)
! # include <signal.h>
! #endif
#if defined (HAVE_UNISTD_H)
--- 34,38 ----
#endif /* HAVE_SYS_FILE_H */
! #include <signal.h>
#if defined (HAVE_UNISTD_H)
***************
*** 108,115 ****
{
int result, chars_avail;
- #if defined(HAVE_SELECT)
- fd_set readfds, exceptfds;
- #endif
#if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
sigset_t set, oset;
#endif
--- 106,111 ----
{
int result, chars_avail;
#if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
+ fd_set readfds, exceptfds;
sigset_t set, oset;
#endif
***************
*** 122,132 ****
chars_avail = 0;
! #if defined (HAVE_SELECT)
FD_ZERO (&readfds);
FD_ZERO (&exceptfds);
FD_SET (fd, &readfds);
FD_SET (fd, &exceptfds);
- #endif
- #if defined (HAVE_SELECT) || defined (HAVE_PSELECT)
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
# ifdef SIGCHLD
--- 115,123 ----
chars_avail = 0;
! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
FD_ZERO (&readfds);
FD_ZERO (&exceptfds);
FD_SET (fd, &readfds);
FD_SET (fd, &exceptfds);
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
# ifdef SIGCHLD
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 34
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 35
#endif /* _PATCHLEVEL_H_ */
@@ -1,237 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-036
Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
Bug-Reference-ID: <CAMu=Brrv5qKY6LPfw8PxqNXNO8rNsZo0Fb=BcFb-uHObWPqnrw@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-04/msg00082.html
Bug-Description:
When readline is accumulating bytes until it reads a complete multibyte
character, reading a byte that makes the multibyte character invalid can
result in discarding the bytes in the partial character.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/lib/readline/text.c Mon May 1 09:37:52 2023
--- lib/readline/text.c Mon May 29 12:22:29 2023
***************
*** 86,90 ****
rl_insert_text (const char *string)
{
! register int i, l;
l = (string && *string) ? strlen (string) : 0;
--- 86,91 ----
rl_insert_text (const char *string)
{
! register int i;
! size_t l;
l = (string && *string) ? strlen (string) : 0;
***************
*** 705,709 ****
/* Insert the character C at the current location, moving point forward.
If C introduces a multibyte sequence, we read the whole sequence and
! then insert the multibyte char into the line buffer. */
int
_rl_insert_char (int count, int c)
--- 706,714 ----
/* Insert the character C at the current location, moving point forward.
If C introduces a multibyte sequence, we read the whole sequence and
! then insert the multibyte char into the line buffer.
! If C == 0, we immediately insert any pending partial multibyte character,
! assuming that we have read a character that doesn't map to self-insert.
! This doesn't completely handle characters that are part of a multibyte
! character but map to editing functions. */
int
_rl_insert_char (int count, int c)
***************
*** 719,727 ****
#endif
if (count <= 0)
return 0;
! #if defined (HANDLE_MULTIBYTE)
! if (MB_CUR_MAX == 1 || rl_byte_oriented)
{
incoming[0] = c;
--- 724,749 ----
#endif
+ #if !defined (HANDLE_MULTIBYTE)
if (count <= 0)
return 0;
+ #else
+ if (count < 0)
+ return 0;
+ if (count == 0)
+ {
+ if (pending_bytes_length == 0)
+ return 0;
+ if (stored_count <= 0)
+ stored_count = count;
+ else
+ count = stored_count;
! memcpy (incoming, pending_bytes, pending_bytes_length);
! incoming[pending_bytes_length] = '\0';
! incoming_length = pending_bytes_length;
! pending_bytes_length = 0;
! memset (&ps, 0, sizeof (mbstate_t));
! }
! else if (MB_CUR_MAX == 1 || rl_byte_oriented)
{
incoming[0] = c;
***************
*** 731,734 ****
--- 753,759 ----
else if (_rl_utf8locale && (c & 0x80) == 0)
{
+ if (pending_bytes_length)
+ _rl_insert_char (0, 0);
+
incoming[0] = c;
incoming[1] = '\0';
***************
*** 765,769 ****
incoming_length = 1;
pending_bytes_length--;
! memmove (pending_bytes, pending_bytes + 1, pending_bytes_length);
/* Clear the state of the byte sequence, because in this case the
effect of mbstate is undefined. */
--- 790,795 ----
incoming_length = 1;
pending_bytes_length--;
! if (pending_bytes_length)
! memmove (pending_bytes, pending_bytes + 1, pending_bytes_length);
/* Clear the state of the byte sequence, because in this case the
effect of mbstate is undefined. */
***************
*** 828,832 ****
--- 854,862 ----
xfree (string);
+ #if defined (HANDLE_MULTIBYTE)
+ return (pending_bytes_length != 0);
+ #else
return 0;
+ #endif
}
***************
*** 861,864 ****
--- 891,896 ----
incoming_length = 0;
stored_count = 0;
+
+ return (pending_bytes_length != 0);
#else /* !HANDLE_MULTIBYTE */
char str[TEXT_COUNT_MAX+1];
***************
*** 874,880 ****
count -= decreaser;
}
- #endif /* !HANDLE_MULTIBYTE */
return 0;
}
--- 906,912 ----
count -= decreaser;
}
return 0;
+ #endif /* !HANDLE_MULTIBYTE */
}
***************
*** 904,910 ****
stored_count = 0;
}
! #endif
!
return 0;
}
--- 936,944 ----
stored_count = 0;
}
!
! return (pending_bytes_length != 0);
! #else
return 0;
+ #endif
}
***************
*** 984,987 ****
--- 1018,1026 ----
}
+ /* If we didn't insert n and there are pending bytes, we need to insert
+ them if _rl_insert_char didn't do that on its own. */
+ if (r == 1 && rl_insert_mode == RL_IM_INSERT)
+ r = _rl_insert_char (0, 0); /* flush partial multibyte char */
+
if (n != (unsigned short)-2) /* -2 = sentinel value for having inserted N */
{
***************
*** 1055,1058 ****
--- 1094,1099 ----
rl_quoted_insert (int count, int key)
{
+ int r;
+
/* Let's see...should the callback interface futz with signal handling? */
#if defined (HANDLE_SIGNALS)
***************
*** 1073,1085 ****
if (count < 0)
{
- int r;
-
do
r = _rl_insert_next (1);
while (r == 0 && ++count < 0);
- return r;
}
! return _rl_insert_next (count);
}
--- 1114,1128 ----
if (count < 0)
{
do
r = _rl_insert_next (1);
while (r == 0 && ++count < 0);
}
+ else
+ r = _rl_insert_next (count);
! if (r == 1)
! _rl_insert_char (0, 0); /* insert partial multibyte character */
!
! return r;
}
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 35
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 36
#endif /* _PATCHLEVEL_H_ */
@@ -1,71 +0,0 @@
BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-037
Bug-Reported-by: Martin Castillo <castilma@uni-bremen.de>
Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html
Bug-Description:
Fix the case where text to be completed from the line buffer (quoted) is
compared to the common prefix of the possible matches (unquoted) and the
quoting makes the former appear to be longer than the latter. Readline
assumes the match doesn't add any characters to the word and doesn't display
multiple matches.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/lib/readline/complete.c Tue Apr 5 10:47:06 2022
--- lib/readline/complete.c Sat Jan 7 14:19:45 2023
***************
*** 2032,2038 ****
text = rl_copy_text (start, end);
matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
/* nontrivial_lcd is set if the common prefix adds something to the word
being completed. */
! nontrivial_lcd = matches && compare_match (text, matches[0]) != 0;
if (what_to_do == '!' || what_to_do == '@')
tlen = strlen (text);
--- 2038,2060 ----
text = rl_copy_text (start, end);
matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
+ /* If TEXT contains quote characters, it will be dequoted as part of
+ generating the matches, and the matches will not contain any quote
+ characters. We need to dequote TEXT before performing the comparison.
+ Since compare_match performs the dequoting, and we only want to do it
+ once, we don't call compare_matches after dequoting TEXT; we call
+ strcmp directly. */
/* nontrivial_lcd is set if the common prefix adds something to the word
being completed. */
! if (rl_filename_completion_desired && rl_filename_quoting_desired &&
! rl_completion_found_quote && rl_filename_dequoting_function)
! {
! char *t;
! t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character);
! xfree (text);
! text = t;
! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
! }
! else
! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
if (what_to_do == '!' || what_to_do == '@')
tlen = strlen (text);
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 36
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 37
#endif /* _PATCHLEVEL_H_ */
@@ -0,0 +1,48 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-001
Bug-Reported-by: John Sidles <jasidles@gmail.com>
Bug-Reference-ID: <CAHOxHhRKa86FtRpsq-FBVciAxZ9kbo5PvfQBovBDXDFySbxj7A@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00035.html
Bug-Description:
In posix mode, `wait -n' with pid arguments does not restrict the set of
processes it considers to those arguments.
Patch (apply with `patch -p0'):
*** ../bash-5.3/jobs.c Fri Mar 7 18:48:44 2025
--- jobs.c Mon Jul 14 10:25:13 2025
***************
*** 3539,3543 ****
one in bgpids. We can do this in posix mode because we'll remove any
one we find from the table, preserving existing semantics. */
! if (posixly_correct && (t = bgp_findone ()))
{
pid = t->pid;
--- 3539,3543 ----
one in bgpids. We can do this in posix mode because we'll remove any
one we find from the table, preserving existing semantics. */
! if (posixly_correct && (flags & JWAIT_WAITING) == 0 && (t = bgp_findone ()))
{
pid = t->pid;
*** ../bash-5.3/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 0
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 1
#endif /* _PATCHLEVEL_H_ */
@@ -0,0 +1,122 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-002
Bug-Reported-by:
Bug-Reference-ID:
Bug-Reference-URL: https://savannah.gnu.org/bugs/?67326
Bug-Description:
There are too many differences in the various implementations of shm_open(2)
to rely on it for bash's use.
Patch (apply with `patch -p0'):
*** ../bash-5.3-patched/lib/sh/anonfile.c Tue Jul 9 11:41:57 2024
--- lib/sh/anonfile.c Thu Jul 17 11:03:23 2025
***************
*** 26,30 ****
#include <bashtypes.h>
! #if defined (HAVE_MEMFD_CREATE) || defined (HAVE_SHM_OPEN) || defined (HAVE_SHM_MKSTEMP)
# include <sys/mman.h>
#endif
--- 26,30 ----
#include <bashtypes.h>
! #if defined (HAVE_MEMFD_CREATE) || defined (HAVE_SHM_MKSTEMP)
# include <sys/mman.h>
#endif
***************
*** 42,57 ****
#endif
! #if defined (HAVE_SHM_OPEN)
! #ifndef O_NOFOLLOW
! # define O_NOFOLLOW 0
! #endif
!
static int
- anonshmunlink (const char *fn)
- {
- return (shm_unlink (fn));
- }
-
- static int
anonshmopen (const char *name, int flags, char **fn)
{
--- 42,47 ----
#endif
! #if defined (HAVE_SHM_MKSTEMP)
static int
anonshmopen (const char *name, int flags, char **fn)
{
***************
*** 63,95 ****
*fn = 0;
- #if defined (HAVE_SHM_MKSTEMP)
fname = savestring ("/shm-XXXXXXXXXX");
fd = shm_mkstemp (fname);
if (fd < 0)
- free (fname);
- #endif
-
- if (fd < 0)
{
- fname = sh_mktmpname (name, flags);
- fd = shm_open (fname, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600);
- }
-
- if (fd < 0)
- {
free (fname);
return fd;
}
- if (shm_unlink (fname) < 0)
- {
- int o;
- o = errno;
- free (fname);
- close (fd);
- errno = o;
- return -1;
- }
-
if (fn)
*fn = fname;
--- 53,64 ----
***************
*** 123,127 ****
flag = (name && *name == '/') ? MT_TEMPLATE : MT_USETMPDIR;
! #if defined (HAVE_SHM_OPEN)
fd = anonshmopen (name, flag, fn);
if (fd >= 0)
--- 92,96 ----
flag = (name && *name == '/') ? MT_TEMPLATE : MT_USETMPDIR;
! #if defined (HAVE_SHM_MKSTEMP)
fd = anonshmopen (name, flag, fn);
if (fd >= 0)
*** ../bash-5.3/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 1
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 2
#endif /* _PATCHLEVEL_H_ */
@@ -0,0 +1,82 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-003
Bug-Reported-by: Isabella Bosia <izaberina@gmail.com>
Bug-Reference-ID: <CAAZkfoJhQ1BJ7BGk3-ObctvCJJrW3rp_tWQXT=9rY7kGDvz4uw@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-06/msg00173.html
Bug-Description:
Bash leaves internal quoting in place when expanding array subscripts
that appear inside array subscripts in an arithmetic context, causing
expansion failures.
Patch (apply with `patch -p0'):
*** ../bash-5.3-patched/subst.c Sun May 18 15:00:13 2025
--- subst.c Fri Jul 11 09:48:44 2025
***************
*** 3796,3802 ****
#endif
! /* We don't perform process substitution in arithmetic expressions, so don't
! bother checking for it. */
! #define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~')
/* If there are any characters in STRING that require full expansion,
--- 3796,3802 ----
#endif
! /* We don't perform process substitution or tilde expansion in arithmetic
! expressions, so don't bother checking for them. */
! #define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC)
/* If there are any characters in STRING that require full expansion,
***************
*** 12216,12219 ****
--- 12216,12227 ----
break;
}
+ #if defined (ARRAY_VARS)
+ /* The only special characters that matter here are []~, since those
+ are backslash-quoted in expand_array_subscript but not dequoted
+ by the statement following this one. */
+ if ((quoted & Q_ARITH) && (c == LBRACK || c == RBRACK || c == '~'))
+ ; /* placeholder here */
+ else
+ #endif
if (((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote) && (sh_syntaxtab[c] & CBSDQUOTE) == 0)
*r++ = '\\';
*** ../bash-5.3/tests/quotearray.right Thu Nov 10 10:39:56 2022
--- tests/quotearray.right Thu Jul 10 15:40:27 2025
***************
*** 45,49 ****
0
0
! ./quotearray1.sub: line 68: 0\],b\[1: arithmetic syntax error: invalid arithmetic operator (error token is "\],b\[1")
declare -a array
0
--- 45,49 ----
0
0
! ./quotearray1.sub: line 68: 0],b[1: arithmetic syntax error: invalid arithmetic operator (error token is "],b[1")
declare -a array
0
*** ../bash-5.3/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 2
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 3
#endif /* _PATCHLEVEL_H_ */
+13 -40
View File
@@ -12,50 +12,16 @@
<IsA>app:console</IsA>
<Summary>The standard GNU Bourne again shell</Summary>
<Description>Bash is the GNU Project's Bourne Again SHell, a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, csh-like features such as history substitution.</Description>
<Archive sha1sum="a799460be16c01aeab492b9aa88f5eb7f35c1b9b" type="targz">mirrors://gnu/bash/bash-5.2.tar.gz</Archive>
<Archive sha1sum="f55ec1fd62ae33f1b8bf4eb6527e0fa53363e481" type="targz">mirrors://gnu/bash/bash-5.3.tar.gz</Archive>
<BuildDependencies>
<Dependency>ncurses-devel</Dependency>
</BuildDependencies>
<Patches>
<!-- Official Patches -->
<Patch>official/bash52-001.patch</Patch>
<Patch>official/bash52-002.patch</Patch>
<Patch>official/bash52-003.patch</Patch>
<Patch>official/bash52-004.patch</Patch>
<Patch>official/bash52-005.patch</Patch>
<Patch>official/bash52-006.patch</Patch>
<Patch>official/bash52-007.patch</Patch>
<Patch>official/bash52-008.patch</Patch>
<Patch>official/bash52-009.patch</Patch>
<Patch>official/bash52-010.patch</Patch>
<Patch>official/bash52-011.patch</Patch>
<Patch>official/bash52-012.patch</Patch>
<Patch>official/bash52-013.patch</Patch>
<Patch>official/bash52-014.patch</Patch>
<Patch>official/bash52-015.patch</Patch>
<Patch>official/bash52-016.patch</Patch>
<Patch>official/bash52-017.patch</Patch>
<Patch>official/bash52-018.patch</Patch>
<Patch>official/bash52-019.patch</Patch>
<Patch>official/bash52-020.patch</Patch>
<Patch>official/bash52-021.patch</Patch>
<Patch>official/bash52-022.patch</Patch>
<Patch>official/bash52-023.patch</Patch>
<Patch>official/bash52-024.patch</Patch>
<Patch>official/bash52-025.patch</Patch>
<Patch>official/bash52-026.patch</Patch>
<Patch>official/bash52-027.patch</Patch>
<Patch>official/bash52-028.patch</Patch>
<Patch>official/bash52-029.patch</Patch>
<Patch>official/bash52-030.patch</Patch>
<Patch>official/bash52-031.patch</Patch>
<Patch>official/bash52-032.patch</Patch>
<Patch>official/bash52-033.patch</Patch>
<Patch>official/bash52-034.patch</Patch>
<Patch>official/bash52-035.patch</Patch>
<Patch>official/bash52-036.patch</Patch>
<Patch>official/bash52-037.patch</Patch>
<Patch>official/bash53-001.patch</Patch>
<Patch>official/bash53-002.patch</Patch>
<Patch>official/bash53-003.patch</Patch>
<!-- Fedora patches -->
<!-- <Patch level="1">fedora/bash-2.03-paths.patch</Patch> -->
@@ -71,13 +37,13 @@
<Patch level="1">fedora/bash-4.2-coverity.patch</Patch>
<Patch level="1">fedora/bash-4.2-manpage_trap.patch</Patch>
<Patch level="1">fedora/bash-4.2-rc2-logout.patch</Patch>
<Patch level="1">fedora/bash-4.2-size_type.patch</Patch>
<!-- <Patch level="1">fedora/bash-4.2-size_type.patch</Patch> -->
<Patch level="1">fedora/bash-4.3-man-ulimit.patch</Patch>
<Patch level="1">fedora/bash-4.3-memleak-lc_all.patch</Patch>
<Patch level="1">fedora/bash-4.3-noecho.patch</Patch>
<Patch level="1">fedora/bash-4.4-no-loadable-builtins.patch</Patch>
<Patch level="1">fedora/bash-5.0-syslog-history.patch</Patch>
<Patch level="1">fedora/bash-requires.patch</Patch>
<!-- <Patch level="1">fedora/bash-requires.patch</Patch> -->
<Patch level="1">fedora/bash-setlocale.patch</Patch>
<Patch level="1">fedora/bash-tty-tests.patch</Patch>
@@ -105,6 +71,13 @@
</Package>
<History>
<Update release="19">
<Date>2025-11-05</Date>
<Version>5.3.3</Version>
<Comment>Version bump.</Comment>
<Name>Pisi Linux Community</Name>
<Email>admin@pisilinux.org</Email>
</Update>
<Update release="18">
<Date>2024-09-24</Date>
<Version>5.2.37</Version>