summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Travis <immanetize@fedoraproject.org>2014-09-26 14:32:59 -0600
committerPete Travis <immanetize@fedoraproject.org>2014-09-26 14:32:59 -0600
commitfe5673aed2053463a7164ec5e7b609877340c0fa (patch)
treef7db962c06e191244951fa2f415c79325051892d
parent08b01b8f3f227bda87ee2591c7e6ccb379fad187 (diff)
downloadrpmbuild-fe5673aed2053463a7164ec5e7b609877340c0fa.tar.gz
rpmbuild-fe5673aed2053463a7164ec5e7b609877340c0fa.tar.xz
rpmbuild-fe5673aed2053463a7164ec5e7b609877340c0fa.zip
SLES10 bash init
-rw-r--r--SOURCES/bash-2.03-manual.patch59
-rw-r--r--SOURCES/bash-2.05-2.4.4.patch54
-rw-r--r--SOURCES/bash-2.05a-security.patch69
-rw-r--r--SOURCES/bash-3.0-decl.patch10
-rw-r--r--SOURCES/bash-3.0-evalexp.patch13
-rw-r--r--SOURCES/bash-3.0-nfs_redir.patch148
-rw-r--r--SOURCES/bash-3.0-warn-locale.patch29
-rw-r--r--SOURCES/bash-3.1-directory.patch38
-rw-r--r--SOURCES/bash-3.1-extended_quote.patch19
-rw-r--r--SOURCES/bash-3.1-loadables.dif689
-rw-r--r--SOURCES/bash-3.1-patches.tar.bz2bin0 -> 10804 bytes
-rw-r--r--SOURCES/bash-3.1-printf.patch44
-rw-r--r--SOURCES/bash-3.1-random.patch16
-rw-r--r--SOURCES/bash-3.1-wcschr.dif13
-rw-r--r--SOURCES/bash-3.1.dif263
-rw-r--r--SOURCES/bash-3.1.tar.bz2bin0 -> 1932815 bytes
-rw-r--r--SOURCES/eol-pushback.patch11
-rw-r--r--SOURCES/funcdef-import-3.1.patch72
-rw-r--r--SOURCES/readline-4.3-input.dif46
-rw-r--r--SOURCES/readline-5.0-conf.patch124
-rw-r--r--SOURCES/readline-5.0-wrap.patch17
-rw-r--r--SOURCES/readline-5.1-destdir.patch191
-rw-r--r--SOURCES/readline-5.1-patches.tar.bz2bin0 -> 2496 bytes
-rw-r--r--SOURCES/readline-5.1-random.patch14
-rw-r--r--SOURCES/readline-5.1.dif158
-rw-r--r--SOURCES/readline-5.1.tar.bz2bin0 -> 1691651 bytes
-rw-r--r--SOURCES/run-tests29
-rw-r--r--SOURCES/variables-affix-3.1.patch145
-rw-r--r--SPECS/bash.spec763
-rw-r--r--SRPMS/bash-3.1-55.src.rpmbin0 -> 3688802 bytes
30 files changed, 3034 insertions, 0 deletions
diff --git a/SOURCES/bash-2.03-manual.patch b/SOURCES/bash-2.03-manual.patch
new file mode 100644
index 0000000..f0ae58f
--- /dev/null
+++ b/SOURCES/bash-2.03-manual.patch
@@ -0,0 +1,59 @@
+--- doc/bash.1
++++ doc/bash.1 Mon Oct 25 17:29:54 2004
+@@ -113,6 +113,12 @@
+ This option allows the positional parameters to be set
+ when invoking an interactive shell.
+ .TP
++.B \-v
++Print shell input lines as they are read.
++.TP
++.B \-x
++Print commands and their arguments as they are executed.
++.TP
+ .B \-D
+ A list of all double-quoted strings preceded by \fB$\fP
+ is printed on the standard ouput.
+@@ -5799,6 +5805,11 @@
+ .SH "SHELL BUILTIN COMMANDS"
+ .\" start of bash_builtins
+ .zZ
++.if !dFN \{\
++.de FN
++\fI\|\\$1\|\fP
++..
++.\}
+ .PP
+ Unless otherwise noted, each builtin command documented in this
+ section as accepting options preceded by
+@@ -8534,6 +8545,11 @@
+ .SH "RESTRICTED SHELL"
+ .\" rbash.1
+ .zY
++.if !dFN \{\
++.de FN
++\fI\|\\$1\|\fP
++..
++.\}
+ .PP
+ If
+ .B bash
+--- doc/builtins.1
++++ doc/builtins.1 Mon Oct 25 17:29:20 2004
+@@ -10,6 +10,6 @@
+ ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1)
+ .SH BASH BUILTIN COMMANDS
+ .nr zZ 1
+-.so bash.1
++.so /usr/share/man/man1/bash.1
+ .SH SEE ALSO
+ bash(1), sh(1)
+--- doc/rbash.1
++++ doc/rbash.1 Mon Oct 25 17:29:20 2004
+@@ -3,6 +3,6 @@
+ rbash \- restricted bash, see \fBbash\fR(1)
+ .SH RESTRICTED SHELL
+ .nr zY 1
+-.so bash.1
++.so /usr/share/man/man1/bash.1
+ .SH SEE ALSO
+ bash(1)
diff --git a/SOURCES/bash-2.05-2.4.4.patch b/SOURCES/bash-2.05-2.4.4.patch
new file mode 100644
index 0000000..aee1211
--- /dev/null
+++ b/SOURCES/bash-2.05-2.4.4.patch
@@ -0,0 +1,54 @@
+--- jobs.c
++++ jobs.c Wed May 2 18:20:31 2001
+@@ -1166,6 +1166,15 @@
+ pid_t mypid;
+
+ mypid = getpid ();
++
++ if (interrupt_state)
++ {
++ struct timeval tv;
++ struct rusage rx;
++ (void) gettimeofday(&tv, NULL);
++ (void) getrusage(RUSAGE_SELF, &rx);
++ }
++
+ #if defined (BUFFERED_INPUT)
+ /* Close default_buffered_input if it's > 0. We don't close it if it's
+ 0 because that's the file descriptor used when redirecting input,
+--- quit.h
++++ quit.h Wed May 2 17:38:34 2001
+@@ -21,8 +21,12 @@
+ #if !defined (_QUIT_H_)
+ #define _QUIT_H_
+
++#define __need_sig_atomic_t
++#include <signal.h>
++#undef __need_sig_atomic_t
++
+ /* Non-zero means SIGINT has already ocurred. */
+-extern int interrupt_state;
++extern volatile sig_atomic_t interrupt_state;
+
+ extern void throw_to_top_level ();
+
+--- sig.c
++++ sig.c Wed May 2 17:36:17 2001
+@@ -57,7 +57,7 @@
+ extern int interactive, interactive_shell, login_shell, startup_state;
+
+ /* Non-zero after SIGINT. */
+-int interrupt_state;
++volatile sig_atomic_t interrupt_state = 0;
+
+ /* The environment at the top-level R-E loop. We use this in
+ the case of error return. */
+@@ -69,7 +69,7 @@
+ #endif /* JOB_CONTROL */
+
+ /* When non-zero, we throw_to_top_level (). */
+-int interrupt_immediately = 0;
++volatile sig_atomic_t interrupt_immediately = 0;
+
+ static void initialize_shell_signals ();
+
diff --git a/SOURCES/bash-2.05a-security.patch b/SOURCES/bash-2.05a-security.patch
new file mode 100644
index 0000000..86af623
--- /dev/null
+++ b/SOURCES/bash-2.05a-security.patch
@@ -0,0 +1,69 @@
+--- variables.c
++++ variables.c Wed Aug 21 12:14:18 2002
+@@ -1035,6 +1035,7 @@
+ return v;
+ }
+
++#if !defined(linux)
+ /* The random number seed. You can change this by setting RANDOM. */
+ static unsigned long rseed = 1;
+ static int last_random_value;
+@@ -1060,6 +1061,21 @@
+ last_random_value = 0;
+ }
+
++#else
++
++static int last_sbrand_pid;
++
++static int brand ()
++{
++ return random() & 32767;
++}
++
++static void sbrand (unsigned long seed)
++{
++ srandom(seed);
++}
++#endif
++
+ static SHELL_VAR *
+ assign_random (self, value, unused)
+ SHELL_VAR *self;
+@@ -1075,6 +1091,7 @@
+ {
+ int rv;
+
++#if !defined(linux)
+ /* Reset for command and process substitution. */
+ if (subshell_environment)
+ sbrand (rseed + getpid() + NOW);
+@@ -1082,6 +1099,18 @@
+ do
+ rv = brand ();
+ while (rv == last_random_value);
++#else
++ if (subshell_environment)
++ {
++ int mypid = getpid();
++ if (mypid != last_sbrand_pid)
++ {
++ last_sbrand_pid = mypid;
++ sbrand (mypid + NOW);
++ }
++ }
++ rv = brand();
++#endif
+ return rv;
+ }
+
+@@ -1093,7 +1122,9 @@
+ char *p;
+
+ rv = get_random_number ();
++#if !defined(linux)
+ last_random_value = rv;
++#endif
+ p = itos (rv);
+
+ FREE (value_cell (var));
diff --git a/SOURCES/bash-3.0-decl.patch b/SOURCES/bash-3.0-decl.patch
new file mode 100644
index 0000000..91a3aa6
--- /dev/null
+++ b/SOURCES/bash-3.0-decl.patch
@@ -0,0 +1,10 @@
+--- support/printenv.c
++++ support/printenv.c 2005-09-19 15:09:08.000000000 +0200
+@@ -24,6 +24,7 @@
+ with Bash; see the file COPYING. If not, write to the Free Software
+ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
+
++#include <string.h>
+ extern char **environ;
+
+ int
diff --git a/SOURCES/bash-3.0-evalexp.patch b/SOURCES/bash-3.0-evalexp.patch
new file mode 100644
index 0000000..11b28cd
--- /dev/null
+++ b/SOURCES/bash-3.0-evalexp.patch
@@ -0,0 +1,13 @@
+--- expr.c
++++ expr.c 2004-07-30 16:39:48.000000000 +0200
+@@ -406,8 +406,8 @@
+ value = expcond ();
+ if (curtok == EQ || curtok == OP_ASSIGN)
+ {
+- int special, op;
+- intmax_t lvalue;
++ int special, op = -1;
++ intmax_t lvalue = 0;
+
+ special = curtok == OP_ASSIGN;
+
diff --git a/SOURCES/bash-3.0-nfs_redir.patch b/SOURCES/bash-3.0-nfs_redir.patch
new file mode 100644
index 0000000..ac245c9
--- /dev/null
+++ b/SOURCES/bash-3.0-nfs_redir.patch
@@ -0,0 +1,148 @@
+--- redir.c
++++ redir.c 2005-01-28 15:22:21.950230271 +0100
+@@ -169,12 +169,13 @@
+ how to undo the redirections later, if non-zero. If flags & RX_CLEXEC
+ is non-zero, file descriptors opened in do_redirection () have their
+ close-on-exec flag set. */
++static int close_before_dup2_err;
+ int
+ do_redirections (list, flags)
+ REDIRECT *list;
+ int flags;
+ {
+- int error;
++ int error, ret = 0;
+ REDIRECT *temp;
+
+ if (flags & RX_UNDOABLE)
+@@ -190,14 +191,21 @@
+
+ for (temp = list; temp; temp = temp->next)
+ {
++ close_before_dup2_err = 0;
+ error = do_redirection_internal (temp, flags);
+ if (error)
+ {
+ redirection_error (temp, error);
+ return (error);
+ }
++ if (close_before_dup2_err)
++ {
++ redirection_error (temp, close_before_dup2_err);
++ ret = close_before_dup2_err;
++ }
+ }
+- return (0);
++
++ return (ret);
+ }
+
+ /* Return non-zero if the redirection pointed to by REDIRECT has a
+@@ -759,6 +767,8 @@
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+ #endif
++ if ((fd != redirector) && (close(redirector) < 0) && (errno != EBADF))
++ close_before_dup2_err = errno;
+
+ if ((fd != redirector) && (dup2 (fd, redirector) < 0))
+ return (errno);
+@@ -838,6 +848,9 @@
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+ #endif
++ if ((fd != redirector) && (close(redirector) < 0) && (errno != EBADF))
++ close_before_dup2_err = errno;
++
+ if (fd != redirector && dup2 (fd, redirector) < 0)
+ {
+ r = errno;
+@@ -880,6 +893,9 @@
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+ #endif
++ if ((close(redirector) < 0) && (errno != EBADF))
++ close_before_dup2_err = errno;
++
+ /* This is correct. 2>&1 means dup2 (1, 2); */
+ if (dup2 (redir_fd, redirector) < 0)
+ return (errno);
+--- execute_cmd.c
++++ execute_cmd.c 2005-01-28 16:09:10.383937390 +0100
+@@ -119,7 +119,7 @@
+ static void do_piping __P((int, int));
+ static void bind_lastarg __P((char *));
+ static int shell_control_structure __P((enum command_type));
+-static void cleanup_redirects __P((REDIRECT *));
++static int cleanup_redirects __P((REDIRECT *));
+
+ #if defined (JOB_CONTROL)
+ static int restore_signal_mask __P((sigset_t *));
+@@ -393,12 +393,13 @@
+
+ /* A function to use to unwind_protect the redirection undo list
+ for loops. */
+-static void
++static int
+ cleanup_redirects (list)
+ REDIRECT *list;
+ {
+- do_redirections (list, RX_ACTIVE);
++ int ret = do_redirections (list, RX_ACTIVE);
+ dispose_redirects (list);
++ return (ret ? 1 : 0);
+ }
+
+ #if 0
+@@ -603,7 +604,7 @@
+ redirection.) */
+ if (do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
+ {
+- cleanup_redirects (redirection_undo_list);
++ (void)cleanup_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+ dispose_exec_redirects ();
+ return (EXECUTION_FAILURE);
+@@ -2593,7 +2594,7 @@
+ int pipe_in, pipe_out, async;
+ pid_t old_last_command_subst_pid;
+ {
+- int r;
++ int r, s;
+
+ if (pipe_in != NO_PIPE || pipe_out != NO_PIPE || async)
+ {
+@@ -2632,10 +2633,10 @@
+ substitution. Otherwise, return EXECUTION_SUCCESS. */
+
+ r = do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE);
+- cleanup_redirects (redirection_undo_list);
++ s = cleanup_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+
+- if (r != 0)
++ if (r != 0 || s != 0)
+ return (EXECUTION_FAILURE);
+ else if (old_last_command_subst_pid != last_command_subst_pid)
+ return (last_command_exit_value);
+@@ -3404,7 +3405,7 @@
+
+ if (do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
+ {
+- cleanup_redirects (redirection_undo_list);
++ (void)cleanup_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+ dispose_exec_redirects ();
+ return (EX_REDIRFAIL); /* was EXECUTION_FAILURE */
+@@ -3463,8 +3464,10 @@
+
+ if (redirection_undo_list)
+ {
+- cleanup_redirects (redirection_undo_list);
++ int ret = cleanup_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
++ if (result == 0)
++ result = ret;
+ }
+
+ return (result);
diff --git a/SOURCES/bash-3.0-warn-locale.patch b/SOURCES/bash-3.0-warn-locale.patch
new file mode 100644
index 0000000..ed6215a
--- /dev/null
+++ b/SOURCES/bash-3.0-warn-locale.patch
@@ -0,0 +1,29 @@
+--- locale.c
++++ locale.c 2004-09-03 12:56:10.000000000 +0200
+@@ -29,6 +29,10 @@
+ #include "bashintl.h"
+ #include "bashansi.h"
+ #include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#include <errno.h>
+ #include "chartypes.h"
+
+ #include "shell.h"
+@@ -63,6 +67,15 @@
+ set_default_locale ()
+ {
+ #if defined (HAVE_SETLOCALE)
++ struct stat st;
++
++ if (stat("/usr/lib/locale/locale-archive", &st) == 0 && st.st_size == 0) {
++ errno = EINVAL;
++ sys_error("set_default_locale: broken locale");
++ fprintf (stderr, "%s: Please remove /usr/lib/locale/locale-archive\n",
++ get_name_for_error());
++ sleep(1);
++ }
+ default_locale = setlocale (LC_ALL, "");
+ if (default_locale)
+ default_locale = savestring (default_locale);
diff --git a/SOURCES/bash-3.1-directory.patch b/SOURCES/bash-3.1-directory.patch
new file mode 100644
index 0000000..9e57847
--- /dev/null
+++ b/SOURCES/bash-3.1-directory.patch
@@ -0,0 +1,38 @@
+--- bashline.c
++++ bashline.c 2005-12-09 14:53:53.000000000 +0100
+@@ -1157,7 +1157,7 @@
+ }
+ else
+ {
+-#define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && absolute_program(x) == 0 && *(x) != '~' && test_for_directory (x))
++#define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && absolute_program(x) == 0 && *(x) != '~')
+
+ dot_in_path = 0;
+ matches = rl_completion_matches (text, command_word_completion_function);
+@@ -1169,13 +1169,14 @@
+ filenames and leave directories in the match list. */
+ if (matches == (char **)NULL)
+ rl_ignore_some_completions_function = bash_ignore_filenames;
+- else if (matches[1] == 0 && CMD_IS_DIR(matches[0]) && dot_in_path == 0)
++ else if (matches[1] == 0 && matches[0] && CMD_IS_DIR(matches[0]) && dot_in_path == 0)
+ /* If we found a single match, without looking in the current
+ directory (because it's not in $PATH), but the found name is
+ also a command in the current directory, suppress appending any
+ terminating character, since it's ambiguous. */
+ {
+- rl_completion_suppress_append = 1;
++ if (test_for_directory(matches[0]))
++ rl_completion_suppress_append = 1;
+ rl_filename_completion_desired = 0;
+ }
+ else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
+@@ -1188,7 +1189,8 @@
+ completion. If there are multiple completions this won't
+ make a difference and the problem won't occur. */
+ {
+- rl_completion_suppress_append = 1;
++ if (test_for_directory(matches[0]))
++ rl_completion_suppress_append = 1;
+ rl_filename_completion_desired = 0;
+ }
+ }
diff --git a/SOURCES/bash-3.1-extended_quote.patch b/SOURCES/bash-3.1-extended_quote.patch
new file mode 100644
index 0000000..14e98c8
--- /dev/null
+++ b/SOURCES/bash-3.1-extended_quote.patch
@@ -0,0 +1,19 @@
+*** parse.y
+--- parse.y Tue Jan 10 11:36:59 2006
+***************
+*** 2842,2848 ****
+ ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
+ xfree (nestret);
+
+! if ((rflags & P_DQUOTE) == 0)
+ {
+ nestret = sh_single_quote (ttrans);
+ free (ttrans);
+--- 2842,2848 ----
+ ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
+ xfree (nestret);
+
+! if (extended_quote || (rflags & P_DQUOTE) == 0)
+ {
+ nestret = sh_single_quote (ttrans);
+ free (ttrans);
diff --git a/SOURCES/bash-3.1-loadables.dif b/SOURCES/bash-3.1-loadables.dif
new file mode 100644
index 0000000..0d14df4
--- /dev/null
+++ b/SOURCES/bash-3.1-loadables.dif
@@ -0,0 +1,689 @@
+--- examples/loadables/Makefile.in
++++ examples/loadables/Makefile.in 2006-09-25 13:31:55.000000000 +0200
+@@ -81,7 +81,7 @@
+ $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
+
+
+-ALLPROG = print truefalse sleep pushd finfo logname basename dirname \
++ALLPROG = print sleep finfo logname basename dirname \
+ tty pathchk tee head mkdir rmdir printenv id whoami \
+ uname sync push ln unlink cut realpath getconf strftime
+ OTHERPROG = necho hello cat
+--- examples/loadables/basename.c
++++ examples/loadables/basename.c 2006-09-25 13:49:31.000000000 +0200
+@@ -9,9 +9,12 @@
+ #endif
+
+ #include <stdio.h>
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+
++int
+ basename_builtin (list)
+ WORD_LIST *list;
+ {
+--- examples/loadables/cat.c
++++ examples/loadables/cat.c 2006-09-25 13:37:46.000000000 +0200
+@@ -7,8 +7,10 @@
+ #include <fcntl.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+
+ #ifndef errno
+ extern int errno;
+--- examples/loadables/cut.c
++++ examples/loadables/cut.c 2006-09-25 14:00:21.000000000 +0200
+@@ -60,8 +60,10 @@
+ # include <unistd.h>
+ #endif
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ #if !defined (errno)
+@@ -243,7 +245,7 @@
+ pos = positions + 1;
+ for (col = maxval; col; --col) {
+ if ((ch = getc(fp)) == EOF)
+- return;
++ return (0);
+ if (ch == '\n')
+ break;
+ if (*pos++)
+--- examples/loadables/dirname.c
++++ examples/loadables/dirname.c 2006-09-25 13:49:38.000000000 +0200
+@@ -9,9 +9,12 @@
+ #endif
+
+ #include <stdio.h>
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+
++int
+ dirname_builtin (list)
+ WORD_LIST *list;
+ {
+--- examples/loadables/finfo.c
++++ examples/loadables/finfo.c 2006-09-25 13:48:52.000000000 +0200
+@@ -16,6 +16,8 @@
+ #include "bashansi.h"
+ #include "shell.h"
+ #include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "common.h"
+
+ #ifndef errno
+@@ -77,7 +79,7 @@
+ char **argv;
+ {
+ register int i;
+- int mode, flags, opt;
++ int flags, opt;
+
+ sh_optind = 0; /* XXX */
+ prog = base_pathname(argv[0]);
+@@ -170,7 +172,7 @@
+ return (m & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID));
+ }
+
+-static int
++static void
+ perms(m)
+ int m;
+ {
+@@ -214,7 +216,7 @@
+ printf ("u=%s,g=%s,o=%s", ubits, gbits, obits);
+ }
+
+-static int
++static void
+ printmode(mode)
+ int mode;
+ {
+@@ -309,13 +311,13 @@
+ else
+ printf("%ld\n", st->st_ctime);
+ } else if (flags & OPT_DEV)
+- printf("%d\n", st->st_dev);
++ printf("%lu\n", (ulong)st->st_dev);
+ else if (flags & OPT_INO)
+- printf("%d\n", st->st_ino);
++ printf("%lu\n", (ulong)st->st_ino);
+ else if (flags & OPT_FID)
+- printf("%d:%ld\n", st->st_dev, st->st_ino);
++ printf("%lu:%lu\n", (ulong)st->st_dev, (ulong)st->st_ino);
+ else if (flags & OPT_NLINK)
+- printf("%d\n", st->st_nlink);
++ printf("%lu\n", (ulong)st->st_nlink);
+ else if (flags & OPT_LNKNAM) {
+ #ifdef S_ISLNK
+ b = xmalloc(4096);
+@@ -365,7 +367,6 @@
+ {
+ int c, r;
+ char **v;
+- WORD_LIST *l;
+
+ v = make_builtin_argv (list, &c);
+ r = finfo_main (c, v);
+--- examples/loadables/getconf.c
++++ examples/loadables/getconf.c 2006-09-25 14:02:33.000000000 +0200
+@@ -65,6 +65,8 @@
+ #include "bashansi.h"
+ #include "shell.h"
+ #include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "stdc.h"
+ #include "common.h"
+ #include "bashgetopt.h"
+@@ -1119,8 +1121,6 @@
+ { NULL }
+ };
+
+-static int num_getconf_variables = sizeof(conf_table) / sizeof(struct conf_variable) - 1;
+-
+ extern char *this_command_name;
+ extern char **make_builtin_argv ();
+
+@@ -1133,8 +1133,7 @@
+ getconf_builtin (list)
+ WORD_LIST *list;
+ {
+- int c, r, opt, aflag;
+- char **v;
++ int r, opt, aflag;
+
+ aflag = 0;
+ reset_internal_getopt();
+@@ -1169,7 +1168,6 @@
+ getconf_help()
+ {
+ const struct conf_variable *cp;
+- register int i, column;
+
+ builtin_usage();
+ printf("Acceptable variable names are:\n");
+--- examples/loadables/head.c
++++ examples/loadables/head.c 2006-09-25 13:55:24.000000000 +0200
+@@ -20,6 +20,8 @@
+
+ #include "builtins.h"
+ #include "shell.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ #if !defined (errno)
+@@ -69,8 +71,10 @@
+ break;
+ }
+ }
++ return EXECUTION_SUCCESS;
+ }
+
++int
+ head_builtin (list)
+ WORD_LIST *list;
+ {
+@@ -78,8 +82,6 @@
+ WORD_LIST *l;
+ FILE *fp;
+
+- char *t;
+-
+ munge_list (list); /* change -num into -n num */
+
+ reset_internal_getopt ();
+--- examples/loadables/hello.c
++++ examples/loadables/hello.c 2006-09-25 13:38:25.000000000 +0200
+@@ -11,8 +11,10 @@
+
+ #include <stdio.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ /* A builtin `xxx' is normally implemented with an `xxx_builtin' function.
+--- examples/loadables/id.c
++++ examples/loadables/id.c 2006-09-25 13:57:41.000000000 +0200
+@@ -29,6 +29,8 @@
+
+ #include "shell.h"
+ #include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "stdc.h"
+ #include "common.h"
+ #include "bashgetopt.h"
+@@ -46,8 +48,6 @@
+ static uid_t ruid, euid;
+ static gid_t rgid, egid;
+
+-static char *id_user;
+-
+ static int inituser ();
+
+ static int id_pruser ();
+--- examples/loadables/ln.c
++++ examples/loadables/ln.c 2006-09-25 13:59:09.000000000 +0200
+@@ -15,8 +15,10 @@
+ #include <stdio.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ #if !defined (errno)
+@@ -31,6 +33,7 @@
+ static unix_link_syscall_t *linkfn;
+ static int dolink ();
+
++int
+ ln_builtin (list)
+ WORD_LIST *list;
+ {
+--- examples/loadables/logname.c
++++ examples/loadables/logname.c 2006-09-25 13:30:40.000000000 +0200
+@@ -9,8 +9,10 @@
+ #include <stdio.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/common.h"
++#include "builtins/builtext.h"
+
+ #if !defined (errno)
+ extern int errno;
+--- examples/loadables/mkdir.c
++++ examples/loadables/mkdir.c 2006-09-25 13:56:07.000000000 +0200
+@@ -13,8 +13,10 @@
+ # include <unistd.h>
+ #endif
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ #if !defined (errno)
+@@ -33,7 +35,7 @@
+ mkdir_builtin (list)
+ WORD_LIST *list;
+ {
+- int opt, pflag, omode, rval, octal, nmode, parent_mode, um;
++ int opt, pflag, omode, rval, octal, nmode, parent_mode;
+ char *mode;
+ WORD_LIST *l;
+
+@@ -150,7 +152,7 @@
+ while (*p == '/')
+ p++;
+
+- while (p = strchr (p, '/'))
++ while ((p = strchr (p, '/')))
+ {
+ *p = '\0';
+ if (stat (npath, &sb) != 0)
+--- examples/loadables/necho.c
++++ examples/loadables/necho.c 2006-09-25 13:39:26.000000000 +0200
+@@ -3,9 +3,15 @@
+ /* Sample builtin to be dynamically loaded with enable -f and replace an
+ existing builtin. */
+
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <stdio.h>
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+
+ necho_builtin (list)
+ WORD_LIST *list;
+--- examples/loadables/pathchk.c
++++ examples/loadables/pathchk.c 2006-09-25 13:53:13.000000000 +0200
+@@ -40,8 +40,10 @@
+ #include <stdio.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "stdc.h"
+ #include "bashgetopt.h"
+ #include "maxpath.h"
+@@ -79,6 +81,7 @@
+
+ static int validate_path ();
+
++int
+ pathchk_builtin (list)
+ WORD_LIST *list;
+ {
+@@ -257,7 +260,7 @@
+ char *path;
+ int portability;
+ {
+- int path_max;
++ size_t path_max;
+ int last_elem; /* Nonzero if checking last element of path. */
+ int exists; /* 2 if the path element exists. */
+ char *slash;
+@@ -269,10 +272,8 @@
+ if (*path == '\0')
+ return 0;
+
+-#ifdef lint
+ /* Suppress `used before initialized' warning. */
+ exists = 0;
+-#endif
+
+ /* Figure out the parent of the first element in PATH. */
+ parent = xstrdup (*path == '/' ? "/" : ".");
+@@ -349,7 +350,7 @@
+ free (parent);
+ if (strlen (path) > path_max)
+ {
+- builtin_error ("path `%s' has length %d; exceeds limit of %d",
++ builtin_error ("path `%s' has length %zu; exceeds limit of %zu",
+ path, strlen (path), path_max);
+ return 1;
+ }
+--- examples/loadables/print.c
++++ examples/loadables/print.c 2006-09-25 13:23:46.000000000 +0200
+@@ -15,6 +15,8 @@
+ #include "bashansi.h"
+ #include "shell.h"
+ #include "builtins.h"
++#include "builtins/common.h"
++#include "builtins/builtext.h"
+ #include "stdc.h"
+ #include "bashgetopt.h"
+
+@@ -55,7 +57,7 @@
+ {
+ int c, r, nflag, raw, ofd, sflag;
+ intmax_t lfd;
+- char **v, *pfmt, *arg;
++ char *pfmt;
+ WORD_LIST *l;
+
+ nflag = raw = sflag = 0;
+--- examples/loadables/printenv.c
++++ examples/loadables/printenv.c 2006-09-25 13:39:47.000000000 +0200
+@@ -8,8 +8,10 @@
+ #include <config.h>
+ #include <stdio.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ extern char **export_env;
+--- examples/loadables/push.c
++++ examples/loadables/push.c 2006-09-25 13:39:53.000000000 +0200
+@@ -7,8 +7,10 @@
+ #include <stdio.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "jobs.h"
+ #include "bashgetopt.h"
+
+--- examples/loadables/realpath.c
++++ examples/loadables/realpath.c 2006-09-25 14:03:01.000000000 +0200
+@@ -31,8 +31,10 @@
+ #include <maxpath.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ #ifndef errno
+@@ -41,6 +43,7 @@
+
+ extern char *sh_realpath();
+
++int
+ realpath_builtin(list)
+ WORD_LIST *list;
+ {
+@@ -67,14 +70,14 @@
+ vflag = 1;
+ break;
+ default:
+- usage();
++ builtin_usage();
+ }
+ }
+
+ list = loptend;
+
+ if (list == 0)
+- usage();
++ builtin_usage();
+
+ for (es = EXECUTION_SUCCESS; list; list = list->next) {
+ p = list->word->word;
+--- examples/loadables/rmdir.c
++++ examples/loadables/rmdir.c 2006-09-25 13:56:28.000000000 +0200
+@@ -6,13 +6,16 @@
+
+ #include <stdio.h>
+ #include <errno.h>
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+
+ #if !defined (errno)
+ extern int errno;
+ #endif
+
++int
+ rmdir_builtin (list)
+ WORD_LIST *list;
+ {
+--- examples/loadables/sleep.c
++++ examples/loadables/sleep.c 2006-09-25 13:24:54.000000000 +0200
+@@ -27,6 +27,8 @@
+
+ #include "shell.h"
+ #include "builtins.h"
++#include "builtins/common.h"
++#include "builtins/builtext.h"
+
+ #define RETURN(x) \
+ do { \
+--- examples/loadables/strftime.c
++++ examples/loadables/strftime.c 2006-09-25 13:40:17.000000000 +0200
+@@ -13,8 +13,10 @@
+
+ #include <stdio.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "common.h"
+
+ int
+--- examples/loadables/sync.c
++++ examples/loadables/sync.c 2006-09-25 13:58:50.000000000 +0200
+@@ -6,10 +6,13 @@
+ #include <unistd.h>
+ #endif
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
++int
+ sync_builtin (list)
+ WORD_LIST *list;
+ {
+--- examples/loadables/tee.c
++++ examples/loadables/tee.c 2006-09-25 13:54:21.000000000 +0200
+@@ -19,8 +19,10 @@
+ #include <stdio.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ #if !defined (errno)
+@@ -41,6 +43,7 @@
+
+ extern char *strerror ();
+
++int
+ tee_builtin (list)
+ WORD_LIST *list;
+ {
+@@ -49,8 +52,6 @@
+ FLIST *fl;
+ char *buf, *bp;
+
+- char *t;
+-
+ reset_internal_getopt ();
+ append = nointr = 0;
+ tee_flist = (FLIST *)NULL;
+--- examples/loadables/template.c
++++ examples/loadables/template.c 2006-09-25 13:40:33.000000000 +0200
+@@ -11,8 +11,10 @@
+ #include <stdio.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ #if !defined (errno)
+--- examples/loadables/truefalse.c
++++ examples/loadables/truefalse.c 2006-09-25 13:40:42.000000000 +0200
+@@ -1,16 +1,22 @@
+ /* true and false builtins */
+
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include "bashtypes.h"
+ #include "shell.h"
+ #include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+
+-true_builtin (list)
++int true_builtin (list)
+ WORD_LIST *list;
+ {
+ return EXECUTION_SUCCESS;
+ }
+
+-false_builtin (list)
++int false_builtin (list)
+ WORD_LIST *list;
+ {
+ return EXECUTION_FAILURE;
+--- examples/loadables/tty.c
++++ examples/loadables/tty.c 2006-09-25 13:49:53.000000000 +0200
+@@ -5,12 +5,15 @@
+ #include "config.h"
+
+ #include <stdio.h>
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ extern char *ttyname ();
+
++int
+ tty_builtin (list)
+ WORD_LIST *list;
+ {
+--- examples/loadables/uname.c
++++ examples/loadables/uname.c 2006-09-25 13:58:18.000000000 +0200
+@@ -24,8 +24,10 @@
+
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
+ #define FLAG_SYSNAME 0x01 /* -s */
+@@ -44,10 +46,11 @@
+
+ static int uname_flags;
+
++int
+ uname_builtin (list)
+ WORD_LIST *list;
+ {
+- int opt, r;
++ int opt;
+ struct utsname uninfo;
+
+ uname_flags = 0;
+--- examples/loadables/unlink.c
++++ examples/loadables/unlink.c 2006-09-25 13:59:37.000000000 +0200
+@@ -12,13 +12,16 @@
+ #include <stdio.h>
+ #include <errno.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+
+ #ifndef errno
+ extern int errno;
+ #endif
+
++int
+ unlink_builtin (list)
+ WORD_LIST *list;
+ {
+--- examples/loadables/whoami.c
++++ examples/loadables/whoami.c 2006-09-25 13:57:54.000000000 +0200
+@@ -5,10 +5,13 @@
+ #include <config.h>
+ #include <stdio.h>
+
+-#include "builtins.h"
+ #include "shell.h"
++#include "builtins.h"
++#include "builtins/builtext.h"
++#include "builtins/common.h"
+ #include "bashgetopt.h"
+
++int
+ whoami_builtin (list)
+ WORD_LIST *list;
+ {
diff --git a/SOURCES/bash-3.1-patches.tar.bz2 b/SOURCES/bash-3.1-patches.tar.bz2
new file mode 100644
index 0000000..b9c286c
--- /dev/null
+++ b/SOURCES/bash-3.1-patches.tar.bz2
Binary files differ
diff --git a/SOURCES/bash-3.1-printf.patch b/SOURCES/bash-3.1-printf.patch
new file mode 100644
index 0000000..56a1152
--- /dev/null
+++ b/SOURCES/bash-3.1-printf.patch
@@ -0,0 +1,44 @@
+--- builtins/printf.def
++++ builtins/printf.def 2006-07-27 17:11:19.000000000 +0200
+@@ -37,6 +37,7 @@ shell variable VAR rather than being sen
+ $END
+
+ #include <config.h>
++#include <locale.h>
+
+ #include "../bashtypes.h"
+
+@@ -132,6 +133,11 @@ extern int errno;
+ vbuf = 0; \
+ } \
+ fflush (stdout); \
++ if (ferror (stdout)) \
++ { \
++ clearerr (stdout); \
++ return (EXECUTION_FAILURE); \
++ } \
+ return (value); \
+ } \
+ while (0)
+@@ -487,12 +493,20 @@ printf_builtin (list)
+ case 'A':
+ #endif
+ {
+- char *f;
++ char *f, *lce = getenv("LC_NUMERIC"), *lcl = setlocale(LC_NUMERIC, NULL);
+ floatmax_t p;
+
+ p = getfloatmax ();
+ f = mklong (start, FLOATMAX_CONV, sizeof(FLOATMAX_CONV) - 1);
++
++ if (lce && lcl)
++ setlocale(LC_NUMERIC, lce);
++
+ PF (f, p);
++
++ if (lce && lcl)
++ setlocale(LC_NUMERIC, lcl);
++
+ break;
+ }
+
diff --git a/SOURCES/bash-3.1-random.patch b/SOURCES/bash-3.1-random.patch
new file mode 100644
index 0000000..07822e0
--- /dev/null
+++ b/SOURCES/bash-3.1-random.patch
@@ -0,0 +1,16 @@
+ builtins/printf.def | 2 +-
+ 1 files changed, 1 insertion(+), 1 deletion(-)
+
+Index: bash-3.1/builtins/printf.def
+===================================================================
+--- bash-3.1.orig/builtins/printf.def 2005-12-12 16:00:42.000000000 +0100
++++ bash-3.1/builtins/printf.def 2005-12-12 16:01:38.000000000 +0100
+@@ -558,7 +558,7 @@ printstr (fmt, string, len, fieldwidth,
+ #else
+ if (string == 0 || len == 0)
+ #endif
+- return;
++ return 0;
+
+ #if 0
+ s = fmt;
diff --git a/SOURCES/bash-3.1-wcschr.dif b/SOURCES/bash-3.1-wcschr.dif
new file mode 100644
index 0000000..00c3aaa
--- /dev/null
+++ b/SOURCES/bash-3.1-wcschr.dif
@@ -0,0 +1,13 @@
+--- subst.c
++++ subst.c 2006-05-31 16:59:58.000000000 +0000
+@@ -946,8 +946,9 @@
+ len = mbstowcs (wcharlist, charlist, 0);
+ if (len == -1)
+ len = 0;
+- wcharlist = xmalloc ((sizeof (wchar_t) * len) + 1);
++ wcharlist = xmalloc ((sizeof (wchar_t)) * (len + 1));
+ mbstowcs (wcharlist, charlist, len);
++ wcharlist[len] = (wchar_t)0;
+ }
+
+ if (wcschr (wcharlist, wc))
diff --git a/SOURCES/bash-3.1.dif b/SOURCES/bash-3.1.dif
new file mode 100644
index 0000000..da06e03
--- /dev/null
+++ b/SOURCES/bash-3.1.dif
@@ -0,0 +1,263 @@
+--- .pkgextract
++++ .pkgextract 2006-03-27 14:15:25.000000000 +0200
+@@ -0,0 +1,14 @@
++patch -p0 -s --suffix=".manual" < ../bash-2.03-manual.patch
++patch -p0 -s --suffix=".security" < ../bash-2.05a-security.patch
++patch -p0 -s --suffix=".2.4.4" < ../bash-2.05-2.4.4.patch
++patch -p0 -s --suffix=".directory"< ../bash-3.1-directory.patch
++patch -p0 -s --suffix=".evalexp" < ../bash-3.0-evalexp.patch
++patch -p0 -s --suffix=".warnlc" < ../bash-3.0-warn-locale.patch
++patch -p0 -s --suffix=".nfs_redir"< ../bash-3.0-nfs_redir.patch
++patch -p0 -s --suffix=".decl" < ../bash-3.0-decl.patch
++patch -p1 -s --suffix=".random2" < ../bash-3.1-random.patch
++patch -p0 -s --suffix=".wcschr" < ../bash-3.1-wcschr.dif
++patch -p0 -s --suffix=".zerotty" < ../readline-4.3-input.dif
++patch -p0 -s --suffix=".wrap" < ../readline-5.0-wrap.patch
++patch -p0 -s --suffix=".conf" < ../readline-5.0-conf.patch
++patch -p0 -s --suffix=".random" < ../readline-5.1-random.patch
+--- config-top.h
++++ config-top.h 2006-03-27 14:15:25.000000000 +0200
+@@ -52,14 +52,14 @@
+ /* The default value of the PATH variable. */
+ #ifndef DEFAULT_PATH_VALUE
+ #define DEFAULT_PATH_VALUE \
+- "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
++ "/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:."
+ #endif
+
+ /* The value for PATH when invoking `command -p'. This is only used when
+ the Posix.2 confstr () function, or CS_PATH define are not present. */
+ #ifndef STANDARD_UTILS_PATH
+ #define STANDARD_UTILS_PATH \
+- "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
++ "/bin:/usr/bin:/sbin:/usr/sbin"
+ #endif
+
+ /* Default primary and secondary prompt strings. */
+@@ -73,14 +73,14 @@
+ #define KSH_COMPATIBLE_SELECT
+
+ /* System-wide .bashrc file for interactive shells. */
+-/* #define SYS_BASHRC "/etc/bash.bashrc" */
++#define SYS_BASHRC "/etc/bash.bashrc"
+
+ /* System-wide .bash_logout for login shells. */
+-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
++#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"
+
+ /* Define this to make non-interactive shells begun with argv[0][0] == '-'
+ run the startup files when not in posix mode. */
+-/* #define NON_INTERACTIVE_LOGIN_SHELLS */
++#define NON_INTERACTIVE_LOGIN_SHELLS
+
+ /* Define this if you want bash to try to check whether it's being run by
+ sshd and source the .bashrc if so (like the rshd behavior). */
+--- general.h
++++ general.h 2006-03-27 14:15:25.000000000 +0200
+@@ -21,10 +21,13 @@
+ #if !defined (_GENERAL_H_)
+ #define _GENERAL_H_
+
++#include <time.h>
++#include <sys/types.h>
+ #include "stdc.h"
+
+ #include "bashtypes.h"
+ #include "chartypes.h"
++#include "bashline.h"
+
+ #if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE)
+ # if defined (HAVE_SYS_TIME_H)
+--- jobs.c
++++ jobs.c 2006-03-27 14:15:25.000000000 +0200
+@@ -189,10 +189,10 @@ int previous_job = NO_JOB;
+ #endif
+
+ /* Last child made by the shell. */
+-pid_t last_made_pid = NO_PID;
++volatile pid_t last_made_pid = NO_PID;
+
+ /* Pid of the last asynchronous child. */
+-pid_t last_asynchronous_pid = NO_PID;
++volatile pid_t last_asynchronous_pid = NO_PID;
+
+ /* The pipeline currently being built. */
+ PROCESS *the_pipeline = (PROCESS *)NULL;
+@@ -205,7 +205,7 @@ int already_making_children = 0;
+
+ /* If this is non-zero, $LINES and $COLUMNS are reset after every process
+ exits from get_tty_state(). */
+-int check_window_size;
++int check_window_size = 1;
+
+ /* Functions local to this file. */
+
+--- jobs.h
++++ jobs.h 2006-03-27 14:15:25.000000000 +0200
+@@ -162,7 +162,7 @@ extern pid_t fork (), getpid (), getpgrp
+ extern struct jobstats js;
+
+ extern pid_t original_pgrp, shell_pgrp, pipeline_pgrp;
+-extern pid_t last_made_pid, last_asynchronous_pid;
++extern volatile pid_t last_made_pid, last_asynchronous_pid;
+ extern int asynchronous_notification;
+
+ extern JOB **jobs;
+--- parse.y
++++ parse.y 2006-03-27 14:15:25.000000000 +0200
+@@ -1186,7 +1186,7 @@ input_file_descriptor ()
+
+ #if defined (READLINE)
+ char *current_readline_prompt = (char *)NULL;
+-char *current_readline_line = (char *)NULL;
++unsigned char *current_readline_line = (unsigned char *)NULL;
+ int current_readline_line_index = 0;
+
+ static int
+--- shell.c
++++ shell.c 2006-03-27 14:15:25.000000000 +0200
+@@ -460,7 +460,7 @@ main (argc, argv, env)
+ if (dump_translatable_strings)
+ read_but_dont_execute = 1;
+
+- if (running_setuid && privileged_mode == 0)
++ if (running_setuid && privileged_mode == 0 /* && act_like_sh == 0 */)
+ disable_priv_mode ();
+
+ /* Need to get the argument to a -c option processed in the
+--- subst.c
++++ subst.c 2006-03-27 14:15:25.000000000 +0200
+@@ -2659,6 +2659,7 @@ call_expand_word_internal (w, q, i, c, e
+ last_command_exit_value = EXECUTION_FAILURE;
+ exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF);
+ /* NOTREACHED */
++ return NULL; /* make stupid compiler happy */
+ }
+ else
+ return (result);
+--- test.c
++++ test.c 2006-03-27 14:42:19.000000000 +0200
+@@ -226,6 +226,30 @@ test_eaccess (path, mode)
+ {
+ struct stat st;
+
++#ifdef __linux__
++ if (mode != F_OK)
++ {
++ int result;
++ int saved_errno;
++
++ if (current_user.uid != current_user.euid)
++ setreuid (current_user.euid, current_user.uid);
++ if (current_user.gid != current_user.egid)
++ setregid (current_user.egid, current_user.gid);
++
++ result = access (path, mode);
++ saved_errno = errno;
++
++ if (current_user.uid != current_user.euid)
++ setreuid (current_user.uid, current_user.euid);
++ if (current_user.gid != current_user.egid)
++ setregid (current_user.gid, current_user.egid);
++
++ errno = saved_errno;
++ return (result);
++ }
++#endif
++
+ if (test_stat (path, &st) < 0)
+ return (-1);
+
+--- variables.c
++++ variables.c 2006-03-27 14:15:25.000000000 +0200
+@@ -1183,8 +1183,10 @@ assign_random (self, value, unused)
+ arrayind_t unused;
+ {
+ sbrand (strtoul (value, (char **)NULL, 10));
++#if !defined(linux)
+ if (subshell_environment)
+ seeded_subshell = 1;
++#endif
+ return (self);
+ }
+
+--- builtins/shopt.def
++++ builtins/shopt.def 2006-03-27 14:15:25.000000000 +0200
+@@ -252,9 +252,9 @@ reset_shopt_options ()
+ allow_null_glob_expansion = glob_dot_filenames = 0;
+ cdable_vars = mail_warning = 0;
+ no_exit_on_failed_exec = print_shift_error = 0;
+- check_hashed_filenames = cdspelling = expand_aliases = check_window_size = 0;
++ check_hashed_filenames = cdspelling = expand_aliases = 0;
+
+- source_uses_path = promptvars = 1;
++ check_window_size = source_uses_path = promptvars = 1;
+
+ #if defined (EXTENDED_GLOB)
+ extended_glob = 0;
+--- doc/Makefile.in
++++ doc/Makefile.in 2006-03-27 14:15:25.000000000 +0200
+@@ -141,7 +141,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $
+ ${RM} $@
+ -${DVIPS} $<
+
+-all: ps info dvi text html
++all: info html
+ nodvi: ps info text html
+
+ PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
+--- doc/bash.1
++++ doc/bash.1 2006-03-27 14:15:25.000000000 +0200
+@@ -4361,8 +4361,8 @@ file (the \fIinputrc\fP file).
+ The name of this file is taken from the value of the
+ .SM
+ .B INPUTRC
+-variable. If that variable is unset, the default is
+-.IR ~/.inputrc .
++environment variable. If that variable is unset, readline will read both
++.IR /etc/inputrc " and " ~/.inputrc .
+ When a program which uses the readline library starts up, the
+ initialization file is read, and the key bindings and variables
+ are set.
+@@ -8796,6 +8796,9 @@ The individual login shell cleanup file,
+ .TP
+ .FN ~/.inputrc
+ Individual \fIreadline\fP initialization file
++.TP
++.FN /etc/inputrc
++System \fBreadline\fP initialization file
+ .PD
+ .SH AUTHORS
+ Brian Fox, Free Software Foundation
+--- support/rlvers.sh
++++ support/rlvers.sh 2006-03-27 14:15:25.000000000 +0200
+@@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers
+
+ # defaults
+ CC=cc
+-RL_LIBDIR=/usr/local/lib
+-RL_INCDIR=/usr/local/include
++RL_LIBDIR=/lib
++RL_INCDIR=/usr/include
+
+-TERMCAP_LIB="-ltermcap"
++TERMCAP_LIB="-lncurses"
+
+ # cannot rely on the presence of getopts
+ while [ $# -gt 0 ]; do
+--- support/shobj-conf
++++ support/shobj-conf 2006-09-22 16:11:58.000000000 +0200
+@@ -108,10 +108,11 @@ sunos5*|solaris2*)
+ linux*-*|gnu*-*|k*bsd*-gnu-*)
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
++ SHOBJ_LDFLAGS='-shared'
+
+- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
++ SHLIB_XLDFLAGS='-Wl,-rpath-link,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
++ SHLIB_LIBS=-lncurses
+ ;;
+
+ freebsd2* | netbsd*)
diff --git a/SOURCES/bash-3.1.tar.bz2 b/SOURCES/bash-3.1.tar.bz2
new file mode 100644
index 0000000..69000b3
--- /dev/null
+++ b/SOURCES/bash-3.1.tar.bz2
Binary files differ
diff --git a/SOURCES/eol-pushback.patch b/SOURCES/eol-pushback.patch
new file mode 100644
index 0000000..964b91f
--- /dev/null
+++ b/SOURCES/eol-pushback.patch
@@ -0,0 +1,11 @@
+*** ../bash-20140912/parse.y 2014-08-26 15:09:42.000000000 -0400
+--- parse.y 2014-09-24 22:47:28.000000000 -0400
+***************
+*** 2959,2962 ****
+--- 2959,2964 ----
+ word_desc_to_read = (WORD_DESC *)NULL;
+
++ eol_ungetc_lookahead = 0;
++
+ current_token = '\n'; /* XXX */
+ last_read_token = '\n';
diff --git a/SOURCES/funcdef-import-3.1.patch b/SOURCES/funcdef-import-3.1.patch
new file mode 100644
index 0000000..4393211
--- /dev/null
+++ b/SOURCES/funcdef-import-3.1.patch
@@ -0,0 +1,72 @@
+*** ../bash-3.1.17/builtins/common.h 2004-09-09 13:21:08.000000000 -0400
+--- builtins/common.h 2014-09-16 22:00:02.000000000 -0400
+***************
+*** 34,37 ****
+--- 34,39 ----
+
+ /* Flags for describe_command, shared between type.def and command.def */
++ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */
++ #define SEVAL_ONECMD 0x100 /* only allow a single command */
+ #define CDESC_ALL 0x001 /* type -a */
+ #define CDESC_SHORTDESC 0x002 /* command -V */
+*** ../bash-3.1.17/builtins/evalstring.c 2005-10-30 18:28:24.000000000 -0500
+--- builtins/evalstring.c 2014-09-16 22:00:02.000000000 -0400
+***************
+*** 224,227 ****
+--- 224,235 ----
+ struct fd_bitmap *bitmap;
+
++ if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
++ {
++ internal_warning ("%s: ignoring function definition attempt", from_file);
++ should_jump_to_top_level = 0;
++ last_result = last_command_exit_value = EX_BADUSAGE;
++ break;
++ }
++
+ bitmap = new_fd_bitmap (FD_BITMAP_SIZE);
+ begin_unwind_frame ("pe_dispose");
+***************
+*** 279,282 ****
+--- 287,293 ----
+ dispose_fd_bitmap (bitmap);
+ discard_unwind_frame ("pe_dispose");
++
++ if (flags & SEVAL_ONECMD)
++ break;
+ }
+ }
+*** ../bash-3.1.17/variables.c 2006-03-10 16:56:29.000000000 -0500
+--- variables.c 2014-09-16 22:00:02.000000000 -0400
+***************
+*** 311,320 ****
+ strcpy (temp_string + char_index + 1, string);
+
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
+!
+! /* Ancient backwards compatibility. Old versions of bash exported
+! functions like name()=() {...} */
+! if (name[char_index - 1] == ')' && name[char_index - 2] == '(')
+! name[char_index - 2] = '\0';
+
+ if (temp_var = find_function (name))
+--- 311,318 ----
+ strcpy (temp_string + char_index + 1, string);
+
+! /* Don't import function names that are invalid identifiers from the
+! environment. */
+! if (legal_identifier (name))
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+ if (temp_var = find_function (name))
+***************
+*** 325,332 ****
+ else
+ report_error (_("error importing function definition for `%s'"), name);
+-
+- /* ( */
+- if (name[char_index - 1] == ')' && name[char_index - 2] == '\0')
+- name[char_index - 2] = '('; /* ) */
+ }
+ #if defined (ARRAY_VARS)
+--- 323,326 ----
diff --git a/SOURCES/readline-4.3-input.dif b/SOURCES/readline-4.3-input.dif
new file mode 100644
index 0000000..ad51e5c
--- /dev/null
+++ b/SOURCES/readline-4.3-input.dif
@@ -0,0 +1,46 @@
+--- lib/readline/input.c
++++ lib/readline/input.c Mon Mar 17 19:03:51 2003
+@@ -415,6 +415,8 @@
+ return (c);
+ }
+
++extern int _rl_read_zero_char_from_tty;
++
+ int
+ rl_getc (stream)
+ FILE *stream;
+@@ -432,7 +434,10 @@
+ /* If zero characters are returned, then the file that we are
+ reading from is empty! Return EOF in that case. */
+ if (result == 0)
+- return (EOF);
++ {
++ _rl_read_zero_char_from_tty = 1;
++ return (EOF);
++ }
+
+ #if defined (__BEOS__)
+ if (errno == EINTR)
+--- lib/readline/readline.c
++++ lib/readline/readline.c Mon Mar 17 19:02:52 2003
+@@ -387,6 +387,9 @@
+ return (eof ? (char *)NULL : savestring (the_line));
+ }
+
++/* Catch EOF from tty, do not return command line */
++int _rl_read_zero_char_from_tty = 0;
++
+ STATIC_CALLBACK int
+ #if defined (READLINE_CALLBACKS)
+ readline_internal_char ()
+@@ -421,6 +424,10 @@
+ RL_SETSTATE(RL_STATE_READCMD);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_READCMD);
++
++ /* Return here if terminal is closed */
++ if (c == EOF && _rl_read_zero_char_from_tty)
++ return (rl_done = 1);
+
+ /* EOF typed to a non-blank line is a <NL>. */
+ if (c == EOF && rl_end)
diff --git a/SOURCES/readline-5.0-conf.patch b/SOURCES/readline-5.0-conf.patch
new file mode 100644
index 0000000..368be31
--- /dev/null
+++ b/SOURCES/readline-5.0-conf.patch
@@ -0,0 +1,124 @@
+--- lib/readline/bind.c
++++ lib/readline/bind.c 2006-09-14 17:58:06.000000000 +0200
+@@ -723,6 +723,9 @@ rl_function_of_keyseq (keyseq, map, type
+ /* The last key bindings file read. */
+ static char *last_readline_init_file = (char *)NULL;
+
++/* Flag to read system init file */
++static int read_system_init_file = 0;
++
+ /* The file we're currently reading key bindings from. */
+ static const char *current_readline_init_file;
+ static int current_readline_init_include_level;
+@@ -786,11 +789,14 @@ rl_re_read_init_file (count, ignore)
+ return r;
+ }
+
++/* Forward declarations */
++static int sv_bell_style PARAMS((const char *));
++
+ /* Do key bindings from a file. If FILENAME is NULL it defaults
+ to the first non-null filename from this list:
+ 1. the filename used for the previous call
+ 2. the value of the shell variable `INPUTRC'
+- 3. ~/.inputrc
++ 3. /etc/inputrc and ~/.inputrc
+ If the file existed and could be opened and read, 0 is returned,
+ otherwise errno is returned. */
+ int
+@@ -802,13 +808,43 @@ rl_read_init_file (filename)
+ {
+ filename = last_readline_init_file;
+ if (filename == 0)
+- filename = sh_get_env_value ("INPUTRC");
++ {
++ filename = sh_get_env_value ("INPUTRC");
++ if (filename && !strncmp(SYSTEM_INPUTRC, filename, strlen(SYSTEM_INPUTRC)))
++ {
++ struct stat st;
++ char *default_inputrc = tilde_expand(DEFAULT_INPUTRC);
++
++ if ((stat(default_inputrc, &st) == 0))
++ {
++ filename = DEFAULT_INPUTRC;
++ read_system_init_file = 1;
++ }
++ else
++ read_system_init_file = 0;
++
++ free(default_inputrc);
++ }
++ else
++ read_system_init_file = 1;
++ }
+ if (filename == 0)
++ {
+ filename = DEFAULT_INPUTRC;
++ read_system_init_file = 1;
++ }
+ }
+
+ if (*filename == 0)
++ {
+ filename = DEFAULT_INPUTRC;
++ read_system_init_file = 1;
++ }
++
++ sv_bell_style(sh_get_env_value("DEFAULT_BELL_STYLE"));
++
++ if (read_system_init_file)
++ _rl_read_init_file (SYSTEM_INPUTRC, 1);
+
+ #if defined (__MSDOS__)
+ if (_rl_read_init_file (filename, 0) == 0)
+@@ -1319,7 +1355,14 @@ rl_parse_and_bind (string)
+ rl_macro_bind (seq, &funname[1], _rl_keymap);
+ }
+ else
+- rl_bind_keyseq (seq, rl_named_function (funname));
++ {
++#if defined (PREFIX_META_HACK)
++ if (_rl_stricmp (funname, "prefix-meta") == 0)
++ rl_generic_bind (ISKMAP, seq, (char *)emacs_meta_keymap, _rl_keymap);
++ else
++#endif
++ rl_bind_keyseq (seq, rl_named_function (funname));
++ }
+
+ free (seq);
+ return 0;
+@@ -1456,7 +1499,6 @@ typedef int _rl_sv_func_t PARAMS((const
+ #define V_INT 2
+
+ /* Forward declarations */
+-static int sv_bell_style PARAMS((const char *));
+ static int sv_combegin PARAMS((const char *));
+ static int sv_compquery PARAMS((const char *));
+ static int sv_editmode PARAMS((const char *));
+--- lib/readline/rlconf.h
++++ lib/readline/rlconf.h 2006-03-22 16:23:22.000000000 +0100
+@@ -35,10 +35,11 @@
+ #define HANDLE_SIGNALS
+
+ /* Ugly but working hack for binding prefix meta. */
+-#define PREFIX_META_HACK
++#undef PREFIX_META_HACK
+
+ /* The final, last-ditch effort file name for an init file. */
+ #define DEFAULT_INPUTRC "~/.inputrc"
++#define SYSTEM_INPUTRC "/etc/inputrc"
+
+ /* If defined, expand tabs to spaces. */
+ #define DISPLAY_TABS
+--- lib/readline/doc/rluser.texi
++++ lib/readline/doc/rluser.texi 2006-03-22 14:18:33.000000000 +0100
+@@ -336,7 +336,8 @@ file is taken from the value of the shel
+ @ifclear BashFeatures
+ file is taken from the value of the environment variable @env{INPUTRC}. If
+ @end ifclear
+-that variable is unset, the default is @file{~/.inputrc}.
++that variable is unset, Readline will read both @file{/etc/inputrc} and
++@file{~/.inputrc}.
+
+ When a program which uses the Readline library starts up, the
+ init file is read, and the key bindings are set.
diff --git a/SOURCES/readline-5.0-wrap.patch b/SOURCES/readline-5.0-wrap.patch
new file mode 100644
index 0000000..e54e0b2
--- /dev/null
+++ b/SOURCES/readline-5.0-wrap.patch
@@ -0,0 +1,17 @@
+--- lib/readline/display.c 2005-01-18 12:34:39.489668286 +0000
++++ lib/readline/display.c 2005-01-18 12:35:29.127187527 +0000
+@@ -622,10 +622,11 @@
+
+ inv_lbreaks[++newlines] = temp;
+ #if defined (HANDLE_MULTIBYTE)
+- lpos -= _rl_col_width (local_prompt, n0, num);
+-#else
+- lpos -= _rl_screenwidth;
++ if (local_prompt)
++ lpos -= _rl_col_width (local_prompt, n0, num);
++ else
+ #endif
++ lpos -= _rl_screenwidth;
+ }
+
+ prompt_last_screen_line = newlines;
diff --git a/SOURCES/readline-5.1-destdir.patch b/SOURCES/readline-5.1-destdir.patch
new file mode 100644
index 0000000..456e38d
--- /dev/null
+++ b/SOURCES/readline-5.1-destdir.patch
@@ -0,0 +1,191 @@
+--- shlib/Makefile.in
++++ shlib/Makefile.in 2005-12-09 17:00:46.000000000 +0100
+@@ -57,6 +57,7 @@
+ libdir = @libdir@
+ datadir = @datadir@
+ localedir = $(datadir)/locale
++linkagedir = $(libdir)
+
+ # Support an alternate destination root directory for package building
+ DESTDIR =
+@@ -181,13 +182,13 @@
+ -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir)
+
+ install: installdirs $(SHLIB_STATUS)
+- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
+- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
++ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
++ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
+ @echo install: you may need to run ldconfig
+
+ uninstall:
+- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY)
+- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE)
++ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_HISTORY)
++ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_READLINE)
+ @echo uninstall: you may need to run ldconfig
+
+ clean mostlyclean: force
+--- support/shlib-install
++++ support/shlib-install 2005-12-09 17:05:28.000000000 +0100
+@@ -3,7 +3,7 @@
+ # shlib-install - install a shared library and do any necessary host-specific
+ # post-installation configuration (like ldconfig)
+ #
+-# usage: shlib-install [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library
++# usage: shlib-install [-D] -O host_os -d installation-dir [-l linkage-dir] [-b bin-dir] -i install-prog [-U] library
+ #
+ # Chet Ramey
+ # chet@po.cwru.edu
+@@ -12,10 +12,12 @@
+ # defaults
+ #
+ INSTALLDIR=/usr/local/lib
++LINKAGEDIR=
+ LDCONFIG=ldconfig
++DESTDIR=
+
+ PROGNAME=`basename $0`
+-USAGE="$PROGNAME [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library"
++USAGE="$PROGNAME [-D] -O host_os -d installation-dir [-l linkage-dir] [-b bin-dir] -i install-prog [-U] library"
+
+ # process options
+
+@@ -23,14 +25,19 @@
+ case "$1" in
+ -O) shift; host_os="$1"; shift ;;
+ -d) shift; INSTALLDIR="$1"; shift ;;
++ -dd) shift; DESTDIR=$1; shift ;;
+ -b) shift; BINDIR="$1" ; shift ;;
+ -i) shift; INSTALLPROG="$1" ; shift ;;
++ -l) shift; LINKAGEDIR="$1" ; shift ;;
+ -D) echo=echo ; shift ;;
+ -U) uninstall=true ; shift ;;
+ -*) echo "$USAGE" >&2 ; exit 2;;
+ *) break ;;
+ esac
+ done
++if [ -z "$LINKAGEDIR" ]; then
++ LINKAGEDIR="$INSTALLDIR"
++fi
+
+ # set install target name
+ LIBNAME="$1"
+@@ -48,18 +55,18 @@
+ # pre-install
+
+ if [ -z "$uninstall" ]; then
+- ${echo} $RM ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
+- if [ -f "$INSTALLDIR/$LIBNAME" ]; then
+- ${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
++ ${echo} $RM ${DESTDIR}${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
++ if [ -f "${DESTDIR}$INSTALLDIR/$LIBNAME" ]; then
++ ${echo} $MV ${DESTDIR}$INSTALLDIR/$LIBNAME ${DESTDIR}${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
+ fi
+ fi
+
+ # install/uninstall
+
+ if [ -z "$uninstall" ] ; then
+- ${echo} eval ${INSTALLPROG} $LIBNAME ${INSTALLDIR}/${LIBNAME}
++ ${echo} eval ${INSTALLPROG} $LIBNAME ${DESTDIR}${INSTALLDIR}/${LIBNAME}
+ else
+- ${echo} ${RM} ${INSTALLDIR}/${LIBNAME}
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/${LIBNAME}
+ fi
+
+ # post-install/uninstall
+@@ -70,7 +77,7 @@
+ case "$host_os" in
+ hpux*|darwin*|macosx*)
+ if [ -z "$uninstall" ]; then
+- chmod 555 ${INSTALLDIR}/${LIBNAME}
++ chmod 555 ${DESTDIR}${INSTALLDIR}/${LIBNAME}
+ fi ;;
+ cygwin*)
+ IMPLIBNAME=`echo ${LIBNAME} \
+@@ -108,8 +115,8 @@
+ LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib
+ esac
+
+-INSTALL_LINK1='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
+-INSTALL_LINK2='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
++INSTALL_LINK1='${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
++INSTALL_LINK2='${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
+
+ #
+ # Create symlinks to the installed library. This section is incomplete.
+@@ -117,27 +124,27 @@
+ case "$host_os" in
+ *linux*)
+ # libname.so.M -> libname.so.M.N
+- ${echo} ${RM} ${INSTALLDIR}/$LINK2
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK2
+ fi
+
+ # libname.so -> libname.so.M
+- ${echo} ${RM} ${INSTALLDIR}/$LINK1
++ ${echo} ${RM} ${DESTDIR}${LINKAGEDIR}/$LINK1
+ if [ -z "$uninstall" ]; then
+- ${echo} cd $INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1
++ ${echo} ln -s ${INSTALLDIR}/$LIBNAME ${DESTDIR}${LINKAGEDIR}/$LINK1
+ fi
+ ;;
+
+ bsdi4*|*gnu*|darwin*|macosx*|k*bsd*-gnu)
+ # libname.so.M -> libname.so.M.N
+- ${echo} ${RM} ${INSTALLDIR}/$LINK2
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK2
+ fi
+
+ # libname.so -> libname.so.M.N
+- ${echo} ${RM} ${INSTALLDIR}/$LINK1
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK1
+ fi
+@@ -145,7 +152,7 @@
+
+ solaris2*|aix4.[2-9]*|osf*|irix[56]*|sysv[45]*|dgux*)
+ # libname.so -> libname.so.M
+- ${echo} ${RM} ${INSTALLDIR}/$LINK1
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK1
+ fi
+@@ -156,19 +163,19 @@
+ freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*)
+ if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
+ # libname.so -> libname.so.M
+- ${echo} ${RM} ${INSTALLDIR}/$LINK1
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK1
+ fi
+ else
+ # libname.so.M -> libname.so.M.N
+- ${echo} ${RM} ${INSTALLDIR}/$LINK2
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK2
+ fi
+
+ # libname.so -> libname.so.M.N
+- ${echo} ${RM} ${INSTALLDIR}/$LINK1
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK1
+ fi
+@@ -177,7 +184,7 @@
+
+ hpux1*)
+ # libname.sl -> libname.M
+- ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl
++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1.sl
+ if [ -z "$uninstall" ]; then
+ eval $INSTALL_LINK1
+ fi
diff --git a/SOURCES/readline-5.1-patches.tar.bz2 b/SOURCES/readline-5.1-patches.tar.bz2
new file mode 100644
index 0000000..c5612ab
--- /dev/null
+++ b/SOURCES/readline-5.1-patches.tar.bz2
Binary files differ
diff --git a/SOURCES/readline-5.1-random.patch b/SOURCES/readline-5.1-random.patch
new file mode 100644
index 0000000..64ebdcf
--- /dev/null
+++ b/SOURCES/readline-5.1-random.patch
@@ -0,0 +1,14 @@
+--- lib/readline/misc.c
++++ lib/readline/misc.c 2005-12-09 18:12:24.000000000 +0100
+@@ -210,8 +210,10 @@
+
+ r = _rl_arg_dispatch (_rl_argcxt, c);
+ if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0))
+- break;
++ return r;
+ }
++
++ return 1;
+ }
+
+ /* Create a default argument. */
diff --git a/SOURCES/readline-5.1.dif b/SOURCES/readline-5.1.dif
new file mode 100644
index 0000000..e64eb90
--- /dev/null
+++ b/SOURCES/readline-5.1.dif
@@ -0,0 +1,158 @@
+--- .pkgextract
++++ .pkgextract 2005-12-09 17:09:26.000000000 +0100
+@@ -0,0 +1,5 @@
++patch -p2 -s --suffix=".zerotty" < ../readline-4.3-input.dif
++patch -p2 -s --suffix=".wrap" < ../readline-5.0-wrap.patch
++patch -p2 -s --suffix=".conf" < ../readline-5.0-conf.patch
++patch -p2 -s --suffix=".random" < ../readline-5.1-random.patch
++patch -p0 -s --suffix=".destdir" < ../readline-5.1-destdir.patch
+--- Makefile.in
++++ Makefile.in 2005-12-09 17:09:26.000000000 +0100
+@@ -220,10 +220,8 @@ maybe-uninstall-headers: uninstall-heade
+ install: $(INSTALL_TARGETS)
+
+ install-static: installdirs $(STATIC_LIBS) install-headers install-doc
+- -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
+ $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
+ -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
+- -$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old
+ $(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a
+ -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a
+
+@@ -246,7 +244,7 @@ uninstall-shared: maybe-uninstall-header
+ install-doc: installdirs
+ -( if test -d doc ; then \
+ cd doc && \
+- ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
++ ${MAKE} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
+ fi )
+
+ uninstall-doc:
+--- bind.c
++++ bind.c 2005-12-09 17:09:26.000000000 +0100
+@@ -370,7 +370,10 @@ rl_generic_bind (type, keyseq, data, map
+
+ ic = uc;
+ if (ic < 0 || ic >= KEYMAP_SIZE)
+- return -1;
++ {
++ free (keys);
++ return -1;
++ }
+
+ if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii)
+ {
+--- complete.c
++++ complete.c 2005-12-09 17:11:19.000000000 +0100
+@@ -428,7 +428,7 @@ get_y_or_n (for_pager)
+ return (1);
+ if (c == 'n' || c == 'N' || c == RUBOUT)
+ return (0);
+- if (c == ABORT_CHAR)
++ if (c == ABORT_CHAR || c == EOF)
+ _rl_abort_internal ();
+ if (for_pager && (c == NEWLINE || c == RETURN))
+ return (2);
+@@ -883,7 +883,7 @@ _rl_find_completion_word (fp, dp)
+ /* We didn't find an unclosed quoted substring upon which to do
+ completion, so use the word break characters to find the
+ substring on which to complete. */
+- while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
++ while ((rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY)))
+ {
+ scan = rl_line_buffer[rl_point];
+
+@@ -1813,7 +1813,7 @@ rl_completion_matches (text, entry_funct
+ match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
+ match_list[1] = (char *)NULL;
+
+- while (string = (*entry_function) (text, matches))
++ while ((string = (*entry_function) (text, matches)))
+ {
+ if (matches + 1 == match_list_size)
+ match_list = (char **)xrealloc
+@@ -1864,7 +1864,7 @@ rl_username_completion_function (text, s
+ }
+
+ #if defined (HAVE_GETPWENT)
+- while (entry = getpwent ())
++ while ((entry = getpwent ()))
+ {
+ /* Null usernames should result in all users as possible completions. */
+ if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
+--- readline.c
++++ readline.c 2005-12-09 17:09:26.000000000 +0100
+@@ -715,7 +715,11 @@ _rl_dispatch_subseq (key, map, got_subse
+ {
+ /* Special case rl_do_lowercase_version (). */
+ if (func == rl_do_lowercase_version)
+- return (_rl_dispatch (_rl_to_lower (key), map));
++ {
++ if (key == ANYOTHERKEY)
++ return -1;
++ return (_rl_dispatch (_rl_to_lower (key), map));
++ }
+
+ rl_executing_keymap = map;
+
+--- readline.h
++++ readline.h 2005-12-09 17:09:26.000000000 +0100
+@@ -445,7 +445,7 @@ extern char *rl_filename_completion_func
+
+ extern int rl_completion_mode PARAMS((rl_command_func_t *));
+
+-#if 0
++#ifdef OLD_READLINE
+ /* Backwards compatibility (compat.c). These will go away sometime. */
+ extern void free_undo_list PARAMS((void));
+ extern int maybe_save_line PARAMS((void));
+--- doc/Makefile.in
++++ doc/Makefile.in 2005-12-09 17:09:26.000000000 +0100
+@@ -96,7 +96,7 @@ DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ
+ $(RM) $@
+ -${DVIPDF} $<
+
+-all: info dvi html ps text
++all: info html
+ nodvi: info html text
+
+ info: $(INFOOBJ)
+--- doc/readline.3
++++ doc/readline.3 2005-12-09 17:09:26.000000000 +0100
+@@ -114,8 +114,8 @@ Readline is customized by putting comman
+ file (the \fIinputrc\fP file).
+ The name of this file is taken from the value of the
+ .B INPUTRC
+-environment variable. If that variable is unset, the default is
+-.IR ~/.inputrc .
++environment variable. If that variable is unset, readline will read both
++.IR /etc/inputrc " and " ~/.inputrc .
+ When a program which uses the readline library starts up, the
+ init file is read, and the key bindings and variables are set.
+ There are only a few basic constructs allowed in the
+@@ -1266,6 +1266,9 @@ VI Command Mode functions
+ .TP
+ .FN ~/.inputrc
+ Individual \fBreadline\fP initialization file
++.TP
++.FN /etc/inputrc
++System \fBreadline\fP initialization file
+ .PD
+ .SH AUTHORS
+ Brian Fox, Free Software Foundation
+--- support/shobj-conf
++++ support/shobj-conf 2006-09-22 16:17:48.000000000 +0200
+@@ -108,10 +108,11 @@ sunos5*|solaris2*)
+ linux*-*|gnu*-*|k*bsd*-gnu-*)
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
++ SHOBJ_LDFLAGS='-shared'
+
+- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
++ SHLIB_XLDFLAGS='-Wl,-rpath-link,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
++ SHLIB_LIBS=-lncurses
+ ;;
+
+ freebsd2* | netbsd*)
diff --git a/SOURCES/readline-5.1.tar.bz2 b/SOURCES/readline-5.1.tar.bz2
new file mode 100644
index 0000000..bc70369
--- /dev/null
+++ b/SOURCES/readline-5.1.tar.bz2
Binary files differ
diff --git a/SOURCES/run-tests b/SOURCES/run-tests
new file mode 100644
index 0000000..9a113d8
--- /dev/null
+++ b/SOURCES/run-tests
@@ -0,0 +1,29 @@
+#! /bin/sh
+
+PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
+export PATH
+
+# unset BASH_ENV only if it is set
+[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV
+# ditto for SHELLOPTS
+#[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS
+
+: ${THIS_SH:=../bash}
+export THIS_SH
+
+${THIS_SH} ./version
+
+rm -f /tmp/xx
+
+echo Any output from any test, unless otherwise noted, indicates a possible anomaly
+
+for x in run-*
+do
+ case $x in
+ $0|run-all|run-minimal|run-gprof|run-jobs|run-ifs-posix) ;;
+ *.orig|*~) ;;
+ *) echo $x ; sh $x ;;
+ esac
+done
+
+exit 0
diff --git a/SOURCES/variables-affix-3.1.patch b/SOURCES/variables-affix-3.1.patch
new file mode 100644
index 0000000..a1bcbbe
--- /dev/null
+++ b/SOURCES/variables-affix-3.1.patch
@@ -0,0 +1,145 @@
+--- bash-3.1/variables.c.orig 2014-09-26 13:46:00.396609081 +0200
++++ bash-3.1/variables.c 2014-09-26 13:46:45.869563912 +0200
+@@ -239,7 +239,7 @@
+ static void propagate_temp_var __P((PTR_T));
+ static void dispose_temporary_env __P((sh_free_func_t *));
+
+-static inline char *mk_env_string __P((const char *, const char *));
++static inline char *mk_env_string __P((const char *, const char *, int));
+ static char **make_env_array_from_var_list __P((SHELL_VAR **));
+ static char **make_var_export_array __P((VAR_CONTEXT *));
+ static char **make_func_export_array __P((void));
+@@ -252,7 +252,14 @@
+ static void push_exported_var __P((PTR_T));
+
+ static inline int find_special_var __P((const char *));
+-
++
++/* Prefix and suffix for environment variable names which contain
++ shell functions. */
++#define FUNCDEF_PREFIX "BASH_FUNC_"
++#define FUNCDEF_PREFIX_LEN (strlen (FUNCDEF_PREFIX))
++#define FUNCDEF_SUFFIX "()"
++#define FUNCDEF_SUFFIX_LEN (strlen (FUNCDEF_SUFFIX))
++
+ /* Initialize the shell variables from the current environment.
+ If PRIVMODE is nonzero, don't import functions from ENV or
+ parse $SHELLOPTS. */
+@@ -301,27 +308,37 @@
+
+ /* If exported function, define it now. Don't import functions from
+ the environment in privileged mode. */
+- if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
+- {
+- string_length = strlen (string);
+- temp_string = (char *)xmalloc (3 + string_length + char_index);
++ if (privmode == 0 && read_but_dont_execute == 0
++ && STREQN (FUNCDEF_PREFIX, name, FUNCDEF_PREFIX_LEN)
++ && STREQ (name + char_index - FUNCDEF_SUFFIX_LEN, FUNCDEF_SUFFIX)
++ && STREQN ("() {", string, 4))
++ {
++ size_t name_length
++ = char_index - (FUNCDEF_PREFIX_LEN + FUNCDEF_SUFFIX_LEN);
++ char *temp_name = name + FUNCDEF_PREFIX_LEN;
++ /* Temporarily remove the suffix. */
++ temp_name[name_length] = '\0';
+
+- strcpy (temp_string, name);
+- temp_string[char_index] = ' ';
+- strcpy (temp_string + char_index + 1, string);
++ string_length = strlen (string);
++ temp_string = (char *)xmalloc (name_length + 1 + string_length + 1);
++ memcpy (temp_string, temp_name, name_length);
++ temp_string[name_length] = ' ';
++ memcpy (temp_string + name_length + 1, string, string_length + 1);
+
+ /* Don't import function names that are invalid identifiers from the
+ environment. */
+- if (legal_identifier (name))
+- parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
++ if (legal_identifier (temp_name))
++ parse_and_execute (temp_string, temp_name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+- if (temp_var = find_function (name))
++ if (temp_var = find_function (temp_name))
+ {
+ VSETATTR (temp_var, (att_exported|att_imported));
+ array_needs_making = 1;
+ }
+ else
+ report_error (_("error importing function definition for `%s'"), name);
++ /* Restore the original suffix. */
++ temp_name[name_length] = FUNCDEF_SUFFIX[0];
+ }
+ #if defined (ARRAY_VARS)
+ # if 0
+@@ -2247,7 +2264,7 @@
+ var->context = variable_context; /* XXX */
+
+ INVALIDATE_EXPORTSTR (var);
+- var->exportstr = mk_env_string (name, value);
++ var->exportstr = mk_env_string (name, value, 0);
+
+ array_needs_making = 1;
+
+@@ -3034,22 +3051,43 @@
+ /* */
+ /* **************************************************************** */
+
++/* Returns the string NAME=VALUE if !FUNCTIONP or if VALUE == NULL (in
++ which case it is treated as empty). Otherwise, decorate NAME with
++ FUNCDEF_PREFIX and FUNCDEF_SUFFIX, and return a string of the form
++ FUNCDEF_PREFIX NAME FUNCDEF_SUFFIX = VALUE (without spaces). */
+ static inline char *
+-mk_env_string (name, value)
++mk_env_string (name, value, functionp)
+ const char *name, *value;
++ int functionp;
+ {
+- int name_len, value_len;
+- char *p;
++ size_t name_len, value_len;
++ char *p, *q;
+
+ name_len = strlen (name);
+ value_len = STRLEN (value);
+- p = (char *)xmalloc (2 + name_len + value_len);
+- strcpy (p, name);
+- p[name_len] = '=';
++ if (functionp && value != NULL)
++ {
++ p = (char *)xmalloc (FUNCDEF_PREFIX_LEN + name_len + FUNCDEF_SUFFIX_LEN
++ + 1 + value_len + 1);
++ q = p;
++ memcpy (q, FUNCDEF_PREFIX, FUNCDEF_PREFIX_LEN);
++ q += FUNCDEF_PREFIX_LEN;
++ memcpy (q, name, name_len);
++ q += name_len;
++ memcpy (q, FUNCDEF_SUFFIX, FUNCDEF_SUFFIX_LEN);
++ q += FUNCDEF_SUFFIX_LEN;
++ }
++ else
++ {
++ p = (char *)xmalloc (name_len + 1 + value_len + 1);
++ memcpy (p, name, name_len);
++ q = p + name_len;
++ }
++ q[0] = '=';
+ if (value && *value)
+- strcpy (p + name_len + 1, value);
++ memcpy (q + 1, value, value_len + 1);
+ else
+- p[name_len + 1] = '\0';
++ q[1] = '\0';
+ return (p);
+ }
+
+@@ -3124,7 +3162,7 @@
+ /* Gee, I'd like to get away with not using savestring() if we're
+ using the cached exportstr... */
+ list[list_index] = USE_EXPORTSTR ? savestring (value)
+- : mk_env_string (var->name, value);
++ : mk_env_string (var->name, value, function_p (var));
+
+ if (USE_EXPORTSTR == 0)
+ SAVE_EXPORTSTR (var, list[list_index]);
diff --git a/SPECS/bash.spec b/SPECS/bash.spec
new file mode 100644
index 0000000..a114978
--- /dev/null
+++ b/SPECS/bash.spec
@@ -0,0 +1,763 @@
+#
+# spec file for package bash (Version 3.1)
+#
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+
+# norootforbuild
+# usedforbuild aaa_base acl attr audit-libs autoconf automake bash bind-libs bind-utils binutils bison bzip2 coreutils cpio cpp cpp41 cracklib cvs cyrus-sasl db diffutils e2fsprogs file filesystem fillup findutils flex gawk gcc gcc41 gdbm gdbm-devel gettext gettext-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv klogd less libacl libattr libcom_err libgcc41 libltdl libmudflap41 libnscd libstdc++41 libtool libvolume_id libxcrypt libzio linux-kernel-headers m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch perl permissions popt procinfo procps psmisc pwdutils rcs readline rpm sed strace sysvinit tar tcpd texinfo timezone unzip util-linux vim zlib zlib-devel
+
+Name: bash
+License: GNU General Public License (GPL)
+Group: System/Shells
+Requires: readline >= 5.1
+Autoreqprov: on
+Version: 3.1
+Release: 56fwp
+%define bash_vers 3.1
+%define rl_vers 5.1
+Summary: The GNU Bourne-Again Shell
+URL: http://www.gnu.org/software/bash/bash.html
+Source0: bash-%{bash_vers}.tar.bz2
+Source1: readline-%{rl_vers}.tar.bz2
+Source2: bash-%{bash_vers}-patches.tar.bz2
+Source3: readline-%{rl_vers}-patches.tar.bz2
+Source4: run-tests
+Patch0: bash-%{bash_vers}.dif
+Patch1: bash-2.03-manual.patch
+Patch2: bash-2.05a-security.patch
+Patch3: bash-2.05-2.4.4.patch
+Patch4: bash-3.1-directory.patch
+Patch5: bash-3.0-evalexp.patch
+Patch6: bash-3.0-warn-locale.patch
+Patch7: bash-3.0-nfs_redir.patch
+Patch8: bash-3.0-decl.patch
+Patch9: bash-3.1-random.patch
+Patch10: bash-3.1-extended_quote.patch
+Patch11: bash-3.1-wcschr.dif
+Patch12: bash-3.1-printf.patch
+Patch13: bash-3.1-loadables.dif
+Patch20: readline-%{rl_vers}.dif
+Patch21: readline-4.3-input.dif
+Patch22: readline-5.0-wrap.patch
+Patch23: readline-5.0-conf.patch
+Patch24: readline-5.1-random.patch
+Patch30: readline-5.1-destdir.patch
+
+#PT sourced from https://bugzilla.novell.com/show_bug.cgi?id=896776
+Patch100: funcdef-import-3.1.patch
+#PT sourced from https://bugzilla.novell.com/show_bug.cgi?id=898346
+Patch101: eol-pushback.patch
+Patch102: variables-affix-3.1.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%description
+Bash is an sh-compatible command interpreter that executes commands
+read from standard input or from a file. Bash incorporates useful
+features from the Korn and C shells (ksh and csh). Bash is intended to
+be a conformant implementation of the IEEE Posix Shell and Tools
+specification (IEEE Working Group 1003.2).
+
+
+
+Authors:
+--------
+ Brian Fox <bfox@gnu.org>
+ Chet Ramey <chet@ins.cwru.edu>
+
+%debug_package
+%package -n readline
+Summary: The Readline Library
+Group: System/Libraries
+Provides: bash:/lib/libreadline.so.5
+Version: 5.1
+Release: 55
+Autoreqprov: on
+
+%description -n readline
+The readline library is used by the Bourne Again Shell (bash, the
+standard command interpreter) for easy editing of command lines. This
+includes history and search functionality.
+
+
+
+Authors:
+--------
+ Brian Fox <bfox@gnu.org>
+ Chet Ramey <chet@ins.cwru.edu>
+
+%package -n readline-devel
+Summary: Include Files and Libraries mandatory for Development.
+Group: Development/Libraries/C and C++
+Provides: bash:/usr/lib/libreadline.a
+Version: 5.1
+Release: 55
+Requires: readline = %{version}-%{release}, %{_libdir}/libncurses.so
+Autoreqprov: on
+
+%description -n readline-devel
+This package contains all necessary include files and libraries needed
+to develop applications that require these.
+
+
+
+Authors:
+--------
+ Brian Fox <bfox@gnu.org>
+ Chet Ramey <chet@ins.cwru.edu>
+
+%prep
+%setup -n bash-%{bash_vers} -b1 -b2 -b3
+for p in ../bash-%{bash_vers}-patches/*; do
+ echo Patch $p
+ patch -s -p0 < $p
+done
+unset p
+%patch1 -p0 -b .manual
+%patch2 -p0 -b .security
+%patch3 -p0 -b .2.4.4
+%patch4 -p0 -b .directory
+%patch5 -p0 -b .evalexp
+%patch6 -p0 -b .warnlc
+%patch7 -p0 -b .nfs_redir
+%patch8 -p0 -b .decl
+%patch9 -p1 -b .random2
+%patch10 -p0 -b .extended_quote
+%patch11 -p0 -b .wcschr
+%patch12 -p0 -b .printf
+%patch13 -p0 -b .plugins
+for p in ../readline-%{rl_vers}-patches/*; do
+ case "${p##*/}" in
+ readline51-00[234])
+ echo ${p##*/} is already included in bash31-patches
+ continue
+ ;;
+ esac
+ echo Patch $p
+ patch -d lib/readline/ -s -p0 < $p
+done
+unset p
+%patch21 -p0 -b .zerotty
+%patch22 -p0 -b .wrap
+%patch23 -p0 -b .conf
+%patch24 -p0 -b .random
+%patch0 -p0
+cd ../readline-%{rl_vers}
+for p in ../readline-%{rl_vers}-patches/*; do
+ echo Patch $p
+ patch -s -p0 < $p
+done
+%patch21 -p2 -b .zerotty
+%patch22 -p2 -b .wrap
+%patch23 -p2 -b .conf
+%patch24 -p2 -b .random
+%patch30 -p0 -b .destdir
+%patch20 -p0
+
+%patch100 -p0
+%patch101 -P0
+%patch102 -P0
+
+%build
+ unset LC_CTYPE LC_ALL
+ LANG=POSIX
+ CPU=$(uname -m 2> /dev/null)
+ HOSTTYPE=${CPU}
+ MACHTYPE=${CPU}-suse-linux
+ export POSIX HOSTTYPE MACHTYPE
+cd ../readline-%{rl_vers}
+%{?suse_update_config:%{suse_update_config -f support}}
+ CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -pipe -g"
+ CFLAGS_FOR_BUILD="$CFLAGS"
+ CC=gcc
+ export CFLAGS CFLAGS_FOR_BUILD CC
+ autoconf
+ ./configure --build=%{_target_cpu}-suse-linux \
+ --prefix=/usr \
+ --with-curses \
+ --mandir=%{_mandir} \
+ --infodir=%{_infodir} \
+ --libdir=%{_libdir}
+ make
+ make documentation
+ ln -sf shlib/libreadline.so.%{rl_vers} libreadline.so
+ ln -sf shlib/libreadline.so.%{rl_vers} libreadline.so.5
+ ln -sf shlib/libhistory.so.%{rl_vers} libhistory.so
+ ln -sf shlib/libhistory.so.%{rl_vers} libhistory.so.5
+cd ../bash-%{bash_vers}
+ # /proc is required for correct configuration
+ test -d /dev/fd || { echo "/proc is not mounted!" >&2; exit 1; }
+ ln -sf ../readline-%{rl_vers} readline
+ CC="gcc -I$PWD -L$PWD/../readline-%{rl_vers}"
+ export LD_LIBRARY_PATH=$PWD/../readline-%{rl_vers}
+ CFLAGS="$CFLAGS -fPIE"
+ CFLAGS_FOR_BUILD="$CFLAGS"
+ LDFLAGS="$LDFLAGS -pie"
+ export CFLAGS CFLAGS_FOR_BUILD LDFLAGS
+%{?suse_update_config:%{suse_update_config -f support}}
+ #
+ # We have a malloc with our glibc
+ #
+ SYSMALLOC="
+ --without-gnu-malloc
+ --without-glibc-malloc
+ "
+ #
+ # System readline library (comment out it not to be used)
+ #
+ READLINE="
+ --with-installed-readline
+ "
+ bash support/mkconffiles -v
+ autoconf
+ ./configure --build=%{_target_cpu}-suse-linux \
+ --prefix=/usr \
+ --mandir=%{_mandir} \
+ --infodir=%{_infodir} \
+ --libdir=%{_libdir} \
+ --with-curses \
+ $SYSMALLOC \
+ --enable-job-control \
+ --enable-alias \
+ --enable-readline \
+ --enable-history \
+ --enable-bang-history \
+ --enable-directory-stack \
+ --enable-process-substitution \
+ --enable-prompt-string-decoding \
+ --enable-select \
+ --enable-help-builtin \
+ --enable-array-variables \
+ --enable-brace-expansion \
+ --enable-command-timing \
+ --enable-disabled-builtins \
+ $READLINE
+%if %do_profiling
+ make CFLAGS="$CFLAGS "%cflags_profile_generate bash printenv recho zecho
+ env -i TERM=$TERM make TESTSCRIPT=%{SOURCE4} check
+ make clean
+ make CFLAGS="$CFLAGS "%cflags_profile_feedback
+%else
+ make all printenv recho zecho
+ env -i TERM=$TERM make TESTSCRIPT=%{SOURCE4} check
+%endif
+ make -C examples/loadables/
+ make documentation
+
+%install
+cd ../readline-%{rl_vers}
+ make install DESTDIR=$RPM_BUILD_ROOT
+ make install-shared libdir=/%{_lib} linkagedir=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
+ rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/bash
+ mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/bash
+ install -m 644 doc/*.html $RPM_BUILD_ROOT%{_defaultdocdir}/bash/
+ chmod 0755 $RPM_BUILD_ROOT/%{_lib}/libhistory.so.%{rl_vers}
+ chmod 0755 $RPM_BUILD_ROOT/%{_lib}/libreadline.so.%{rl_vers}
+ rm -f $RPM_BUILD_ROOT/%{_lib}/libhistory.so.%{rl_vers}*old
+ rm -f $RPM_BUILD_ROOT/%{_lib}/libreadline.so.%{rl_vers}*old
+cd ../bash-%{bash_vers}
+ make install DESTDIR=$RPM_BUILD_ROOT
+ mkdir -p $RPM_BUILD_ROOT/bin
+ mv $RPM_BUILD_ROOT/usr/bin/bash $RPM_BUILD_ROOT/bin/
+ ln -sf bash $RPM_BUILD_ROOT/bin/sh
+ ln -sf ../../bin/bash $RPM_BUILD_ROOT/usr/bin/sh
+ ln -sf ../../bin/bash $RPM_BUILD_ROOT/usr/bin/rbash
+ install -m 644 COMPAT NEWS $RPM_BUILD_ROOT%{_defaultdocdir}/bash/
+ install -m 644 COPYING $RPM_BUILD_ROOT%{_defaultdocdir}/bash/
+ install -m 644 doc/FAQ $RPM_BUILD_ROOT%{_defaultdocdir}/bash/
+ install -m 644 doc/INTRO $RPM_BUILD_ROOT%{_defaultdocdir}/bash/
+ install -m 644 doc/*.html $RPM_BUILD_ROOT%{_defaultdocdir}/bash/
+ install -m 644 doc/builtins.1 $RPM_BUILD_ROOT%{_mandir}/man1/bashbuiltins.1
+ install -m 644 doc/rbash.1 $RPM_BUILD_ROOT%{_mandir}/man1/rbash.1
+ gzip -9f $RPM_BUILD_ROOT%{_infodir}/*.inf*[^z] || true
+ mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d
+ sed 's/^|//' > $RPM_BUILD_ROOT%{_defaultdocdir}/bash/BUGS <<\EOF
+Known problems
+--------------
+|
+This version of bash/readline supports multi byte handling
+that is e.g. wide character support for UTF-8. This causes
+problems in geting the current cursor position within the
+readline runtime library:
+|
+bash-%{bash_vers}> LANG=ja_JP
+bash-%{bash_vers}> echo -n "Hello"
+bash-%{bash_vers}>
+|
+In other words the prompt overwrites the output of the
+echo comand. The boolean variable byte-oriented
+set in /etc/inputrc or $HOME/.inputrc avoids this
+but disables multi byte handling.
+EOF
+# remove unpackaged files
+rm -fv $RPM_BUILD_ROOT/usr/%{_lib}/libhistory.so.*
+rm -fv $RPM_BUILD_ROOT/usr/%{_lib}/libreadline.so.*
+rm -fv $RPM_BUILD_ROOT/usr/share/info/rluserman.info.gz
+rm -fv $RPM_BUILD_ROOT/usr/share/man/man3/history.3*
+
+%post -n readline -p /sbin/ldconfig
+
+%postun -n readline -p /sbin/ldconfig
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/bin/bash
+/bin/sh
+%dir /etc/bash_completion.d
+/usr/bin/bashbug
+/usr/bin/rbash
+/usr/bin/sh
+%doc %{_infodir}/bash.info.gz
+%doc %{_mandir}/man1/bash.1.gz
+%doc %{_mandir}/man1/bashbuiltins.1.gz
+%doc %{_mandir}/man1/bashbug.1.gz
+%doc %{_mandir}/man1/rbash.1.gz
+%doc %{_defaultdocdir}/bash/
+/usr/share/locale/en@boldquot/LC_MESSAGES/bash.mo
+/usr/share/locale/en@quot/LC_MESSAGES/bash.mo
+
+%files -n readline
+%defattr(-,root,root)
+/%{_lib}/libhistory.so.5
+/%{_lib}/libhistory.so.%{rl_vers}
+/%{_lib}/libreadline.so.5
+/%{_lib}/libreadline.so.%{rl_vers}
+%doc %{_infodir}/history.info.gz
+%doc %{_infodir}/readline.info.gz
+
+%files -n readline-devel
+%defattr(-,root,root)
+/usr/include/readline/
+%{_libdir}/libhistory.a
+%{_libdir}/libhistory.so
+%{_libdir}/libreadline.a
+%{_libdir}/libreadline.so
+%doc %{_mandir}/man3/readline.3.gz
+
+%changelog -n bash
+* Fri Sep 26 2014 - ptravis@mt.gov
+- Patches for CVE-2014-6271, CVE-2014-7169
+- https://bugzilla.novell.com/show_bug.cgi?id=898604
+- https://bugzilla.novell.com/show_bug.cgi?id=896776
+- https://bugzilla.novell.com/show_bug.cgi?id=898346
+* Fri Nov 17 2006 - werner@suse.de
+- Remove /usr/bin/bash (#206000)
+* Wed Sep 27 2006 - werner@suse.de
+- Use PIE to make a shared bash binary
+- Make the bash modules build for testing
+* Fri Sep 22 2006 - werner@suse.de
+- Remove rpath option for libraries use linker defaults instead
+* Fri Sep 22 2006 - werner@suse.de
+- Add symbolic link for POSIX bourne shell to /usr/bin/ (#206000)
+* Thu Sep 14 2006 - werner@suse.de
+- Add environment variable DEFAULT_BELL_STYLE to control the
+ bell style of the readline library without using intputrc.
+* Mon Aug 07 2006 - werner@suse.de
+- Let readline-devel requires libncurses.so (bug #188673)
+* Thu Jul 27 2006 - werner@suse.de
+- Let printf builtin handle stdout errors correctly (bug #190349)
+* Wed May 31 2006 - werner@suse.de
+- Fix crash in IFS multi byte handling (bug #180317)
+* Tue May 23 2006 - werner@suse.de
+- Make the test suite run even on ppc emulated on ppc64
+* Mon May 15 2006 - werner@suse.de
+- Update bash 3.1 to patch level 17
+ * Allow array subscripts to be sourounded by double quotes
+- Run test suite with nearly all scripts
+* Mon Apr 03 2006 - werner@suse.de
+- Update bash 3.1 to patch level 16
+ * Bash will dump core when attempting to perform globbing in
+ directories with very large numbers of files
+ * Solve problem with the extended globbing code prevented dots
+ from matching filenames when used in some matching patterns
+* Mon Mar 27 2006 - werner@suse.de
+- Use access(2) with temporary switched euid/ruid and egid/rgid
+ instead of stat(2) to determine the access permissions of a
+ file, this works even on RO mounted NFS file systems (#160513)
+* Wed Mar 22 2006 - werner@suse.de
+- Be sure that ~/.inputrc is read even if INPUTRC is set to
+ system wide /etc/inputrc (bug #160003)
+- Make prefix-meta work even with new readline syntax but
+ disable it by default (since bug #suse21096)
+* Mon Mar 20 2006 - werner@suse.de
+- Update to bash 3.1 to patch level 14 and readline 5.1 to level 4
+ * Do not terminate words prematurely if parentheses are involved
+ * Readline sometimes reference freed memory
+ * Fix double displayed prompt when using non-incremental searches
+* Sun Mar 12 2006 - schwab@suse.de
+- Update bash31-010 patch, better fix for #151000.
+* Thu Mar 02 2006 - werner@suse.de
+- Update bash 3.1 to patch level 11 and readline 5.1 to level 2
+ * Includes fix for line-wrapping errors
+ * Replacement for bug fix of bug #146075 with better
+ reallocation and compaction of the job array list.
+ * Do not let SIGINT from terminal reach background processes
+ * Do not let asynchronous background jobs set the terminal
+ process group incorrectly.
+ * Replacement for bug fix of bug #151000
+ * Do not strip quoting inside double-quoted command substitutions
+* Wed Mar 01 2006 - werner@suse.de
+- Re-enable escaping newline within quotes in commands (#151000)
+* Mon Jan 30 2006 - werner@suse.de
+- Do initialize the fresh members of the job array (bug #146075)
+* Mon Jan 30 2006 - schwab@suse.de
+- Barf if /proc is missing.
+* Wed Jan 25 2006 - mls@suse.de
+- converted neededforbuild to BuildRequires
+* Tue Jan 10 2006 - werner@suse.de
+- Update to newest patch level 5:
+ + corrects several omissions in the bash documentation
+ + local array variable declared at function scope shadowing
+ a global variable should create a separate instance
+ + When tilde expansion fails, do not skip rest of an expansion
+- Expand dollar quotes even for the single quote case (bug #141394)
+* Thu Dec 22 2005 - werner@suse.de
+- Switch to first patchlevel for the bash and the readline library.
+ This should fix problems happen with local/eval/let builtins.
+* Mon Dec 19 2005 - werner@suse.de
+- Remove dangling sym links
+* Tue Dec 13 2005 - schwab@suse.de
+- Fix segfault in readline callback interface.
+* Mon Dec 12 2005 - schwab@suse.de
+- Fix return of random data.
+- Set CFLAGS_FOR_BUILD.
+* Fri Dec 09 2005 - werner@suse.de
+- Update to bash version 3.1 and readline library version 5.1
+* Thu Sep 29 2005 - werner@suse.de
+- More cookie for the compiler
+* Mon Sep 19 2005 - werner@suse.de
+- Give the compiler its cookie
+* Tue Apr 19 2005 - postadal@suse.cz
+- fixed crashing on read -e command and line wrapping (in readline code)
+ (bug #76709)
+* Fri Jan 28 2005 - werner@suse.de
+- Add workaround for NFS bug which does not check permissions
+ on open of a file but close (bug #20244)
+* Thu Nov 25 2004 - werner@suse.de
+- Remove local array patch because not needed anymore
+- Fix a crash on internal arrays if unset during execution of
+ functions and files (bug #48511)
+* Sun Nov 21 2004 - schwab@suse.de
+- Add patches from <ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/> and
+ <ftp://ftp.cwru.edu/pub/bash/readline-5.0-patches/>.
+* Fri Nov 19 2004 - werner@suse.de
+- Fix the evalexp fix (bug #48253)
+* Mon Oct 25 2004 - werner@suse.de
+- Be sure that the FN macro nroff macro is available in all
+ sub manual pages (bug #47560)
+* Tue Oct 12 2004 - werner@suse.de
+- Re-activate first part of prompt fix because it does not harm
+ (bug #36919)
+* Tue Oct 12 2004 - ro@suse.de
+- no macros in Version lines
+* Mon Oct 11 2004 - werner@suse.de
+- Disable prompt patch for now because not needed and other
+ problmes caused by this fix (bug #36919)
+- Clear out last_made_pid on success (bug #42232)
+* Thu Sep 30 2004 - werner@suse.de
+- Clear out prompt line of isearch for invisible chars (bug #36919)
+* Wed Sep 29 2004 - werner@suse.de
+- Fix prompt problem with invisible characters (bug #36919)
+* Fri Sep 17 2004 - werner@suse.de
+- Fix line wraping for newlines in prompt (bug #45519)
+* Thu Sep 16 2004 - schwab@suse.de
+- Fix missing return value.
+* Sat Sep 11 2004 - kukuk@suse.de
+- Disable use of WCONTINUED as long as bash does not check if
+ it is supported.
+* Mon Sep 06 2004 - werner@suse.de
+- Fix prefix strip for last added patch
+* Fri Sep 03 2004 - werner@suse.de
+- Add warning about broken glibc locale before we get the SIGSEGV
+ (bug #44658)
+* Sun Aug 01 2004 - schwab@suse.de
+- Fix rl_maybe_save_line.
+- Track LC_TIME.
+* Fri Jul 30 2004 - werner@suse.de
+- Put version to bash 3.0 and readline 5.0
+* Mon Jun 07 2004 - werner@suse.de
+- Add missed declaration of oldval for previous bugfix
+* Fri Jun 04 2004 - werner@suse.de
+- Fix local array variable handling (bug #41649)
+* Wed Jun 02 2004 - werner@suse.de
+- Fix evaluation none local return stack curruption (bug #41488)
+* Wed Apr 07 2004 - werner@suse.de
+- In case of quotes position counter has to be advanced (#38599)
+* Thu Apr 01 2004 - werner@suse.de
+- Add directoy check to distinguish none unique and unique
+ executables (bug #37329)
+* Mon Mar 29 2004 - werner@suse.de
+- Make the directory patch working as it should (bug #37329)
+* Thu Mar 25 2004 - werner@suse.de
+- Move forward to official bug fixes to catch UTF-8 bug #31451
+ and bug #36919
+* Thu Feb 12 2004 - werner@suse.de
+- Fix cut&paste error of fix for bug #34427
+* Wed Feb 11 2004 - werner@suse.de
+- Fix SIGSEGV in using UTF-8 and pattern matching (bug #34427)
+- Fix LC_NUMERIC handling of builtin printf (bug #34428)
+* Mon Feb 02 2004 - werner@suse.de
+- Fix the fix and also bug #34242
+* Thu Jan 29 2004 - werner@suse.de
+- Fix performance problem for pattern matching in UTF-8 locale
+ (port back patch from Mitsuru Chinen <mchinen@yamato.ibm.com>)
+* Tue Jan 13 2004 - kukuk@suse.de
+- Fix last changes
+* Sat Jan 10 2004 - adrian@suse.de
+- add %%run_ldconfig
+* Mon Jul 28 2003 - werner@suse.de
+- Add /etc/bash_completion.d directory
+* Thu Jun 26 2003 - kukuk@suse.de
+- Fix specfile for lib64
+* Wed Jun 04 2003 - jh@suse.de
+- Enable profile feedback
+* Fri May 23 2003 - ro@suse.de
+- remove unpackaged files
+* Thu May 22 2003 - mfabian@suse.de
+- improvement for bash-2.05b-locale.patch and
+ bash-2.05b-readline-init.patch: this fixes the problem that
+ the line editor in bash is not correctly initialized in the first
+ bash after login via ssh or on the linux console. This is
+ especially obvious in UTF-8 locales when editing non-ASCII
+ characters on the command line. See also:
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=74701
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=74925
+ The following bug remains fixed:
+ http://bugzilla.suse.de/show_bug.cgi?id=16999
+- bash-2.05b-complete.patch: (by Miloslav Trmac <mitr@volny.cz>)
+ achieve correct alignment of file names containing non-ASCII
+ characters when typing "ls " and pressing Tab twice to show
+ the completions. See also:
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90201
+* Mon Mar 17 2003 - werner@suse.de
+- Do not execute command line if tty is closed (bug #25445)
+* Thu Feb 13 2003 - schwab@suse.de
+- Fix prompt decoding with -noediting.
+* Tue Feb 11 2003 - kukuk@suse.de
+- To avoid loop in PreRequires, don't install info pages. The info
+ package contains a dir file which contains the bash entries
+ already.
+* Fri Feb 07 2003 - ro@suse.de
+- fixed specfile
+* Fri Feb 07 2003 - ro@suse.de
+- added install_info macros
+* Mon Jan 27 2003 - schwab@suse.de
+- Fix bugs #21096 and #21392 properly: don't recurse on
+ do-lowercase-version for fallback entry.
+* Tue Jan 21 2003 - werner@suse.de
+- Allow rbash as login shell (`-' problem, bug #22917)
+* Wed Dec 18 2002 - schwab@suse.de
+- Use BuildRoot.
+* Thu Dec 12 2002 - mfabian@suse.de
+- add bash-2.05b-display-mbspeed.patch received from
+ Jiro SEKIBA <jir@yamato.ibm.com> to improve display speed in
+ multibyte locales.
+* Sat Nov 09 2002 - ro@suse.de
+- add bison to neededforbuild for now
+ (till we're sure about bison again)
+* Thu Oct 31 2002 - werner@suse.de
+- For bug #21096 and #21392: implement an oom protection.
+* Mon Oct 21 2002 - werner@suse.de
+- More for bug#21096: Make prefix-meta work even if mapped onto
+ longer escape sequences.
+* Fri Oct 18 2002 - werner@suse.de
+- Fix bug#21096: sequences like `ESC ... CHARACTER' with CHARACTER
+ mapped on functions will not cause an endless recursion anymore.
+* Wed Sep 25 2002 - ro@suse.de
+- removed more bogus provides
+* Wed Sep 11 2002 - werner@suse.de
+- Correct Provides (package should not provides its self)
+* Fri Aug 30 2002 - werner@suse.de
+- Add version dependend require on readline (bug #18652)
+* Fri Aug 30 2002 - werner@suse.de
+- Fix annoying display bug in wide character support (bug #18449)
+* Wed Aug 28 2002 - werner@suse.de
+- Add comment about multi byte handling and echo builtin (#18449)
+* Wed Aug 21 2002 - mls@suse.de
+- fix $RANDOM randomness in subshells
+* Fri Aug 09 2002 - kukuk@suse.de
+- readline-devel should require readline
+* Mon Jul 29 2002 - werner@suse.de
+- Expansion of `~user/<dir>' is like `/<dir>'
+* Sat Jul 27 2002 - kukuk@suse.de
+- Remove not used tetex from neededforbuild
+- Fix building of man2html (bash.html still broken)
+* Fri Jul 19 2002 - werner@suse.de
+- Check value of LANG before LC_ALL will be unset for getting the
+ _current_ default value of LC_ALL with setlocale(3) (bug #16999)
+* Fri Jul 19 2002 - werner@suse.de
+- Fix NULL pointer handled by memset (readline:mbutil.c)
+* Thu Jul 18 2002 - werner@suse.de
+- Update to new version bash 2.05b/readline 4.3
+* Wed May 22 2002 - schwab@suse.de
+- Fix vi-change-char.
+- Fix missing declaration.
+* Wed Apr 17 2002 - schwab@suse.de
+- Fix last change.
+* Thu Apr 11 2002 - sf@suse.de
+- using %%{_libdir} to put the shlibs into the correct directories
+ (lib / lib64)
+* Tue Mar 26 2002 - werner@suse.de
+- Fix possible endless loop if terminal will be disconneted during
+ complete answer (bug report from bastian@kde.org, for more see
+ http://bugs.kde.org/db/37/37999.html)
+* Wed Mar 20 2002 - ro@suse.de
+- removed tetex from neededforbuild, it's not used here
+* Wed Mar 06 2002 - werner@suse.de
+- Use improved bug fix for line wrapping problem, now line wrapping
+ work for char and wide char environments
+- Fix readline version number
+* Wed Feb 27 2002 - mfabian@suse.de
+- add readline-4.2-i18n-0.3-display.patch from
+ Jiro SEKIBA <jir@yamato.ibm.com> to fix a line wrapping
+ problem.
+* Mon Jan 21 2002 - werner@suse.de
+- Fix bug #12834: Update to bash-2.05-i18n-0.5.patch.gz and
+ bash-2.05-readline-i18n-0.3.patch.gz
+* Thu Oct 18 2001 - werner@suse.de
+- Allways include /etc/inputrc if INPUTRC isn't system file
+* Mon Oct 08 2001 - werner@suse.de
+- Fix readline i18n patch: enable configure of multi byte handling,
+ fix warnings and bug in histexpand.c
+* Fri Oct 05 2001 - werner@suse.de
+- Add two patches for I18N support of bash and readline library
+* Tue Sep 04 2001 - werner@suse.de
+- Add patch to avoid trouble with C++ header definitions
+* Fri Aug 03 2001 - werner@suse.de
+- Fix fc crash (bug #9620)
+* Mon Jul 02 2001 - olh@suse.de
+- dont apply bash-2.05-s390x-unwind.patch on ppc and sparc
+* Thu Jun 14 2001 - bk@suse.de
+- fix 64-bit bigendian bug for s390x
+* Wed Jun 06 2001 - werner@suse.de
+- Re-order configure.in to avoid trouble with new autoconf
+* Tue May 08 2001 - mfabian@suse.de
+- bzip2 sources
+* Sat May 05 2001 - schwab@suse.de
+- Fix process substitution when stdin is closed.
+* Wed May 02 2001 - werner@suse.de
+- Make patch for 2.4.4 work within spec
+* Wed May 02 2001 - werner@suse.de
+- Remove buggy patch in job control, add a workaround
+* Mon Apr 30 2001 - werner@suse.de
+- Add patch to get job control into right order on a pipe
+* Thu Apr 12 2001 - werner@suse.de
+- Provide cpp macro OLD_READLINE for backwards compatibility
+ at compile time with old readline interface
+* Thu Apr 12 2001 - ro@suse.de
+- added split-alias as provides (again)
+* Wed Apr 11 2001 - werner@suse.de
+- Update to bash 2.05 and readline 4.2
+- Port of our patches
+* Thu Feb 22 2001 - werner@suse.de
+- Split package into bash/readline/readline-devel
+- Depend libreadline on libncurses
+* Thu Sep 14 2000 - werner@suse.de
+- Add some bug fixes
+- Add missed ssh fix for none interactive shell
+* Wed Jun 07 2000 - werner@suse.de
+- Fix some patches
+- Add export patch for bash 2.04
+- Fix `soname' of readline and history libraries
+- Fix linkage of major readline and history libraries
+* Mon Jun 05 2000 - schwab@suse.de
+- Fix unwind_protect_pointer on 64-bit systems.
+* Wed May 31 2000 - schwab@suse.de
+- Comment out declaration of savestring in <readline.h> that conflicts
+ with other people's declaration (eg. gdb).
+* Mon May 29 2000 - aj@suse.de
+- Upgrade to bash 2.04 and readline 4.1.
+* Sun May 21 2000 - kukuk@suse.de
+- Use docdir
+* Sat Apr 01 2000 - bk@suse.de
+- remove obviosly unneeded link /usr/lib/libreadline.so on s390
+* Tue Mar 14 2000 - werner@suse.de
+- Add locale patch to enable LC_NUMERIC handling
+* Thu Feb 24 2000 - werner@suse.de
+- Use $VENDOR for several linux architectures
+- Set check_window_size (shopt checkwinsize) to true, this will
+ correct screen size even if it changes during a job.
+* Tue Feb 15 2000 - schwab@suse.de
+- Update config.{guess,sub} to latest version.
+- Fix spec file to create doc directory before installing into it.
+* Fri Jan 28 2000 - werner@suse.de
+- Add mailstat patch (handles mail directories)
+- Fix configuration (system is %%arch-suse-linux)
+- Fix segfault (job handling)
+- Fix manual (add rbash manual, add some missed options)
+- Install rbash (symlink to bash)
+- Fix readline (End, Del)
+- Fix temporary file handling (do not write without check)
+- Use system random interface not builtin
+- Remove some compiler warnings
+- Set --enable-disabled-builtins (useful)
+- Install shared readline and history in /lib (bash needs that)
+- Enable shared readline (version 4.0) and history library
+- Try to use shared readline and history for bash (TEST)
+* Fri Dec 03 1999 - kasal@suse.de
+- added command to make and install doc/bashref.html
+* Fri Nov 26 1999 - kukuk@suse.de
+- Fix spec file
+* Thu Nov 25 1999 - kukuk@suse.de
+- Merge Makefile.Linux with spec file, use RPM_OPT_FLAGS
+- Remove --disable-dparen-arithmetic
+* Mon Sep 13 1999 - bs@suse.de
+- ran old prepare_spec on spec file to switch to new prepare_spec.
+* Tue Aug 24 1999 - uli@suse.de
+- fixed for PPC
+* Mon Jul 19 1999 - florian@suse.de
+- update to bash 2.03, readline 4.0
+* Wed Jan 13 1999 - @suse.de
+- disabled `Broken pipe' messages
+* Sun Dec 13 1998 - bs@suse.de
+- removed notify message - bash 2.0 is standard for a long time now.
+* Mon Dec 07 1998 - florian@suse.de
+- remove SSH_CLIENT-kludge as this cannot detect all correct cases
+ where .bashrc should be loaded
+- delete email-changes in bashbug script
+- update readline to version 2.2.1
+* Thu Nov 12 1998 - bs@suse.de
+- minor fix for new rpm
+* Thu Oct 01 1998 - ro@suse.de
+- update to 2.02.1 / reintegrated werner's tmp-fix for bashbug
+* Thu Jul 23 1998 - werner@suse.de
+- use mktemp
+* Thu Jul 16 1998 - werner@suse.de
+- fix bashbug temp file handling
+* Wed Jun 17 1998 - ro@suse.de
+- changed general.h: !defined (gid_t)
+* Mon Oct 27 1997 - florian@suse.de
+- do not include old compatible-only safestring() in libreadline.a
+* Thu Oct 09 1997 - florian@suse.de
+- update to version 2.01.1
+- add several bugfixes
+- fix missing things in spec-file
+* Thu Aug 14 1997 - florian@suse.de
+- add several bug-fixes from gnu.bash.bug and fix memory management
+ of LC_ALL
+* Sat Jul 05 1997 - florian@suse.de
+- add another bugfix from gnu.utils.bugs
+* Mon Jun 23 1997 - florian@suse.de
+- create the history file with 0600 perms
+- add minor bugfix to check for new email
+* Thu Jun 05 1997 - florian@suse.de
+- update to bash 2.01 and readline 2.1
+- add more documentation files in /usr/doc
+- bash: check for NULL-pointer before calling "savestring()"
+- add bashref.info and newer FAQ
+* Tue Apr 22 1997 - bs@suse.de
+- added FAQ and bashref.html to /usr/doc/packages/bash
+* Sun Apr 13 1997 - florian@suse.de
+- update to bash 2.0 with lots of patches from gnu.utils.bugs
+ Mon Sep 2 02:48:35 MET DST 1996
+ new version with security patches
+* Thu Jan 02 1997 - florian@suse.de
+ security fix included (0xff was command separator)
diff --git a/SRPMS/bash-3.1-55.src.rpm b/SRPMS/bash-3.1-55.src.rpm
new file mode 100644
index 0000000..52541da
--- /dev/null
+++ b/SRPMS/bash-3.1-55.src.rpm
Binary files differ