Update to bash-4.4 patchlevel 5
This commit is contained in:
parent
fdd44b835d
commit
1bf46ca407
49
Bash-4.4-patch-1.patch
Normal file
49
Bash-4.4-patch-1.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 8ddc8d6e3a3d85eec6d4ba9b9ed2bc36bce56716 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Mon, 14 Nov 2016 14:26:51 -0500
|
||||
Subject: [PATCH] Bash-4.4 patch 1
|
||||
|
||||
---
|
||||
lib/readline/history.c | 6 +++++-
|
||||
patchlevel.h | 2 +-
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/readline/history.c b/lib/readline/history.c
|
||||
index 3b8dbc5..9ff25a7 100644
|
||||
--- a/lib/readline/history.c
|
||||
+++ b/lib/readline/history.c
|
||||
@@ -57,6 +57,8 @@ extern int errno;
|
||||
/* How big to make the_history when we first allocate it. */
|
||||
#define DEFAULT_HISTORY_INITIAL_SIZE 502
|
||||
|
||||
+#define MAX_HISTORY_INITIAL_SIZE 8192
|
||||
+
|
||||
/* The number of slots to increase the_history by. */
|
||||
#define DEFAULT_HISTORY_GROW_SIZE 50
|
||||
|
||||
@@ -307,7 +309,9 @@ add_history (string)
|
||||
if (history_size == 0)
|
||||
{
|
||||
if (history_stifled && history_max_entries > 0)
|
||||
- history_size = history_max_entries + 2;
|
||||
+ history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
|
||||
+ ? MAX_HISTORY_INITIAL_SIZE
|
||||
+ : history_max_entries + 2;
|
||||
else
|
||||
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
|
||||
the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index 1cd7c96..40db1a3 100644
|
||||
--- 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 0
|
||||
+#define PATCHLEVEL 1
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
--
|
||||
2.9.3
|
||||
|
59
Bash-4.4-patch-2.patch
Normal file
59
Bash-4.4-patch-2.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 280bd77d8d3e7f7c90c9fa07de3d1e8f8e18ac29 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Mon, 14 Nov 2016 14:27:06 -0500
|
||||
Subject: [PATCH] Bash-4.4 patch 2
|
||||
|
||||
---
|
||||
patchlevel.h | 2 +-
|
||||
subst.c | 9 ++++++++-
|
||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index 40db1a3..a988d85 100644
|
||||
--- 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 1
|
||||
+#define PATCHLEVEL 2
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
diff --git a/subst.c b/subst.c
|
||||
index f1a4df1..4d498ef 100644
|
||||
--- a/subst.c
|
||||
+++ b/subst.c
|
||||
@@ -5931,6 +5931,7 @@ read_comsub (fd, quoted, rflag)
|
||||
char *istring, buf[128], *bufp, *s;
|
||||
int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul;
|
||||
ssize_t bufn;
|
||||
+ int nullbyte;
|
||||
|
||||
istring = (char *)NULL;
|
||||
istring_index = istring_size = bufn = tflag = 0;
|
||||
@@ -5938,6 +5939,8 @@ read_comsub (fd, quoted, rflag)
|
||||
for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
|
||||
skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
|
||||
|
||||
+ nullbyte = 0;
|
||||
+
|
||||
/* Read the output of the command through the pipe. This may need to be
|
||||
changed to understand multibyte characters in the future. */
|
||||
while (1)
|
||||
@@ -5956,7 +5959,11 @@ read_comsub (fd, quoted, rflag)
|
||||
if (c == 0)
|
||||
{
|
||||
#if 1
|
||||
- internal_warning ("%s", _("command substitution: ignored null byte in input"));
|
||||
+ if (nullbyte == 0)
|
||||
+ {
|
||||
+ internal_warning ("%s", _("command substitution: ignored null byte in input"));
|
||||
+ nullbyte = 1;
|
||||
+ }
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
52
Bash-4.4-patch-3.patch
Normal file
52
Bash-4.4-patch-3.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 4f59a8babc53a9f975078c4a003bdc8831c5ee22 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Mon, 14 Nov 2016 14:27:23 -0500
|
||||
Subject: [PATCH] Bash-4.4 patch 3
|
||||
|
||||
---
|
||||
lib/glob/sm_loop.c | 9 +++++++++
|
||||
patchlevel.h | 2 +-
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/glob/sm_loop.c b/lib/glob/sm_loop.c
|
||||
index c3a2aa3..65179e2 100644
|
||||
--- a/lib/glob/sm_loop.c
|
||||
+++ b/lib/glob/sm_loop.c
|
||||
@@ -330,6 +330,12 @@ PARSE_COLLSYM (p, vp)
|
||||
for (pc = 0; p[pc]; pc++)
|
||||
if (p[pc] == L('.') && p[pc+1] == L(']'))
|
||||
break;
|
||||
+ if (p[pc] == 0)
|
||||
+ {
|
||||
+ if (vp)
|
||||
+ *vp = INVALID;
|
||||
+ return (p + pc);
|
||||
+ }
|
||||
val = COLLSYM (p, pc);
|
||||
if (vp)
|
||||
*vp = val;
|
||||
@@ -483,6 +489,9 @@ BRACKMATCH (p, test, flags)
|
||||
c = *p++;
|
||||
c = FOLD (c);
|
||||
|
||||
+ if (c == L('\0'))
|
||||
+ return ((test == L('[')) ? savep : (CHAR *)0);
|
||||
+
|
||||
if ((flags & FNM_PATHNAME) && c == L('/'))
|
||||
/* [/] can never match when matching a pathname. */
|
||||
return (CHAR *)0;
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index a988d85..e7e960c 100644
|
||||
--- 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 2
|
||||
+#define PATCHLEVEL 3
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
--
|
||||
2.9.3
|
||||
|
81
Bash-4.4-patch-4.patch
Normal file
81
Bash-4.4-patch-4.patch
Normal file
@ -0,0 +1,81 @@
|
||||
From 2965eca924466a48c5597ac5c6c86d470e718908 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Mon, 14 Nov 2016 14:27:35 -0500
|
||||
Subject: [PATCH] Bash-4.4 patch 4
|
||||
|
||||
---
|
||||
jobs.c | 15 +++++++++++++++
|
||||
jobs.h | 1 +
|
||||
patchlevel.h | 2 +-
|
||||
subst.c | 5 +----
|
||||
4 files changed, 18 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/jobs.c b/jobs.c
|
||||
index cef3c79..fc96603 100644
|
||||
--- a/jobs.c
|
||||
+++ b/jobs.c
|
||||
@@ -453,6 +453,21 @@ cleanup_the_pipeline ()
|
||||
discard_pipeline (disposer);
|
||||
}
|
||||
|
||||
+void
|
||||
+discard_last_procsub_child ()
|
||||
+{
|
||||
+ PROCESS *disposer;
|
||||
+ sigset_t set, oset;
|
||||
+
|
||||
+ BLOCK_CHILD (set, oset);
|
||||
+ disposer = last_procsub_child;
|
||||
+ last_procsub_child = (PROCESS *)NULL;
|
||||
+ UNBLOCK_CHILD (oset);
|
||||
+
|
||||
+ if (disposer)
|
||||
+ discard_pipeline (disposer);
|
||||
+}
|
||||
+
|
||||
struct pipeline_saver *
|
||||
alloc_pipeline_saver ()
|
||||
{
|
||||
diff --git a/jobs.h b/jobs.h
|
||||
index 4ba3513..6df0607 100644
|
||||
--- a/jobs.h
|
||||
+++ b/jobs.h
|
||||
@@ -190,6 +190,7 @@ extern JOB **jobs;
|
||||
extern void making_children __P((void));
|
||||
extern void stop_making_children __P((void));
|
||||
extern void cleanup_the_pipeline __P((void));
|
||||
+extern void discard_last_procsub_child __P((void));
|
||||
extern void save_pipeline __P((int));
|
||||
extern PROCESS *restore_pipeline __P((int));
|
||||
extern void start_pipeline __P((void));
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index e7e960c..c059f0b 100644
|
||||
--- 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 3
|
||||
+#define PATCHLEVEL 4
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
diff --git a/subst.c b/subst.c
|
||||
index 4d498ef..298187d 100644
|
||||
--- a/subst.c
|
||||
+++ b/subst.c
|
||||
@@ -5808,10 +5808,7 @@ process_substitute (string, open_for_read_in_child)
|
||||
{
|
||||
#if defined (JOB_CONTROL)
|
||||
if (last_procsub_child)
|
||||
- {
|
||||
- discard_pipeline (last_procsub_child);
|
||||
- last_procsub_child = (PROCESS *)NULL;
|
||||
- }
|
||||
+ discard_last_procsub_child ();
|
||||
last_procsub_child = restore_pipeline (0);
|
||||
#endif
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
42
Bash-4.4-patch-5.patch
Normal file
42
Bash-4.4-patch-5.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From f459cbd8be37b28be1dc90315e0ab51d7f211301 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Mon, 14 Nov 2016 14:27:55 -0500
|
||||
Subject: [PATCH] Bash-4.4 patch 5
|
||||
|
||||
---
|
||||
builtins/evalstring.c | 3 ---
|
||||
patchlevel.h | 2 +-
|
||||
2 files changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/builtins/evalstring.c b/builtins/evalstring.c
|
||||
index e221591..6dc756c 100644
|
||||
--- a/builtins/evalstring.c
|
||||
+++ b/builtins/evalstring.c
|
||||
@@ -104,12 +104,9 @@ should_suppress_fork (command)
|
||||
running_trap == 0 &&
|
||||
*bash_input.location.string == '\0' &&
|
||||
command->type == cm_simple &&
|
||||
-#if 0
|
||||
signal_is_trapped (EXIT_TRAP) == 0 &&
|
||||
signal_is_trapped (ERROR_TRAP) == 0 &&
|
||||
-#else
|
||||
any_signals_trapped () < 0 &&
|
||||
-#endif
|
||||
command->redirects == 0 && command->value.Simple->redirects == 0 &&
|
||||
((command->flags & CMD_TIME_PIPELINE) == 0) &&
|
||||
((command->flags & CMD_INVERT_RETURN) == 0));
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index c059f0b..1bc098b 100644
|
||||
--- 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 4
|
||||
+#define PATCHLEVEL 5
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,6 +1,6 @@
|
||||
#% define beta_tag rc2
|
||||
%global _hardened_build 1
|
||||
%define patchleveltag .0
|
||||
%define patchleveltag .5
|
||||
%define baseversion 4.4
|
||||
%bcond_without tests
|
||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
@ -21,7 +21,8 @@ Source2: dot-bash_profile
|
||||
Source3: dot-bash_logout
|
||||
|
||||
# Official upstream patches
|
||||
|
||||
# Patches are converted to apply with '-p1'
|
||||
%{lua:for i=1,5 do print(string.format("Patch%u: Bash-4.4-patch-%u.patch\n", i, i)) end}
|
||||
|
||||
# Other patches
|
||||
Patch101: bash-2.02-security.patch
|
||||
@ -294,6 +295,9 @@ end
|
||||
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
|
||||
|
||||
%changelog
|
||||
* Mon Jan 16 2017 Siteshwar Vashisht <svashisht@redhat.com> - 4.4.5-1
|
||||
- Update to bash-4.4 patchlevel 5
|
||||
|
||||
* Fri Jan 06 2017 Siteshwar Vashisht <svashisht@redhat.com> - 4.4.0-1
|
||||
- Rebase to bash-4.4
|
||||
Resolves: #1376609
|
||||
|
Loading…
Reference in New Issue
Block a user