rpms/bash/devel .cvsignore, 1.13, 1.14 bash-2.05a-interpreter.patch, 1.6, 1.7 bash-cond-rmatch.patch, 1.3, 1.4 bash-requires.patch, 1.4, 1.5 bash.spec, 1.193, 1.194 sources, 1.16, 1.17 bash-4.0-emacs.patch, 1.1, NONE bash40-001, 1.1, NONE bash40-002, 1.1, NONE bash40-003, 1.1, NONE bash40-004, 1.1, NONE bash40-005, 1.1, NONE bash40-006, 1.1, NONE bash40-007, 1.1, NONE bash40-008, 1.1, NONE bash40-009, 1.1, NONE bash40-010, 1.1, NONE bash40-011, 1.1, NONE bash40-012, 1.1, NONE bash40-013, 1.1, NONE bash40-014, 1.1, NONE bash40-015, 1.1, NONE bash40-016, 1.1, NONE bash40-017, 1.1, NONE bash40-018, 1.1, NONE bash40-019, 1.1, NONE bash40-020, 1.1, NONE bash40-021, 1.1, NONE bash40-022, 1.1, NONE bash40-023, 1.1, NONE bash40-024, 1.1, NONE bash40-025, 1.1, NONE bash40-026, 1.1, NONE bash40-027, 1.1, NONE bash40-028, 1.1, NONE bash40-029, 1.1, NONE bash40-030, 1.1, NONE bash40-031, 1.1, NONE bash40-032, 1.1, NONE bash40-033, 1.1, NONE bash40-034, 1.1, NONE bash40-035, 1.1, NONE

Roman Rakus rrakus at fedoraproject.org
Sun Dec 27 11:22:38 UTC 2009


Author: rrakus

Update of /cvs/pkgs/rpms/bash/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18105

Modified Files:
	.cvsignore bash-2.05a-interpreter.patch bash-cond-rmatch.patch 
	bash-requires.patch bash.spec sources 
Removed Files:
	bash-4.0-emacs.patch bash40-001 bash40-002 bash40-003 
	bash40-004 bash40-005 bash40-006 bash40-007 bash40-008 
	bash40-009 bash40-010 bash40-011 bash40-012 bash40-013 
	bash40-014 bash40-015 bash40-016 bash40-017 bash40-018 
	bash40-019 bash40-020 bash40-021 bash40-022 bash40-023 
	bash40-024 bash40-025 bash40-026 bash40-027 bash40-028 
	bash40-029 bash40-030 bash40-031 bash40-032 bash40-033 
	bash40-034 bash40-035 
Log Message:
Update to upstream 4.1-rc1


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/bash/devel/.cvsignore,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- .cvsignore	24 Feb 2009 13:28:29 -0000	1.13
+++ .cvsignore	27 Dec 2009 11:22:37 -0000	1.14
@@ -1 +1 @@
-bash-4.0.tar.gz
+bash-4.1-rc1.tar.gz

bash-2.05a-interpreter.patch:
 config.h.in   |    6 ++
 configure.in  |    4 -
 execute_cmd.c |  144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 151 insertions(+), 3 deletions(-)

Index: bash-2.05a-interpreter.patch
===================================================================
RCS file: /cvs/pkgs/rpms/bash/devel/bash-2.05a-interpreter.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- bash-2.05a-interpreter.patch	26 Jan 2009 11:50:44 -0000	1.6
+++ bash-2.05a-interpreter.patch	27 Dec 2009 11:22:37 -0000	1.7
@@ -1,6 +1,50 @@
-diff -up bash-4.0/execute_cmd.c.interpreter bash-4.0/execute_cmd.c
---- bash-4.0/execute_cmd.c.interpreter	2009-01-04 20:32:29.000000000 +0100
-+++ bash-4.0/execute_cmd.c	2009-01-21 14:55:34.000000000 +0100
+diff -up bash-4.1-rc1/config.h.in.interpreter bash-4.1-rc1/config.h.in
+--- bash-4.1-rc1/config.h.in.interpreter	2009-12-26 22:44:46.000000000 +0100
++++ bash-4.1-rc1/config.h.in	2009-12-26 22:44:46.000000000 +0100
+@@ -695,6 +695,9 @@
+ /* Define if you have the pathconf function. */
+ #undef HAVE_PATHCONF
+ 
++/* Define if you have the pread function. */
++#undef HAVE_PREAD
++
+ /* Define if you have the putenv function.  */
+ #undef HAVE_PUTENV
+ 
+@@ -881,6 +884,9 @@
+ /* Define if you have the <dlfcn.h> header file.  */
+ #undef HAVE_DLFCN_H
+ 
++/* Define if you have the <elf.h> header file.  */
++#undef HAVE_ELF_H
++
+ /* Define if you have the <grp.h> header file.  */
+ #undef HAVE_GRP_H
+ 
+diff -up bash-4.1-rc1/configure.in.interpreter bash-4.1-rc1/configure.in
+--- bash-4.1-rc1/configure.in.interpreter	2009-12-12 21:43:18.000000000 +0100
++++ bash-4.1-rc1/configure.in	2009-12-26 22:46:19.000000000 +0100
+@@ -659,7 +659,7 @@ BASH_HEADER_INTTYPES
+ AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
+ 		 memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
+ 		 stddef.h stdint.h netdb.h pwd.h grp.h strings.h regex.h \
+-		 syslog.h)
++		 syslog.h elf.h)
+ AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h \
+ 		 sys/resource.h sys/param.h sys/socket.h sys/stat.h \
+ 		 sys/time.h sys/times.h sys/types.h sys/wait.h)
+@@ -723,7 +723,7 @@ dnl checks for system calls
+ AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getgroups gethostname \
+ 		getpagesize getpeername getrlimit getrusage gettimeofday \
+ 		kill killpg lstat readlink sbrk select setdtablesize \
+-		setitimer tcgetpgrp uname ulimit waitpid)
++		setitimer tcgetpgrp uname ulimit waitpid pread)
+ AC_REPLACE_FUNCS(rename)
+ 
+ dnl checks for c library functions
+diff -up bash-4.1-rc1/execute_cmd.c.interpreter bash-4.1-rc1/execute_cmd.c
+--- bash-4.1-rc1/execute_cmd.c.interpreter	2009-11-29 03:29:34.000000000 +0100
++++ bash-4.1-rc1/execute_cmd.c	2009-12-26 22:44:46.000000000 +0100
 @@ -41,6 +41,10 @@
  #  include <unistd.h>
  #endif
@@ -12,7 +56,7 @@ diff -up bash-4.0/execute_cmd.c.interpre
  #include "posixtime.h"
  
  #if defined (HAVE_SYS_RESOURCE_H) && !defined (RLIMTYPE)
-@@ -4601,13 +4605,21 @@ shell_execve (command, args, env)
+@@ -4805,13 +4809,21 @@ shell_execve (command, args, env)
  	{
  	  /* The file has the execute bits set, but the kernel refuses to
  	     run it for some reason.  See why. */
@@ -35,7 +79,7 @@ diff -up bash-4.0/execute_cmd.c.interpre
  	      interp = getinterp (sample, sample_len, (int *)NULL);
  	      ilen = strlen (interp);
  	      errno = i;
-@@ -4623,6 +4635,136 @@ shell_execve (command, args, env)
+@@ -4827,6 +4839,136 @@ shell_execve (command, args, env)
  	      return (EX_NOEXEC);
  	    }
  #endif
@@ -172,47 +216,3 @@ diff -up bash-4.0/execute_cmd.c.interpre
  	  errno = i;
  	  file_error (command);
  	}
-diff -up bash-4.0/config.h.in.interpreter bash-4.0/config.h.in
---- bash-4.0/config.h.in.interpreter	2009-01-21 14:55:34.000000000 +0100
-+++ bash-4.0/config.h.in	2009-01-21 14:55:34.000000000 +0100
-@@ -670,6 +670,9 @@
- /* Define if you have the pathconf function. */
- #undef HAVE_PATHCONF
- 
-+/* Define if you have the pread function. */
-+#undef HAVE_PREAD
-+
- /* Define if you have the putenv function.  */
- #undef HAVE_PUTENV
- 
-@@ -850,6 +853,9 @@
- /* Define if you have the <dlfcn.h> header file.  */
- #undef HAVE_DLFCN_H
- 
-+/* Define if you have the <elf.h> header file.  */
-+#undef HAVE_ELF_H
-+
- /* Define if you have the <grp.h> header file.  */
- #undef HAVE_GRP_H
- 
-diff -up bash-4.0/configure.in.interpreter bash-4.0/configure.in
---- bash-4.0/configure.in.interpreter	2009-01-06 17:51:58.000000000 +0100
-+++ bash-4.0/configure.in	2009-01-21 15:04:58.000000000 +0100
-@@ -649,7 +649,7 @@ BASH_HEADER_INTTYPES
- 
- AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
- 		 memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
--		 stddef.h stdint.h netdb.h pwd.h grp.h strings.h regex.h)
-+		 stddef.h stdint.h netdb.h pwd.h grp.h strings.h regex.h elf.h)
- AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h \
- 		 sys/resource.h sys/param.h sys/socket.h sys/stat.h \
- 		 sys/time.h sys/times.h sys/types.h sys/wait.h)
-@@ -713,7 +713,7 @@ dnl checks for system calls
- AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getgroups gethostname \
- 		getpagesize getpeername getrlimit getrusage gettimeofday \
- 		kill killpg lstat readlink sbrk select setdtablesize \
--		setitimer tcgetpgrp uname ulimit waitpid)
-+		setitimer tcgetpgrp uname ulimit waitpid pread)
- AC_REPLACE_FUNCS(rename)
- 
- dnl checks for c library functions

bash-cond-rmatch.patch:
 execute_cmd.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: bash-cond-rmatch.patch
===================================================================
RCS file: /cvs/pkgs/rpms/bash/devel/bash-cond-rmatch.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- bash-cond-rmatch.patch	5 Jun 2008 15:43:36 -0000	1.3
+++ bash-cond-rmatch.patch	27 Dec 2009 11:22:37 -0000	1.4
@@ -1,15 +1,13 @@
-diff -up bash-3.2/execute_cmd.c.cond-rmatch bash-3.2/execute_cmd.c
---- bash-3.2/execute_cmd.c.cond-rmatch	2008-06-05 17:21:20.000000000 +0200
-+++ bash-3.2/execute_cmd.c	2008-06-05 17:23:54.000000000 +0200
-@@ -2560,8 +2560,9 @@ execute_cond_node (cond)
-       arg1 = cond_expand_word (cond->left->op, 0);
-       if (arg1 == 0)
+diff -up bash-4.1-rc1/execute_cmd.c.cond_rmatch bash-4.1-rc1/execute_cmd.c
+--- bash-4.1-rc1/execute_cmd.c.cond_rmatch	2009-12-26 22:49:09.000000000 +0100
++++ bash-4.1-rc1/execute_cmd.c	2009-12-26 22:54:11.000000000 +0100
+@@ -3278,8 +3278,7 @@ execute_cond_node (cond)
  	arg1 = nullstr;
+       if (ignore)
+ 	comsub_ignore_return++;
 -      arg2 = cond_expand_word (cond->right->op,
 -			       (rmatch && shell_compatibility_level > 31) ? 2 : (patmatch ? 1 : 0));
-+
 +      arg2 = cond_expand_word (cond->right->op, patmatch ? 1 : 0);
-+
+       if (ignore)
+ 	comsub_ignore_return--;
        if (arg2 == 0)
- 	arg2 = nullstr;
- 

bash-requires.patch:
 builtins.h            |    2 ++
 builtins/mkbuiltins.c |   27 ++++++++++++++++++++++++++-
 doc/bash.1            |    7 +++++++
 doc/bashref.texi      |    7 +++++++
 eval.c                |    3 ++-
 execute_cmd.c         |   11 +++++++++--
 execute_cmd.h         |    2 ++
 make_cmd.c            |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 shell.c               |   10 ++++++++++
 9 files changed, 115 insertions(+), 4 deletions(-)

Index: bash-requires.patch
===================================================================
RCS file: /cvs/pkgs/rpms/bash/devel/bash-requires.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- bash-requires.patch	26 Jan 2009 11:50:44 -0000	1.4
+++ bash-requires.patch	27 Dec 2009 11:22:37 -0000	1.5
@@ -1,57 +1,94 @@
-diff -up bash-4.0/shell.c.requires bash-4.0/shell.c
---- bash-4.0/shell.c.requires	2009-01-21 15:28:16.000000000 +0100
-+++ bash-4.0/shell.c	2009-01-21 15:28:16.000000000 +0100
-@@ -193,6 +193,9 @@ int have_devfd = 0;
- /* The name of the .(shell)rc file. */
- static char *bashrc_file = "~/.bashrc";
- 
-+/* Non-zero if we are finding the scripts requirements. */
-+int rpm_requires;
+diff -up bash-4.1-rc1/builtins.h.requires bash-4.1-rc1/builtins.h
+--- bash-4.1-rc1/builtins.h.requires	2009-01-04 20:32:23.000000000 +0100
++++ bash-4.1-rc1/builtins.h	2009-12-26 22:55:02.000000000 +0100
+@@ -41,6 +41,8 @@
+ #define SPECIAL_BUILTIN 0x08	/* This is a Posix `special' builtin. */
+ #define ASSIGNMENT_BUILTIN 0x10	/* This builtin takes assignment statements. */
+ #define POSIX_BUILTIN	0x20	/* This builtins is special in the Posix command search order. */
++#define REQUIRES_BUILTIN 0x40	/* This builtin requires other files. */
 +
- /* Non-zero means to act more like the Bourne shell on startup. */
- static int act_like_sh;
  
-@@ -251,6 +254,7 @@ static const struct {
-   { "posix", Int, &posixly_correct, (char **)0x0 },
-   { "protected", Int, &protected_mode, (char **)0x0 },
-   { "rcfile", Charp, (int *)0x0, &bashrc_file },
-+  { "rpm-requires", Int, &rpm_requires, (char **)0x0 },
- #if defined (RESTRICTED_SHELL)
-   { "restricted", Int, &restricted, (char **)0x0 },
- #endif
-@@ -479,6 +483,12 @@ main (argc, argv, env)
-   if (dump_translatable_strings)
-     read_but_dont_execute = 1;
+ #define BASE_INDENT	4
  
-+  if (rpm_requires)
-+    {
-+      read_but_dont_execute = 1;
-+      initialize_shell_builtins ();
-+    }
+diff -up bash-4.1-rc1/builtins/mkbuiltins.c.requires bash-4.1-rc1/builtins/mkbuiltins.c
+--- bash-4.1-rc1/builtins/mkbuiltins.c.requires	2009-01-04 20:32:23.000000000 +0100
++++ bash-4.1-rc1/builtins/mkbuiltins.c	2009-12-26 22:55:02.000000000 +0100
+@@ -69,9 +69,15 @@ extern char *strcpy ();
+ #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
+ 
+ /* Flag values that builtins can have. */
++/*  These flags are for the C code generator, 
++    the C which is produced (./builtin.c)
++    includes the flags definitions found 
++    in ../builtins.h */
+ #define BUILTIN_FLAG_SPECIAL	0x01
+ #define BUILTIN_FLAG_ASSIGNMENT 0x02
+ #define BUILTIN_FLAG_POSIX_BUILTIN 0x04
++#define BUILTIN_FLAG_REQUIRES	0x08
 +
-   if (running_setuid && privileged_mode == 0)
-     disable_priv_mode ();
  
-diff -up bash-4.0/doc/bashref.texi.requires bash-4.0/doc/bashref.texi
---- bash-4.0/doc/bashref.texi.requires	2009-01-21 15:28:16.000000000 +0100
-+++ bash-4.0/doc/bashref.texi	2009-01-21 15:28:16.000000000 +0100
-@@ -5253,6 +5253,13 @@ standard.  @xref{Bash POSIX Mode}, for a
- @item --restricted
- Make the shell a restricted shell (@pxref{The Restricted Shell}).
+ #define BASE_INDENT	4
  
-+ at item --rpm-requires
-+Produce the list of files that are required for the 
-+shell script to run.  This implies '-n' and is subject
-+to the same limitations as compile time error checking checking;
-+Backticks, [] tests,  and evals are not parsed so some 
-+dependencies may be missed.
+@@ -163,10 +169,18 @@ char *posix_builtins[] =
+   (char *)NULL
+ };
+ 
++/* The builtin commands that cause requirements on other files. */
++static char *requires_builtins[] =
++{
++  ".", "command", "exec", "source", "inlib",
++  (char *)NULL
++};
 +
- @item --verbose
- Equivalent to @option{-v}.  Print shell input lines as they're read.
+ /* Forward declarations. */
+ static int is_special_builtin ();
+ static int is_assignment_builtin ();
+ static int is_posix_builtin ();
++static int is_requires_builtin ();
+ 
+ #if !defined (HAVE_RENAME)
+ static int rename ();
+@@ -812,6 +826,9 @@ builtin_handler (self, defs, arg)
+     new->flags |= BUILTIN_FLAG_ASSIGNMENT;
+   if (is_posix_builtin (name))
+     new->flags |= BUILTIN_FLAG_POSIX_BUILTIN;
++  if (is_requires_builtin (name))
++    new->flags |= BUILTIN_FLAG_REQUIRES;
++
+ 
+   array_add ((char *)new, defs->builtins);
+   building_builtin = 1;
+@@ -1229,11 +1246,12 @@ write_builtins (defs, structfile, extern
+ 		  else
+ 		    fprintf (structfile, "(sh_builtin_func_t *)0x0, ");
  
-diff -up bash-4.0/doc/bash.1.requires bash-4.0/doc/bash.1
---- bash-4.0/doc/bash.1.requires	2009-01-21 15:28:16.000000000 +0100
-+++ bash-4.0/doc/bash.1	2009-01-21 15:28:16.000000000 +0100
+-		  fprintf (structfile, "%s%s%s%s, %s_doc,\n",
++		  fprintf (structfile, "%s%s%s%s%s, %s_doc,\n",
+ 		    "BUILTIN_ENABLED | STATIC_BUILTIN",
+ 		    (builtin->flags & BUILTIN_FLAG_SPECIAL) ? " | SPECIAL_BUILTIN" : "",
+ 		    (builtin->flags & BUILTIN_FLAG_ASSIGNMENT) ? " | ASSIGNMENT_BUILTIN" : "",
+ 		    (builtin->flags & BUILTIN_FLAG_POSIX_BUILTIN) ? " | POSIX_BUILTIN" : "",
++		    (builtin->flags & BUILTIN_FLAG_REQUIRES) ? " | REQUIRES_BUILTIN" : "",
+ 		    document_name (builtin));
+ 
+ 		  fprintf
+@@ -1581,6 +1599,13 @@ is_posix_builtin (name)
+   return (_find_in_table (name, posix_builtins));
+ }
+ 
++static int
++is_requires_builtin (name)
++     char *name;
++{
++  return (_find_in_table (name, requires_builtins));
++}
++
+ #if !defined (HAVE_RENAME)
+ static int
+ rename (from, to)
+diff -up bash-4.1-rc1/doc/bash.1.requires bash-4.1-rc1/doc/bash.1
+--- bash-4.1-rc1/doc/bash.1.requires	2009-12-26 22:55:02.000000000 +0100
++++ bash-4.1-rc1/doc/bash.1	2009-12-26 22:55:02.000000000 +0100
 @@ -231,6 +231,13 @@ The shell becomes restricted (see
  .B "RESTRICTED SHELL"
  below).
@@ -66,10 +103,95 @@ diff -up bash-4.0/doc/bash.1.requires ba
  .B \-\-verbose
  Equivalent to  \fB\-v\fP.
  .TP
-diff -up bash-4.0/make_cmd.c.requires bash-4.0/make_cmd.c
---- bash-4.0/make_cmd.c.requires	2009-01-04 20:32:38.000000000 +0100
-+++ bash-4.0/make_cmd.c	2009-01-21 15:28:16.000000000 +0100
-@@ -41,11 +41,15 @@
+diff -up bash-4.1-rc1/doc/bashref.texi.requires bash-4.1-rc1/doc/bashref.texi
+--- bash-4.1-rc1/doc/bashref.texi.requires	2009-12-26 22:55:02.000000000 +0100
++++ bash-4.1-rc1/doc/bashref.texi	2009-12-26 22:55:02.000000000 +0100
+@@ -5337,6 +5337,13 @@ standard.  @xref{Bash POSIX Mode}, for a
+ @item --restricted
+ Make the shell a restricted shell (@pxref{The Restricted Shell}).
+ 
++ at item --rpm-requires
++Produce the list of files that are required for the 
++shell script to run.  This implies '-n' and is subject
++to the same limitations as compile time error checking checking;
++Backticks, [] tests,  and evals are not parsed so some 
++dependencies may be missed.
++
+ @item --verbose
+ Equivalent to @option{-v}.  Print shell input lines as they're read.
+ 
+diff -up bash-4.1-rc1/eval.c.requires bash-4.1-rc1/eval.c
+--- bash-4.1-rc1/eval.c.requires	2009-01-04 20:32:26.000000000 +0100
++++ bash-4.1-rc1/eval.c	2009-12-26 22:55:02.000000000 +0100
+@@ -53,6 +53,7 @@ extern int last_command_exit_value, stdi
+ extern int need_here_doc;
+ extern int current_command_number, current_command_line_count, line_number;
+ extern int expand_aliases;
++extern int rpm_requires;
+ 
+ static void send_pwd_to_eterm __P((void));
+ static sighandler alrm_catcher __P((int));
+@@ -136,7 +137,7 @@ reader_loop ()
+ 
+       if (read_command () == 0)
+ 	{
+-	  if (interactive_shell == 0 && read_but_dont_execute)
++	  if (interactive_shell == 0 && (read_but_dont_execute && !rpm_requires))
+ 	    {
+ 	      last_command_exit_value = EXECUTION_SUCCESS;
+ 	      dispose_command (global_command);
+diff -up bash-4.1-rc1/execute_cmd.c.requires bash-4.1-rc1/execute_cmd.c
+--- bash-4.1-rc1/execute_cmd.c.requires	2009-12-26 22:55:02.000000000 +0100
++++ bash-4.1-rc1/execute_cmd.c	2009-12-26 22:55:02.000000000 +0100
+@@ -501,6 +501,8 @@ async_redirect_stdin ()
+ 
+ #define DESCRIBE_PID(pid) do { if (interactive) describe_pid (pid); } while (0)
+ 
++extern int rpm_requires;
++
+ /* Execute the command passed in COMMAND, perhaps doing it asynchrounously.
+    COMMAND is exactly what read_command () places into GLOBAL_COMMAND.
+    ASYNCHROUNOUS, if non-zero, says to do this command in the background.
+@@ -532,8 +534,13 @@ execute_command_internal (command, async
+ #else
+   if (breaking || continuing)
+     return (last_command_exit_value);
+-  if (command == 0 || read_but_dont_execute)
++  if (command == 0 || (read_but_dont_execute && !rpm_requires))
+     return (EXECUTION_SUCCESS);
++  if (rpm_requires && command->type == cm_function_def)
++    return last_command_exit_value =
++      execute_intern_function (command->value.Function_def->name,
++                              command->value.Function_def->command);
++
+ #endif
+ 
+   QUIT;
+@@ -5061,7 +5068,7 @@ execute_intern_function (name, function)
+ 
+   if (check_identifier (name, posixly_correct) == 0)
+     {
+-      if (posixly_correct && interactive_shell == 0)
++      if (posixly_correct && interactive_shell == 0 && rpm_requires == 0)
+ 	{
+ 	  last_command_exit_value = EX_BADUSAGE;
+ 	  jump_to_top_level (ERREXIT);
+diff -up bash-4.1-rc1/execute_cmd.h.requires bash-4.1-rc1/execute_cmd.h
+--- bash-4.1-rc1/execute_cmd.h.requires	2009-01-16 22:20:15.000000000 +0100
++++ bash-4.1-rc1/execute_cmd.h	2009-12-26 22:55:02.000000000 +0100
+@@ -22,6 +22,8 @@
+ #define _EXECUTE_CMD_H_
+ 
+ #include "stdc.h"
++#include "variables.h"
++#include "command.h"
+ 
+ extern struct fd_bitmap *new_fd_bitmap __P((int));
+ extern void dispose_fd_bitmap __P((struct fd_bitmap *));
+diff -up bash-4.1-rc1/make_cmd.c.requires bash-4.1-rc1/make_cmd.c
+--- bash-4.1-rc1/make_cmd.c.requires	2009-09-11 23:26:12.000000000 +0200
++++ bash-4.1-rc1/make_cmd.c	2009-12-26 22:57:46.000000000 +0100
+@@ -42,11 +42,15 @@
  #include "flags.h"
  #include "make_cmd.h"
  #include "dispose_cmd.h"
@@ -85,9 +207,9 @@ diff -up bash-4.0/make_cmd.c.requires ba
  
  #if defined (JOB_CONTROL)
  #include "jobs.h"
-@@ -55,6 +59,10 @@
+@@ -56,6 +60,10 @@
  
- extern int line_number, current_command_line_count;
+ extern int line_number, current_command_line_count, parser_state;
  extern int last_command_exit_value;
 +extern int rpm_requires;
 +
@@ -96,7 +218,7 @@ diff -up bash-4.0/make_cmd.c.requires ba
  
  /* Object caching */
  sh_obj_cache_t wdcache = {0, 0, 0};
-@@ -810,6 +818,27 @@ make_coproc_command (name, command)
+@@ -820,6 +828,27 @@ make_coproc_command (name, command)
    return (make_command (cm_coproc, (SIMPLE_COM *)temp));
  }
  
@@ -124,7 +246,7 @@ diff -up bash-4.0/make_cmd.c.requires ba
  /* Reverse the word list and redirection list in the simple command
     has just been parsed.  It seems simpler to do this here the one
     time then by any other method that I can think of. */
-@@ -827,6 +856,27 @@ clean_simple_command (command)
+@@ -837,6 +866,27 @@ clean_simple_command (command)
  	REVERSE_LIST (command->value.Simple->redirects, REDIRECT *);
      }
  
@@ -149,162 +271,40 @@ diff -up bash-4.0/make_cmd.c.requires ba
 +      }
 +    } /*rpm_requires*/
 +
+   parser_state &= ~PST_REDIRLIST;
    return (command);
  }
+diff -up bash-4.1-rc1/shell.c.requires bash-4.1-rc1/shell.c
+--- bash-4.1-rc1/shell.c.requires	2009-12-26 22:55:02.000000000 +0100
++++ bash-4.1-rc1/shell.c	2009-12-26 22:55:02.000000000 +0100
+@@ -193,6 +193,9 @@ int have_devfd = 0;
+ /* The name of the .(shell)rc file. */
+ static char *bashrc_file = "~/.bashrc";
  
-diff -up bash-4.0/execute_cmd.c.requires bash-4.0/execute_cmd.c
---- bash-4.0/execute_cmd.c.requires	2009-01-21 15:28:16.000000000 +0100
-+++ bash-4.0/execute_cmd.c	2009-01-21 15:28:16.000000000 +0100
-@@ -497,6 +497,8 @@ async_redirect_stdin ()
- 
- #define DESCRIBE_PID(pid) do { if (interactive) describe_pid (pid); } while (0)
- 
-+extern int rpm_requires;
-+
- /* Execute the command passed in COMMAND, perhaps doing it asynchrounously.
-    COMMAND is exactly what read_command () places into GLOBAL_COMMAND.
-    ASYNCHROUNOUS, if non-zero, says to do this command in the background.
-@@ -528,8 +530,13 @@ execute_command_internal (command, async
- #else
-   if (breaking || continuing)
-     return (last_command_exit_value);
--  if (command == 0 || read_but_dont_execute)
-+  if (command == 0 || (read_but_dont_execute && !rpm_requires))
-     return (EXECUTION_SUCCESS);
-+  if (rpm_requires && command->type == cm_function_def)
-+    return last_command_exit_value =
-+      execute_intern_function (command->value.Function_def->name,
-+                              command->value.Function_def->command);
-+
- #endif
- 
-   QUIT;
-@@ -4859,7 +4866,7 @@ execute_intern_function (name, function)
- 
-   if (check_identifier (name, posixly_correct) == 0)
-     {
--      if (posixly_correct && interactive_shell == 0)
-+      if (posixly_correct && interactive_shell == 0 && rpm_requires == 0)
- 	{
- 	  last_command_exit_value = EX_BADUSAGE;
- 	  jump_to_top_level (ERREXIT);
-diff -up bash-4.0/execute_cmd.h.requires bash-4.0/execute_cmd.h
---- bash-4.0/execute_cmd.h.requires	2009-01-04 20:32:29.000000000 +0100
-+++ bash-4.0/execute_cmd.h	2009-01-21 15:28:16.000000000 +0100
-@@ -22,6 +22,8 @@
- #define _EXECUTE_CMD_H_
- 
- #include "stdc.h"
-+#include "variables.h"
-+#include "command.h"
- 
- extern struct fd_bitmap *new_fd_bitmap __P((int));
- extern void dispose_fd_bitmap __P((struct fd_bitmap *));
-diff -up bash-4.0/builtins.h.requires bash-4.0/builtins.h
---- bash-4.0/builtins.h.requires	2009-01-04 20:32:23.000000000 +0100
-+++ bash-4.0/builtins.h	2009-01-21 16:10:39.000000000 +0100
-@@ -41,6 +41,8 @@
- #define SPECIAL_BUILTIN 0x08	/* This is a Posix `special' builtin. */
- #define ASSIGNMENT_BUILTIN 0x10	/* This builtin takes assignment statements. */
- #define POSIX_BUILTIN	0x20	/* This builtins is special in the Posix command search order. */
-+#define REQUIRES_BUILTIN 0x40	/* This builtin requires other files. */
-+
- 
- #define BASE_INDENT	4
- 
-diff -up bash-4.0/eval.c.requires bash-4.0/eval.c
---- bash-4.0/eval.c.requires	2009-01-04 20:32:26.000000000 +0100
-+++ bash-4.0/eval.c	2009-01-21 15:28:16.000000000 +0100
-@@ -53,6 +53,7 @@ extern int last_command_exit_value, stdi
- extern int need_here_doc;
- extern int current_command_number, current_command_line_count, line_number;
- extern int expand_aliases;
-+extern int rpm_requires;
- 
- static void send_pwd_to_eterm __P((void));
- static sighandler alrm_catcher __P((int));
-@@ -136,7 +137,7 @@ reader_loop ()
- 
-       if (read_command () == 0)
- 	{
--	  if (interactive_shell == 0 && read_but_dont_execute)
-+	  if (interactive_shell == 0 && (read_but_dont_execute && !rpm_requires))
- 	    {
- 	      last_command_exit_value = EXECUTION_SUCCESS;
- 	      dispose_command (global_command);
-diff -up bash-4.0/builtins/mkbuiltins.c.requires bash-4.0/builtins/mkbuiltins.c
---- bash-4.0/builtins/mkbuiltins.c.requires	2009-01-04 20:32:23.000000000 +0100
-+++ bash-4.0/builtins/mkbuiltins.c	2009-01-21 16:16:05.000000000 +0100
-@@ -69,9 +69,15 @@ extern char *strcpy ();
- #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
- 
- /* Flag values that builtins can have. */
-+/*  These flags are for the C code generator, 
-+    the C which is produced (./builtin.c)
-+    includes the flags definitions found 
-+    in ../builtins.h */
- #define BUILTIN_FLAG_SPECIAL	0x01
- #define BUILTIN_FLAG_ASSIGNMENT 0x02
- #define BUILTIN_FLAG_POSIX_BUILTIN 0x04
-+#define BUILTIN_FLAG_REQUIRES	0x08
++/* Non-zero if we are finding the scripts requirements. */
++int rpm_requires;
 +
+ /* Non-zero means to act more like the Bourne shell on startup. */
+ static int act_like_sh;
  
- #define BASE_INDENT	4
- 
-@@ -163,10 +169,18 @@ char *posix_builtins[] =
-   (char *)NULL
- };
- 
-+/* The builtin commands that cause requirements on other files. */
-+static char *requires_builtins[] =
-+{
-+  ".", "command", "exec", "source", "inlib",
-+  (char *)NULL
-+};
-+
- /* Forward declarations. */
- static int is_special_builtin ();
- static int is_assignment_builtin ();
- static int is_posix_builtin ();
-+static int is_requires_builtin ();
+@@ -251,6 +254,7 @@ static const struct {
+   { "posix", Int, &posixly_correct, (char **)0x0 },
+   { "protected", Int, &protected_mode, (char **)0x0 },
+   { "rcfile", Charp, (int *)0x0, &bashrc_file },
++  { "rpm-requires", Int, &rpm_requires, (char **)0x0 },
+ #if defined (RESTRICTED_SHELL)
+   { "restricted", Int, &restricted, (char **)0x0 },
+ #endif
+@@ -485,6 +489,12 @@ main (argc, argv, env)
+   if (dump_translatable_strings)
+     read_but_dont_execute = 1;
  
- #if !defined (HAVE_RENAME)
- static int rename ();
-@@ -812,6 +826,9 @@ builtin_handler (self, defs, arg)
-     new->flags |= BUILTIN_FLAG_ASSIGNMENT;
-   if (is_posix_builtin (name))
-     new->flags |= BUILTIN_FLAG_POSIX_BUILTIN;
-+  if (is_requires_builtin (name))
-+    new->flags |= BUILTIN_FLAG_REQUIRES;
++  if (rpm_requires)
++    {
++      read_but_dont_execute = 1;
++      initialize_shell_builtins ();
++    }
 +
+   if (running_setuid && privileged_mode == 0)
+     disable_priv_mode ();
  
-   array_add ((char *)new, defs->builtins);
-   building_builtin = 1;
-@@ -1229,11 +1246,12 @@ write_builtins (defs, structfile, extern
- 		  else
- 		    fprintf (structfile, "(sh_builtin_func_t *)0x0, ");
- 
--		  fprintf (structfile, "%s%s%s%s, %s_doc,\n",
-+		  fprintf (structfile, "%s%s%s%s%s, %s_doc,\n",
- 		    "BUILTIN_ENABLED | STATIC_BUILTIN",
- 		    (builtin->flags & BUILTIN_FLAG_SPECIAL) ? " | SPECIAL_BUILTIN" : "",
- 		    (builtin->flags & BUILTIN_FLAG_ASSIGNMENT) ? " | ASSIGNMENT_BUILTIN" : "",
- 		    (builtin->flags & BUILTIN_FLAG_POSIX_BUILTIN) ? " | POSIX_BUILTIN" : "",
-+		    (builtin->flags & BUILTIN_FLAG_REQUIRES) ? " | REQUIRES_BUILTIN" : "",
- 		    document_name (builtin));
- 
- 		  fprintf
-@@ -1581,6 +1599,13 @@ is_posix_builtin (name)
-   return (_find_in_table (name, posix_builtins));
- }
- 
-+static int
-+is_requires_builtin (name)
-+     char *name;
-+{
-+  return (_find_in_table (name, requires_builtins));
-+}
-+
- #if !defined (HAVE_RENAME)
- static int
- rename (from, to)


Index: bash.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bash/devel/bash.spec,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -p -r1.193 -r1.194
--- bash.spec	11 Dec 2009 12:05:03 -0000	1.193
+++ bash.spec	27 Dec 2009 11:22:37 -0000	1.194
@@ -1,15 +1,16 @@
-#%define beta_tag rc1
-%define patchlevel .35
-%define baseversion 4.0
+%define beta_tag rc1
+%define patchleveltag .0
+%define baseversion 4.1
 
-Version: %{baseversion}%{patchlevel}
+Version: %{baseversion}%{?patchleveltag}
 Name: bash
 Summary: The GNU Bourne Again shell
-Release: 2%{?dist}
+Release: 0.1.%{beta_tag}%{?dist}
 Group: System Environment/Shells
-License: GPLv2+
+License: GPLv3+
 Url: http://www.gnu.org/software/bash
-Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz
+#Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz
+Source0: ftp://ftp.cwru.edu/pub/bash/%{name}-%{baseversion}-%{beta_tag}.tar.gz
 
 # For now there isn't any doc
 #Source2: ftp://ftp.gnu.org/gnu/bash/bash-doc-%{version}.tar.gz
@@ -19,49 +20,12 @@ Source2: dot-bash_profile
 Source3: dot-bash_logout
 
 # Official upstream patches
-Patch001: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-001
-Patch002: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-002
-Patch003: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-003
-Patch004: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-004
-Patch005: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-005
-Patch006: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-006
-Patch007: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-007
-Patch008: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-008
-Patch009: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-009
-Patch010: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-010
-Patch011: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-011
-Patch012: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-012
-Patch013: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-013
-Patch014: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-014
-Patch015: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-015
-Patch016: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-016
-Patch017: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-017
-Patch018: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-018
-Patch019: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-019
-Patch020: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-020
-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
-Patch029: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-029
-Patch030: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-030
-Patch031: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-031
-Patch032: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-032
-Patch033: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-033
-Patch034: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-034
-Patch035: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0-patches/bash40-035
-
 # Other patches
 Patch101: bash-2.02-security.patch
 Patch102: bash-2.03-paths.patch
 Patch103: bash-2.03-profile.patch
 Patch104: bash-2.05a-interpreter.patch
 Patch105: bash-2.05b-debuginfo.patch
-#Patch106: bash-2.05b-manso.patch
 Patch107: bash-2.05b-pgrp_sync.patch
 Patch108: bash-2.05b-readline-oom.patch
 Patch109: bash-2.05b-xcc.patch
@@ -78,9 +42,6 @@ Patch118: bash-tty-tests.patch
 # 484809, check if interp section is NOBITS
 Patch123: bash-4.0-nobits.patch
 
-# 530911, bash was segfaulting when TERM=eterm* and EMACS was unset
-Patch124: bash-4.0-emacs.patch
-
 Requires(post): ncurses-libs
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -106,52 +67,15 @@ This package contains documentation file
 
 %prep
 #%setup -q -a 2
-%setup -q -n %{name}-%{baseversion}
+%setup -q -n %{name}-%{baseversion}-%{beta_tag}
 
 # Official upstream patches
-%patch001 -p0 -b .001
-%patch002 -p0 -b .002
-%patch003 -p0 -b .003
-%patch004 -p0 -b .004
-%patch005 -p0 -b .005
-%patch006 -p0 -b .006
-%patch007 -p0 -b .007
-%patch008 -p0 -b .008
-%patch009 -p0 -b .009
-%patch010 -p0 -b .010
-%patch011 -p0 -b .011
-%patch012 -p0 -b .012
-%patch013 -p0 -b .013
-%patch014 -p0 -b .014
-%patch015 -p0 -b .015
-%patch016 -p0 -b .016
-%patch017 -p0 -b .017
-%patch018 -p0 -b .018
-%patch019 -p0 -b .019
-%patch020 -p0 -b .020
-%patch021 -p0 -b .021
-%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
-%patch029 -p0 -b .029
-%patch030 -p0 -b .030
-%patch031 -p0 -b .031
-%patch032 -p0 -b .032
-%patch033 -p0 -b .033
-#%patch034 -p0 -b .034
-#%patch035 -p0 -b .035
-
 # Other patches
 %patch101 -p1 -b .security
 %patch102 -p1 -b .paths
 %patch103 -p1 -b .profile
 %patch104 -p1 -b .interpreter
 %patch105 -p1 -b .debuginfo
-#%patch106 -p1 -b .manso
 %patch107 -p1 -b .pgrp_sync
 %patch108 -p1 -b .readline_oom
 %patch109 -p1 -b .xcc
@@ -164,7 +88,6 @@ This package contains documentation file
 %patch117 -p1 -b .setlocale
 %patch118 -p1 -b .tty_tests
 %patch123 -p1 -b .nobits
-%patch124 -p1 -b .emacs
 
 echo %{version} > _distribution
 echo %{release} > _patchlevel
@@ -332,6 +255,9 @@ fi
 #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
 
 %changelog
+* Sun Dec 27 2009 Roman Rakus <rrakus at redhat.com> - 4.1-0.1.rc1
+- Upstream 4.1.rc1
+
 * Fri Dec 11 2009 Roman Rakus <rrakus at redhat.com> - 4.0.35-2
 - Don't segfault when TERM=eterm* and EMACS is unset (#530911)
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/bash/devel/sources,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -r1.16 -r1.17
--- sources	24 Feb 2009 13:28:29 -0000	1.16
+++ sources	27 Dec 2009 11:22:38 -0000	1.17
@@ -1 +1 @@
-a90a1b5a6db4838483f05438e05e8eb9  bash-4.0.tar.gz
+fc8de7b0c715fe043129c9e347a5658c  bash-4.1-rc1.tar.gz


--- bash-4.0-emacs.patch DELETED ---


--- bash40-001 DELETED ---


--- bash40-002 DELETED ---


--- bash40-003 DELETED ---


--- bash40-004 DELETED ---


--- bash40-005 DELETED ---


--- bash40-006 DELETED ---


--- bash40-007 DELETED ---


--- bash40-008 DELETED ---


--- bash40-009 DELETED ---


--- bash40-010 DELETED ---


--- bash40-011 DELETED ---


--- bash40-012 DELETED ---


--- bash40-013 DELETED ---


--- bash40-014 DELETED ---


--- bash40-015 DELETED ---


--- bash40-016 DELETED ---


--- bash40-017 DELETED ---


--- bash40-018 DELETED ---


--- bash40-019 DELETED ---


--- bash40-020 DELETED ---


--- bash40-021 DELETED ---


--- bash40-022 DELETED ---


--- bash40-023 DELETED ---


--- bash40-024 DELETED ---


--- bash40-025 DELETED ---


--- bash40-026 DELETED ---


--- bash40-027 DELETED ---


--- bash40-028 DELETED ---


--- bash40-029 DELETED ---


--- bash40-030 DELETED ---


--- bash40-031 DELETED ---


--- bash40-032 DELETED ---


--- bash40-033 DELETED ---


--- bash40-034 DELETED ---


--- bash40-035 DELETED ---




More information about the fedora-extras-commits mailing list