Changeset 8e00734
- Timestamp:
- Jul 22, 2009, 10:36:04 PM (15 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 3b38e0e
- Parents:
- 32a78cf
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
BOOK/general.ent
r32a78cf r8e00734 3 3 <!ENTITY month "07"> <!-- Use two digits --> 4 4 <!ENTITY month_name "July"> 5 <!ENTITY day "2 0"> <!-- Use two digits -->5 <!ENTITY day "22"> <!-- Use two digits --> 6 6 <!ENTITY year "2009"> <!-- Use four digits --> 7 7 -
BOOK/introduction/common/changelog.xml
r32a78cf r8e00734 36 36 </listitem> 37 37 --> 38 39 <listitem> 40 <para>July 21, 2009</para> 41 <itemizedlist> 42 <listitem> 43 <para>[jim] - Updated Bash Update Patch to 6.</para> 44 </listitem> 45 </itemizedlist> 46 </listitem> 38 47 39 48 <listitem> -
patches/bash-4.0-branch_update-6.patch
r32a78cf r8e00734 1 1 Submitted By: Jim Gifford (jim at cross-lfs dot org) 2 Date: 0 5-24-20092 Date: 07-22-2009 3 3 Initial Package Version: 4.0 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 4.0-02 46 Description: Contains all upstream patches up to 4.0-028 7 7 8 8 diff -Naur bash-4.0.orig/arrayfunc.c bash-4.0/arrayfunc.c 9 9 --- bash-4.0.orig/arrayfunc.c 2009-01-04 11:32:21.000000000 -0800 10 +++ bash-4.0/arrayfunc.c 2009-0 5-24 09:14:10.000000000 -070010 +++ bash-4.0/arrayfunc.c 2009-07-22 15:31:16.000000000 -0700 11 11 @@ -604,64 +604,7 @@ 12 12 } … … 77 77 diff -Naur bash-4.0.orig/builtins/declare.def bash-4.0/builtins/declare.def 78 78 --- bash-4.0.orig/builtins/declare.def 2009-01-04 11:32:22.000000000 -0800 79 +++ bash-4.0/builtins/declare.def 2009-0 5-24 09:14:07.000000000 -070079 +++ bash-4.0/builtins/declare.def 2009-07-22 15:31:12.000000000 -0700 80 80 @@ -295,6 +295,13 @@ 81 81 subscript_start = (char *)NULL; … … 103 103 diff -Naur bash-4.0.orig/builtins/exit.def bash-4.0/builtins/exit.def 104 104 --- bash-4.0.orig/builtins/exit.def 2009-01-04 11:32:22.000000000 -0800 105 +++ bash-4.0/builtins/exit.def 2009-0 5-24 09:14:06.000000000 -0700105 +++ bash-4.0/builtins/exit.def 2009-07-22 15:31:11.000000000 -0700 106 106 @@ -113,7 +113,7 @@ 107 107 for (i = stopmsg = 0; i < js.j_jobslots; i++) … … 115 115 diff -Naur bash-4.0.orig/builtins/fc.def bash-4.0/builtins/fc.def 116 116 --- bash-4.0.orig/builtins/fc.def 2009-01-04 11:32:22.000000000 -0800 117 +++ bash-4.0/builtins/fc.def 2009-0 5-24 09:14:20.000000000 -0700117 +++ bash-4.0/builtins/fc.def 2009-07-22 15:31:26.000000000 -0700 118 118 @@ -88,6 +88,7 @@ 119 119 extern int current_command_line_count; … … 181 181 diff -Naur bash-4.0.orig/builtins/read.def bash-4.0/builtins/read.def 182 182 --- bash-4.0.orig/builtins/read.def 2009-01-15 20:11:21.000000000 -0800 183 +++ bash-4.0/builtins/read.def 2009-0 5-24 09:14:13.000000000 -0700183 +++ bash-4.0/builtins/read.def 2009-07-22 15:31:19.000000000 -0700 184 184 @@ -369,14 +369,14 @@ 185 185 code = setjmp (alrmbuf); … … 202 202 old_alrm = set_signal_handler (SIGALRM, sigalrm); 203 203 add_unwind_protect (reset_alarm, (char *)NULL); 204 diff -Naur bash-4.0.orig/doc/bash.1 bash-4.0/doc/bash.1 205 --- bash-4.0.orig/doc/bash.1 2009-02-18 12:13:56.000000000 -0800 206 +++ bash-4.0/doc/bash.1 2009-07-22 15:31:48.000000000 -0700 207 @@ -8257,9 +8257,10 @@ 208 Exit after reading and executing one command. 209 .TP 8 210 .B \-u 211 -Treat unset variables as an error when performing 212 +Treat unset variables and parameters other than the special 213 +parameters "@" and "*" as an error when performing 214 parameter expansion. If expansion is attempted on an 215 -unset variable, the shell prints an error message, and, 216 +unset variable or parameter, the shell prints an error message, and, 217 if not interactive, exits with a non-zero status. 218 .TP 8 219 .B \-v 220 diff -Naur bash-4.0.orig/doc/bashref.texi bash-4.0/doc/bashref.texi 221 --- bash-4.0.orig/doc/bashref.texi 2009-02-18 12:14:43.000000000 -0800 222 +++ bash-4.0/doc/bashref.texi 2009-07-22 15:31:48.000000000 -0700 223 @@ -4138,7 +4138,8 @@ 224 Exit after reading and executing one command. 225 226 @item -u 227 -Treat unset variables as an error when performing parameter expansion. 228 +Treat unset variables and parameters other than the special parameters 229 +@samp{@@} or @samp{*} as an error when performing parameter expansion. 230 An error message will be written to the standard error, and a non-interactive 231 shell will exit. 232 204 233 diff -Naur bash-4.0.orig/execute_cmd.c bash-4.0/execute_cmd.c 205 234 --- bash-4.0.orig/execute_cmd.c 2009-02-13 13:41:41.000000000 -0800 206 +++ bash-4.0/execute_cmd.c 2009-0 5-24 09:14:23.000000000 -0700235 +++ bash-4.0/execute_cmd.c 2009-07-22 15:31:29.000000000 -0700 207 236 @@ -568,6 +568,7 @@ 208 237 … … 268 297 else 269 298 break; 299 diff -Naur bash-4.0.orig/externs.h bash-4.0/externs.h 300 --- bash-4.0.orig/externs.h 2009-01-18 15:29:29.000000000 -0800 301 +++ bash-4.0/externs.h 2009-07-22 15:31:45.000000000 -0700 302 @@ -192,6 +192,8 @@ 303 extern char *fmtumax __P((uintmax_t, int, char *, size_t, int)); 304 305 /* Declarations for functions defined in lib/sh/fpurge.c */ 306 + 307 +#if defined NEED_FPURGE_DECL 308 #if !HAVE_DECL_FPURGE 309 310 #if HAVE_FPURGE 311 @@ -200,7 +202,7 @@ 312 extern int fpurge __P((FILE *stream)); 313 314 #endif /* HAVE_DECL_FPURGE */ 315 - 316 +#endif /* NEED_FPURGE_DECL */ 317 318 /* Declarations for functions defined in lib/sh/getcwd.c */ 319 #if !defined (HAVE_GETCWD) 270 320 diff -Naur bash-4.0.orig/jobs.c bash-4.0/jobs.c 271 321 --- bash-4.0.orig/jobs.c 2009-01-29 14:09:49.000000000 -0800 272 +++ bash-4.0/jobs.c 2009-0 5-24 09:14:28.000000000 -0700322 +++ bash-4.0/jobs.c 2009-07-22 15:31:34.000000000 -0700 273 323 @@ -442,7 +442,7 @@ 274 324 old_pipeline = the_pipeline; … … 306 356 diff -Naur bash-4.0.orig/jobs.h bash-4.0/jobs.h 307 357 --- bash-4.0.orig/jobs.h 2009-01-04 11:32:29.000000000 -0800 308 +++ bash-4.0/jobs.h 2009-0 5-24 09:14:28.000000000 -0700358 +++ bash-4.0/jobs.h 2009-07-22 15:31:34.000000000 -0700 309 359 @@ -235,6 +235,8 @@ 310 360 extern void init_job_stats __P((void)); … … 318 368 diff -Naur bash-4.0.orig/lib/glob/glob.c bash-4.0/lib/glob/glob.c 319 369 --- bash-4.0.orig/lib/glob/glob.c 2009-01-04 11:32:30.000000000 -0800 320 +++ bash-4.0/lib/glob/glob.c 2009-0 5-24 09:14:36.000000000 -0700370 +++ bash-4.0/lib/glob/glob.c 2009-07-22 15:31:43.000000000 -0700 321 371 @@ -356,7 +356,7 @@ 322 372 *np = 0; … … 328 378 return (struct globval *)0; 329 379 } 330 @@ -665, 8+665,9 @@380 @@ -665,7 +665,9 @@ 331 381 (void) closedir (d); 332 382 } 333 383 334 384 - /* compat: if GX_ALLDIRS, add the passed directory also */ 335 - if (add_current) 336 + /* compat: if GX_ALLDIRS, add the passed directory also, but don't add an337 + empty directory name. */338 + if (add_current && (flags & GX_NULLDIR) == 0)385 + /* compat: if GX_ADDCURDIR, add the passed directory also. Add an empty 386 + directory name as a placeholder if GX_NULLDIR (in which case the passed 387 + directory name is "."). */ 388 if (add_current) 339 389 { 340 390 sdlen = strlen (dir); 341 nextname = (char *)malloc (sdlen + 1); 342 @@ -678,10 +679,7 @@ 343 nextlink->name = nextname; 344 nextlink->next = lastlink; 345 lastlink = nextlink; 346 - if (flags & GX_NULLDIR) 347 - nextname[0] = '\0'; 348 - else 349 - bcopy (dir, nextname, sdlen + 1); 350 + bcopy (dir, nextname, sdlen + 1); 351 ++count; 352 } 353 } 354 @@ -942,7 +940,12 @@ 391 @@ -942,7 +944,12 @@ 355 392 char **array; 356 393 register unsigned int l; … … 366 403 while (array[l] != NULL) 367 404 ++l; 368 @@ -959,7 +96 2,8 @@405 @@ -959,7 +966,8 @@ 369 406 result[result_size - 1] = NULL; 370 407 … … 376 413 } 377 414 /* Free the directories. */ 415 @@ -1003,11 +1011,24 @@ 416 417 /* Just return what glob_vector () returns appended to the 418 directory name. */ 419 + /* If flags & GX_ALLDIRS, we're called recursively */ 420 dflags = flags & ~GX_MARKDIRS; 421 if (directory_len == 0) 422 dflags |= GX_NULLDIR; 423 if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') 424 - dflags |= GX_ALLDIRS|GX_ADDCURDIR; 425 + { 426 + dflags |= GX_ALLDIRS|GX_ADDCURDIR; 427 +#if 0 428 + /* If we want all directories (dflags & GX_ALLDIRS) and we're not 429 + being called recursively as something like `echo **/*.o' 430 + ((flags & GX_ALLDIRS) == 0), we want to prevent glob_vector from 431 + adding a null directory name to the front of the temp_results 432 + array. We turn off ADDCURDIR if not called recursively and 433 + dlen == 0 */ 434 +#endif 435 + if (directory_len == 0 && (flags & GX_ALLDIRS) == 0) 436 + dflags &= ~GX_ADDCURDIR; 437 + } 438 temp_results = glob_vector (filename, 439 (directory_len == 0 ? "." : directory_name), 440 dflags); 378 441 diff -Naur bash-4.0.orig/lib/readline/display.c bash-4.0/lib/readline/display.c 379 442 --- bash-4.0.orig/lib/readline/display.c 2009-01-04 11:32:32.000000000 -0800 380 +++ bash-4.0/lib/readline/display.c 2009-0 5-24 09:14:34.000000000 -0700443 +++ bash-4.0/lib/readline/display.c 2009-07-22 15:31:46.000000000 -0700 381 444 @@ -512,6 +512,7 @@ 382 445 /* Block keyboard interrupts because this function manipulates global … … 387 450 if (!rl_display_prompt) 388 451 rl_display_prompt = ""; 389 @@ -1236,6 +1237,7 @@ 452 @@ -1188,9 +1189,11 @@ 453 if (t < out) 454 line[t - 1] = '>'; 455 456 - if (!rl_display_fixed || forced_display || lmargin != last_lmargin) 457 + if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin) 458 { 459 forced_display = 0; 460 + o_cpos = _rl_last_c_pos; 461 + cpos_adjusted = 0; 462 update_line (&visible_line[last_lmargin], 463 &invisible_line[lmargin], 464 0, 465 @@ -1198,6 +1201,13 @@ 466 _rl_screenwidth + (lmargin ? 0 : wrap_offset), 467 0); 468 469 + if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && 470 + cpos_adjusted == 0 && 471 + _rl_last_c_pos != o_cpos && 472 + _rl_last_c_pos > wrap_offset && 473 + o_cpos < prompt_last_invisible) 474 + _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ 475 + 476 /* If the visible new line is shorter than the old, but the number 477 of invisible characters is greater, and we are at the end of 478 the new line, we need to clear to eol. */ 479 @@ -1236,6 +1246,7 @@ 390 480 visible_wrap_offset = wrap_offset; 391 481 } … … 395 485 } 396 486 397 @@ -1772,7 +17 74,7 @@487 @@ -1772,7 +1783,7 @@ 398 488 space_to_eol will insert too many spaces. XXX - maybe we should 399 489 adjust col_lendiff based on the difference between _rl_last_c_pos … … 404 494 { 405 495 if (_rl_term_autowrap && current_line < inv_botlin) 406 @@ -1892,6 +1 894,10 @@496 @@ -1892,6 +1903,10 @@ 407 497 408 498 woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset); … … 415 505 /* If we have multibyte characters, NEW is indexed by the buffer point in 416 506 a multibyte string, but _rl_last_c_pos is the display position. In 417 @@ -1905,9 +19 11,9 @@507 @@ -1905,9 +1920,9 @@ 418 508 prompt string, since they're both buffer indices and DPOS is a 419 509 desired display position. */ … … 429 519 diff -Naur bash-4.0.orig/lib/readline/readline.h bash-4.0/lib/readline/readline.h 430 520 --- bash-4.0.orig/lib/readline/readline.h 2009-01-04 11:32:33.000000000 -0800 431 +++ bash-4.0/lib/readline/readline.h 2009-0 5-24 09:14:30.000000000 -0700521 +++ bash-4.0/lib/readline/readline.h 2009-07-22 15:31:36.000000000 -0700 432 522 @@ -814,8 +814,9 @@ 433 523 #define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */ … … 443 533 diff -Naur bash-4.0.orig/lib/readline/terminal.c bash-4.0/lib/readline/terminal.c 444 534 --- bash-4.0.orig/lib/readline/terminal.c 2009-01-04 11:32:34.000000000 -0800 445 +++ bash-4.0/lib/readline/terminal.c 2009-0 5-24 09:14:30.000000000 -0700535 +++ bash-4.0/lib/readline/terminal.c 2009-07-22 15:31:36.000000000 -0700 446 536 @@ -355,7 +355,7 @@ 447 537 _rl_get_screen_size (fileno (rl_instream), 1); … … 455 545 diff -Naur bash-4.0.orig/lib/sh/winsize.c bash-4.0/lib/sh/winsize.c 456 546 --- bash-4.0.orig/lib/sh/winsize.c 2008-08-12 10:53:51.000000000 -0700 457 +++ bash-4.0/lib/sh/winsize.c 2009-0 5-24 09:14:27.000000000 -0700547 +++ bash-4.0/lib/sh/winsize.c 2009-07-22 15:31:33.000000000 -0700 458 548 @@ -30,16 +30,29 @@ 459 549 … … 497 587 diff -Naur bash-4.0.orig/parse.y bash-4.0/parse.y 498 588 --- bash-4.0.orig/parse.y 2009-01-08 05:29:12.000000000 -0800 499 +++ bash-4.0/parse.y 2009-0 5-24 09:14:32.000000000 -0700589 +++ bash-4.0/parse.y 2009-07-22 15:31:39.000000000 -0700 500 590 @@ -1122,7 +1122,7 @@ 501 591 REDIRECTEE rd; … … 743 833 diff -Naur bash-4.0.orig/patchlevel.h bash-4.0/patchlevel.h 744 834 --- bash-4.0.orig/patchlevel.h 2009-01-04 11:32:40.000000000 -0800 745 +++ bash-4.0/patchlevel.h 2009-0 5-24 09:14:36.000000000 -0700835 +++ bash-4.0/patchlevel.h 2009-07-22 15:31:48.000000000 -0700 746 836 @@ -25,6 +25,6 @@ 747 837 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh … … 749 839 750 840 -#define PATCHLEVEL 0 751 +#define PATCHLEVEL 2 4841 +#define PATCHLEVEL 28 752 842 753 843 #endif /* _PATCHLEVEL_H_ */ 754 844 diff -Naur bash-4.0.orig/pcomplete.c bash-4.0/pcomplete.c 755 845 --- bash-4.0.orig/pcomplete.c 2009-02-01 14:12:31.000000000 -0800 756 +++ bash-4.0/pcomplete.c 2009-0 5-24 09:14:02.000000000 -0700846 +++ bash-4.0/pcomplete.c 2009-07-22 15:31:08.000000000 -0700 757 847 @@ -1032,6 +1032,7 @@ 758 848 cmdlist = build_arg_list (funcname, text, lwords, cw); … … 765 855 diff -Naur bash-4.0.orig/sig.c bash-4.0/sig.c 766 856 --- bash-4.0.orig/sig.c 2009-01-04 11:32:41.000000000 -0800 767 +++ bash-4.0/sig.c 2009-0 5-24 09:14:22.000000000 -0700857 +++ bash-4.0/sig.c 2009-07-22 15:31:28.000000000 -0700 768 858 @@ -448,6 +448,48 @@ 769 859 termsig_sighandler (sig) … … 817 907 diff -Naur bash-4.0.orig/subst.c bash-4.0/subst.c 818 908 --- bash-4.0.orig/subst.c 2009-01-28 11:34:12.000000000 -0800 819 +++ bash-4.0/subst.c 2009-0 5-24 09:14:19.000000000 -0700909 +++ bash-4.0/subst.c 2009-07-22 15:31:48.000000000 -0700 820 910 @@ -85,6 +85,7 @@ 821 911 … … 999 1089 if (tdesc) 1000 1090 { 1001 @@ -6887,7 +6990,7 @@ 1091 @@ -6664,13 +6767,13 @@ 1092 return &expand_wdesc_error; 1093 1094 case RBRACE: 1095 - if (var_is_set == 0 && unbound_vars_is_error) 1096 + if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1])) 1097 { 1098 + last_command_exit_value = EXECUTION_FAILURE; 1099 err_unboundvar (name); 1100 FREE (value); 1101 FREE (temp); 1102 free (name); 1103 - last_command_exit_value = EXECUTION_FAILURE; 1104 return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); 1105 } 1106 break; 1107 @@ -6887,15 +6990,25 @@ 1002 1108 case '*': /* `$*' */ 1003 1109 list = list_rest_of_args (); 1004 1110 1005 1111 - if (list == 0 && unbound_vars_is_error) 1112 +#if 0 1113 + /* According to austin-group posix proposal by Geoff Clare in 1114 + <20090505091501.GA10097@squonk.masqnet> of 5 May 2009: 1115 + 1116 + "The shell shall write a message to standard error and 1117 + immediately exit when it tries to expand an unset parameter 1118 + other than the '@' and '*' special parameters." 1119 + */ 1120 + 1006 1121 + if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0) 1007 1122 { 1008 1123 uerror[0] = '$'; 1009 1124 uerror[1] = '*'; 1010 @@ -6949,7 +7052,7 @@ 1125 uerror[2] = '\0'; 1126 - err_unboundvar (uerror); 1127 last_command_exit_value = EXECUTION_FAILURE; 1128 + err_unboundvar (uerror); 1129 return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); 1130 } 1131 +#endif 1132 1133 /* If there are no command-line arguments, this should just 1134 disappear if there are other characters in the expansion, 1135 @@ -6949,15 +7062,25 @@ 1011 1136 case '@': /* `$@' */ 1012 1137 list = list_rest_of_args (); 1013 1138 1014 1139 - if (list == 0 && unbound_vars_is_error) 1140 +#if 0 1141 + /* According to austin-group posix proposal by Geoff Clare in 1142 + <20090505091501.GA10097@squonk.masqnet> of 5 May 2009: 1143 + 1144 + "The shell shall write a message to standard error and 1145 + immediately exit when it tries to expand an unset parameter 1146 + other than the '@' and '*' special parameters." 1147 + */ 1148 + 1015 1149 + if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0) 1016 1150 { 1017 1151 uerror[0] = '$'; 1018 1152 uerror[1] = '@'; 1153 uerror[2] = '\0'; 1154 - err_unboundvar (uerror); 1155 last_command_exit_value = EXECUTION_FAILURE; 1156 + err_unboundvar (uerror); 1157 return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal); 1158 } 1159 +#endif 1160 1161 /* We want to flag the fact that we saw this. We can't turn 1162 off quoting entirely, because other characters in the 1019 1163 diff -Naur bash-4.0.orig/trap.c bash-4.0/trap.c 1020 1164 --- bash-4.0.orig/trap.c 2009-01-16 14:07:53.000000000 -0800 1021 +++ bash-4.0/trap.c 2009-0 5-24 09:14:28.000000000 -07001165 +++ bash-4.0/trap.c 2009-07-22 15:31:34.000000000 -0700 1022 1166 @@ -755,7 +755,7 @@ 1023 1167 }
Note:
See TracChangeset
for help on using the changeset viewer.