diff --git a/bash.spec b/bash.spec index c37ca57..0b5b208 100644 --- a/bash.spec +++ b/bash.spec @@ -1,12 +1,12 @@ #% define beta_tag rc2 -%define patchleveltag .24 +%define patchleveltag .28 %define baseversion 4.2 %bcond_without tests Version: %{baseversion}%{patchleveltag} Name: bash Summary: The GNU Bourne Again shell -Release: 2%{?dist} +Release: 1%{?dist} Group: System Environment/Shells License: GPLv3+ Url: http://www.gnu.org/software/bash @@ -44,6 +44,10 @@ Patch021: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-021 Patch022: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-022 Patch023: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-023 Patch024: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-024 +Patch025: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-025 +Patch026: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-026 +Patch027: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-027 +Patch028: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-028 # Other patches Patch101: bash-2.02-security.patch @@ -134,6 +138,10 @@ This package contains documentation files for %{name}. %patch022 -p0 -b .022 %patch023 -p0 -b .023 %patch024 -p0 -b .024 +%patch025 -p0 -b .025 +%patch026 -p0 -b .026 +%patch027 -p0 -b .027 +%patch028 -p0 -b .028 # Other patches %patch101 -p1 -b .security @@ -326,6 +334,9 @@ end #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %changelog +* Wed May 09 2012 Roman Rakus - 4.2.28-1 +- Patchlevel 28 + * Mon Apr 23 2012 Roman Rakus - 4.2.24-2 - Don't call malloc in signal handler diff --git a/bash42-025 b/bash42-025 new file mode 100644 index 0000000..34ac343 --- /dev/null +++ b/bash42-025 @@ -0,0 +1,143 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-025 + +Bug-Reported-by: Bill Gradwohl +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/help-bash/2012-03/msg00078.html + +Bug-Description: + +When used in a shell function, `declare -g -a array=(compound assignment)' +creates a local variable instead of a global one. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/command.h 2010-08-02 19:36:51.000000000 -0400 +--- command.h 2012-04-01 12:38:35.000000000 -0400 +*************** +*** 98,101 **** +--- 98,102 ---- + #define W_ASSIGNASSOC 0x400000 /* word looks like associative array assignment */ + #define W_ARRAYIND 0x800000 /* word is an array index being expanded */ ++ #define W_ASSNGLOBAL 0x1000000 /* word is a global assignment to declare (declare/typeset -g) */ + + /* Possible values for subshell_environment */ +*** ../bash-4.2-patched/execute_cmd.c 2011-11-21 18:03:41.000000000 -0500 +--- execute_cmd.c 2012-04-01 12:42:03.000000000 -0400 +*************** +*** 3581,3585 **** + WORD_LIST *w; + struct builtin *b; +! int assoc; + + if (words == 0) +--- 3581,3585 ---- + WORD_LIST *w; + struct builtin *b; +! int assoc, global; + + if (words == 0) +*************** +*** 3587,3591 **** + + b = 0; +! assoc = 0; + + for (w = words; w; w = w->next) +--- 3587,3591 ---- + + b = 0; +! assoc = global = 0; + + for (w = words; w; w = w->next) +*************** +*** 3604,3607 **** +--- 3604,3609 ---- + if (assoc) + w->word->flags |= W_ASSIGNASSOC; ++ if (global) ++ w->word->flags |= W_ASSNGLOBAL; + #endif + } +*************** +*** 3609,3613 **** + /* Note that we saw an associative array option to a builtin that takes + assignment statements. This is a bit of a kludge. */ +! else if (w->word->word[0] == '-' && strchr (w->word->word, 'A')) + { + if (b == 0) +--- 3611,3618 ---- + /* Note that we saw an associative array option to a builtin that takes + assignment statements. This is a bit of a kludge. */ +! else if (w->word->word[0] == '-' && (strchr (w->word->word+1, 'A') || strchr (w->word->word+1, 'g'))) +! #else +! else if (w->word->word[0] == '-' && strchr (w->word->word+1, 'g')) +! #endif + { + if (b == 0) +*************** +*** 3619,3626 **** + words->word->flags |= W_ASSNBLTIN; + } +! if (words->word->flags & W_ASSNBLTIN) + assoc = 1; + } +- #endif + } + +--- 3624,3632 ---- + words->word->flags |= W_ASSNBLTIN; + } +! if ((words->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'A')) + assoc = 1; ++ if ((words->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'g')) ++ global = 1; + } + } + +*** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400 +--- subst.c 2012-04-01 12:38:35.000000000 -0400 +*************** +*** 367,370 **** +--- 367,375 ---- + fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : ""); + } ++ if (f & W_ASSNGLOBAL) ++ { ++ f &= ~W_ASSNGLOBAL; ++ fprintf (stderr, "W_ASSNGLOBAL%s", f ? "|" : ""); ++ } + if (f & W_COMPASSIGN) + { +*************** +*** 2804,2808 **** + else if (assign_list) + { +! if (word->flags & W_ASSIGNARG) + aflags |= ASS_MKLOCAL; + if (word->flags & W_ASSIGNASSOC) +--- 2809,2813 ---- + else if (assign_list) + { +! if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL) == 0) + aflags |= ASS_MKLOCAL; + if (word->flags & W_ASSIGNASSOC) + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 24 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 25 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/bash42-026 b/bash42-026 new file mode 100644 index 0000000..e15d748 --- /dev/null +++ b/bash42-026 @@ -0,0 +1,58 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-026 + +Bug-Reported-by: Greg Wooledge +Bug-Reference-ID: <20120425180443.GO22241@eeg.ccf.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00172.html + +Bug-Description: + +The `lastpipe' option does not behave correctly on machines where the +open file limit is less than 256. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/execute_cmd.c 2011-11-21 12:04:47.000000000 -0500 +--- execute_cmd.c 2012-04-26 11:09:30.000000000 -0400 +*************** +*** 2206,2210 **** + if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { +! lstdin = move_to_high_fd (0, 0, 255); + if (lstdin > 0) + { +--- 2325,2329 ---- + if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { +! lstdin = move_to_high_fd (0, 1, -1); + if (lstdin > 0) + { +*************** +*** 2252,2256 **** +--- 2371,2377 ---- + } + ++ #if defined (JOB_CONTROL) + discard_unwind_frame ("lastpipe-exec"); ++ #endif + + return (exec_result); + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 25 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 26 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/bash42-027 b/bash42-027 new file mode 100644 index 0000000..c0c5d3f --- /dev/null +++ b/bash42-027 @@ -0,0 +1,47 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-027 + +Bug-Reported-by: Mike Frysinger +Bug-Reference-ID: <201204211243.30163.vapier@gentoo.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00134.html + +Bug-Description: + +When the `extglob' shell option is enabled, pattern substitution does not +work correctly in the presence of multibyte characters. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2012-03-11 17:52:57.000000000 -0400 +--- subst.c 2012-04-22 16:19:10.000000000 -0400 +*************** +*** 4167,4171 **** + #if defined (EXTENDED_GLOB) + if (extended_glob) +! simple |= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/ + #endif + +--- 4167,4171 ---- + #if defined (EXTENDED_GLOB) + if (extended_glob) +! simple &= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/ + #endif + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 26 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 27 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/bash42-028 b/bash42-028 new file mode 100644 index 0000000..fa3be3b --- /dev/null +++ b/bash42-028 @@ -0,0 +1,52 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-028 + +Bug-Reported-by: Mark Edgar +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00109.html + +Bug-Description: + +When using a word expansion for which the right hand side is evaluated, +certain expansions of quoted null strings include spurious ^? characters. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400 +--- subst.c 2012-03-20 19:30:13.000000000 -0400 +*************** +*** 5810,5813 **** +--- 5810,5823 ---- + if (qdollaratp && ((hasdol && quoted) || l->next)) + *qdollaratp = 1; ++ /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is ++ a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the ++ flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the ++ expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ++ (which is more paranoia than anything else), we need to return the ++ quoted null string and set the flags to indicate it. */ ++ if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL(temp) && QUOTED_NULL(l->word->word) && (l->word->flags & W_HASQUOTEDNULL)) ++ { ++ w->flags |= W_HASQUOTEDNULL; ++ } + dispose_words (l); + } + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 27 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 28 + + #endif /* _PATCHLEVEL_H_ */