From 56628986c058474629248d3100019d02722700b8 Mon Sep 17 00:00:00 2001 From: licihua Date: Sat, 29 May 2021 19:17:38 +0800 Subject: [PATCH] backport upstream patch (cherry picked from commit b6006973d1cff499ed333921e7c57988c1fe17d2) --- backport-bash-5.0-patch18.patch | 39 +++++++++++++++++++++++++++++++++ bash.spec | 9 +++++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 backport-bash-5.0-patch18.patch diff --git a/backport-bash-5.0-patch18.patch b/backport-bash-5.0-patch18.patch new file mode 100644 index 0000000..0b755ef --- /dev/null +++ b/backport-bash-5.0-patch18.patch @@ -0,0 +1,39 @@ +From 36f2c406ff27995392a9247dfa90672fdaf7dc43 Mon Sep 17 00:00:00 2001 +From: Chet Ramey +Date: Fri, 10 Jul 2020 11:29:25 -0400 +Subject: [PATCH] Bash-5.0 patch 18: fix quoted null string removal when using + shell word expansion pattern operators + +--- + patchlevel.h | 2 +- + subst.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/patchlevel.h b/patchlevel.h +index 98e714da..f0ee56e4 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 17 ++#define PATCHLEVEL 18 + + #endif /* _PATCHLEVEL_H_ */ +diff --git a/subst.c b/subst.c +index 8884b487..843c9d39 100644 +--- a/subst.c ++++ b/subst.c +@@ -5112,6 +5112,8 @@ getpattern (value, quoted, expandpat) + (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? Q_PATQUOTE : quoted, + (int *)NULL, (int *)NULL) + : (WORD_LIST *)0; ++ if (l) ++ word_list_remove_quoted_nulls (l); + pat = string_list (l); + dispose_words (l); + if (pat) +-- +2.26.2 + diff --git a/bash.spec b/bash.spec index eb0a5bb..cba07e4 100644 --- a/bash.spec +++ b/bash.spec @@ -1,6 +1,6 @@ Name: bash Version: 5.0 -Release: 16 +Release: 17 Summary: It is the Bourne Again Shell License: GPLv3 URL: https://www.gnu.org/software/bash @@ -28,6 +28,7 @@ Patch14: bash-5.0-patch14.patch Patch15: bash-5.0-patch15.patch Patch16: bash-5.0-patch16.patch Patch17: bash-5.0-patch17.patch +Patch18: backport-bash-5.0-patch18.patch @@ -131,6 +132,12 @@ make check %exclude %{_infodir}/dir %changelog +* Sat May 29 2021 licihua - 5.0-17 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix quoted null string removal when using shell word expansion pattern operators + * Thu Mar 30 2021 shenyangyang - 5.0-16 - Type:bugfix - ID:NA -- Gitee