Changeset e6b4db2


Ignore:
Timestamp:
Apr 9, 2009, 10:12:33 PM (16 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
697d86d
Parents:
a602073
Message:

Updated Bash Branch Update Patch to -4

Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • BOOK/introduction/common/changelog.xml

    ra602073 re6b4db2  
    3636    </listitem>
    3737-->
     38
     39    <listitem>
     40      <para>April 9, 2009</para>
     41      <itemizedlist>
     42        <listitem>
     43          <para>[Jim] - Updated Bash Branch Update Patch to -4.</para>
     44        </listitem>
     45      </itemizedlist>
     46    </listitem>
    3847
    3948    <listitem>
  • BOOK/patches.ent

    ra602073 re6b4db2  
    55<!-- Start of Common Patches -->
    66
    7 <!ENTITY bash-branch_update-patch "bash-&bash-version;-branch_update-3.patch">
    8 <!ENTITY bash-branch_update-patch-md5 "1121b5d966599721aaf6dffb03f13d8c">
    9 <!ENTITY bash-branch_update-patch-size "14 KB">
     7<!ENTITY bash-branch_update-patch "bash-&bash-version;-branch_update-4.patch">
     8<!ENTITY bash-branch_update-patch-md5 "25ff4f245e33902252f7dc97ae04c119">
     9<!ENTITY bash-branch_update-patch-size "24 KB">
    1010
    1111<!ENTITY binutils-branch_update-patch "binutils-&binutils-version;-branch_update-1.patch">
  • patches/bash-4.0-branch_update-4.patch

    ra602073 re6b4db2  
    11Submitted By: Jim Gifford (jim at cross-lfs dot org)
    2 Date: 03-09-2009
     2Date: 04-09-2009
    33Initial Package Version: 4.0
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 4.0-010
     6Description: Contains all upstream patches up to 4.0-017
    77
    88diff -Naur bash-4.0.orig/arrayfunc.c bash-4.0/arrayfunc.c
    99--- bash-4.0.orig/arrayfunc.c   2009-01-04 11:32:21.000000000 -0800
    10 +++ bash-4.0/arrayfunc.c        2009-03-09 15:07:05.270012850 -0700
     10+++ bash-4.0/arrayfunc.c        2009-04-09 22:09:24.500045537 -0700
    1111@@ -604,64 +604,7 @@
    1212     }
     
    7777diff -Naur bash-4.0.orig/builtins/declare.def bash-4.0/builtins/declare.def
    7878--- bash-4.0.orig/builtins/declare.def  2009-01-04 11:32:22.000000000 -0800
    79 +++ bash-4.0/builtins/declare.def       2009-03-09 15:07:02.561839362 -0700
     79+++ bash-4.0/builtins/declare.def       2009-04-09 22:09:21.747868696 -0700
    8080@@ -295,6 +295,13 @@
    8181       subscript_start = (char *)NULL;
     
    103103diff -Naur bash-4.0.orig/builtins/exit.def bash-4.0/builtins/exit.def
    104104--- bash-4.0.orig/builtins/exit.def     2009-01-04 11:32:22.000000000 -0800
    105 +++ bash-4.0/builtins/exit.def  2009-03-09 15:07:01.245754993 -0700
     105+++ bash-4.0/builtins/exit.def  2009-04-09 22:09:20.423784047 -0700
    106106@@ -113,7 +113,7 @@
    107107       for (i = stopmsg = 0; i < js.j_jobslots; i++)
     
    113113 
    114114       if (stopmsg == JSTOPPED)
     115diff -Naur bash-4.0.orig/builtins/fc.def bash-4.0/builtins/fc.def
     116--- bash-4.0.orig/builtins/fc.def       2009-01-04 11:32:22.000000000 -0800
     117+++ bash-4.0/builtins/fc.def    2009-04-09 22:09:34.484684732 -0700
     118@@ -88,6 +88,7 @@
     119 extern int current_command_line_count;
     120 extern int literal_history;
     121 extern int posixly_correct;
     122+extern int subshell_environment, interactive_shell;
     123 
     124 extern int unlink __P((const char *));
     125 
     126@@ -172,7 +173,7 @@
     127   register int i;
     128   register char *sep;
     129   int numbering, reverse, listing, execute;
     130-  int histbeg, histend, last_hist, retval, opt;
     131+  int histbeg, histend, last_hist, retval, opt, rh;
     132   FILE *stream;
     133   REPL *rlist, *rl;
     134   char *ename, *command, *newcom, *fcedit;
     135@@ -275,6 +276,8 @@
     136 
     137       fprintf (stderr, "%s\n", command);
     138       fc_replhist (command);   /* replace `fc -s' with command */
     139+      /* Posix says that the re-executed commands should be entered into the
     140+        history. */
     141       return (parse_and_execute (command, "fc", SEVAL_NOHIST));
     142     }
     143 
     144@@ -293,7 +296,12 @@
     145      line was actually added (HISTIGNORE may have caused it to not be),
     146      so we check hist_last_line_added. */
     147 
     148-  last_hist = i - remember_on_history - hist_last_line_added;
     149+  /* Even though command substitution through parse_and_execute turns off
     150+     remember_on_history, command substitution in a shell when set -o history
     151+     has been enabled (interactive or not) should use it in the last_hist
     152+     calculation as if it were on. */
     153+  rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
     154+  last_hist = i - rh - hist_last_line_added;
     155 
     156   if (list)
     157     {
     158@@ -456,7 +464,7 @@
     159      char *command;
     160      HIST_ENTRY **hlist;
     161 {
     162-  int sign, n, clen;
     163+  int sign, n, clen, rh;
     164   register int i, j;
     165   register char *s;
     166 
     167@@ -472,7 +480,12 @@
     168      line was actually added (HISTIGNORE may have caused it to not be),
     169      so we check hist_last_line_added.  This needs to agree with the
     170      calculation of last_hist in fc_builtin above. */
     171-  i -= remember_on_history + hist_last_line_added;
     172+  /* Even though command substitution through parse_and_execute turns off
     173+     remember_on_history, command substitution in a shell when set -o history
     174+     has been enabled (interactive or not) should use it in the last_hist
     175+     calculation as if it were on. */
     176+  rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
     177+  i -= rh + hist_last_line_added;
     178 
     179   /* No specification defaults to most recent command. */
     180   if (command == NULL)
    115181diff -Naur bash-4.0.orig/builtins/read.def bash-4.0/builtins/read.def
    116182--- bash-4.0.orig/builtins/read.def     2009-01-15 20:11:21.000000000 -0800
    117 +++ bash-4.0/builtins/read.def  2009-03-09 15:07:07.890180751 -0700
     183+++ bash-4.0/builtins/read.def  2009-04-09 22:09:27.380229641 -0700
    118184@@ -369,14 +369,14 @@
    119185       code = setjmp (alrmbuf);
     
    136202       old_alrm = set_signal_handler (SIGALRM, sigalrm);
    137203       add_unwind_protect (reset_alarm, (char *)NULL);
     204diff -Naur bash-4.0.orig/execute_cmd.c bash-4.0/execute_cmd.c
     205--- bash-4.0.orig/execute_cmd.c 2009-02-13 13:41:41.000000000 -0800
     206+++ bash-4.0/execute_cmd.c      2009-04-09 22:09:37.908905992 -0700
     207@@ -568,6 +568,7 @@
     208 
     209       /* Fork a subshell, turn off the subshell bit, turn off job
     210         control and call execute_command () on the command again. */
     211+      line_number_for_err_trap = line_number;
     212       paren_pid = make_child (savestring (make_command_string (command)),
     213                              asynchronous);
     214       if (paren_pid == 0)
     215@@ -610,7 +611,10 @@
     216              if (user_subshell && was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
     217                {
     218                  last_command_exit_value = exec_result;
     219+                 save_line_number = line_number;
     220+                 line_number = line_number_for_err_trap;
     221                  run_error_trap ();
     222+                 line_number = save_line_number;
     223                }
     224 
     225              if (user_subshell && ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
     226@@ -766,7 +770,9 @@
     227       if (was_error_trap && ignore_return == 0 && invert == 0 && pipe_in == NO_PIPE && pipe_out == NO_PIPE && exec_result != EXECUTION_SUCCESS)
     228        {
     229          last_command_exit_value = exec_result;
     230+         line_number = line_number_for_err_trap;
     231          run_error_trap ();
     232+         line_number = save_line_number;
     233        }
     234 
     235       if (ignore_return == 0 && invert == 0 &&
     236@@ -2105,6 +2111,7 @@
     237   REDIRECT *rp;
     238   COMMAND *tc, *second;
     239   int ignore_return, exec_result, was_error_trap, invert;
     240+  volatile int save_line_number;
     241 
     242   ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
     243 
     244@@ -2174,12 +2181,16 @@
     245       invert = (command->flags & CMD_INVERT_RETURN) != 0;
     246       ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
     247 
     248+      line_number_for_err_trap = line_number;
     249       exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close);
     250 
     251       if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
     252        {
     253          last_command_exit_value = exec_result;
     254+         save_line_number = line_number;
     255+         line_number = line_number_for_err_trap;
     256          run_error_trap ();
     257+         line_number = save_line_number;
     258        }
     259 
     260       if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
     261@@ -2930,7 +2941,7 @@
     262                  retval = execute_command (clauses->action);
     263                }
     264              while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
     265-             if ((clauses->flags & CASEPAT_TESTNEXT) == 0)
     266+             if (clauses == 0 || (clauses->flags & CASEPAT_TESTNEXT) == 0)
     267                EXIT_CASE ();
     268              else
     269                break;
    138270diff -Naur bash-4.0.orig/parse.y bash-4.0/parse.y
    139271--- bash-4.0.orig/parse.y       2009-01-08 05:29:12.000000000 -0800
    140 +++ bash-4.0/parse.y    2009-03-09 15:07:09.194264282 -0700
     272+++ bash-4.0/parse.y    2009-04-09 22:09:39.212989803 -0700
     273@@ -1122,7 +1122,7 @@
     274                          REDIRECTEE rd;
     275                          REDIRECT *r;
     276 
     277-                         tc = $1;
     278+                         tc = $1->type == cm_simple ? (COMMAND *)$1->value.Simple : $1;
     279                          rd.dest = 1;
     280                          r = make_redirection (2, r_duplicating_output, rd);
     281                          if (tc->redirects)
    141282@@ -1615,10 +1615,11 @@
    142283 {
     
    160301 
    161302 /*
     303@@ -1877,7 +1879,7 @@
     304     prompt_again ();
     305   ret = read_a_line (remove_quoted_newline);
     306 #if defined (HISTORY)
     307-  if (remember_on_history && (parser_state & PST_HEREDOC))
     308+  if (ret && remember_on_history && (parser_state & PST_HEREDOC))
     309     {
     310       /* To make adding the the here-document body right, we need to rely
     311         on history_delimiting_chars() returning \n for the first line of
    162312@@ -2668,6 +2670,7 @@
    163313   FREE (word_desc_to_read);
     
    357507diff -Naur bash-4.0.orig/patchlevel.h bash-4.0/patchlevel.h
    358508--- bash-4.0.orig/patchlevel.h  2009-01-04 11:32:40.000000000 -0800
    359 +++ bash-4.0/patchlevel.h       2009-03-09 15:07:09.194264282 -0700
     509+++ bash-4.0/patchlevel.h       2009-04-09 22:09:39.212989803 -0700
    360510@@ -25,6 +25,6 @@
    361511    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
     
    363513 
    364514-#define PATCHLEVEL 0
    365 +#define PATCHLEVEL 10
     515+#define PATCHLEVEL 17
    366516 
    367517 #endif /* _PATCHLEVEL_H_ */
    368518diff -Naur bash-4.0.orig/pcomplete.c bash-4.0/pcomplete.c
    369519--- bash-4.0.orig/pcomplete.c   2009-02-01 14:12:31.000000000 -0800
    370 +++ bash-4.0/pcomplete.c        2009-03-09 15:06:58.589584858 -0700
     520+++ bash-4.0/pcomplete.c        2009-04-09 22:09:17.783614750 -0700
    371521@@ -1032,6 +1032,7 @@
    372522   cmdlist = build_arg_list (funcname, text, lwords, cw);
     
    377527   add_unwind_protect (restore_parser_state, (char *)pps);
    378528   add_unwind_protect (dispose_words, (char *)cmdlist);
     529diff -Naur bash-4.0.orig/sig.c bash-4.0/sig.c
     530--- bash-4.0.orig/sig.c 2009-01-04 11:32:41.000000000 -0800
     531+++ bash-4.0/sig.c      2009-04-09 22:09:36.612821343 -0700
     532@@ -448,6 +448,48 @@
     533 termsig_sighandler (sig)
     534      int sig;
     535 {
     536+  /* If we get called twice with the same signal before handling it,
     537+     terminate right away. */
     538+  if (
     539+#ifdef SIGHUP
     540+    sig != SIGHUP &&
     541+#endif
     542+#ifdef SIGINT
     543+    sig != SIGINT &&
     544+#endif
     545+#ifdef SIGDANGER
     546+    sig != SIGDANGER &&
     547+#endif
     548+#ifdef SIGPIPE
     549+    sig != SIGPIPE &&
     550+#endif
     551+#ifdef SIGALRM
     552+    sig != SIGALRM &&
     553+#endif
     554+#ifdef SIGTERM
     555+    sig != SIGTERM &&
     556+#endif
     557+#ifdef SIGXCPU
     558+    sig != SIGXCPU &&
     559+#endif
     560+#ifdef SIGXFSZ
     561+    sig != SIGXFSZ &&
     562+#endif
     563+#ifdef SIGVTALRM
     564+    sig != SIGVTALRM &&
     565+#endif
     566+#ifdef SIGLOST
     567+    sig != SIGLOST &&
     568+#endif
     569+#ifdef SIGUSR1
     570+    sig != SIGUSR1 &&
     571+#endif
     572+#ifdef SIGUSR2
     573+   sig != SIGUSR2 &&
     574+#endif
     575+   sig == terminating_signal)
     576+    terminate_immediately = 1;
     577+
     578   terminating_signal = sig;
     579 
     580   /* XXX - should this also trigger when interrupt_immediately is set? */
    379581diff -Naur bash-4.0.orig/subst.c bash-4.0/subst.c
    380582--- bash-4.0.orig/subst.c       2009-01-28 11:34:12.000000000 -0800
    381 +++ bash-4.0/subst.c    2009-03-09 15:07:05.274015365 -0700
    382 @@ -222,6 +222,7 @@
     583+++ bash-4.0/subst.c    2009-04-09 22:09:33.024593378 -0700
     584@@ -85,6 +85,7 @@
     585 
     586 /* Flags for the `pflags' argument to param_expand() */
     587 #define PF_NOCOMSUB    0x01    /* Do not perform command substitution */
     588+#define PF_IGNUNBOUND  0x02    /* ignore unbound vars even if -u set */
     589 
     590 /* These defs make it easier to use the editor. */
     591 #define LBRACE         '{'
     592@@ -222,6 +223,7 @@
    383593 static int skip_double_quoted __P((char *, size_t, int));
    384594 static char *extract_delimited_string __P((char *, int *, char *, char *, char *, int));
     
    388598 static char *pos_params __P((char *, int, int, int));
    389599 
    390 @@ -1374,6 +1375,107 @@
     600@@ -262,7 +264,7 @@
     601 static int chk_atstar __P((char *, int, int *, int *));
     602 static int chk_arithsub __P((const char *, int));
     603 
     604-static WORD_DESC *parameter_brace_expand_word __P((char *, int, int));
     605+static WORD_DESC *parameter_brace_expand_word __P((char *, int, int, int));
     606 static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
     607 static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
     608 static void parameter_brace_expand_error __P((char *, char *));
     609@@ -1374,6 +1376,107 @@
    391610 
    392611 #define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0)
     
    496715    the index of that character.  START is the index into string at which we
    497716    begin.  This is similar in spirit to strpbrk, but it returns an index into
     717@@ -5093,9 +5196,9 @@
     718    the shell, e.g., "@", "$", "*", etc.  QUOTED, if non-zero, means that
     719    NAME was found inside of a double-quoted expression. */
     720 static WORD_DESC *
     721-parameter_brace_expand_word (name, var_is_special, quoted)
     722+parameter_brace_expand_word (name, var_is_special, quoted, pflags)
     723      char *name;
     724-     int var_is_special, quoted;
     725+     int var_is_special, quoted, pflags;
     726 {
     727   WORD_DESC *ret;
     728   char *temp, *tt;
     729@@ -5127,7 +5230,7 @@
     730       strcpy (tt + 1, name);
     731 
     732       ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL,
     733-                         (int *)NULL, (int *)NULL, 0);
     734+                         (int *)NULL, (int *)NULL, pflags);
     735       free (tt);
     736     }
     737 #if defined (ARRAY_VARS)
     738@@ -5188,7 +5291,7 @@
     739   char *temp, *t;
     740   WORD_DESC *w;
     741 
     742-  w = parameter_brace_expand_word (name, var_is_special, quoted);
     743+  w = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
     744   t = w->word;
     745   /* Have to dequote here if necessary */
     746   if (t)
     747@@ -5205,7 +5308,7 @@
     748   if (t == 0)
     749     return (WORD_DESC *)NULL;
     750 
     751-  w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted);
     752+  w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0);
     753   free (t);
     754 
     755   return w;
     756@@ -6556,7 +6659,7 @@
     757   if (want_indir)
     758     tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
     759   else
     760-    tdesc = parameter_brace_expand_word (name, var_is_special, quoted);
     761+    tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
     762 
     763   if (tdesc)
     764     {
     765@@ -6887,7 +6990,7 @@
     766     case '*':          /* `$*' */
     767       list = list_rest_of_args ();
     768 
     769-      if (list == 0 && unbound_vars_is_error)
     770+      if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
     771        {
     772          uerror[0] = '$';
     773          uerror[1] = '*';
     774@@ -6949,7 +7052,7 @@
     775     case '@':          /* `$@' */
     776       list = list_rest_of_args ();
     777 
     778-      if (list == 0 && unbound_vars_is_error)
     779+      if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
     780        {
     781          uerror[0] = '$';
     782          uerror[1] = '@';
     783diff -Naur bash-4.0.orig/trap.c bash-4.0/trap.c
     784--- bash-4.0.orig/trap.c        2009-01-16 14:07:53.000000000 -0800
     785+++ bash-4.0/trap.c     2009-04-09 22:09:37.908905992 -0700
     786@@ -755,7 +755,7 @@
     787        }
     788 
     789       flags = SEVAL_NONINT|SEVAL_NOHIST;
     790-      if (sig != DEBUG_TRAP && sig != RETURN_TRAP)
     791+      if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
     792        flags |= SEVAL_RESETLINE;
     793       if (function_code == 0)
     794        parse_and_execute (trap_command, tag, flags);
  • scripts/patch/binutils-patch.sh

    ra602073 re6b4db2  
    2828cd /usr/src
    2929wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing
    30 PATCH_NUM=$(cat index.html | grep binutils | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
     30PATCH_NUM=$(cat index.html | grep binutils | grep "${SOURCEVERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
    3131PATCH_NUM=$(expr ${PATCH_NUM} + 1)
    3232rm -f index.html
Note: See TracChangeset for help on using the changeset viewer.