From 4a895d111d1b13ddb624a8d055d217e695361447 Mon Sep 17 00:00:00 2001 From: Pete Travis Date: Wed, 1 Oct 2014 11:59:35 -0600 Subject: sles 11.2 bash, in whole --- SOURCES/bash-2.03-manual.patch | 65 ++ SOURCES/bash-3.0-decl.patch | 12 + SOURCES/bash-3.0-evalexp.patch | 15 + SOURCES/bash-3.0-nfs_redir.patch | 152 +++++ SOURCES/bash-3.0-warn-locale.patch | 31 + SOURCES/bash-3.2-2.4.4.patch | 144 ++++ SOURCES/bash-3.2-longjmp.dif | 45 ++ SOURCES/bash-3.2-printf.patch | 34 + SOURCES/bash-3.2-sigrestart.patch | 38 ++ SOURCES/bash-4.0-async-bnc523667.dif | 18 + SOURCES/bash-4.0-extended_quote.patch | 22 + SOURCES/bash-4.0-headers.dif | 77 +++ SOURCES/bash-4.0-loadables.dif | 754 +++++++++++++++++++++ SOURCES/bash-4.0-patches.tar.bz2 | Bin 0 -> 17535 bytes SOURCES/bash-4.0-security.patch | 85 +++ SOURCES/bash-4.0-setlocale.dif | 39 ++ SOURCES/bash-4.0.10-typo.patch | 22 + SOURCES/bash-4.0.24-acl.dif | 61 ++ SOURCES/bash-4.0.dif | 282 ++++++++ SOURCES/bash-4.0.tar.bz2 | Bin 0 -> 4706830 bytes SOURCES/bash-rpmlintrc | 2 + SOURCES/dot.bashrc | 28 + SOURCES/dot.profile | 28 + SOURCES/readline-4.3-input.dif | 50 ++ SOURCES/readline-5.2-conf.patch | 124 ++++ SOURCES/readline-6.0-destdir.patch | 191 ++++++ SOURCES/readline-6.0-metamode.patch | 11 + SOURCES/readline-6.0-patches.tar.bz2 | Bin 0 -> 2635 bytes SOURCES/readline-6.0-wrap.patch | 16 + SOURCES/readline-6.0.dif | 139 ++++ SOURCES/readline-6.0.tar.bz2 | Bin 0 -> 1905460 bytes SOURCES/run-tests | 29 + SPECS/bash.spec | 1185 +++++++++++++++++++++++++++++++++ 33 files changed, 3699 insertions(+) create mode 100644 SOURCES/bash-2.03-manual.patch create mode 100644 SOURCES/bash-3.0-decl.patch create mode 100644 SOURCES/bash-3.0-evalexp.patch create mode 100644 SOURCES/bash-3.0-nfs_redir.patch create mode 100644 SOURCES/bash-3.0-warn-locale.patch create mode 100644 SOURCES/bash-3.2-2.4.4.patch create mode 100644 SOURCES/bash-3.2-longjmp.dif create mode 100644 SOURCES/bash-3.2-printf.patch create mode 100644 SOURCES/bash-3.2-sigrestart.patch create mode 100644 SOURCES/bash-4.0-async-bnc523667.dif create mode 100644 SOURCES/bash-4.0-extended_quote.patch create mode 100644 SOURCES/bash-4.0-headers.dif create mode 100644 SOURCES/bash-4.0-loadables.dif create mode 100644 SOURCES/bash-4.0-patches.tar.bz2 create mode 100644 SOURCES/bash-4.0-security.patch create mode 100644 SOURCES/bash-4.0-setlocale.dif create mode 100644 SOURCES/bash-4.0.10-typo.patch create mode 100644 SOURCES/bash-4.0.24-acl.dif create mode 100644 SOURCES/bash-4.0.dif create mode 100644 SOURCES/bash-4.0.tar.bz2 create mode 100644 SOURCES/bash-rpmlintrc create mode 100644 SOURCES/dot.bashrc create mode 100644 SOURCES/dot.profile create mode 100644 SOURCES/readline-4.3-input.dif create mode 100644 SOURCES/readline-5.2-conf.patch create mode 100644 SOURCES/readline-6.0-destdir.patch create mode 100644 SOURCES/readline-6.0-metamode.patch create mode 100644 SOURCES/readline-6.0-patches.tar.bz2 create mode 100644 SOURCES/readline-6.0-wrap.patch create mode 100644 SOURCES/readline-6.0.dif create mode 100644 SOURCES/readline-6.0.tar.bz2 create mode 100644 SOURCES/run-tests create mode 100644 SPECS/bash.spec diff --git a/SOURCES/bash-2.03-manual.patch b/SOURCES/bash-2.03-manual.patch new file mode 100644 index 0000000..fd085d2 --- /dev/null +++ b/SOURCES/bash-2.03-manual.patch @@ -0,0 +1,65 @@ +Index: doc/bash.1 +=================================================================== +--- doc/bash.1.orig ++++ doc/bash.1 +@@ -115,6 +115,12 @@ processing, then commands are read from + 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 output. +@@ -6211,6 +6217,11 @@ Apply the following `\fBs\fP' modifier o + .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 +@@ -9205,6 +9216,11 @@ process or job waited for. + .SH "RESTRICTED SHELL" + .\" rbash.1 + .zY ++.if !dFN \{\ ++.de FN ++\fI\|\\$1\|\fP ++.. ++.\} + .PP + If + .B bash +Index: doc/builtins.1 +=================================================================== +--- doc/builtins.1.orig ++++ doc/builtins.1 +@@ -12,6 +12,6 @@ shift, shopt, source, suspend, test, tim + 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) +Index: doc/rbash.1 +=================================================================== +--- doc/rbash.1.orig ++++ doc/rbash.1 +@@ -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-3.0-decl.patch b/SOURCES/bash-3.0-decl.patch new file mode 100644 index 0000000..8994ae1 --- /dev/null +++ b/SOURCES/bash-3.0-decl.patch @@ -0,0 +1,12 @@ +Index: support/printenv.c +=================================================================== +--- support/printenv.c.orig ++++ support/printenv.c +@@ -30,6 +30,7 @@ + + #include "bashansi.h" + ++#include + 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..797f121 --- /dev/null +++ b/SOURCES/bash-3.0-evalexp.patch @@ -0,0 +1,15 @@ +Index: expr.c +=================================================================== +--- expr.c.orig ++++ expr.c +@@ -410,8 +410,8 @@ expassign () + 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..cd3f57c --- /dev/null +++ b/SOURCES/bash-3.0-nfs_redir.patch @@ -0,0 +1,152 @@ +Index: redir.c +=================================================================== +--- redir.c.orig ++++ redir.c +@@ -176,12 +176,13 @@ redirection_error (temp, error) + 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) +@@ -197,14 +198,21 @@ do_redirections (list, flags) + + 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 +@@ -786,6 +794,8 @@ do_redirection_internal (redirect, flags + #if defined (BUFFERED_INPUT) + check_bash_input (redirector); + #endif ++ if ((fd != redirector) && (close(redirector) < 0) && (errno != EBADF)) ++ close_before_dup2_err = errno; + + /* Make sure there is no pending output before we change the state + of the underlying file descriptor, since the builtins use stdio +@@ -879,6 +889,9 @@ do_redirection_internal (redirect, flags + #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; +@@ -920,6 +933,9 @@ do_redirection_internal (redirect, flags + #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); +Index: execute_cmd.c +=================================================================== +--- execute_cmd.c.orig ++++ execute_cmd.c +@@ -121,7 +121,7 @@ static void close_pipes __P((int, int)); + 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 *)); +@@ -417,12 +417,13 @@ shell_control_structure (type) + + /* 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 +@@ -664,7 +665,7 @@ execute_command_internal (command, async + 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 (last_command_exit_value = EXECUTION_FAILURE); +@@ -3314,7 +3315,7 @@ execute_null_command (redirects, pipe_in + REDIRECT *redirects; + int pipe_in, pipe_out, async; + { +- int r; ++ int r, s; + + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE || async) + { +@@ -3361,10 +3362,10 @@ execute_null_command (redirects, pipe_in + 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 (last_command_subst_pid != NO_PID) + return (last_command_exit_value); +@@ -4238,7 +4239,7 @@ execute_builtin_or_function (words, buil + + 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 */ +@@ -4299,8 +4300,10 @@ execute_builtin_or_function (words, buil + + 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..1773510 --- /dev/null +++ b/SOURCES/bash-3.0-warn-locale.patch @@ -0,0 +1,31 @@ +Index: locale.c +=================================================================== +--- locale.c.orig ++++ locale.c +@@ -29,6 +29,10 @@ + #include "bashintl.h" + #include "bashansi.h" + #include ++#include ++#include ++#include ++#include + #include "chartypes.h" + #include + +@@ -68,6 +72,15 @@ void + 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.2-2.4.4.patch b/SOURCES/bash-3.2-2.4.4.patch new file mode 100644 index 0000000..3f34241 --- /dev/null +++ b/SOURCES/bash-3.2-2.4.4.patch @@ -0,0 +1,144 @@ +Index: array.c +=================================================================== +--- array.c.orig ++++ array.c +@@ -877,7 +877,7 @@ char *s, *sep; + * To make a running version, compile -DTEST_ARRAY and link with: + * xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a + */ +-int interrupt_immediately = 0; ++volatile sig_atomic_t interrupt_immediately = 0; + + int + signal_is_trapped(s) +Index: hashlib.c +=================================================================== +--- hashlib.c.orig ++++ hashlib.c +@@ -381,7 +381,7 @@ hash_pstats (table, name) + + HASH_TABLE *table, *ntable; + +-int interrupt_immediately = 0; ++volatile sig_atomic_t interrupt_immediately = 0; + + int + signal_is_trapped (s) +Index: jobs.c +=================================================================== +--- jobs.c.orig ++++ jobs.c +@@ -1735,6 +1735,15 @@ make_child (command, async_p) + 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, +Index: quit.h +=================================================================== +--- quit.h.orig ++++ quit.h +@@ -21,9 +21,13 @@ + #if !defined (_QUIT_H_) + #define _QUIT_H_ + ++#define __need_sig_atomic_t ++#include ++#undef __need_sig_atomic_t ++ + /* Non-zero means SIGINT has already ocurred. */ +-extern volatile int interrupt_state; +-extern volatile int terminating_signal; ++extern volatile sig_atomic_t interrupt_state; ++extern volatile sig_atomic_t terminating_signal; + + /* Macro to call a great deal. SIGINT just sets the interrupt_state variable. + When it is safe, put QUIT in the code, and the "interrupt" will take +Index: sig.c +=================================================================== +--- sig.c.orig ++++ sig.c +@@ -61,13 +61,13 @@ extern int comsub_ignore_return; + extern int parse_and_execute_level, shell_initialized; + + /* Non-zero after SIGINT. */ +-volatile int interrupt_state = 0; ++volatile sig_atomic_t interrupt_state = 0; + + /* Non-zero after SIGWINCH */ +-volatile int sigwinch_received = 0; ++volatile sig_atomic_t sigwinch_received = 0; + + /* Set to the value of any terminating signal received. */ +-volatile int terminating_signal = 0; ++volatile sig_atomic_t terminating_signal = 0; + + /* The environment at the top-level R-E loop. We use this in + the case of error return. */ +@@ -79,10 +79,10 @@ sigset_t top_level_mask; + #endif /* JOB_CONTROL */ + + /* When non-zero, we throw_to_top_level (). */ +-int interrupt_immediately = 0; ++volatile sig_atomic_t interrupt_immediately = 0; + + /* When non-zero, we call the terminating signal handler immediately. */ +-int terminate_immediately = 0; ++volatile sig_atomic_t terminate_immediately = 0; + + #if defined (SIGWINCH) + static SigHandler *old_winch = (SigHandler *)SIG_DFL; +Index: sig.h +=================================================================== +--- sig.h.orig ++++ sig.h +@@ -108,11 +108,15 @@ do { \ + + #endif /* JOB_CONTROL */ + ++#define __need_sig_atomic_t ++#include ++#undef __need_sig_atomic_t ++ + /* Extern variables */ +-extern volatile int sigwinch_received; ++extern volatile sig_atomic_t sigwinch_received; + +-extern int interrupt_immediately; +-extern int terminate_immediately; ++extern volatile sig_atomic_t interrupt_immediately; ++extern volatile sig_atomic_t terminate_immediately; + + /* Functions from sig.c. */ + extern sighandler termsig_sighandler __P((int)); +Index: examples/loadables/tee.c +=================================================================== +--- examples/loadables/tee.c.orig ++++ examples/loadables/tee.c +@@ -35,6 +35,7 @@ + #include "bashansi.h" + + #include ++#include + #include + + #include "builtins.h" +@@ -56,7 +57,7 @@ static FLIST *tee_flist; + + #define TEE_BUFSIZE 8192 + +-extern int interrupt_immediately; ++extern volatile sig_atomic_t interrupt_immediately; + + extern char *strerror (); + diff --git a/SOURCES/bash-3.2-longjmp.dif b/SOURCES/bash-3.2-longjmp.dif new file mode 100644 index 0000000..cb5ed4f --- /dev/null +++ b/SOURCES/bash-3.2-longjmp.dif @@ -0,0 +1,45 @@ +Index: execute_cmd.c +=================================================================== +--- execute_cmd.c.orig ++++ execute_cmd.c +@@ -25,6 +25,7 @@ + #endif /* _AIX && RISC6000 && !__GNUC__ */ + + #include ++#include + #include "chartypes.h" + #include "bashtypes.h" + #if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) +@@ -4764,6 +4765,23 @@ shell_execve (command, args, env) + /* We have committed to attempting to execute the contents of this file + as shell commands. */ + ++#if 1 ++ larray = strvec_len(args) + 1; ++ args = strvec_resize(args, larray + 1); ++ ++ for (i = larray - 1; i; i--) ++ args[i] = args[i - 1]; ++ ++ args[0] = savestring(_PATH_BSHELL); ++ args[1] = command; ++ args[larray] = (char *)0; ++ ++ SETOSTYPE (0); /* Some systems use for USG/POSIX semantics */ ++ execve ("/bin/sh", args, env); ++ SETOSTYPE (1); ++ ++ internal_error (_("%s: cannot execute: %s"), command, strerror (errno)); ++#else + initialize_subshell (); + + set_sigint_handler (); +@@ -4806,6 +4824,8 @@ shell_execve (command, args, env) + + longjmp (subshell_top_level, 1); + /*NOTREACHED*/ ++#endif ++ return (EX_NOEXEC); + } + + static int diff --git a/SOURCES/bash-3.2-printf.patch b/SOURCES/bash-3.2-printf.patch new file mode 100644 index 0000000..65cfa06 --- /dev/null +++ b/SOURCES/bash-3.2-printf.patch @@ -0,0 +1,34 @@ +Index: builtins/printf.def +=================================================================== +--- builtins/printf.def.orig ++++ builtins/printf.def +@@ -47,6 +47,7 @@ error occurs. + $END + + #include ++#include + + #include "../bashtypes.h" + +@@ -529,12 +530,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.2-sigrestart.patch b/SOURCES/bash-3.2-sigrestart.patch new file mode 100644 index 0000000..7520861 --- /dev/null +++ b/SOURCES/bash-3.2-sigrestart.patch @@ -0,0 +1,38 @@ +Index: jobs.c +=================================================================== +--- jobs.c.orig ++++ jobs.c +@@ -2417,7 +2417,11 @@ wait_for (pid) + act.sa_handler = SIG_DFL; + sigemptyset (&act.sa_mask); + sigemptyset (&oact.sa_mask); ++# if defined(MUST_REINSTALL_SIGHANDLERS) + act.sa_flags = 0; ++# else ++ act.sa_flags = SA_RESTART; ++# endif + sigaction (SIGCHLD, &act, &oact); + # endif + queue_sigchld = 1; +Index: sig.c +=================================================================== +--- sig.c.orig ++++ sig.c +@@ -654,6 +654,17 @@ set_signal_handler (sig, handler) + act.sa_flags |= SA_INTERRUPT; /* XXX */ + else + act.sa_flags |= SA_RESTART; /* XXX */ ++#else ++# if !defined(MUST_REINSTALL_SIGHANDLERS) ++ if (sig != SIGALRM) ++ act.sa_flags |= SA_RESTART; /* XXX */ ++ if (handler == (trap_handler)) ++ act.sa_flags |= SA_NODEFER; /* XXX */ ++ if (handler == (termsig_sighandler)) ++ act.sa_flags |= SA_NODEFER; /* XXX */ ++ if (sig == SIGTSTP || sig == SIGTTOU || sig == SIGTTIN || sig == SIGCONT) ++ act.sa_flags |= SA_NODEFER; /* XXX */ ++# endif + #endif + sigemptyset (&act.sa_mask); + sigemptyset (&oact.sa_mask); diff --git a/SOURCES/bash-4.0-async-bnc523667.dif b/SOURCES/bash-4.0-async-bnc523667.dif new file mode 100644 index 0000000..1b4e162 --- /dev/null +++ b/SOURCES/bash-4.0-async-bnc523667.dif @@ -0,0 +1,18 @@ +--- jobs.c ++++ jobs.c 2009-09-09 17:38:46.286401756 +0200 +@@ -626,6 +626,7 @@ stop_pipeline (async, deferred) + if (newjob) + { + newjob->flags |= J_FOREGROUND; ++#if !defined(__linux__) + /* + * !!!!! NOTE !!!!! (chet@ins.cwru.edu) + * +@@ -640,6 +641,7 @@ stop_pipeline (async, deferred) + */ + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) + maybe_give_terminal_to (shell_pgrp, newjob->pgrp, 0); ++#endif + } + } + diff --git a/SOURCES/bash-4.0-extended_quote.patch b/SOURCES/bash-4.0-extended_quote.patch new file mode 100644 index 0000000..a39d81d --- /dev/null +++ b/SOURCES/bash-4.0-extended_quote.patch @@ -0,0 +1,22 @@ +Index: parse.y +=================================================================== +--- parse.y.orig ++++ parse.y +@@ -3106,7 +3106,7 @@ parse_matched_pair (qc, open, close, len + ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen); + xfree (nestret); + +- if ((rflags & P_DQUOTE) == 0) ++ if (extended_quote || (rflags & P_DQUOTE) == 0) + { + nestret = sh_single_quote (ttrans); + free (ttrans); +@@ -3517,7 +3517,7 @@ eof_error: + ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen); + xfree (nestret); + +- if ((rflags & P_DQUOTE) == 0) ++ if (extended_quote || (rflags & P_DQUOTE) == 0) + { + nestret = sh_single_quote (ttrans); + free (ttrans); diff --git a/SOURCES/bash-4.0-headers.dif b/SOURCES/bash-4.0-headers.dif new file mode 100644 index 0000000..0acbfe0 --- /dev/null +++ b/SOURCES/bash-4.0-headers.dif @@ -0,0 +1,77 @@ +Index: examples/loadables/Makefile.in +=================================================================== +--- examples/loadables/Makefile.in.orig ++++ examples/loadables/Makefile.in +@@ -28,6 +28,9 @@ includedir = @includedir@ + + datarootdir = @datarootdir@ + ++# Support an alternate destination root directory for package building ++DESTDIR = ++ + topdir = @top_srcdir@ + BUILD_DIR = @BUILD_DIR@ + srcdir = @srcdir@ +@@ -61,6 +64,16 @@ LIBINTL_H = @LIBINTL_H@ + + CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS) + ++INSTALL = @INSTALL@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALLMODE= -m 0755 ++INSTALLMODE2 = -m 0555 ++ ++Name = bash ++Version = @BASHVERS@ ++ + # + # These values are generated for configure by ${topdir}/support/shobj-conf. + # If your system is not supported by that script, but includes facilities for +@@ -79,20 +92,45 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/l + -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \ + -I$(BUILD_DIR)/builtins $(INTL_INC) + ++.SUFFIXES: .d ++.c.d: ++ $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -MM -MT install-headers -MF $@ $< ++ + .c.o: + $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< + ++SUPPORT_SRC = $(topdir)/support/ + + 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 mypid + OTHERPROG = necho hello cat ++HEADERS = + + all: $(SHOBJ_STATUS) + + supported: $(ALLPROG) + others: $(OTHERPROG) + ++dependlist: template.d ++-include template.d ++install-headers: HEADERS = $(sort $(filter %.h,$(realpath $^))) ++install-headers: ++ @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(includedir)/$(Name)/$(Version)/builtins ++ for head in $(subst $(realpath $(topdir))/,,$(HEADERS)) ; do \ ++ case $$head in \ ++ builtins/*) dest=$(DESTDIR)$(includedir)/$(Name)/$(Version)/builtins ;; \ ++ *) dest=$(DESTDIR)$(includedir)/$(Name)/$(Version) ;; \ ++ esac; \ ++ $(INSTALL_DATA) -t $$dest $(topdir)/$$head; \ ++ done ++ ++install-plugins: $(ALLPROG) ++ @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(libdir)/$(Name)/$(Version) ++ for plugin in $(ALLPROG) ; do \ ++ $(INSTALL) $$plugin $(DESTDIR)$(libdir)/$(Name)/$(Version)/$$plugin.so ; \ ++ done ++ + unsupported: + @echo "Your system (${host_os}) is not supported by the" + @echo "${topdir}/support/shobj-conf script." diff --git a/SOURCES/bash-4.0-loadables.dif b/SOURCES/bash-4.0-loadables.dif new file mode 100644 index 0000000..83ec6fc --- /dev/null +++ b/SOURCES/bash-4.0-loadables.dif @@ -0,0 +1,754 @@ +Index: examples/loadables/Makefile.in +=================================================================== +--- examples/loadables/Makefile.in.orig ++++ examples/loadables/Makefile.in +@@ -83,7 +83,7 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/l + $(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 mypid + OTHERPROG = necho hello cat +Index: examples/loadables/basename.c +=================================================================== +--- examples/loadables/basename.c.orig ++++ examples/loadables/basename.c +@@ -9,10 +9,13 @@ + #endif + + #include +-#include "builtins.h" + #include "shell.h" + #include "common.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + ++int + basename_builtin (list) + WORD_LIST *list; + { +Index: examples/loadables/cat.c +=================================================================== +--- examples/loadables/cat.c.orig ++++ examples/loadables/cat.c +@@ -25,8 +25,10 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + + #ifndef errno + extern int errno; +Index: examples/loadables/cut.c +=================================================================== +--- examples/loadables/cut.c.orig ++++ examples/loadables/cut.c +@@ -60,8 +60,10 @@ static const char sccsid[] = "@(#)cut.c + # include + #endif + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + +@@ -244,7 +246,7 @@ c_cut(fp, fname) + pos = positions + 1; + for (col = maxval; col; --col) { + if ((ch = getc(fp)) == EOF) +- return; ++ return (0); + if (ch == '\n') + break; + if (*pos++) +Index: examples/loadables/dirname.c +=================================================================== +--- examples/loadables/dirname.c.orig ++++ examples/loadables/dirname.c +@@ -27,10 +27,13 @@ + #endif + + #include +-#include "builtins.h" + #include "shell.h" + #include "common.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + ++int + dirname_builtin (list) + WORD_LIST *list; + { +Index: examples/loadables/finfo.c +=================================================================== +--- examples/loadables/finfo.c.orig ++++ examples/loadables/finfo.c +@@ -20,6 +20,8 @@ + #include "bashansi.h" + #include "shell.h" + #include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "common.h" + + #ifndef errno +@@ -81,7 +83,7 @@ int argc; + char **argv; + { + register int i; +- int mode, flags, opt; ++ int flags, opt; + + sh_optind = 0; /* XXX */ + prog = base_pathname(argv[0]); +@@ -174,7 +176,7 @@ int m; + return (m & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID)); + } + +-static int ++static void + perms(m) + int m; + { +@@ -218,7 +220,7 @@ int m; + printf ("u=%s,g=%s,o=%s", ubits, gbits, obits); + } + +-static int ++static void + printmode(mode) + int mode; + { +@@ -313,13 +315,13 @@ int flags; + 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); +@@ -369,7 +371,6 @@ finfo_builtin(list) + { + int c, r; + char **v; +- WORD_LIST *l; + + v = make_builtin_argv (list, &c); + r = finfo_main (c, v); +Index: examples/loadables/getconf.c +=================================================================== +--- examples/loadables/getconf.c.orig ++++ examples/loadables/getconf.c +@@ -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 @@ static const struct conf_variable conf_t + { 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 @@ int + 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 @@ static void + getconf_help() + { + const struct conf_variable *cp; +- register int i, column; + + builtin_usage(); + printf("Acceptable variable names are:\n"); +Index: examples/loadables/head.c +=================================================================== +--- examples/loadables/head.c.orig ++++ examples/loadables/head.c +@@ -38,6 +38,8 @@ + + #include "builtins.h" + #include "shell.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + +@@ -88,8 +90,10 @@ file_head (fp, cnt) + break; + } + } ++ return EXECUTION_SUCCESS; + } + ++int + head_builtin (list) + WORD_LIST *list; + { +@@ -97,8 +101,6 @@ head_builtin (list) + WORD_LIST *l; + FILE *fp; + +- char *t; +- + munge_list (list); /* change -num into -n num */ + + reset_internal_getopt (); +Index: examples/loadables/hello.c +=================================================================== +--- examples/loadables/hello.c.orig ++++ examples/loadables/hello.c +@@ -11,8 +11,10 @@ + + #include + +-#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. +Index: examples/loadables/id.c +=================================================================== +--- examples/loadables/id.c.orig ++++ examples/loadables/id.c +@@ -47,6 +47,8 @@ extern struct group *getgrgid (); + + #include "shell.h" + #include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "stdc.h" + #include "common.h" + #include "bashgetopt.h" +@@ -64,8 +66,6 @@ static int id_flags; + static uid_t ruid, euid; + static gid_t rgid, egid; + +-static char *id_user; +- + static int inituser (); + + static int id_pruser (); +Index: examples/loadables/ln.c +=================================================================== +--- examples/loadables/ln.c.orig ++++ examples/loadables/ln.c +@@ -33,8 +33,10 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + +@@ -50,6 +52,7 @@ typedef int unix_link_syscall_t __P((con + static unix_link_syscall_t *linkfn; + static int dolink (); + ++int + ln_builtin (list) + WORD_LIST *list; + { +Index: examples/loadables/logname.c +=================================================================== +--- examples/loadables/logname.c.orig ++++ examples/loadables/logname.c +@@ -27,8 +27,10 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/common.h" ++#include "builtins/builtext.h" + #include "common.h" + + #if !defined (errno) +Index: examples/loadables/mkdir.c +=================================================================== +--- examples/loadables/mkdir.c.orig ++++ examples/loadables/mkdir.c +@@ -31,8 +31,10 @@ + # include + #endif + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + +@@ -52,7 +54,7 @@ int + 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; + +@@ -169,7 +171,7 @@ make_path (path, nmode, parent_mode) + while (*p == '/') + p++; + +- while (p = strchr (p, '/')) ++ while ((p = strchr (p, '/'))) + { + *p = '\0'; + if (stat (npath, &sb) != 0) +Index: examples/loadables/necho.c +=================================================================== +--- examples/loadables/necho.c.orig ++++ examples/loadables/necho.c +@@ -21,9 +21,15 @@ + along with Bash. If not, see . + */ + ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ + #include +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + + necho_builtin (list) + WORD_LIST *list; +Index: examples/loadables/pathchk.c +=================================================================== +--- examples/loadables/pathchk.c.orig ++++ examples/loadables/pathchk.c +@@ -58,8 +58,10 @@ + #include + #include + +-#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" +@@ -98,6 +100,7 @@ extern char *strerror (); + + static int validate_path (); + ++int + pathchk_builtin (list) + WORD_LIST *list; + { +@@ -278,7 +281,7 @@ validate_path (path, portability) + 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; +@@ -290,10 +293,8 @@ validate_path (path, portability) + 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 == '/' ? "/" : "."); +@@ -370,7 +371,7 @@ validate_path (path, portability) + 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; + } +Index: examples/loadables/print.c +=================================================================== +--- examples/loadables/print.c.orig ++++ examples/loadables/print.c +@@ -33,6 +33,8 @@ + #include "bashansi.h" + #include "shell.h" + #include "builtins.h" ++#include "builtins/common.h" ++#include "builtins/builtext.h" + #include "stdc.h" + #include "bashgetopt.h" + #include "builtext.h" +@@ -77,7 +79,7 @@ print_builtin (list) + { + int c, r, nflag, raw, ofd, sflag; + intmax_t lfd; +- char **v, *pfmt, *arg; ++ char *pfmt; + WORD_LIST *l; + + nflag = raw = sflag = 0; +Index: examples/loadables/printenv.c +=================================================================== +--- examples/loadables/printenv.c.orig ++++ examples/loadables/printenv.c +@@ -26,8 +26,10 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + +Index: examples/loadables/push.c +=================================================================== +--- examples/loadables/push.c.orig ++++ examples/loadables/push.c +@@ -25,8 +25,10 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "jobs.h" + #include "bashgetopt.h" + #include "common.h" +Index: examples/loadables/realpath.c +=================================================================== +--- examples/loadables/realpath.c.orig ++++ examples/loadables/realpath.c +@@ -49,8 +49,10 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + +@@ -60,6 +62,7 @@ extern int errno; + + extern char *sh_realpath(); + ++int + realpath_builtin(list) + WORD_LIST *list; + { +Index: examples/loadables/rmdir.c +=================================================================== +--- examples/loadables/rmdir.c.orig ++++ examples/loadables/rmdir.c +@@ -24,14 +24,17 @@ + + #include + #include +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "common.h" + + #if !defined (errno) + extern int errno; + #endif + ++int + rmdir_builtin (list) + WORD_LIST *list; + { +Index: examples/loadables/sleep.c +=================================================================== +--- examples/loadables/sleep.c.orig ++++ examples/loadables/sleep.c +@@ -46,6 +46,8 @@ + + #include "shell.h" + #include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "common.h" + + #define RETURN(x) \ +Index: examples/loadables/strftime.c +=================================================================== +--- examples/loadables/strftime.c.orig ++++ examples/loadables/strftime.c +@@ -31,8 +31,10 @@ + + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "common.h" + + int +Index: examples/loadables/sync.c +=================================================================== +--- examples/loadables/sync.c.orig ++++ examples/loadables/sync.c +@@ -24,10 +24,13 @@ + #include + #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; + { +Index: examples/loadables/tee.c +=================================================================== +--- examples/loadables/tee.c.orig ++++ examples/loadables/tee.c +@@ -38,8 +38,10 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + +@@ -61,6 +63,7 @@ extern volatile sig_atomic_t interrupt_i + + extern char *strerror (); + ++int + tee_builtin (list) + WORD_LIST *list; + { +@@ -69,8 +72,6 @@ tee_builtin (list) + FLIST *fl; + char *buf, *bp; + +- char *t; +- + reset_internal_getopt (); + append = nointr = 0; + tee_flist = (FLIST *)NULL; +Index: examples/loadables/template.c +=================================================================== +--- examples/loadables/template.c.orig ++++ examples/loadables/template.c +@@ -11,8 +11,10 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + + #if !defined (errno) +Index: examples/loadables/truefalse.c +=================================================================== +--- examples/loadables/truefalse.c.orig ++++ examples/loadables/truefalse.c +@@ -20,18 +20,24 @@ + + #include + ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ + #include "bashtypes.h" + #include "shell.h" + #include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "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; +Index: examples/loadables/tty.c +=================================================================== +--- examples/loadables/tty.c.orig ++++ examples/loadables/tty.c +@@ -23,13 +23,16 @@ + #include "config.h" + + #include +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + + extern char *ttyname (); + ++int + tty_builtin (list) + WORD_LIST *list; + { +Index: examples/loadables/uname.c +=================================================================== +--- examples/loadables/uname.c.orig ++++ examples/loadables/uname.c +@@ -42,8 +42,10 @@ struct utsname { + + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + +@@ -63,10 +65,11 @@ static void uprint(); + + static int uname_flags; + ++int + uname_builtin (list) + WORD_LIST *list; + { +- int opt, r; ++ int opt; + struct utsname uninfo; + + uname_flags = 0; +Index: examples/loadables/unlink.c +=================================================================== +--- examples/loadables/unlink.c.orig ++++ examples/loadables/unlink.c +@@ -30,14 +30,17 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "common.h" + + #ifndef errno + extern int errno; + #endif + ++int + unlink_builtin (list) + WORD_LIST *list; + { +Index: examples/loadables/whoami.c +=================================================================== +--- examples/loadables/whoami.c.orig ++++ examples/loadables/whoami.c +@@ -23,11 +23,14 @@ + #include + #include + +-#include "builtins.h" + #include "shell.h" ++#include "builtins.h" ++#include "builtins/builtext.h" ++#include "builtins/common.h" + #include "bashgetopt.h" + #include "common.h" + ++int + whoami_builtin (list) + WORD_LIST *list; + { +Index: shell.h +=================================================================== +--- shell.h.orig ++++ shell.h +@@ -22,6 +22,9 @@ + #include "config.h" + #endif + ++#include ++#include ++ + #include "bashjmp.h" + + #include "command.h" diff --git a/SOURCES/bash-4.0-patches.tar.bz2 b/SOURCES/bash-4.0-patches.tar.bz2 new file mode 100644 index 0000000..aa7f485 Binary files /dev/null and b/SOURCES/bash-4.0-patches.tar.bz2 differ diff --git a/SOURCES/bash-4.0-security.patch b/SOURCES/bash-4.0-security.patch new file mode 100644 index 0000000..2b60b9d --- /dev/null +++ b/SOURCES/bash-4.0-security.patch @@ -0,0 +1,85 @@ +Index: variables.c +=================================================================== +--- variables.c.orig ++++ variables.c +@@ -1203,6 +1203,7 @@ init_seconds_var () + 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; +@@ -1256,6 +1257,24 @@ seedrand () + sbrand (tv.tv_sec ^ tv.tv_usec ^ getpid ()); + } + ++#else ++ ++static int last_sbrand_pid; ++ ++static int brand () ++{ ++ return random() & 32767; ++} ++ ++static void sbrand (unsigned long seed) ++{ ++ srandom(seed); ++} ++ ++static void ++seedrand () {} ++#endif ++ + static SHELL_VAR * + assign_random (self, value, unused, key) + SHELL_VAR *self; +@@ -1264,8 +1283,10 @@ assign_random (self, value, unused, key) + char *key; + { + sbrand (strtoul (value, (char **)NULL, 10)); ++#if !defined(linux) + if (subshell_environment) + seeded_subshell = getpid (); ++#endif + return (self); + } + +@@ -1274,6 +1295,7 @@ get_random_number () + { + int rv, pid; + ++#if !defined(linux) + /* Reset for command and process substitution. */ + pid = getpid (); + if (subshell_environment && seeded_subshell != pid) +@@ -1285,6 +1307,18 @@ get_random_number () + 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; + } + +@@ -1296,7 +1330,9 @@ get_random (var) + 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-4.0-setlocale.dif b/SOURCES/bash-4.0-setlocale.dif new file mode 100644 index 0000000..cec7bc1 --- /dev/null +++ b/SOURCES/bash-4.0-setlocale.dif @@ -0,0 +1,39 @@ +Index: locale.c +=================================================================== +--- locale.c.orig ++++ locale.c +@@ -47,6 +47,7 @@ extern int dump_translatable_strings, du + + /* The current locale when the program begins */ + static char *default_locale; ++static char fallback[128]; + + /* The current domain for textdomain(3). */ + static char *default_domain; +@@ -314,11 +315,21 @@ get_locale_var (var) + if (locale == 0 || *locale == 0) + locale = lang; + if (locale == 0 || *locale == 0) +-#if 0 +- locale = default_locale; /* system-dependent; not really portable. should it be "C"? */ +-#else +- locale = ""; +-#endif ++ { ++ char *ptr; ++ if (default_locale && *default_locale && (ptr = strstr(default_locale, var)) && (ptr = strchr(ptr, '=')) && ++ptr) ++ { ++ memset (fallback, 0, sizeof(fallback)); ++ strncpy(fallback, ptr, sizeof(fallback)-1); ++ ++ if ((ptr = strchr(fallback, ';'))) ++ *ptr = '\0'; ++ ++ locale = fallback; ++ } ++ else ++ locale = default_locale; /* system-dependent; not really portable. should it be "C"? */ ++ } + return (locale); + } + diff --git a/SOURCES/bash-4.0.10-typo.patch b/SOURCES/bash-4.0.10-typo.patch new file mode 100644 index 0000000..e92826c --- /dev/null +++ b/SOURCES/bash-4.0.10-typo.patch @@ -0,0 +1,22 @@ +| Date: Sat, 14 Mar 2009 21:14:06 +0100 +| From: Andreas Schwab +| To: bug-bash@gnu.org +| Subject: [bash-bug] Doc typo +| +| A small typo in the bash doc. +| +| Andreas. +| +Index: doc/bashref.texi +=================================================================== +--- doc/bashref.texi.orig ++++ doc/bashref.texi +@@ -864,7 +864,7 @@ operator terminates a pattern list. + A list of patterns and an associated command-list is known + as a @var{clause}. + +-Each clause must be terminated with @samp{;;}, @samp{,&}, or @samp{;;&}. ++Each clause must be terminated with @samp{;;}, @samp{;&}, or @samp{;;&}. + The @var{word} undergoes tilde expansion, parameter expansion, command + substitution, arithmetic expansion, and quote removal before matching is + attempted. Each @var{pattern} undergoes tilde expansion, parameter diff --git a/SOURCES/bash-4.0.24-acl.dif b/SOURCES/bash-4.0.24-acl.dif new file mode 100644 index 0000000..5e7e1ed --- /dev/null +++ b/SOURCES/bash-4.0.24-acl.dif @@ -0,0 +1,61 @@ +Index: findcmd.c +=================================================================== +--- findcmd.c.orig ++++ findcmd.c +@@ -93,7 +93,22 @@ file_status (name) + + r = FS_EXISTS; + +-#if defined (AFS) ++#if defined (HAVE_EACCESS) /* FreeBSD, GLIBC_2.4+ */ ++ ++ /* For support of ACL's use eaccess(3) if found e.g. glibc 2.4 and up: ++ * Like access(2), euidaccess(3) checks permissions and existence of the ++ * file identified by its argument pathname. However, whereas access(2), ++ * performs checks using the real user and group identifiers of the pro- ++ * cess, euidaccess(3) uses the effective identifiers. ++ * eaccess(3) is a synonym for euidaccess(3), provided for compatibility ++ * with some other systems. */ ++ if (eaccess (name, X_OK) == 0) ++ r |= FS_EXECABLE; ++ if (eaccess (name, R_OK) == 0) ++ r |= FS_READABLE; ++ ++#elif defined (AFS) ++ + /* We have to use access(2) to determine access because AFS does not + support Unix file system semantics. This may produce wrong + answers for non-AFS files when ruid != euid. I hate AFS. */ +@@ -102,8 +117,7 @@ file_status (name) + if (access (name, R_OK) == 0) + r |= FS_READABLE; + +- return r; +-#else /* !AFS */ ++#else /* !AFS && !HAVE_EACCESS */ + + /* Find out if the file is actually executable. By definition, the + only other criteria is that the file has an execute bit set that +@@ -146,8 +160,8 @@ file_status (name) + r |= FS_READABLE; + } + ++#endif /* !AFS && !HAVE_EACCESS */ + return r; +-#endif /* !AFS */ + } + + /* Return non-zero if FILE exists and is executable. +Index: lib/sh/eaccess.c +=================================================================== +--- lib/sh/eaccess.c.orig ++++ lib/sh/eaccess.c +@@ -201,7 +201,7 @@ sh_eaccess (path, mode) + if (path_is_devfd (path)) + return (sh_stataccess (path, mode)); + +-#if defined (HAVE_EACCESS) /* FreeBSD */ ++#if defined (HAVE_EACCESS) /* FreeBSD, GLIBC_2.4+ */ + return (eaccess (path, mode)); + #elif defined (EFF_ONLY_OK) /* SVR4(?), SVR4.2 */ + return access (path, mode|EFF_ONLY_OK); diff --git a/SOURCES/bash-4.0.dif b/SOURCES/bash-4.0.dif new file mode 100644 index 0000000..f9bd897 --- /dev/null +++ b/SOURCES/bash-4.0.dif @@ -0,0 +1,282 @@ +Index: .pkgextract +=================================================================== +--- /dev/null ++++ .pkgextract +@@ -0,0 +1,14 @@ ++tar Oxfj ../bash-4.0-patches.tar.bz2 | patch -p0 -s ++patch -p0 -s --suffix=".manual" < ../bash-2.03-manual.patch ++patch -p0 -s --suffix=".security" < ../bash-4.0-security.patch ++patch -p0 -s --suffix=".2.4.4" < ../bash-3.2-2.4.4.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 -p0 -s --suffix=".equote" < ../bash-4.0-extended_quote.patch ++patch -p0 -s --suffix=".printf" < ../bash-3.2-printf.patch ++patch -p0 -s --suffix=".plugins" < ../bash-4.0-loadables.dif ++patch -p0 -s --suffix=".zerotty" < ../readline-4.3-input.dif ++patch -p0 -s --suffix=".wrap" < ../readline-6.0-wrap.patch ++patch -p0 -s --suffix=".conf" < ../readline-5.2-conf.patch +Index: config-top.h +=================================================================== +--- config-top.h.orig ++++ config-top.h +@@ -54,14 +54,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. */ +@@ -75,20 +75,20 @@ + #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). This checks + for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment, + which can be fooled under certain not-uncommon circumstances. */ +-/* #define SSH_SOURCE_BASHRC */ ++#define SSH_SOURCE_BASHRC + + /* Define if you want the case-capitalizing operators (~[~]) and the + `capcase' variable attribute (declare -c). */ +Index: general.h +=================================================================== +--- general.h.orig ++++ general.h +@@ -21,10 +21,13 @@ + #if !defined (_GENERAL_H_) + #define _GENERAL_H_ + ++#include ++#include + #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) +Index: jobs.c +=================================================================== +--- jobs.c.orig ++++ jobs.c +@@ -199,10 +199,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; +@@ -215,7 +215,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. */ + +Index: jobs.h +=================================================================== +--- jobs.h.orig ++++ jobs.h +@@ -165,7 +165,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; +Index: parse.y +=================================================================== +--- parse.y.orig ++++ parse.y +@@ -1283,7 +1283,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 +Index: shell.c +=================================================================== +--- shell.c.orig ++++ shell.c +@@ -479,7 +479,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 +Index: subst.c +=================================================================== +--- subst.c.orig ++++ subst.c +@@ -2962,6 +2962,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); +Index: builtins/shopt.def +=================================================================== +--- builtins/shopt.def.orig ++++ builtins/shopt.def +@@ -279,9 +279,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; +Index: doc/Makefile.in +=================================================================== +--- doc/Makefile.in.orig ++++ doc/Makefile.in +@@ -142,7 +142,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $ + ${RM} $@ + -${DVIPS} $< + +-all: ps info dvi text html ++all: info html + nodvi: ps info text html + everything: all pdf + +Index: doc/bash.1 +=================================================================== +--- doc/bash.1.orig ++++ doc/bash.1 +@@ -4620,8 +4620,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. +@@ -9340,6 +9340,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 +Index: support/printenv.c +=================================================================== +--- support/printenv.c.orig ++++ support/printenv.c +@@ -27,6 +27,7 @@ + #if defined (HAVE_CONFIG_H) + # include + #endif ++#include + + #include "bashansi.h" + +Index: support/rlvers.sh +=================================================================== +--- support/rlvers.sh.orig ++++ support/rlvers.sh +@@ -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 +Index: support/shobj-conf +=================================================================== +--- support/shobj-conf.orig ++++ support/shobj-conf +@@ -112,10 +112,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*) +Index: tests/run-intl +=================================================================== +--- tests/run-intl.orig ++++ tests/run-intl +@@ -5,4 +5,4 @@ echo "warning: some of these tests will + echo "warning: locales installed on your system." >&2 + echo "warning: please ignore any differences consisting only of white space" >&2 + ${THIS_SH} ./intl.tests > /tmp/xx +-diff $AFLAG /tmp/xx intl.right && rm -f /tmp/xx ++diff -w $AFLAG /tmp/xx intl.right && rm -f /tmp/xx +Index: tests/run-read +=================================================================== +--- tests/run-read.orig ++++ tests/run-read +@@ -1,4 +1,4 @@ + echo "warning: please do not consider output differing only in the amount of" >&2 + echo "warning: white space to be an error." >&2 + ${THIS_SH} ./read.tests > /tmp/xx 2>&1 +-diff /tmp/xx read.right && rm -f /tmp/xx ++diff -w /tmp/xx read.right && rm -f /tmp/xx diff --git a/SOURCES/bash-4.0.tar.bz2 b/SOURCES/bash-4.0.tar.bz2 new file mode 100644 index 0000000..2c5fe5e Binary files /dev/null and b/SOURCES/bash-4.0.tar.bz2 differ diff --git a/SOURCES/bash-rpmlintrc b/SOURCES/bash-rpmlintrc new file mode 100644 index 0000000..db5425f --- /dev/null +++ b/SOURCES/bash-rpmlintrc @@ -0,0 +1,2 @@ +addFilter(".*hidden-file-or-dir.*/etc/skel/\..*") +addFilter(".*zero-length.*/etc/skel/\..*") diff --git a/SOURCES/dot.bashrc b/SOURCES/dot.bashrc new file mode 100644 index 0000000..8421175 --- /dev/null +++ b/SOURCES/dot.bashrc @@ -0,0 +1,28 @@ +# Sample .bashrc for SuSE Linux +# Copyright (c) SuSE GmbH Nuernberg + +# There are 3 different types of shells in bash: the login shell, normal shell +# and interactive shell. Login shells read ~/.profile and interactive shells +# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all +# settings made here will also take effect in a login shell. +# +# NOTE: It is recommended to make language settings in ~/.profile rather than +# here, since multilingual X sessions would not work properly if LANG is over- +# ridden in every subshell. + +# Some applications read the EDITOR variable to determine your favourite text +# editor. So uncomment the line below and enter the editor of your choice :-) +#export EDITOR=/usr/bin/vim +#export EDITOR=/usr/bin/mcedit + +# For some news readers it makes sense to specify the NEWSSERVER variable here +#export NEWSSERVER=your.news.server + +# If you want to use a Palm device with Linux, uncomment the two lines below. +# For some (older) Palm Pilots, you might need to set a lower baud rate +# e.g. 57600 or 38400; lowest is 9600 (very slow!) +# +#export PILOTPORT=/dev/pilot +#export PILOTRATE=115200 + +test -s ~/.alias && . ~/.alias || true diff --git a/SOURCES/dot.profile b/SOURCES/dot.profile new file mode 100644 index 0000000..3da0215 --- /dev/null +++ b/SOURCES/dot.profile @@ -0,0 +1,28 @@ +# Sample .profile for SuSE Linux +# rewritten by Christian Steinruecken +# +# This file is read each time a login shell is started. +# All other interactive shells will only read .bashrc; this is particularly +# important for language settings, see below. + +test -z "$PROFILEREAD" && . /etc/profile || true + +# Most applications support several languages for their output. +# To make use of this feature, simply uncomment one of the lines below or +# add your own one (see /usr/share/locale/locale.alias for more codes) +# This overwrites the system default set in /etc/sysconfig/language +# in the variable RC_LANG. +# +#export LANG=de_DE.UTF-8 # uncomment this line for German output +#export LANG=fr_FR.UTF-8 # uncomment this line for French output +#export LANG=es_ES.UTF-8 # uncomment this line for Spanish output + + +# Some people don't like fortune. If you uncomment the following lines, +# you will have a fortune each time you log in ;-) + +#if [ -x /usr/bin/fortune ] ; then +# echo +# /usr/bin/fortune +# echo +#fi diff --git a/SOURCES/readline-4.3-input.dif b/SOURCES/readline-4.3-input.dif new file mode 100644 index 0000000..5abe76e --- /dev/null +++ b/SOURCES/readline-4.3-input.dif @@ -0,0 +1,50 @@ +Index: lib/readline/input.c +=================================================================== +--- lib/readline/input.c.orig ++++ lib/readline/input.c +@@ -459,6 +459,8 @@ rl_read_key () + return (c); + } + ++extern int _rl_read_zero_char_from_tty; ++ + int + rl_getc (stream) + FILE *stream; +@@ -482,7 +484,10 @@ rl_getc (stream) + /* 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) +Index: lib/readline/readline.c +=================================================================== +--- lib/readline/readline.c.orig ++++ lib/readline/readline.c +@@ -469,6 +469,9 @@ _rl_internal_char_cleanup () + _rl_erase_entire_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 () +@@ -513,6 +516,10 @@ readline_internal_charloop () + 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); ++ + /* look at input.c:rl_getc() for the circumstances under which this will + be returned; punt immediately on read error without converting it to + a newline. */ diff --git a/SOURCES/readline-5.2-conf.patch b/SOURCES/readline-5.2-conf.patch new file mode 100644 index 0000000..448efe1 --- /dev/null +++ b/SOURCES/readline-5.2-conf.patch @@ -0,0 +1,124 @@ +Index: lib/readline/bind.c +=================================================================== +--- lib/readline/bind.c.orig ++++ lib/readline/bind.c +@@ -751,6 +751,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; +@@ -816,11 +819,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 + 4. /etc/inputrc + If the file existed and could be opened and read, 0 is returned, + otherwise errno is returned. */ +@@ -832,16 +838,37 @@ rl_read_init_file (filename) + if (filename == 0) + filename = last_readline_init_file; + if (filename == 0) +- filename = sh_get_env_value ("INPUTRC"); ++ { ++ filename = sh_get_env_value ("INPUTRC"); ++ if (filename && !strncmp(SYS_INPUTRC, filename, strlen(SYS_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 == 0) + { + filename = DEFAULT_INPUTRC; +- /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */ +- if (_rl_read_init_file (filename, 0) == 0) +- return 0; +- filename = SYS_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 (SYS_INPUTRC, 1); ++ + #if defined (__MSDOS__) + if (_rl_read_init_file (filename, 0) == 0) + return 0; +@@ -1352,7 +1379,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)); ++ } + + xfree (seq); + return 0; +@@ -1490,7 +1524,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_dispprefix PARAMS((const char *)); + static int sv_compquery PARAMS((const char *)); +Index: lib/readline/rlconf.h +=================================================================== +--- lib/readline/rlconf.h.orig ++++ lib/readline/rlconf.h +@@ -33,7 +33,7 @@ + #define HANDLE_SIGNALS + + /* Ugly but working hack for binding prefix meta. */ +-#define PREFIX_META_HACK ++#undef PREFIX_META_HACK + + /* The next-to-last-ditch effort file name for a user-specific init file. */ + #define DEFAULT_INPUTRC "~/.inputrc" +Index: lib/readline/doc/rluser.texi +=================================================================== +--- lib/readline/doc/rluser.texi.orig ++++ lib/readline/doc/rluser.texi +@@ -347,7 +347,8 @@ file is taken from the value of the envi + @end ifclear + that variable is unset, the default is @file{~/.inputrc}. If that + file does not exist or cannot be read, the ultimate default is +-@file{/etc/inputrc}. ++@file{/etc/inputrc}. If both @file{~/.inputrc} and @file{/etc/inputrc} ++exist Readline will read first @file{/etc/inputrc} and then @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-6.0-destdir.patch b/SOURCES/readline-6.0-destdir.patch new file mode 100644 index 0000000..55412c3 --- /dev/null +++ b/SOURCES/readline-6.0-destdir.patch @@ -0,0 +1,191 @@ +--- shlib/Makefile.in ++++ shlib/Makefile.in 2009-02-27 17:21:24.428797577 +0100 +@@ -58,6 +58,7 @@ bindir = @bindir@ + libdir = @libdir@ + datadir = @datadir@ + localedir = @localedir@ ++linkagedir = $(libdir) + + # Support an alternate destination root directory for package building + DESTDIR = +@@ -182,13 +183,13 @@ installdirs: $(topdir)/support/mkdirs + -$(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 2009-02-27 17:22:54.688001513 +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 @@ while [ $# -gt 0 ]; do + 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 @@ LN="ln -s" + # 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 +@@ -71,7 +78,7 @@ fi + case "$host_os" in + hpux*|darwin*|macosx*|linux*) + if [ -z "$uninstall" ]; then +- chmod 555 ${INSTALLDIR}/${LIBNAME} ++ chmod 555 ${DESTDIR}${INSTALLDIR}/${LIBNAME} + fi ;; + cygwin*|mingw*) + IMPLIBNAME=`echo ${LIBNAME} \ +@@ -109,8 +116,8 @@ case "$LIBNAME" in + 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. +@@ -118,27 +125,27 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR && + 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}${INSTALLDIR}/$LINK1 + if [ -z "$uninstall" ]; then +- ${echo} cd $INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1 ++ ${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1 + fi + ;; + + bsdi4*|*gnu*|darwin*|macosx*|k*bsd*-gnu|netbsd*) + # 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 +@@ -146,7 +153,7 @@ bsdi4*|*gnu*|darwin*|macosx*|k*bsd*-gnu| + + solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|irix[56]*|sysv[45]*|dgux*|interix*) + # libname.so -> libname.so.M +- ${echo} ${RM} ${INSTALLDIR}/$LINK1 ++ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1 + if [ -z "$uninstall" ]; then + eval $INSTALL_LINK1 + fi +@@ -157,19 +164,19 @@ solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|iri + 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 +@@ -178,7 +185,7 @@ freebsd[3-9]*|freebsdelf[3-9]*|freebsdao + + 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-6.0-metamode.patch b/SOURCES/readline-6.0-metamode.patch new file mode 100644 index 0000000..3badc39 --- /dev/null +++ b/SOURCES/readline-6.0-metamode.patch @@ -0,0 +1,11 @@ +# See bug bnc#541379 +--- lib/readline/bind.c ++++ lib/readline/bind.c 2009-09-30 11:25:38.087930034 +0200 +@@ -1473,6 +1473,7 @@ static const struct { + #if defined (VISIBLE_STATS) + { "visible-stats", &rl_visible_stats, 0 }, + #endif /* VISIBLE_STATS */ ++ { "meta-mode", &_rl_enable_meta, 0 }, + { (char *)NULL, (int *)NULL } + }; + diff --git a/SOURCES/readline-6.0-patches.tar.bz2 b/SOURCES/readline-6.0-patches.tar.bz2 new file mode 100644 index 0000000..f0558bd Binary files /dev/null and b/SOURCES/readline-6.0-patches.tar.bz2 differ diff --git a/SOURCES/readline-6.0-wrap.patch b/SOURCES/readline-6.0-wrap.patch new file mode 100644 index 0000000..f26ad5b --- /dev/null +++ b/SOURCES/readline-6.0-wrap.patch @@ -0,0 +1,16 @@ +Index: lib/readline/display.c +=================================================================== +--- lib/readline/display.c.orig ++++ lib/readline/display.c +@@ -714,7 +714,10 @@ rl_redisplay () + inv_lbreaks[++newlines] = temp; + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0) +- lpos -= _rl_col_width (local_prompt, n0, num); ++ { ++ if (local_prompt_len > 0) ++ lpos -= _rl_col_width (local_prompt, n0, num); ++ } + else + #endif + lpos -= _rl_screenwidth; diff --git a/SOURCES/readline-6.0.dif b/SOURCES/readline-6.0.dif new file mode 100644 index 0000000..3d9abc6 --- /dev/null +++ b/SOURCES/readline-6.0.dif @@ -0,0 +1,139 @@ +--- .pkgextract ++++ .pkgextract 2005-12-09 17:09:26.000000000 +0100 +@@ -0,0 +1,5 @@ ++tar Oxfj ../readline-6.0-patches.tar.bz2 | patch -p0 -s ++patch -p2 -s --suffix=".zerotty" < ../readline-4.3-input.dif ++patch -p2 -s --suffix=".wrap" < ../readline-6.0-wrap.patch ++patch -p2 -s --suffix=".conf" < ../readline-5.2-conf.patch ++patch -p0 -s --suffix=".destdir" < ../readline-6.0-destdir.patch +--- Makefile.in ++++ Makefile.in 2009-02-27 17:25:01.076001005 +0100 +@@ -222,10 +222,8 @@ uninstall-headers: + maybe-uninstall-headers: uninstall-headers + + install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-examples +- -$(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 + +@@ -254,7 +252,7 @@ uninstall-examples: maybe-uninstall-head + 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: +--- complete.c ++++ complete.c 2009-02-27 17:25:26.616935393 +0100 +@@ -942,7 +942,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]; + +@@ -1884,7 +1884,7 @@ rl_completion_matches (text, entry_funct + match_list[1] = (char *)NULL; + + _rl_interrupt_immediately++; +- while (string = (*entry_function) (text, matches)) ++ while ((string = (*entry_function) (text, matches))) + { + if (matches + 1 == match_list_size) + match_list = (char **)xrealloc +@@ -1936,7 +1936,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 +@@ -767,7 +767,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 +@@ -448,7 +448,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 2009-02-27 17:27:31.104001597 +0100 +@@ -98,7 +98,7 @@ DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ + $(RM) $@ + -${DVIPDF} $< + +-all: info dvi html ps text pdf ++all: info html + nodvi: info html text + + xdist: $(DIST_DOCS) +--- doc/readline.3 ++++ doc/readline.3 2006-11-13 17:33:27.000000000 +0100 +@@ -118,6 +118,14 @@ environment variable. If that variable + .IR ~/.inputrc . + If that file does not exist or cannot be read, the ultimate default is + .IR /etc/inputrc . ++If both files ++.I ~/.inputrc ++and ++.I /etc/inputrc ++exist readline will read first ++.I /etc/inputrc ++and then ++.IR ~/.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 +@@ -1286,6 +1294,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 +@@ -112,10 +112,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*) diff --git a/SOURCES/readline-6.0.tar.bz2 b/SOURCES/readline-6.0.tar.bz2 new file mode 100644 index 0000000..23a65c6 Binary files /dev/null and b/SOURCES/readline-6.0.tar.bz2 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/SPECS/bash.spec b/SPECS/bash.spec new file mode 100644 index 0000000..dd69428 --- /dev/null +++ b/SPECS/bash.spec @@ -0,0 +1,1185 @@ +# +# spec file for package bash (Version 4.0) +# +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + + +Name: bash +BuildRequires: bison fdupes ncurses-devel +License: GPL v2 or later +Group: System/Shells +%define bash_vers 4.0 +%define rl_vers 6.0 +Recommends: bash-doc = %bash_vers +Recommends: bash-lang = %bash_vers +Suggests: command-not-found +AutoReqProv: on +Version: 4.0 +Release: 18.3 +Summary: The GNU Bourne-Again Shell +Url: http://www.gnu.org/software/bash/bash.html +Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2 +Source1: ftp://ftp.gnu.org/gnu/readline/readline-%{rl_vers}.tar.bz2 +Source2: bash-%{bash_vers}-patches.tar.bz2 +Source3: readline-%{rl_vers}-patches.tar.bz2 +Source4: run-tests +Source5: dot.bashrc +Source6: dot.profile +Source7: bash-rpmlintrc +Patch0: bash-%{bash_vers}.dif +Patch1: bash-2.03-manual.patch +Patch2: bash-4.0-security.patch +Patch3: bash-3.2-2.4.4.patch +Patch4: bash-3.0-evalexp.patch +Patch5: bash-3.0-warn-locale.patch +Patch6: bash-3.0-nfs_redir.patch +Patch7: bash-3.0-decl.patch +Patch8: bash-4.0-async-bnc523667.dif +Patch9: bash-4.0-extended_quote.patch +Patch10: bash-3.2-printf.patch +Patch11: bash-4.0-loadables.dif +Patch14: bash-3.2-sigrestart.patch +Patch15: bash-3.2-longjmp.dif +Patch16: bash-4.0-setlocale.dif +Patch17: bash-4.0-headers.dif +Patch20: readline-%{rl_vers}.dif +Patch21: readline-4.3-input.dif +Patch22: readline-6.0-wrap.patch +Patch23: readline-5.2-conf.patch +Patch24: readline-6.0-metamode.patch +Patch30: readline-6.0-destdir.patch +Patch40: bash-4.0.10-typo.patch +Patch42: bash-4.0.24-acl.dif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%global _sysconfdir /etc +%global _incdir %{_includedir} +%global _ldldir /%{_lib}/bash +%global _minsh 0 +%{expand: %%global rl_major %(echo %{rl_vers} | sed -r 's/.[0-9]+//g')} + +%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 + Chet Ramey + +%package -n bash-doc +License: GPL v2 or later +Summary: Documentation how to Use the GNU Bourne-Again Shell +Group: Documentation/Man +Provides: bash:%{_infodir}/bash.info.gz +PreReq: %install_info_prereq +Version: 4.0 +Release: 18.3 +AutoReqProv: on + +%description -n bash-doc +This package contains the documentation for using the bourne shell +interpreter Bash. + + + +Authors: +-------- + Brian Fox + Chet Ramey + +%lang_package(bash) +%package -n bash-devel +License: GPL v2 or later +Summary: Include Files mandatory for Development of bash loadable builtins +Group: Development/Languages/C and C++ +Version: 4.0 +Release: 18.3 +AutoReqProv: on + +%description -n bash-devel +This package contains the C header files for writing loadable new +builtins for the interpreter Bash. Use -I /usr/include/bash/ +on the compilers command line. + + + +Authors: +-------- + Brian Fox + Chet Ramey + +%package -n bash-loadables +License: GPL v2 or later +Summary: Loadable bash builtins +Group: System/Shells +Version: 4.0 +Release: 18.3 +AutoReqProv: on + +%description -n bash-loadables +This package contains the examples for the ready-to-dynamic-load +builtins found in the source tar ball of the bash: + +basename Return non-directory portion of pathname. + +cut cut(1) replacement. + +dirname Return directory portion of pathname. + +finfo Print file info. + +getconf POSIX.2 getconf utility. + +head Copy first part of files. + +id POSIX.2 user identity. + +ln Make links. + +logname Print login name of current user. + +mkdir Make directories. + +pathchk Check pathnames for validity and portability. + +print Loadable ksh-93 style print builtin. + +printenv Minimal builtin clone of BSD printenv(1). + +push Anyone remember TOPS-20? + +realpath Canonicalize pathnames, resolving symlinks. + +rmdir Remove directory. + +sleep sleep for fractions of a second. + +strftime Loadable builtin interface to strftime(3). + +sync Sync the disks by forcing pending filesystem writes to +complete. + +tee Duplicate standard input. + +tty Return terminal name. + +uname Print system information. + +unlink Remove a directory entry. + +whoami Print out username of current user. + + + +Authors: +-------- + Brian Fox + Chet Ramey + +%package -n libreadline6 +License: GPL v2 or later +Summary: The Readline Library +Group: System/Libraries +Provides: bash:/%{_lib}/libreadline.so.%{rl_major} +Version: 6.0 +Release: 18.3 +Recommends: readline-doc = %{version} +# bug437293 +%ifarch ppc64 +Obsoletes: readline-64bit +%endif +# +Provides: readline = 6.0 +Obsoletes: readline <= 6.0 +AutoReqProv: on + +%description -n libreadline6 +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 + Chet Ramey + +%package -n readline-devel +License: GPL v2 or later +Summary: Include Files and Libraries mandatory for Development +Group: Development/Libraries/C and C++ +Provides: bash:%{_libdir}/libreadline.a +Version: 6.0 +Release: 18.3 +Requires: libreadline6 = %{version} +Requires: ncurses-devel +Recommends: readline-doc = %{version} +AutoReqProv: on +# bug437293 +%ifarch ppc64 +Obsoletes: readline-devel-64bit +%endif +# + +%description -n readline-devel +This package contains all necessary include files and libraries needed +to develop applications that require these. + + + +Authors: +-------- + Brian Fox + Chet Ramey + +%package -n readline-doc +License: GPL v2 or later +Summary: Documentation how to Use and Program with the Readline Library +Group: System/Libraries +Provides: readline:%{_infodir}/readline.info.gz +PreReq: %install_info_prereq +Version: 6.0 +Release: 18.3 +AutoReqProv: on + +%description -n readline-doc +This package contains the documentation for using the readline library +as well as programming with the interface of the readline library. + + + +Authors: +-------- + Brian Fox + Chet Ramey + +%prep +%setup -q -n bash-%{bash_vers} -b1 -b2 -b3 +for p in ../bash-%{bash_vers}-patches/*; do + test -e $p || break + 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 .evalexp +%patch5 -p0 -b .warnlc +%patch6 -p0 -b .nfs_redir +%patch7 -p0 -b .decl +%patch8 -p0 -b .async +%patch9 -p0 -b .extended_quote +%patch10 -p0 -b .printf +%patch11 -p0 -b .plugins +%patch14 -p0 -b .sigrestart +%patch15 -p0 -b .longjmp +%patch16 -p0 -b .setlocale +%patch17 -p0 -b .headers +%patch21 -p0 -b .zerotty +%patch22 -p0 -b .wrap +%patch23 -p0 -b .conf +%patch24 -p0 -b .metamode +%patch40 -p0 -b .typo +%patch42 -p0 -b .acl +%patch0 -p0 +cd ../readline-%{rl_vers} +for p in ../readline-%{rl_vers}-patches/*; do + test -e $p || break + echo Patch $p + patch -s -p0 < $p +done +%patch21 -p2 -b .zerotty +%patch22 -p2 -b .wrap +%patch23 -p2 -b .conf +%patch24 -p2 -b .metamode +%patch30 -p0 -b .destdir +%patch20 -p0 + +%build + LANG=POSIX + LC_ALL=$LANG + unset LC_CTYPE + CPU=$(uname -m 2> /dev/null) + HOSTTYPE=${CPU} + MACHTYPE=${CPU}-suse-linux + export LANG LC_ALL HOSTTYPE MACHTYPE +cd ../readline-%{rl_vers} +%{?suse_update_config:%{suse_update_config -f support}} + autoconf + cflags () + { + local flag=$1; shift + case "${RPM_OPT_FLAGS}" in + *${flag}*) return + esac + if test -n "$1" && gcc -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then + local var=$1; shift + eval $var=\${$var:+\$$var\ }$flag + fi + } + echo 'int main () { return !(sizeof(void*) >= 8); }' | gcc -x c -o test64 - + if ./test64 ; then + LARGEFILE="" + else + LARGEFILE="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" + fi + rm -f ./test64 + CFLAGS="$RPM_OPT_FLAGS $LARGEFILE -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g" + LDFLAGS="" + cflags -std=gnu89 CFLAGS + cflags -Wuninitialized CFLAGS + cflags -Wextra CFLAGS + cflags -Wno-unprototyped-calls CFLAGS + cflags -Wno-switch-enum CFLAGS + cflags -Wno-unused-variable CFLAGS + cflags -Wno-unused-parameter CFLAGS + cflags -ftree-loop-linear CFLAGS + cflags -pipe CFLAGS + cflags -Wl,--as-needed LDFLAGS + cflags -Wl,-O2 LDFLAGS + cflags -Wl,--hash-size=16699 LDFLAGS + cflags -Wl,-rpath,%{_ldldir}/%{bash_vers} LDFLAGS + CC=gcc + CC_FOR_BUILD="$CC" + CFLAGS_FOR_BUILD="$CFLAGS" + LDFLAGS_FOR_BUILD="$LDFLAGS" + export CC_FOR_BUILD CFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD CFLAGS LDFLAGS CC + ./configure --build=%{_target_cpu}-suse-linux \ + --prefix=%{_prefix} \ + --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.%{rl_major} + ln -sf shlib/libhistory.so.%{rl_vers} libhistory.so + ln -sf shlib/libhistory.so.%{rl_vers} libhistory.so.%{rl_major} +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 + export LD_LIBRARY_PATH=$PWD/../readline-%{rl_vers} + CC="gcc -I$PWD -L$PWD/../readline-%{rl_vers}" +%if %_minsh + cflags -Os CFLAGS +# cflags -U_FORTIFY_SOURCE CFLAGS +# cflags -funswitch-loops CFLAGS +# cflags -ftree-loop-im CFLAGS +# cflags -ftree-loop-ivcanon CFLAGS +# cflags -fprefetch-loop-arrays CFLAGS +# cflags -fno-stack-protector CFLAGS +# cflags -fno-unwind-tables CFLAGS +# cflags -fno-asynchronous-unwind-tables CFLAGS +%endif + CC_FOR_BUILD="$CC" + CFLAGS_FOR_BUILD="$CFLAGS" + export CC_FOR_BUILD CFLAGS_FOR_BUILD CFLAGS LDFLAGS CC +%{?suse_update_config:%{suse_update_config -f support}} + autoconf + # + # We have a malloc with our glibc + # + SYSMALLOC=" + --without-gnu-malloc + --without-bash-malloc + " + # + # System readline library (comment out it not to be used) + # + READLINE=" + --with-installed-readline + " + bash support/mkconffiles -v +%if %_minsh + ./configure --build=%{_target_cpu}-suse-linux \ + --prefix=%{_prefix} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --libdir=%{_libdir} \ + --with-curses \ + --with-afs \ + $SYSMALLOC \ + --enable-minimal-config \ + --enable-arith-for-command \ + --enable-array-variables \ + --enable-brace-expansion \ + --enable-casemod-attributes \ + --enable-casemod-expansion \ + --enable-command-timing \ + --enable-cond-command \ + --enable-cond-regexp \ + --enable-coprocesses \ + --enable-directory-stack \ + --enable-dparen-arithmetic \ + --enable-extended-glob \ + --enable-job-control \ + --enable-net-redirections \ + --enable-process-substitution \ + --disable-strict-posix-default \ + --enable-separate-helpfiles=%{_datadir}/bash/helpfiles \ + $READLINE + make Program=sh sh + make distclean +%endif + ./configure --build=%{_target_cpu}-suse-linux \ + --prefix=%{_prefix} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --libdir=%{_libdir} \ + --with-curses \ + --with-afs \ + $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 \ + --disable-strict-posix-default \ + --enable-separate-helpfiles=%{_datadir}/bash/helpfiles \ + $READLINE + make %{?do_profiling:CFLAGS="$CFLAGS %cflags_profile_generate"} \ + all printenv recho zecho xcase + env -i HOME=$PWD TERM=$TERM LD_LIBRARY_PATH=$LD_LIBRARY_PATH make TESTSCRIPT=%{SOURCE4} check + make %{?do_profiling:CFLAGS="$CFLAGS %cflags_profile_feedback" clean} all + make -C examples/loadables/ + make documentation + +%install +cd ../readline-%{rl_vers} + make install htmldir=%{_defaultdocdir}/readline \ + installdir=%{_defaultdocdir}/readline/examples DESTDIR=%{buildroot} + make install-shared libdir=/%{_lib} linkagedir=%{_libdir} DESTDIR=%{buildroot} + rm -rf %{buildroot}%{_defaultdocdir}/bash + mkdir -p %{buildroot}%{_defaultdocdir}/bash + chmod 0755 %{buildroot}/%{_lib}/libhistory.so.%{rl_vers} + chmod 0755 %{buildroot}/%{_lib}/libreadline.so.%{rl_vers} + rm -vf %{buildroot}/%{_lib}/libhistory.so.%{rl_vers}*old + rm -vf %{buildroot}/%{_lib}/libreadline.so.%{rl_vers}*old + rm -vf %{buildroot}/%{_lib}/libhistory.so + rm -vf %{buildroot}/%{_lib}/libreadline.so + ln -sf /%{_lib}/libhistory.so.%{rl_vers} %{buildroot}/%{_libdir}/libhistory.so + ln -sf /%{_lib}/libreadline.so.%{rl_vers} %{buildroot}/%{_libdir}/libreadline.so +cd ../bash-%{bash_vers} + make install DESTDIR=%{buildroot} + make -C examples/loadables/ install-plugins DESTDIR=%{buildroot} libdir=/%{_lib} + make -C examples/loadables/ install-headers DESTDIR=%{buildroot} + mkdir -p %{buildroot}/bin + mv %{buildroot}%{_bindir}/bash %{buildroot}/bin/ +%if %_minsh + install sh %{buildroot}/bin/sh + ln -sf ../../bin/sh %{buildroot}%{_bindir}/sh +%else + ln -sf bash %{buildroot}/bin/sh + ln -sf ../../bin/bash %{buildroot}%{_bindir}/sh +%endif + ln -sf ../../bin/bash %{buildroot}%{_bindir}/rbash + install -m 644 COMPAT NEWS %{buildroot}%{_defaultdocdir}/bash/ + install -m 644 COPYING %{buildroot}%{_defaultdocdir}/bash/ + install -m 644 doc/FAQ %{buildroot}%{_defaultdocdir}/bash/ + install -m 644 doc/INTRO %{buildroot}%{_defaultdocdir}/bash/ + install -m 644 doc/*.html %{buildroot}%{_defaultdocdir}/bash/ + install -m 644 doc/builtins.1 %{buildroot}%{_mandir}/man1/bashbuiltins.1 + install -m 644 doc/rbash.1 %{buildroot}%{_mandir}/man1/rbash.1 + gzip -9f %{buildroot}%{_infodir}/*.inf*[^z] || true + mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d + sed 's/^|//' > %{buildroot}%{_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 %{_sysconfdir}/inputrc or $HOME/.inputrc avoids this +but disables multi byte handling. +EOF + # remove unpackaged files + rm -fv %{buildroot}%{_libdir}/libhistory.so.* + rm -fv %{buildroot}%{_libdir}/libreadline.so.* + rm -fv %{buildroot}%{_infodir}/rluserman.info.gz + rm -fv %{buildroot}%{_mandir}/man3/history.3* + mkdir -p %{buildroot}%{_sysconfdir}/skel + install -m 644 %{S:5} %{buildroot}%{_sysconfdir}/skel/.bashrc + install -m 644 %{S:6} %{buildroot}%{_sysconfdir}/skel/.profile + touch -t 199605181720.50 %{buildroot}%{_sysconfdir}/skel/.bash_history + chmod 600 %{buildroot}%{_sysconfdir}/skel/.bash_history + %find_lang bash + %fdupes -s %{buildroot}%{_datadir}/bash/helpfiles + +%post -n bash-doc +%install_info --info-dir=%{_infodir} %{_infodir}/bash.info.gz + +%postun -n bash-doc +%install_info_delete --info-dir=%{_infodir} %{_infodir}/bash.info.gz + +%post -n libreadline6 -p /sbin/ldconfig + +%postun -n libreadline6 -p /sbin/ldconfig + +%post -n readline-doc +%install_info --info-dir=%{_infodir} %{_infodir}/history.info.gz +%install_info --info-dir=%{_infodir} %{_infodir}/readline.info.gz + +%postun -n readline-doc +%install_info_delete --info-dir=%{_infodir} %{_infodir}/history.info.gz +%install_info_delete --info-dir=%{_infodir} %{_infodir}/readline.info.gz + +%clean +ldd -u -r %{buildroot}/bin/bash || true +ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true +%{?buildroot: %{__rm} -rf %{buildroot}} + +%files +%defattr(-,root,root) +%config %attr(600,root,root) %{_sysconfdir}/skel/.bash_history +%config %attr(644,root,root) %{_sysconfdir}/skel/.bashrc +%config %attr(644,root,root) %{_sysconfdir}/skel/.profile +/bin/bash +/bin/sh +%dir %{_sysconfdir}/bash_completion.d +%{_bindir}/bashbug +%{_bindir}/rbash +%{_bindir}/sh +%dir %{_datadir}/bash +%dir %{_datadir}/bash/helpfiles +%{_datadir}/bash/helpfiles/* + +%files -n bash-lang -f bash.lang +%defattr(-,root,root) + +%files -n bash-doc +%defattr(-,root,root) +%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/ + +%files -n bash-devel +%defattr(-,root,root) +%dir /%{_includedir}/bash/ +%dir /%{_includedir}/bash/%{bash_vers}/ +%dir /%{_includedir}/bash/%{bash_vers}/builtins/ +/%{_incdir}/bash/%{bash_vers}/*.h +/%{_incdir}/bash/%{bash_vers}/builtins/*.h + +%files -n bash-loadables +%defattr(-,root,root) +%dir %{_ldldir}/ +%dir %{_ldldir}/%{bash_vers}/ +%{_ldldir}/%{bash_vers}/* + +%files -n libreadline6 +%defattr(-,root,root) +/%{_lib}/libhistory.so.%{rl_major} +/%{_lib}/libhistory.so.%{rl_vers} +/%{_lib}/libreadline.so.%{rl_major} +/%{_lib}/libreadline.so.%{rl_vers} + +%files -n readline-devel +%defattr(-,root,root) +%{_incdir}/readline/ +%{_libdir}/libhistory.a +%{_libdir}/libhistory.so +%{_libdir}/libreadline.a +%{_libdir}/libreadline.so +%doc %{_mandir}/man3/readline.3.gz + +%files -n readline-doc +%defattr(-,root,root) +%doc %{_infodir}/history.info.gz +%doc %{_infodir}/readline.info.gz +%doc %{_defaultdocdir}/readline/ + +%changelog +* Wed Sep 30 2009 werner@suse.de +- Make _rl_enable_meta configurable by the users (bnc#541379) +* Wed Sep 9 2009 werner@suse.de +- Do not change tty owner group twice by child and parent (bnc#523667) +* Wed Sep 9 2009 werner@suse.de +- Update to newest patch level 33 + * Includes one of our own patches +* Wed Aug 26 2009 coolo@novell.com +- rediff patches to avoid fuzz +* Tue Jul 28 2009 werner@suse.de +- Update to newest patch level 28 +* Thu Jul 2 2009 werner@suse.de +- Add fix from bash maintainer for closing memory leak in read + builtin (bnc#510288) +* Tue Jun 9 2009 werner@suse.de +- Branch off some sub packages: + * bash-lang to include localization + * bash-loadables for installing the loadable runtime builtins + * bash-devel to install headers for developing loadable builtins +* Wed Jun 3 2009 werner@suse.de +- Enforce the usage of euidaccess(3) instead of stat(2) for testing + permissions for a file (bnc#509105) +* Mon May 25 2009 werner@suse.de +- Update to newest patch level 24: + * include last few patches +- Add patches from mailing list for globstar expansion +* Mon May 11 2009 werne@suse.de +- Increase size of hash table for runtime linker a lot +* Mon Apr 27 2009 werne@suse.de +- Add patches from mailing list: + * fix problem with invisible characters in prompt + * make dir*/** work +* Tue Apr 21 2009 werne@suse.de +- Do not crash on forbidden subdirectories with globstar extension +* Wed Apr 15 2009 werne@suse.de +- Add fix to be able to clear to eol in readline library +* Tue Apr 14 2009 werne@suse.de +- Add fix for timing issue in readline SIGWINCH handling +* Wed Apr 8 2009 werne@suse.de +- Add patches from bug-bash@gnu.org to avoid eg. segmentation fault +* Mon Mar 16 2009 werner@suse.de +- Add patches from bug-bash@gnu.org to avoid eg. segmentation fault +* Thu Mar 12 2009 werner@suse.de +- Add patch from bug-bash@gnu.org to enable |& not only for + builtins and shell functions but for all commands. +* Tue Mar 10 2009 werner@suse.de +- Switch to official patches, now we are on patch level 10 +* Wed Mar 4 2009 werner@suse.de +- Use patches from bug-bash@gnu.org to make it work +* Wed Mar 4 2009 werner@suse.de +- Patch for bnc#481817 does not work in any case +* Wed Mar 4 2009 werner@suse.de +- My last patch for bnc#470548 send to bug-bash@gnu.org was not + fully applied and this had caused a memory corruption on tab + completion. +- Enable the parser to find closing parenthesis at the end of + an argument of a command even if backslash is used (bnc#481817) +- Correct link of shared libraries of devel readline package +* Fri Feb 27 2009 werner@suse.de +- Update bash 4.0 to patch level 0 +- Update readline 6.0 to patch level 0 +* Wed Feb 18 2009 werner@suse.de +- Add readline patch 13 +* Fri Jan 30 2009 werner@suse.de +- Restore state if shell function for completion is interrupted (bnc#470548) +* Tue Jan 13 2009 olh@suse.de +- obsolete old -XXbit packages (bnc#437293) +* Fri Dec 19 2008 werner@suse.de +- Enable large file support (bnc#460560) +* Tue Dec 9 2008 schwab@suse.de +- Add bash patches 40-48. +* Tue Nov 25 2008 werner@suse.de +- Parse the return value of setlocale(LC_ALL) (bnc#447846) +* Thu Oct 16 2008 werner@suse.de +- Let's avoid not needed library dependencies (bnc#439051) +* Mon Sep 1 2008 prusnak@suse.cz +- bash should suggest command-not-found, not scout +* Thu Jul 24 2008 werner@suse.de +- Add command-not-found.patch for scout support (fate#303730) +* Tue Jun 17 2008 werner@suse.de +- Avoid underline the full paragraph in the man page (bnc#400767) +* Sat May 17 2008 coolo@suse.de +- fix rename of xxbit packages +* Tue May 6 2008 schwab@suse.de +- Add bash patches 34-39. +* Mon Apr 28 2008 matz@suse.de +- Fix last patch. +* Thu Apr 24 2008 werner@suse.de +- Add workaround for bnc#382214 +* Thu Apr 10 2008 ro@suse.de +- added baselibs.conf file to build xxbit packages + for multilib support +* Wed Apr 2 2008 werner@suse.de +- Allow to (re)send signals within trap handlers (bnc#345441) +- Clear exit status if not sourcing system profile (bnc#372061) +* Thu Feb 28 2008 dmueller@suse.de +- remove invalid filerequires, the libreadline5 dependency is enough +* Mon Jan 28 2008 schwab@suse.de +- Add bash patches 26-33. +* Tue Jan 8 2008 werner@suse.de +- Restart the signal handler for SIGCHLD if not already done + within the signal handler its self (may help for bug #345441) +* Mon Jan 7 2008 schwab@suse.de +- Fix memory leak in read builtin. +* Fri Dec 7 2007 werner@suse.de +- Add skel files .bashrc, bash_history, and .profile from aaa_skel +* Tue Dec 4 2007 werner@suse.de +- Extend fix for off-by-one error in libreadline (bug #274120) +- Enable ssh detection in the bash (bug #345570) +* Thu Sep 20 2007 werner@suse.de +- Remove error triggering path requirement (bug #326751) +* Mon Aug 27 2007 schwab@suse.de +- Add bash patches 18-25. +* Sat Aug 11 2007 schwab@suse.de +- Add bash patches 10-17. +* Sat Aug 4 2007 dmueller@suse.de +- fix devel requires +* Fri Aug 3 2007 schwab@suse.de +- Fix dependencies. +* Tue Jul 31 2007 werner@suse.de +- Branch off bash-doc and readline-doc (bug #260209) +- Rename readline to libreadline5 (bug #260209) +* Thu Apr 19 2007 schwab@suse.de +- Fix bug in readline redisplay. +* Thu Mar 29 2007 dmueller@suse.de +- add ncurses-devel requires to readline-devel +* Mon Mar 26 2007 rguenther@suse.de +- Add bison and ncurses-devel BuildRequires. +* Wed Mar 7 2007 rguenther@suse.de +- Fix order of changelog entries. Remove duplicate entry. +* Wed Feb 28 2007 werner@suse.de +- Don't access buffer but resulting pointer for array element names + to avoid the not initialized area of the buffer. This also fixes + an inherent wrong calculation of the string length of the array + element names (bug #248717) +* Thu Dec 14 2006 werner@suse.de +- Update to bash 3.2 patch level 9 +* Wed Dec 6 2006 schwab@suse.de +- Remove obsolete patches. +* Fri Nov 17 2006 werner@suse.de +- Remove /usr/bin/bash (#206000) +* Tue Nov 14 2006 werner@suse.de +- Update to bash 3.2 patch level 5 +* 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 7 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 3 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 2 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 1 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 9 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 and + . +* 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 6 2004 werner@suse.de +- Fix prefix strip for last added patch +* Fri Sep 3 2004 werner@suse.de +- Add warning about broken glibc locale before we get the SIGSEGV + (bug #44658) +* Sun Aug 1 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 7 2004 werner@suse.de +- Add missed declaration of oldval for previous bugfix +* Fri Jun 4 2004 werner@suse.de +- Fix local array variable handling (bug #41649) +* Wed Jun 2 2004 werner@suse.de +- Fix evaluation none local return stack curruption (bug #41488) +* Wed Apr 7 2004 werner@suse.de +- In case of quotes position counter has to be advanced (#38599) +* Thu Apr 1 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 2 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 ) +* 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 4 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 ) + 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 7 2003 ro@suse.de +- fixed specfile +* Fri Feb 7 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 to improve display speed in + multibyte locales. +* Sat Nov 9 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 9 2002 kukuk@suse.de +- readline-devel should require readline +* Mon Jul 29 2002 werner@suse.de +- Expansion of `~user/' is like `/' +* 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 6 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 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 8 2001 werner@suse.de +- Fix readline i18n patch: enable configure of multi byte handling, + fix warnings and bug in histexpand.c +* Fri Oct 5 2001 werner@suse.de +- Add two patches for I18N support of bash and readline library +* Tue Sep 4 2001 werner@suse.de +- Add patch to avoid trouble with C++ header definitions +* Fri Aug 3 2001 werner@suse.de +- Fix fc crash (bug #9620) +* Mon Jul 2 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 6 2001 werner@suse.de +- Re-order configure.in to avoid trouble with new autoconf +* Tue May 8 2001 mfabian@suse.de +- bzip2 sources +* Sat May 5 2001 schwab@suse.de +- Fix process substitution when stdin is closed. +* Wed May 2 2001 werner@suse.de +- Make patch for 2.4.4 work within spec +* Wed May 2 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 7 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 5 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 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 1 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. +* Sat Jan 29 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 3 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 7 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 1 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 9 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 5 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 5 1997 florian@suse.de +- 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 2 1997 florian@suse.de + security fix included (0xff was command separator) -- cgit