Update to bash-5.2 patchlevel 21

Resolves: #2248970
This commit is contained in:
Siteshwar Vashisht 2023-11-10 14:18:00 +01:00
parent 7ba8477069
commit 2ff159c89e
7 changed files with 7855 additions and 2 deletions

5089
bash-5.2-patch-16.patch Normal file

File diff suppressed because it is too large Load Diff

23
bash-5.2-patch-17.patch Normal file
View File

@ -0,0 +1,23 @@
diff --git a/builtins/evalfile.c b/builtins/evalfile.c
--- a/builtins/evalfile.c
+++ b/builtins/evalfile.c
@@ -266,7 +266,7 @@ file_error_and_exit:
#endif
/* set the flags to be passed to parse_and_execute */
- pflags = SEVAL_RESETLINE;
+ pflags = SEVAL_RESETLINE|SEVAL_NOOPTIMIZE;
pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
if (flags & FEVAL_BUILTIN)
diff --git a/patchlevel.h b/patchlevel.h
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 16
+#define PATCHLEVEL 17
#endif /* _PATCHLEVEL_H_ */

2634
bash-5.2-patch-18.patch Normal file

File diff suppressed because it is too large Load Diff

38
bash-5.2-patch-19.patch Normal file
View File

@ -0,0 +1,38 @@
diff --git a/jobs.c b/jobs.c
--- a/jobs.c
+++ b/jobs.c
@@ -3077,9 +3077,13 @@ if (job == NO_JOB)
/* Don't modify terminal pgrp if we are running in background or a
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. */
-
+ 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);
}
@@ -3623,6 +3627,7 @@ start_job (job, foreground)
{
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))
give_terminal_to (jobs[job]->pgrp, 0);
diff --git a/patchlevel.h b/patchlevel.h
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 18
+#define PATCHLEVEL 19
#endif /* _PATCHLEVEL_H_ */

33
bash-5.2-patch-20.patch Normal file
View File

@ -0,0 +1,33 @@
diff --git a/parse.y b/parse.y
--- a/parse.y
+++ b/parse.y
@@ -3150,6 +3150,7 @@ time_command_acceptable ()
case TIME: /* time time pipeline */
case TIMEOPT: /* time -p time pipeline */
case TIMEIGN: /* time -p -- ... */
+ case DOLPAREN:
return 1;
default:
return 0;
diff --git a/patchlevel.h b/patchlevel.h
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 19
+#define PATCHLEVEL 20
#endif /* _PATCHLEVEL_H_ */
diff --git a/y.tab.c b/y.tab.c
--- a/y.tab.c
+++ b/y.tab.c
@@ -5465,6 +5465,7 @@ time_command_acceptable ()
case TIME: /* time time pipeline */
case TIMEOPT: /* time -p time pipeline */
case TIMEIGN: /* time -p -- ... */
+ case DOLPAREN:
return 1;
default:
return 0;

32
bash-5.2-patch-21.patch Normal file
View File

@ -0,0 +1,32 @@
diff --git a/patchlevel.h b/patchlevel.h
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 20
+#define PATCHLEVEL 21
#endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
--- a/subst.c
+++ b/subst.c
@@ -1693,7 +1693,7 @@ extract_heredoc_dolbrace_string (string, sindex, quoted, flags)
t = extract_command_subst (string, &si, flags);
CHECK_STRING_OVERRUN (i, si, slen, c);
- tlen = si - i - 1;
+ tlen = si - i - 2;
RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
result[result_index++] = c;
result[result_index++] = LPAREN;
@@ -1713,7 +1713,7 @@ extract_heredoc_dolbrace_string (string, sindex, quoted, flags)
t = extract_process_subst (string, (string[i] == '<' ? "<(" : ">)"), &si, flags);
CHECK_STRING_OVERRUN (i, si, slen, c);
- tlen = si - i - 1;
+ tlen = si - i - 2;
RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
result[result_index++] = c;
result[result_index++] = LPAREN;

View File

@ -1,12 +1,12 @@
#% define beta_tag rc2 #% define beta_tag rc2
%define patchlevel 15 %define patchlevel 21
%define baseversion 5.2 %define baseversion 5.2
%bcond_without tests %bcond_without tests
Version: %{baseversion}.%{patchlevel} Version: %{baseversion}.%{patchlevel}
Name: bash Name: bash
Summary: The GNU Bourne Again shell Summary: The GNU Bourne Again shell
Release: 5%{?dist} Release: 1%{?dist}
License: GPL-3.0-or-later License: GPL-3.0-or-later
Url: https://www.gnu.org/software/bash Url: https://www.gnu.org/software/bash
Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz
@ -324,6 +324,10 @@ end
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%changelog %changelog
* Fri Nov 10 2023 Siteshwar Vashisht <svashisht@redhat.com> - 5.2.21-1
- Update to bash-5.2 patchlevel 21
Resolves: #2248970
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.15-5 * Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.15-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild