OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   28-Jul-2004 21:19:58
  Branch: HEAD                             Handle: 2004072820195700

  Modified files:
    openpkg-src/bash        bash.patch bash.spec

  Log:
    second attempt to upgrade to GNU Bash 3.0 (now including a still
    unreleased patch from the vendor which fixes the multi-line prompt
    bug)

  Summary:
    Revision    Changes     Path
    1.8         +97 -154    openpkg-src/bash/bash.patch
    1.51        +9  -13     openpkg-src/bash/bash.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/bash/bash.patch
  ============================================================================
  $ cvs diff -u -r1.7 -r1.8 bash.patch
  --- openpkg-src/bash/bash.patch       28 Jul 2004 08:24:40 -0000      1.7
  +++ openpkg-src/bash/bash.patch       28 Jul 2004 19:19:57 -0000      1.8
  @@ -1,30 +1,10 @@
  -This patch makes sure Bash does not segfault on empty here documents. It
  -is derived from Gentoo Linux. The problem can be reproduced with "xargs
  -<<< ${EMTPY_VARIABLE}".
  -
  ---- redir.c  2002-03-12 20:27:38.000000000 +0000
  -+++ redir.c  2003-05-01 13:04:07.000000000 +0100
  -@@ -263,8 +263,10 @@
  -   int herelen, n, e;
  - 
  -   herestr = expand_string_to_string (redirectee->word, 0);
  --  herelen = strlen (herestr);
  - 
  -+  /* verify string wasnt empty */
  -+  herelen = (herestr == NULL) ? 0 : strlen (herestr);
  -+  
  -   n = write (fd, herestr, herelen);
  -   if (n == herelen)
  -     {
  +This patch documents two implemented and classical command
  +line options "-v" and "-x". It is derived from Debian GNU/Linux.
   
  ------------------------------------------------------------------------------
  -
  -This patch documents two implemented and classical command line options
  -"-v" and "-v". It is derived from Debian GNU/Linux.
  -
  ---- doc/bash.1  Wed Jan 20 22:48:04 1999
  -+++ doc/bash.1   Sun Nov 14 13:26:59 1999
  -@@ -104,6 +104,12 @@
  +Index: doc/bash.1
  +--- doc/bash.1.orig  2004-07-12 17:27:08 +0200
  ++++ doc/bash.1       2004-07-27 19:47:10 +0200
  +@@ -113,6 +113,12 @@
    This option allows the positional parameters to be set
    when invoking an interactive shell.
    .TP
  @@ -40,24 +20,38 @@
   
   -----------------------------------------------------------------------------
   
  -This patch makes sure Bash does not segfault on on "shift" under "shopt
  --s shift_verbose". It is a null pointer dereference caused by an
  -erroneous assumption that, when the number of arguments to shift exceeds
  -the number of arguments available for shifting, the latter is always
  -explicitly specified on the command line rather than left implicit at
  -the default 1. The patch was derived from Debian GNU/Linux.
  -
  ---- builtins/shift.def.orig    2002-10-22 01:05:10.000000000 -0400
  -+++ builtins/shift.def 2002-10-22 01:05:06.000000000 -0400
  -@@ -68,7 +68,7 @@
  -   else if (times > number_of_args ())
  -     {
  -       if (print_shift_error)
  --    sh_erange (list->word->word, "shift count");
  -+    sh_erange (list ? list->word->word : NULL, "shift count");
  -       return (EXECUTION_FAILURE);
  -     }
  +This patch adds an explicit recognition for terminal sequence "kD" to be
  +"Delete" key. This is derived from Debian GNU/Linux and SuSE Linux.
  +
  +Index: lib/readline/terminal.c
  +--- lib/readline/terminal.c.orig     2003-09-18 17:03:42 +0200
  ++++ lib/readline/terminal.c  2004-07-27 20:03:17 +0200
  +@@ -145,6 +145,9 @@
  + static char *_rl_term_kH;
  + static char *_rl_term_at7;  /* @7 */
  + 
  ++/* The key sequence sent by the Delete key, if any. */
  ++static char *_rl_term_kD;
  ++
  + /* Insert key */
  + static char *_rl_term_kI;
    
  +@@ -313,6 +316,7 @@
  +   { "ei", &_rl_term_ei },
  +   { "ic", &_rl_term_ic },
  +   { "im", &_rl_term_im },
  ++  { "kD", &_rl_term_kD },   /* delete */
  +   { "kH", &_rl_term_kH },   /* home down ?? */
  +   { "kI", &_rl_term_kI },   /* insert */
  +   { "kd", &_rl_term_kd },
  +@@ -492,6 +496,7 @@
  + 
  +   rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line);  /* Home */
  +   rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
  ++  rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete);               /* Delete */
  + 
  +   _rl_keymap = xkeymap;
  + }
   
   -----------------------------------------------------------------------------
   
  @@ -65,10 +59,10 @@
   it is consistent throughout signal handling. This patch is derived from
   SuSE Linux.
   
  ---- quit.h
  -+++ quit.h   Wed May  2 17:38:34 2001
  -@@ -21,8 +21,8 @@
  - #if !defined (_QUIT_H_)
  +Index: quit.h
  +--- quit.h.orig      2001-09-10 16:08:33 +0200
  ++++ quit.h   2004-07-27 19:47:10 +0200
  +@@ -22,7 +22,7 @@
    #define _QUIT_H_
    
    /* Non-zero means SIGINT has already ocurred. */
  @@ -77,10 +71,11 @@
    
    /* Macro to call a great deal.  SIGINT just sets above variable.  When
       it is safe, put QUIT in the code, and the "interrupt" will take place. */
  ---- sig.c
  -+++ sig.c    Wed May  2 17:36:17 2001
  -@@ -57,7 +57,7 @@
  - extern int interactive, interactive_shell, login_shell, startup_state;
  +Index: sig.c
  +--- sig.c.orig       2003-12-19 22:11:35 +0100
  ++++ sig.c    2004-07-27 19:47:10 +0200
  +@@ -59,7 +59,7 @@
  + extern int parse_and_execute_level, shell_initialized;
    
    /* Non-zero after SIGINT. */
   -int interrupt_state;
  @@ -88,91 +83,23 @@
    
    /* The environment at the top-level R-E loop.  We use this in
       the case of error return. */
  -@@ -69,7 +69,7 @@
  +@@ -71,7 +71,7 @@
    #endif /* JOB_CONTROL */
    
    /* When non-zero, we throw_to_top_level (). */
   -int interrupt_immediately = 0;
   +volatile int interrupt_immediately = 0;
    
  - static void initialize_shell_signals ();
  - 
  ------------------------------------------------------------------------------
  -
  -This patch adds an explicit recognition for terminal sequence "kD" to be
  -"Delete" key. This is derived from Debian GNU/Linux and SuSE Linux.
  -
  ---- lib/readline/terminal.c
  -+++ lib/readline/terminal.c  Thu Jul 18 14:34:00 2002
  -@@ -145,6 +145,9 @@
  - static char *_rl_term_kH;
  - static char *_rl_term_at7;  /* @7 */
  - 
  -+/* The key sequence sent by the Delete key, if any. */
  -+static char *_rl_term_kD;
  -+
  - /* Insert key */
  - static char *_rl_term_kI;
  - 
  -@@ -313,6 +316,7 @@
  -   { "ei", &_rl_term_ei },
  -   { "ic", &_rl_term_ic },
  -   { "im", &_rl_term_im },
  -+  { "kD", &_rl_term_kD },   /* delete */
  -   { "kH", &_rl_term_kH },   /* home down ?? */
  -   { "kI", &_rl_term_kI },   /* insert */
  -   { "kd", &_rl_term_kd },
  -@@ -496,6 +500,7 @@
  - 
  -   _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line);        /* Home */
  -   _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line);       /* End */
  -+  _rl_bind_if_unbound (_rl_term_kD, rl_delete);             /* Delete */
  + static void initialize_shell_signals __P((void));
    
  -   _rl_keymap = xkeymap;
  - }
  -
  ------------------------------------------------------------------------------
  -
  -This patch makes sure Bash does not segfault on a particular error.
  -It is derived from RedHat Linux.
  -
  ---- builtins/common.c.warnings       2003-03-25 17:48:02.000000000 +0000
  -+++ builtins/common.c        2003-03-25 17:49:03.000000000 +0000
  -@@ -244,7 +244,7 @@
  -      char *s;
  - {
  -   if (s)
  --    builtin_error ("%s: no job control");
  -+    builtin_error ("%s: no job control", s);
  -   else
  -     builtin_error ("no job control");
  - }
  -
  ------------------------------------------------------------------------------
  -
  -This adds the OpenPKG packaging brand.
  -
  -Index: version.c
  ---- version.c.orig   2002-04-03 15:49:19.000000000 +0200
  -+++ version.c        2003-10-06 17:23:18.000000000 +0200
  -@@ -63,7 +63,7 @@
  - show_shell_version (extended)
  -      int extended;
  - {
  --  printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
  -+  printf ("GNU bash, version %s (%s) [EMAIL PROTECTED]@]\n", shell_version_string 
(), MACHTYPE);
  -   if (extended)
  -     printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
  - }
  -
   -----------------------------------------------------------------------------
   
   Port to HP-UX 11i and similar less smart platforms.
   
   Index: configure
  ---- configure.orig   2002-07-16 15:31:47.000000000 +0200
  -+++ configure        2004-06-07 10:31:26.000000000 +0200
  -@@ -1146,6 +1146,7 @@
  +--- configure.orig   2004-07-21 22:18:56 +0200
  ++++ configure        2004-07-27 19:47:10 +0200
  +@@ -1479,6 +1479,7 @@
    *-beos*)    opt_bash_malloc=no ;;   # they say it's suitable
    *-cygwin*)  opt_bash_malloc=no ;;   # Cygnus's CYGWIN environment
    *-opennt*|*-interix*)       opt_bash_malloc=no ;;   # Interix, now owned by 
Microsoft
  @@ -180,7 +107,7 @@
    esac
    
    # memory scrambling on free()
  -@@ -1211,7 +1212,7 @@
  +@@ -1624,7 +1625,7 @@
    
    else
        MALLOC_LIB=
  @@ -189,24 +116,9 @@
        MALLOC_LDFLAGS=
        MALLOC_DEP=
    fi
  -Index: mksyntax.c
  ---- mksyntax.c.orig  2002-02-07 15:32:28.000000000 +0100
  -+++ mksyntax.c       2004-06-04 11:53:19.000000000 +0200
  -@@ -128,7 +128,11 @@
  -     
  -   switch (i)
  -     {
  -+#if defined(__STDC__)
  -     case '\a': xbuf[1] = 'a'; break;
  -+#else
  -+    case 7:    xbuf[1] = 'a'; break;
  -+#endif
  -     case '\v': xbuf[1] = 'v'; break;
  -     case '\b': xbuf[1] = 'b'; break;
  -     case '\f': xbuf[1] = 'f'; break;
   Index: syntax.h
  ---- syntax.h.orig    2002-02-25 17:52:37.000000000 +0100
  -+++ syntax.h 2004-06-04 11:53:49.000000000 +0200
  +--- syntax.h.orig    2004-04-15 05:19:36 +0200
  ++++ syntax.h 2004-07-27 19:47:10 +0200
   @@ -21,6 +21,8 @@
    #ifndef _SYNTAX_H_
    #define _SYNTAX_H_
  @@ -216,15 +128,46 @@
    /* Defines for use by mksyntax.c */
    
    #define slashify_in_quotes "\\`$\"\n"
  -Index: builtins/printf.def
  ---- builtins/printf.def.orig 2002-05-13 20:36:04.000000000 +0200
  -+++ builtins/printf.def      2004-06-04 11:57:44.000000000 +0200
  -@@ -114,7 +114,7 @@
  - static intmax_t getintmax __P((void));
  - static uintmax_t getuintmax __P((void));
  - 
  --#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD
  -+#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(HPUX)
  - typedef long double floatmax_t;
  - #  define FLOATMAX_CONV     "L"
  - #  define strtofltmax       strtold
  +
  +-----------------------------------------------------------------------------
  +
  +This adds the OpenPKG packaging brand.
  +
  +Index: version.c
  +--- version.c.orig   2003-12-19 22:34:02 +0100
  ++++ version.c        2004-07-27 19:47:10 +0200
  +@@ -77,7 +77,7 @@
  + show_shell_version (extended)
  +      int extended;
  + {
  +-  printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
  ++  printf ("GNU bash, version %s (%s) [EMAIL PROTECTED]@]\n", shell_version_string 
(), MACHTYPE);
  +   if (extended)
  +     printf (_("Copyright (C) 2004 Free Software Foundation, Inc.\n"));
  + }
  +
  +-----------------------------------------------------------------------------
  +
  +Fix display handling of multi-line prompts.
  +
  +Index: lib/readline/display.c
  +--- lib/readline/display.c.orig      2004-05-28 04:57:51 +0200
  ++++ lib/readline/display.c   2004-07-28 20:17:43 +0200
  +@@ -351,14 +351,14 @@
  +       local_prompt = expand_prompt (p, &prompt_visible_length,
  +                                    &prompt_last_invisible,
  +                                    (int *)NULL,
  +-                                   (int *)NULL);
  ++                                   &prompt_physical_chars);
  +       c = *t; *t = '\0';
  +       /* The portion of the prompt string up to and including the
  +      final newline is now null-terminated. */
  +       local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
  +                                                (int *)NULL,
  +                                                &prompt_invis_chars_first_line,
  +-                                               &prompt_physical_chars);
  ++                                               (int *)NULL);
  +       *t = c;
  +       return (prompt_prefix_length);
  +     }
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/bash/bash.spec
  ============================================================================
  $ cvs diff -u -r1.50 -r1.51 bash.spec
  --- openpkg-src/bash/bash.spec        28 Jul 2004 08:24:40 -0000      1.50
  +++ openpkg-src/bash/bash.spec        28 Jul 2004 19:19:57 -0000      1.51
  @@ -24,10 +24,10 @@
   ##
   
   #   package version
  -%define       V_base_real 2.05b
  -%define       V_base_comp 205b
  -%define       V_plvl_raw  7
  -%define       V_plvl_pad  007
  +%define       V_base_real 3.0
  +%define       V_base_comp 30
  +%define       V_plvl_raw  0
  +%define       V_plvl_pad  000
   
   #   package information
   Name:         bash
  @@ -46,13 +46,6 @@
   Source0:      ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}.tar.gz
   Source1:      profile
   Patch0:       bash.patch
  -Patch1:       
ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-001
  -Patch2:       
ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-002
  -Patch3:       
ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-003
  -Patch4:       
ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-004
  -Patch5:       
ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-005
  -Patch6:       
ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-006
  -Patch7:       
ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}-patches/bash%{V_base_comp}-007
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -86,7 +79,7 @@
   %prep
       #   unpack and patch distribution
       %setup -q -n bash-%{V_base_real}
  -    %patch -p0 -P 0 1 2 3 4 5 6 7
  +    %patch -p0
   
       #   brand with OpenPKG release and fix patchlevel
       %{l_shtool} subst \
  @@ -114,8 +107,11 @@
       ./configure \
           --cache-file=./config.cache \
           --prefix=%{l_prefix} \
  +        --disable-multibyte \
  +        --enable-debugger \
           --without-gnu-malloc \
  -        --without-curses
  +        --without-curses \
  +        --disable-nls
       %{l_shtool} subst \
           -e 's;^\(#define.*SYS_PROFILE["^]*\).*;\1 "%{l_prefix}/etc/bash/profile";' \
           pathnames.h
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to