diff --git a/bash-4.4-case-in-command-subst.patch b/bash-4.4-case-in-command-subst.patch new file mode 100644 index 0000000..12509ed --- /dev/null +++ b/bash-4.4-case-in-command-subst.patch @@ -0,0 +1,18 @@ +diff --git a/parse.y b/parse.y +--- a/parse.y ++++ b/parse.y +@@ -4011,11 +4011,13 @@ eof_error: + tflags |= LEX_RESWDOK; + lex_rwlen = 0; + } +- else ++ else if (shellmeta (ch) == 0) + { + tflags &= ~LEX_RESWDOK; + /*itrace("parse_comsub:%d: found `%.4s', lex_reswdok -> 0", line_number, ret+retind-4);*/ + } ++ else /* can't be in a reserved word any more */ ++ lex_rwlen = 0; + } + else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0))) + ; /* don't modify LEX_RESWDOK if we're starting a comment */ diff --git a/bash.spec b/bash.spec index 37cf20a..058cd24 100644 --- a/bash.spec +++ b/bash.spec @@ -7,7 +7,7 @@ Version: %{baseversion}%{patchleveltag} Name: bash Summary: The GNU Bourne Again shell -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/bash Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz @@ -89,6 +89,10 @@ Patch129: bash-4.4-assignment-error.patch # This should be dropped while rebasing to bash-4.5 Patch130: bash-4.5-test-modification-time.patch +# 1556867 - case in a for loop inside subshell causes syntax error +# This should be dropped while rebasing to bash-4.5 +Patch131: bash-4.4-case-in-command-subst.patch + BuildRequires: texinfo bison BuildRequires: ncurses-devel BuildRequires: autoconf, gettext @@ -312,6 +316,10 @@ end %{_libdir}/pkgconfig/%{name}.pc %changelog +* Thu Mar 15 2018 Siteshwar Vashisht - 4.4.19-2 +- Fix handling case statement in command subsitution + Resolves: #1556867 + * Mon Feb 12 2018 Siteshwar Vashisht - 4.4.19-1 - Update to bash-4.4 patchlevel 19 Resolves: #1540383