From dbeb5d3b5a253923660b422329e7d0112dd54ffc Mon Sep 17 00:00:00 2001 From: Roman Rakus Date: Jul 29 2009 08:25:18 +0000 Subject: Upstream patch level 28 --- diff --git a/bash.spec b/bash.spec index f4752ed..3bf9105 100644 --- a/bash.spec +++ b/bash.spec @@ -1,11 +1,11 @@ #%define beta_tag rc1 -%define patchlevel .24 +%define patchlevel .28 %define baseversion 4.0 Version: %{baseversion}%{patchlevel} Name: bash Summary: The GNU Bourne Again shell -Release: 2%{?dist} +Release: 1%{?dist} Group: System Environment/Shells License: GPLv2+ Url: http://www.gnu.org/software/bash @@ -43,6 +43,10 @@ Patch021: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-021 Patch022: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-022 Patch023: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-023 Patch024: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-024 +Patch025: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-025 +Patch026: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-026 +Patch027: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-027 +Patch028: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-028 # Other patches Patch101: bash-2.02-security.patch @@ -119,6 +123,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 @@ -305,6 +313,9 @@ fi #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %changelog +* Tue Jul 28 2009 Roman Rakus - 4.0.28-1 +- Upstream patch level 28 + * Fri Jul 24 2009 Fedora Release Engineering - 4.0.24-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/bash40-025 b/bash40-025 new file mode 100644 index 0000000..30b38ba --- /dev/null +++ b/bash40-025 @@ -0,0 +1,104 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.0 +Patch-ID: bash40-025 + +Bug-Reported-by: Matt Zyzik +Bug-Reference-ID: <20090519011418.GA21431@ice.filescope.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-05/msg00044.html + +Bug-Description: + +bash40-024 introduced a regression for constructs like **/*.cs; that +expansion would no longer include matching files in the current directory. +This patch undoes portions of bash40-024 and fixes the original problem +in a different way. + +Patch: + +*** ../bash-4.0-patched/lib/glob/glob.c 2009-05-22 12:32:26.000000000 -0400 +--- lib/glob/glob.c 2009-05-22 12:35:55.000000000 -0400 +*************** +*** 666,672 **** + } + +! /* compat: if GX_ALLDIRS, add the passed directory also, but don't add an +! empty directory name. */ +! if (add_current && (flags & GX_NULLDIR) == 0) + { + sdlen = strlen (dir); +--- 666,673 ---- + } + +! /* compat: if GX_ADDCURDIR, add the passed directory also. Add an empty +! directory name as a placeholder if GX_NULLDIR (in which case the passed +! directory name is "."). */ +! if (add_current) + { + sdlen = strlen (dir); +*************** +*** 680,684 **** + nextlink->next = lastlink; + lastlink = nextlink; +! bcopy (dir, nextname, sdlen + 1); + ++count; + } +--- 681,688 ---- + nextlink->next = lastlink; + lastlink = nextlink; +! if (flags & GX_NULLDIR) +! nextname[0] = '\0'; +! else +! bcopy (dir, nextname, sdlen + 1); + ++count; + } +*************** +*** 1008,1016 **** + /* Just return what glob_vector () returns appended to the + directory name. */ + dflags = flags & ~GX_MARKDIRS; + if (directory_len == 0) + dflags |= GX_NULLDIR; + if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') +! dflags |= GX_ALLDIRS|GX_ADDCURDIR; + temp_results = glob_vector (filename, + (directory_len == 0 ? "." : directory_name), +--- 1012,1033 ---- + /* Just return what glob_vector () returns appended to the + directory name. */ ++ /* If flags & GX_ALLDIRS, we're called recursively */ + dflags = flags & ~GX_MARKDIRS; + if (directory_len == 0) + dflags |= GX_NULLDIR; + if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') +! { +! dflags |= GX_ALLDIRS|GX_ADDCURDIR; +! #if 0 +! /* If we want all directories (dflags & GX_ALLDIRS) and we're not +! being called recursively as something like `echo **/*.o' +! ((flags & GX_ALLDIRS) == 0), we want to prevent glob_vector from +! adding a null directory name to the front of the temp_results +! array. We turn off ADDCURDIR if not called recursively and +! dlen == 0 */ +! #endif +! if (directory_len == 0 && (flags & GX_ALLDIRS) == 0) +! dflags &= ~GX_ADDCURDIR; +! } + temp_results = glob_vector (filename, + (directory_len == 0 ? "." : directory_name), +*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500 +--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500 +*************** +*** 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/bash40-026 b/bash40-026 new file mode 100644 index 0000000..412b2c7 --- /dev/null +++ b/bash40-026 @@ -0,0 +1,56 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.0 +Patch-ID: bash40-026 + +Bug-Reported-by: Sergei Steshenko +Bug-Reference-ID: <670181.38883.qm@web35204.mail.mud.yahoo.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-05/msg00059.html + +Bug-Description: + +A forgotten line in externs.h caused compilation errors to occur on some +systems (e.g., Cygwin). + +Patch: + +*** ../bash-4.0-patched/externs.h 2009-01-18 18:29:29.000000000 -0500 +--- externs.h 2009-06-02 09:05:40.000000000 -0400 +*************** +*** 193,196 **** +--- 193,198 ---- + + /* Declarations for functions defined in lib/sh/fpurge.c */ ++ ++ #if defined NEED_FPURGE_DECL + #if !HAVE_DECL_FPURGE + +*************** +*** 201,205 **** + + #endif /* HAVE_DECL_FPURGE */ +! + + /* Declarations for functions defined in lib/sh/getcwd.c */ +--- 203,207 ---- + + #endif /* HAVE_DECL_FPURGE */ +! #endif /* NEED_FPURGE_DECL */ + + /* Declarations for functions defined in lib/sh/getcwd.c */ +*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500 +--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500 +*************** +*** 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/bash40-027 b/bash40-027 new file mode 100644 index 0000000..a96ce4b --- /dev/null +++ b/bash40-027 @@ -0,0 +1,67 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.0 +Patch-ID: bash40-027 + +Bug-Reported-by: jim@jim.sh +Bug-Reference-ID: <200905262140.n4QLeO4X030664@psychosis.jim.sh> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-05/msg00074.html + +Bug-Description: + +There are occasional cursor positioning errors when using readline's +horizontal scroll mode. + +Patch: + +*** ../bash-4.0-patched/lib/readline/display.c 2009-05-22 12:32:25.000000000 -0400 +--- lib/readline/display.c 2009-05-29 23:32:20.000000000 -0400 +*************** +*** 1190,1196 **** + line[t - 1] = '>'; + +! if (!rl_display_fixed || forced_display || lmargin != last_lmargin) + { + forced_display = 0; + update_line (&visible_line[last_lmargin], + &invisible_line[lmargin], +--- 1192,1200 ---- + line[t - 1] = '>'; + +! if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin) + { + forced_display = 0; ++ o_cpos = _rl_last_c_pos; ++ cpos_adjusted = 0; + update_line (&visible_line[last_lmargin], + &invisible_line[lmargin], +*************** +*** 1200,1203 **** +--- 1204,1214 ---- + 0); + ++ if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && ++ cpos_adjusted == 0 && ++ _rl_last_c_pos != o_cpos && ++ _rl_last_c_pos > wrap_offset && ++ o_cpos < prompt_last_invisible) ++ _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ ++ + /* If the visible new line is shorter than the old, but the number + of invisible characters is greater, and we are at the end of +*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500 +--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500 +*************** +*** 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/bash40-028 b/bash40-028 new file mode 100644 index 0000000..a5b0b60 --- /dev/null +++ b/bash40-028 @@ -0,0 +1,172 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.0 +Patch-ID: bash40-028 + +Bug-Reported-by: martin f krafft +Bug-Reference-ID: <4A4E39E7.5080807@debian.org> +Bug-Reference-URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519165 + http://lists.gnu.org/archive/html/bug-bash/2009-07/msg00011.html + +Bug-Description: + +bash-4.0 reverted to the historical shell behavior of raising an error +when $@ or $* was expanded after `set -u' had been executed and there +were no positional parameters. The Posix working group has since +clarified the standard's position on the issue, and $@ and $* are now the +only variables, parameters, or special parameters that do not raise an +error when unset if set -u is enabled. + +Patch: + +*** ../bash-4.0-patched/subst.c Mon Mar 23 11:34:55 2009 +--- subst.c Wed Jun 17 18:12:18 2009 +*************** +*** 6768,6778 **** + + case RBRACE: +! if (var_is_set == 0 && unbound_vars_is_error) + { + err_unboundvar (name); + FREE (value); + FREE (temp); + free (name); +- last_command_exit_value = EXECUTION_FAILURE; + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } +--- 6794,6804 ---- + + case RBRACE: +! if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1])) + { ++ last_command_exit_value = EXECUTION_FAILURE; + err_unboundvar (name); + FREE (value); + FREE (temp); + free (name); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } +*************** +*** 6991,6994 **** +--- 7017,7029 ---- + list = list_rest_of_args (); + ++ #if 0 ++ /* According to austin-group posix proposal by Geoff Clare in ++ <20090505091501.GA10097@squonk.masqnet> of 5 May 2009: ++ ++ "The shell shall write a message to standard error and ++ immediately exit when it tries to expand an unset parameter ++ other than the '@' and '*' special parameters." ++ */ ++ + if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0) + { +*************** +*** 6996,7003 **** + uerror[1] = '*'; + uerror[2] = '\0'; +- err_unboundvar (uerror); + last_command_exit_value = EXECUTION_FAILURE; + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } + + /* If there are no command-line arguments, this should just +--- 7031,7039 ---- + uerror[1] = '*'; + uerror[2] = '\0'; + last_command_exit_value = EXECUTION_FAILURE; ++ err_unboundvar (uerror); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } ++ #endif + + /* If there are no command-line arguments, this should just +*************** +*** 7053,7056 **** +--- 7089,7101 ---- + list = list_rest_of_args (); + ++ #if 0 ++ /* According to austin-group posix proposal by Geoff Clare in ++ <20090505091501.GA10097@squonk.masqnet> of 5 May 2009: ++ ++ "The shell shall write a message to standard error and ++ immediately exit when it tries to expand an unset parameter ++ other than the '@' and '*' special parameters." ++ */ ++ + if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0) + { +*************** +*** 7058,7065 **** + uerror[1] = '@'; + uerror[2] = '\0'; +- err_unboundvar (uerror); + last_command_exit_value = EXECUTION_FAILURE; + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } + + /* We want to flag the fact that we saw this. We can't turn +--- 7103,7111 ---- + uerror[1] = '@'; + uerror[2] = '\0'; + last_command_exit_value = EXECUTION_FAILURE; ++ err_unboundvar (uerror); + return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); + } ++ #endif + + /* We want to flag the fact that we saw this. We can't turn +*** ../bash-4.0-patched/doc/bash.1 Wed Feb 18 15:13:56 2009 +--- doc/bash.1 Wed Jun 17 08:51:19 2009 +*************** +*** 8258,8264 **** + .TP 8 + .B \-u +! Treat unset variables as an error when performing + parameter expansion. If expansion is attempted on an +! unset variable, the shell prints an error message, and, + if not interactive, exits with a non-zero status. + .TP 8 +--- 8274,8281 ---- + .TP 8 + .B \-u +! Treat unset variables and parameters other than the special +! parameters "@" and "*" as an error when performing + parameter expansion. If expansion is attempted on an +! unset variable or parameter, the shell prints an error message, and, + if not interactive, exits with a non-zero status. + .TP 8 +*** ../bash-4.0-patched/doc/bashref.texi Wed Feb 18 15:14:43 2009 +--- doc/bashref.texi Wed Jun 17 08:50:46 2009 +*************** +*** 4139,4143 **** + + @item -u +! Treat unset variables as an error when performing parameter expansion. + An error message will be written to the standard error, and a non-interactive + shell will exit. +--- 4151,4156 ---- + + @item -u +! Treat unset variables and parameters other than the special parameters +! @samp{@@} or @samp{*} as an error when performing parameter expansion. + An error message will be written to the standard error, and a non-interactive + shell will exit. +*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500 +--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500 +*************** +*** 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_ */