Merge pull request #1740 from Rmys/master

bash ver. bump
This commit is contained in:
Rmys
2023-11-12 10:25:17 +03:00
committed by GitHub
7 changed files with 3930 additions and 0 deletions
@@ -0,0 +1,47 @@
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_ */
@@ -0,0 +1,47 @@
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
@@ -0,0 +1,66 @@
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_ */
@@ -0,0 +1,53 @@
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_ */
@@ -0,0 +1,61 @@
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_ */
+13
View File
@@ -34,6 +34,12 @@
<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>
<!-- Fedora patches -->
<!-- <Patch level="1">fedora/bash-2.03-paths.patch</Patch> -->
@@ -83,6 +89,13 @@
</Package>
<History>
<Update release="15">
<Date>2023-11-12</Date>
<Version>5.2.21</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="14">
<Date>2023-01-28</Date>
<Version>5.2.15</Version>