diff --git a/bash.spec b/bash.spec index b1396b4..c3c6766 100644 --- a/bash.spec +++ b/bash.spec @@ -1,12 +1,12 @@ #% define beta_tag rc2 -%define patchleveltag .8 +%define patchleveltag .10 %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 @@ -28,6 +28,8 @@ Patch005: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-005 Patch006: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-006 Patch007: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-007 Patch008: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-008 +Patch009: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-009 +Patch010: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-010 # Other patches Patch101: bash-2.02-security.patch @@ -98,6 +100,8 @@ This package contains documentation files for %{name}. %patch006 -p0 -b .006 %patch007 -p0 -b .007 %patch008 -p0 -b .008 +%patch009 -p0 -b .009 +%patch010 -p0 -b .010 # Other patches %patch101 -p1 -b .security @@ -308,6 +312,9 @@ end #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %changelog +* Thu May 05 2011 Roman Rakus - 4.2.10-1 +- Patchlevel 10 + * Thu Mar 31 2011 Roman Rakus - 4.2.8-2 - Remove bash-4.2-xdupmbstowcs2-patch, which introduced another bugs diff --git a/bash42-009 b/bash42-009 new file mode 100644 index 0000000..83a7e2c --- /dev/null +++ b/bash42-009 @@ -0,0 +1,82 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-009 + +Bug-Reported-by: +Bug-Reference-ID: <4DAAC0DB.7060606@piumalab.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00075.html + +Bug-Description: + +Under certain circumstances, running `fc -l' two times in succession with a +relative history offset at the end of the history will result in an incorrect +calculation of the last history entry and a seg fault. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/builtins/fc.def 2010-05-30 18:25:38.000000000 -0400 +--- builtins/fc.def 2011-04-19 15:46:17.000000000 -0400 +*************** +*** 305,309 **** + + /* XXX */ +! if (saved_command_line_count > 0 && i == last_hist && hlist[last_hist] == 0) + while (last_hist >= 0 && hlist[last_hist] == 0) + last_hist--; +--- 305,309 ---- + + /* XXX */ +! if (i == last_hist && hlist[last_hist] == 0) + while (last_hist >= 0 && hlist[last_hist] == 0) + last_hist--; +*************** +*** 476,480 **** + { + int sign, n, clen, rh; +! register int i, j; + register char *s; + +--- 476,480 ---- + { + int sign, n, clen, rh; +! register int i, j, last_hist; + register char *s; + +*************** +*** 496,500 **** + calculation as if it were on. */ + rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list); +! i -= rh + hist_last_line_added; + + /* No specification defaults to most recent command. */ +--- 496,508 ---- + calculation as if it were on. */ + rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list); +! last_hist = i - rh - hist_last_line_added; +! +! if (i == last_hist && hlist[last_hist] == 0) +! while (last_hist >= 0 && hlist[last_hist] == 0) +! last_hist--; +! if (last_hist < 0) +! return (-1); +! +! i = last_hist; + + /* No specification defaults to most recent command. */ +*** ../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 8 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 9 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/bash42-010 b/bash42-010 new file mode 100644 index 0000000..e408abd --- /dev/null +++ b/bash42-010 @@ -0,0 +1,61 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-010 + +Bug-Reported-by: Mike Frysinger +Bug-Reference-ID: <201104122356.20160.vapier@gentoo.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00058.html + +Bug-Description: + +Bash did not correctly print/reproduce here documents attached to commands +inside compound commands such as arithmetic for loops and user-specified +subshells. This affected the execution of such commands inside a shell +function when the function definition is saved and later restored using +`.' or `eval'. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/print_cmd.c 2010-05-30 18:34:08.000000000 -0400 +--- print_cmd.c 2011-04-14 10:43:18.000000000 -0400 +*************** +*** 316,319 **** +--- 317,321 ---- + skip_this_indent++; + make_command_string_internal (command->value.Subshell->command); ++ PRINT_DEFERRED_HEREDOCS (""); + cprintf (" )"); + break; +*************** +*** 593,596 **** +--- 606,610 ---- + indentation += indentation_amount; + make_command_string_internal (arith_for_command->action); ++ PRINT_DEFERRED_HEREDOCS (""); + semicolon (); + indentation -= indentation_amount; +*************** +*** 654,657 **** +--- 668,672 ---- + + make_command_string_internal (group_command->command); ++ PRINT_DEFERRED_HEREDOCS (""); + + if (inside_function_def) +*** ../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 9 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 10 + + #endif /* _PATCHLEVEL_H_ */