checked in (request 32844)

OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=24
This commit is contained in:
OBS User autobuild 2010-02-18 11:17:28 +00:00 committed by Git OBS Bridge
parent 4bb6eedba5
commit 225dd58931
33 changed files with 592 additions and 459 deletions

View File

@ -1,5 +1,7 @@
--- doc/bash.1 Index: doc/bash.1
+++ doc/bash.1 2004-10-25 17:29:54.000000000 +0000 ===================================================================
--- doc/bash.1.orig
+++ doc/bash.1
@@ -115,6 +115,12 @@ processing, then commands are read from @@ -115,6 +115,12 @@ processing, then commands are read from
This option allows the positional parameters to be set This option allows the positional parameters to be set
when invoking an interactive shell. when invoking an interactive shell.
@ -37,8 +39,10 @@
.PP .PP
If If
.B bash .B bash
--- doc/builtins.1 Index: doc/builtins.1
+++ doc/builtins.1 2004-10-25 17:29:20.000000000 +0000 ===================================================================
--- doc/builtins.1.orig
+++ doc/builtins.1
@@ -12,6 +12,6 @@ shift, shopt, source, suspend, test, tim @@ -12,6 +12,6 @@ shift, shopt, source, suspend, test, tim
ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1) ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1)
.SH BASH BUILTIN COMMANDS .SH BASH BUILTIN COMMANDS
@ -47,8 +51,10 @@
+.so /usr/share/man/man1/bash.1 +.so /usr/share/man/man1/bash.1
.SH SEE ALSO .SH SEE ALSO
bash(1), sh(1) bash(1), sh(1)
--- doc/rbash.1 Index: doc/rbash.1
+++ doc/rbash.1 2004-10-25 17:29:20.000000000 +0000 ===================================================================
--- doc/rbash.1.orig
+++ doc/rbash.1
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
rbash \- restricted bash, see \fBbash\fR(1) rbash \- restricted bash, see \fBbash\fR(1)
.SH RESTRICTED SHELL .SH RESTRICTED SHELL

View File

@ -1,5 +1,7 @@
--- support/printenv.c Index: support/printenv.c
+++ support/printenv.c 2005-09-19 13:09:08.000000000 +0000 ===================================================================
--- support/printenv.c.orig
+++ support/printenv.c
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
#include "bashansi.h" #include "bashansi.h"

View File

@ -1,5 +1,7 @@
--- expr.c Index: expr.c
+++ expr.c 2004-07-30 14:39:48.000000000 +0000 ===================================================================
--- expr.c.orig
+++ expr.c
@@ -410,8 +410,8 @@ expassign () @@ -410,8 +410,8 @@ expassign ()
value = expcond (); value = expcond ();
if (curtok == EQ || curtok == OP_ASSIGN) if (curtok == EQ || curtok == OP_ASSIGN)

152
bash-3.0-nfs_redir.patch Normal file
View File

@ -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);

View File

@ -1,5 +1,7 @@
--- locale.c Index: locale.c
+++ locale.c 2004-09-03 10:56:10.000000000 +0000 ===================================================================
--- locale.c.orig
+++ locale.c
@@ -29,6 +29,10 @@ @@ -29,6 +29,10 @@
#include "bashintl.h" #include "bashintl.h"
#include "bashansi.h" #include "bashansi.h"

View File

@ -1,5 +1,7 @@
--- array.c Index: array.c
+++ array.c 2006-11-14 09:54:22.000000000 +0000 ===================================================================
--- array.c.orig
+++ array.c
@@ -877,7 +877,7 @@ char *s, *sep; @@ -877,7 +877,7 @@ char *s, *sep;
* To make a running version, compile -DTEST_ARRAY and link with: * To make a running version, compile -DTEST_ARRAY and link with:
* xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a * xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a
@ -9,8 +11,10 @@
int int
signal_is_trapped(s) signal_is_trapped(s)
--- hashlib.c Index: hashlib.c
+++ hashlib.c 2006-11-14 09:54:36.000000000 +0000 ===================================================================
--- hashlib.c.orig
+++ hashlib.c
@@ -381,7 +381,7 @@ hash_pstats (table, name) @@ -381,7 +381,7 @@ hash_pstats (table, name)
HASH_TABLE *table, *ntable; HASH_TABLE *table, *ntable;
@ -20,8 +24,10 @@
int int
signal_is_trapped (s) signal_is_trapped (s)
--- jobs.c Index: jobs.c
+++ jobs.c 2001-05-02 16:20:31.000000000 +0000 ===================================================================
--- jobs.c.orig
+++ jobs.c
@@ -1735,6 +1735,15 @@ make_child (command, async_p) @@ -1735,6 +1735,15 @@ make_child (command, async_p)
pid_t mypid; pid_t mypid;
@ -38,8 +44,10 @@
#if defined (BUFFERED_INPUT) #if defined (BUFFERED_INPUT)
/* Close default_buffered_input if it's > 0. We don't close it if it's /* 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, 0 because that's the file descriptor used when redirecting input,
--- quit.h Index: quit.h
+++ quit.h 2006-11-14 09:43:18.000000000 +0000 ===================================================================
--- quit.h.orig
+++ quit.h
@@ -21,9 +21,13 @@ @@ -21,9 +21,13 @@
#if !defined (_QUIT_H_) #if !defined (_QUIT_H_)
#define _QUIT_H_ #define _QUIT_H_
@ -56,8 +64,10 @@
/* Macro to call a great deal. SIGINT just sets the interrupt_state variable. /* 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 When it is safe, put QUIT in the code, and the "interrupt" will take
--- sig.c Index: sig.c
+++ sig.c 2006-11-14 09:53:51.000000000 +0000 ===================================================================
--- sig.c.orig
+++ sig.c
@@ -61,13 +61,13 @@ extern int comsub_ignore_return; @@ -61,13 +61,13 @@ extern int comsub_ignore_return;
extern int parse_and_execute_level, shell_initialized; extern int parse_and_execute_level, shell_initialized;
@ -88,8 +98,10 @@
#if defined (SIGWINCH) #if defined (SIGWINCH)
static SigHandler *old_winch = (SigHandler *)SIG_DFL; static SigHandler *old_winch = (SigHandler *)SIG_DFL;
--- sig.h Index: sig.h
+++ sig.h 2006-11-14 09:49:32.000000000 +0000 ===================================================================
--- sig.h.orig
+++ sig.h
@@ -108,11 +108,15 @@ do { \ @@ -108,11 +108,15 @@ do { \
#endif /* JOB_CONTROL */ #endif /* JOB_CONTROL */
@ -109,8 +121,10 @@
/* Functions from sig.c. */ /* Functions from sig.c. */
extern sighandler termsig_sighandler __P((int)); extern sighandler termsig_sighandler __P((int));
--- examples/loadables/tee.c Index: examples/loadables/tee.c
+++ examples/loadables/tee.c 2006-11-14 10:31:29.000000000 +0000 ===================================================================
--- examples/loadables/tee.c.orig
+++ examples/loadables/tee.c
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
#include "bashansi.h" #include "bashansi.h"

View File

@ -1,5 +1,7 @@
--- execute_cmd.c Index: execute_cmd.c
+++ execute_cmd.c 2008-04-28 01:38:19.000000000 +0000 ===================================================================
--- execute_cmd.c.orig
+++ execute_cmd.c
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
#endif /* _AIX && RISC6000 && !__GNUC__ */ #endif /* _AIX && RISC6000 && !__GNUC__ */

View File

@ -1,5 +1,7 @@
--- builtins/printf.def Index: builtins/printf.def
+++ builtins/printf.def 2006-07-27 15:11:19.000000000 +0000 ===================================================================
--- builtins/printf.def.orig
+++ builtins/printf.def
@@ -47,6 +47,7 @@ error occurs. @@ -47,6 +47,7 @@ error occurs.
$END $END

View File

@ -1,5 +1,7 @@
--- jobs.c Index: jobs.c
+++ jobs.c 2008-01-08 18:10:15.575513000 +0000 ===================================================================
--- jobs.c.orig
+++ jobs.c
@@ -2417,7 +2417,11 @@ wait_for (pid) @@ -2417,7 +2417,11 @@ wait_for (pid)
act.sa_handler = SIG_DFL; act.sa_handler = SIG_DFL;
sigemptyset (&act.sa_mask); sigemptyset (&act.sa_mask);
@ -12,8 +14,10 @@
sigaction (SIGCHLD, &act, &oact); sigaction (SIGCHLD, &act, &oact);
# endif # endif
queue_sigchld = 1; queue_sigchld = 1;
--- sig.c Index: sig.c
+++ sig.c 2008-04-02 10:42:23.742406622 +0000 ===================================================================
--- sig.c.orig
+++ sig.c
@@ -654,6 +654,17 @@ set_signal_handler (sig, handler) @@ -654,6 +654,17 @@ set_signal_handler (sig, handler)
act.sa_flags |= SA_INTERRUPT; /* XXX */ act.sa_flags |= SA_INTERRUPT; /* XXX */
else else

View File

@ -1,5 +1,7 @@
--- parse.y Index: parse.y
+++ parse.y 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- parse.y.orig
+++ parse.y
@@ -3106,7 +3106,7 @@ parse_matched_pair (qc, open, close, len @@ -3106,7 +3106,7 @@ parse_matched_pair (qc, open, close, len
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen); ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
xfree (nestret); xfree (nestret);

View File

@ -1,5 +1,7 @@
--- examples/loadables/Makefile.in Index: examples/loadables/Makefile.in
+++ examples/loadables/Makefile.in 2009-06-09 16:16:25.000000000 +0000 ===================================================================
--- examples/loadables/Makefile.in.orig
+++ examples/loadables/Makefile.in
@@ -28,6 +28,9 @@ includedir = @includedir@ @@ -28,6 +28,9 @@ includedir = @includedir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@

View File

@ -1,5 +1,7 @@
--- examples/loadables/Makefile.in Index: examples/loadables/Makefile.in
+++ examples/loadables/Makefile.in 2006-09-25 11:31:55.000000000 +0000 ===================================================================
--- examples/loadables/Makefile.in.orig
+++ examples/loadables/Makefile.in
@@ -83,7 +83,7 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/l @@ -83,7 +83,7 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/l
$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
@ -9,8 +11,10 @@
tty pathchk tee head mkdir rmdir printenv id whoami \ tty pathchk tee head mkdir rmdir printenv id whoami \
uname sync push ln unlink cut realpath getconf strftime mypid uname sync push ln unlink cut realpath getconf strftime mypid
OTHERPROG = necho hello cat OTHERPROG = necho hello cat
--- examples/loadables/basename.c Index: examples/loadables/basename.c
+++ examples/loadables/basename.c 2006-09-25 11:49:31.000000000 +0000 ===================================================================
--- examples/loadables/basename.c.orig
+++ examples/loadables/basename.c
@@ -9,10 +9,13 @@ @@ -9,10 +9,13 @@
#endif #endif
@ -26,8 +30,10 @@
basename_builtin (list) basename_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- examples/loadables/cat.c Index: examples/loadables/cat.c
+++ examples/loadables/cat.c 2006-09-25 11:37:46.000000000 +0000 ===================================================================
--- examples/loadables/cat.c.orig
+++ examples/loadables/cat.c
@@ -25,8 +25,10 @@ @@ -25,8 +25,10 @@
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
@ -40,8 +46,10 @@
#ifndef errno #ifndef errno
extern int errno; extern int errno;
--- examples/loadables/cut.c Index: examples/loadables/cut.c
+++ examples/loadables/cut.c 2006-09-25 12:00:21.000000000 +0000 ===================================================================
--- examples/loadables/cut.c.orig
+++ examples/loadables/cut.c
@@ -60,8 +60,10 @@ static const char sccsid[] = "@(#)cut.c @@ -60,8 +60,10 @@ static const char sccsid[] = "@(#)cut.c
# include <unistd.h> # include <unistd.h>
#endif #endif
@ -63,8 +71,10 @@
if (ch == '\n') if (ch == '\n')
break; break;
if (*pos++) if (*pos++)
--- examples/loadables/dirname.c Index: examples/loadables/dirname.c
+++ examples/loadables/dirname.c 2006-09-25 11:49:38.000000000 +0000 ===================================================================
--- examples/loadables/dirname.c.orig
+++ examples/loadables/dirname.c
@@ -27,10 +27,13 @@ @@ -27,10 +27,13 @@
#endif #endif
@ -80,8 +90,10 @@
dirname_builtin (list) dirname_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- examples/loadables/finfo.c Index: examples/loadables/finfo.c
+++ examples/loadables/finfo.c 2006-09-25 11:48:52.000000000 +0000 ===================================================================
--- examples/loadables/finfo.c.orig
+++ examples/loadables/finfo.c
@@ -20,6 +20,8 @@ @@ -20,6 +20,8 @@
#include "bashansi.h" #include "bashansi.h"
#include "shell.h" #include "shell.h"
@ -144,8 +156,10 @@
v = make_builtin_argv (list, &c); v = make_builtin_argv (list, &c);
r = finfo_main (c, v); r = finfo_main (c, v);
--- examples/loadables/getconf.c Index: examples/loadables/getconf.c
+++ examples/loadables/getconf.c 2006-09-25 12:02:33.000000000 +0000 ===================================================================
--- examples/loadables/getconf.c.orig
+++ examples/loadables/getconf.c
@@ -65,6 +65,8 @@ @@ -65,6 +65,8 @@
#include "bashansi.h" #include "bashansi.h"
#include "shell.h" #include "shell.h"
@ -182,8 +196,10 @@
builtin_usage(); builtin_usage();
printf("Acceptable variable names are:\n"); printf("Acceptable variable names are:\n");
--- examples/loadables/head.c Index: examples/loadables/head.c
+++ examples/loadables/head.c 2006-09-25 11:55:24.000000000 +0000 ===================================================================
--- examples/loadables/head.c.orig
+++ examples/loadables/head.c
@@ -38,6 +38,8 @@ @@ -38,6 +38,8 @@
#include "builtins.h" #include "builtins.h"
@ -213,8 +229,10 @@
munge_list (list); /* change -num into -n num */ munge_list (list); /* change -num into -n num */
reset_internal_getopt (); reset_internal_getopt ();
--- examples/loadables/hello.c Index: examples/loadables/hello.c
+++ examples/loadables/hello.c 2006-09-25 11:38:25.000000000 +0000 ===================================================================
--- examples/loadables/hello.c.orig
+++ examples/loadables/hello.c
@@ -11,8 +11,10 @@ @@ -11,8 +11,10 @@
#include <stdio.h> #include <stdio.h>
@ -227,8 +245,10 @@
#include "bashgetopt.h" #include "bashgetopt.h"
/* A builtin `xxx' is normally implemented with an `xxx_builtin' function. /* A builtin `xxx' is normally implemented with an `xxx_builtin' function.
--- examples/loadables/id.c Index: examples/loadables/id.c
+++ examples/loadables/id.c 2006-09-25 11:57:41.000000000 +0000 ===================================================================
--- examples/loadables/id.c.orig
+++ examples/loadables/id.c
@@ -47,6 +47,8 @@ extern struct group *getgrgid (); @@ -47,6 +47,8 @@ extern struct group *getgrgid ();
#include "shell.h" #include "shell.h"
@ -247,8 +267,10 @@
static int inituser (); static int inituser ();
static int id_pruser (); static int id_pruser ();
--- examples/loadables/ln.c Index: examples/loadables/ln.c
+++ examples/loadables/ln.c 2006-09-25 11:59:09.000000000 +0000 ===================================================================
--- examples/loadables/ln.c.orig
+++ examples/loadables/ln.c
@@ -33,8 +33,10 @@ @@ -33,8 +33,10 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
@ -269,8 +291,10 @@
ln_builtin (list) ln_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- examples/loadables/logname.c Index: examples/loadables/logname.c
+++ examples/loadables/logname.c 2006-09-25 11:30:40.000000000 +0000 ===================================================================
--- examples/loadables/logname.c.orig
+++ examples/loadables/logname.c
@@ -27,8 +27,10 @@ @@ -27,8 +27,10 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
@ -283,8 +307,10 @@
#include "common.h" #include "common.h"
#if !defined (errno) #if !defined (errno)
--- examples/loadables/mkdir.c Index: examples/loadables/mkdir.c
+++ examples/loadables/mkdir.c 2006-09-25 11:56:07.000000000 +0000 ===================================================================
--- examples/loadables/mkdir.c.orig
+++ examples/loadables/mkdir.c
@@ -31,8 +31,10 @@ @@ -31,8 +31,10 @@
# include <unistd.h> # include <unistd.h>
#endif #endif
@ -315,8 +341,10 @@
{ {
*p = '\0'; *p = '\0';
if (stat (npath, &sb) != 0) if (stat (npath, &sb) != 0)
--- examples/loadables/necho.c Index: examples/loadables/necho.c
+++ examples/loadables/necho.c 2006-09-25 11:39:26.000000000 +0000 ===================================================================
--- examples/loadables/necho.c.orig
+++ examples/loadables/necho.c
@@ -21,9 +21,15 @@ @@ -21,9 +21,15 @@
along with Bash. If not, see <http://www.gnu.org/licenses/>. along with Bash. If not, see <http://www.gnu.org/licenses/>.
*/ */
@ -334,8 +362,10 @@
necho_builtin (list) necho_builtin (list)
WORD_LIST *list; WORD_LIST *list;
--- examples/loadables/pathchk.c Index: examples/loadables/pathchk.c
+++ examples/loadables/pathchk.c 2006-09-25 11:53:13.000000000 +0000 ===================================================================
--- examples/loadables/pathchk.c.orig
+++ examples/loadables/pathchk.c
@@ -58,8 +58,10 @@ @@ -58,8 +58,10 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
@ -385,8 +415,10 @@
path, strlen (path), path_max); path, strlen (path), path_max);
return 1; return 1;
} }
--- examples/loadables/print.c Index: examples/loadables/print.c
+++ examples/loadables/print.c 2006-09-25 11:23:46.000000000 +0000 ===================================================================
--- examples/loadables/print.c.orig
+++ examples/loadables/print.c
@@ -33,6 +33,8 @@ @@ -33,6 +33,8 @@
#include "bashansi.h" #include "bashansi.h"
#include "shell.h" #include "shell.h"
@ -405,8 +437,10 @@
WORD_LIST *l; WORD_LIST *l;
nflag = raw = sflag = 0; nflag = raw = sflag = 0;
--- examples/loadables/printenv.c Index: examples/loadables/printenv.c
+++ examples/loadables/printenv.c 2006-09-25 11:39:47.000000000 +0000 ===================================================================
--- examples/loadables/printenv.c.orig
+++ examples/loadables/printenv.c
@@ -26,8 +26,10 @@ @@ -26,8 +26,10 @@
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
@ -419,8 +453,10 @@
#include "bashgetopt.h" #include "bashgetopt.h"
#include "common.h" #include "common.h"
--- examples/loadables/push.c Index: examples/loadables/push.c
+++ examples/loadables/push.c 2006-09-25 11:39:53.000000000 +0000 ===================================================================
--- examples/loadables/push.c.orig
+++ examples/loadables/push.c
@@ -25,8 +25,10 @@ @@ -25,8 +25,10 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
@ -433,8 +469,10 @@
#include "jobs.h" #include "jobs.h"
#include "bashgetopt.h" #include "bashgetopt.h"
#include "common.h" #include "common.h"
--- examples/loadables/realpath.c Index: examples/loadables/realpath.c
+++ examples/loadables/realpath.c 2006-09-25 12:03:01.000000000 +0000 ===================================================================
--- examples/loadables/realpath.c.orig
+++ examples/loadables/realpath.c
@@ -49,8 +49,10 @@ @@ -49,8 +49,10 @@
#include <maxpath.h> #include <maxpath.h>
#include <errno.h> #include <errno.h>
@ -455,8 +493,10 @@
realpath_builtin(list) realpath_builtin(list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- examples/loadables/rmdir.c Index: examples/loadables/rmdir.c
+++ examples/loadables/rmdir.c 2006-09-25 11:56:28.000000000 +0000 ===================================================================
--- examples/loadables/rmdir.c.orig
+++ examples/loadables/rmdir.c
@@ -24,14 +24,17 @@ @@ -24,14 +24,17 @@
#include <stdio.h> #include <stdio.h>
@ -476,8 +516,10 @@
rmdir_builtin (list) rmdir_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- examples/loadables/sleep.c Index: examples/loadables/sleep.c
+++ examples/loadables/sleep.c 2006-09-25 11:24:54.000000000 +0000 ===================================================================
--- examples/loadables/sleep.c.orig
+++ examples/loadables/sleep.c
@@ -46,6 +46,8 @@ @@ -46,6 +46,8 @@
#include "shell.h" #include "shell.h"
@ -487,8 +529,10 @@
#include "common.h" #include "common.h"
#define RETURN(x) \ #define RETURN(x) \
--- examples/loadables/strftime.c Index: examples/loadables/strftime.c
+++ examples/loadables/strftime.c 2006-09-25 11:40:17.000000000 +0000 ===================================================================
--- examples/loadables/strftime.c.orig
+++ examples/loadables/strftime.c
@@ -31,8 +31,10 @@ @@ -31,8 +31,10 @@
#include <stdio.h> #include <stdio.h>
@ -501,8 +545,10 @@
#include "common.h" #include "common.h"
int int
--- examples/loadables/sync.c Index: examples/loadables/sync.c
+++ examples/loadables/sync.c 2006-09-25 11:58:50.000000000 +0000 ===================================================================
--- examples/loadables/sync.c.orig
+++ examples/loadables/sync.c
@@ -24,10 +24,13 @@ @@ -24,10 +24,13 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
@ -518,8 +564,10 @@
sync_builtin (list) sync_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- examples/loadables/tee.c Index: examples/loadables/tee.c
+++ examples/loadables/tee.c 2006-09-25 11:54:21.000000000 +0000 ===================================================================
--- examples/loadables/tee.c.orig
+++ examples/loadables/tee.c
@@ -38,8 +38,10 @@ @@ -38,8 +38,10 @@
#include <signal.h> #include <signal.h>
#include <errno.h> #include <errno.h>
@ -549,8 +597,10 @@
reset_internal_getopt (); reset_internal_getopt ();
append = nointr = 0; append = nointr = 0;
tee_flist = (FLIST *)NULL; tee_flist = (FLIST *)NULL;
--- examples/loadables/template.c Index: examples/loadables/template.c
+++ examples/loadables/template.c 2006-09-25 11:40:33.000000000 +0000 ===================================================================
--- examples/loadables/template.c.orig
+++ examples/loadables/template.c
@@ -11,8 +11,10 @@ @@ -11,8 +11,10 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
@ -563,8 +613,10 @@
#include "bashgetopt.h" #include "bashgetopt.h"
#if !defined (errno) #if !defined (errno)
--- examples/loadables/truefalse.c Index: examples/loadables/truefalse.c
+++ examples/loadables/truefalse.c 2006-09-25 11:40:42.000000000 +0000 ===================================================================
--- examples/loadables/truefalse.c.orig
+++ examples/loadables/truefalse.c
@@ -20,18 +20,24 @@ @@ -20,18 +20,24 @@
#include <config.h> #include <config.h>
@ -592,8 +644,10 @@
WORD_LIST *list; WORD_LIST *list;
{ {
return EXECUTION_FAILURE; return EXECUTION_FAILURE;
--- examples/loadables/tty.c Index: examples/loadables/tty.c
+++ examples/loadables/tty.c 2006-09-25 11:49:53.000000000 +0000 ===================================================================
--- examples/loadables/tty.c.orig
+++ examples/loadables/tty.c
@@ -23,13 +23,16 @@ @@ -23,13 +23,16 @@
#include "config.h" #include "config.h"
@ -612,8 +666,10 @@
tty_builtin (list) tty_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- examples/loadables/uname.c Index: examples/loadables/uname.c
+++ examples/loadables/uname.c 2006-09-25 11:58:18.000000000 +0000 ===================================================================
--- examples/loadables/uname.c.orig
+++ examples/loadables/uname.c
@@ -42,8 +42,10 @@ struct utsname { @@ -42,8 +42,10 @@ struct utsname {
#include <errno.h> #include <errno.h>
@ -639,8 +695,10 @@
struct utsname uninfo; struct utsname uninfo;
uname_flags = 0; uname_flags = 0;
--- examples/loadables/unlink.c Index: examples/loadables/unlink.c
+++ examples/loadables/unlink.c 2006-09-25 11:59:37.000000000 +0000 ===================================================================
--- examples/loadables/unlink.c.orig
+++ examples/loadables/unlink.c
@@ -30,14 +30,17 @@ @@ -30,14 +30,17 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
@ -660,8 +718,10 @@
unlink_builtin (list) unlink_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- examples/loadables/whoami.c Index: examples/loadables/whoami.c
+++ examples/loadables/whoami.c 2006-09-25 11:57:54.000000000 +0000 ===================================================================
--- examples/loadables/whoami.c.orig
+++ examples/loadables/whoami.c
@@ -23,11 +23,14 @@ @@ -23,11 +23,14 @@
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
@ -678,8 +738,10 @@
whoami_builtin (list) whoami_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
--- shell.h Index: shell.h
+++ shell.h 2009-08-26 11:13:08.000000000 +0000 ===================================================================
--- shell.h.orig
+++ shell.h
@@ -22,6 +22,9 @@ @@ -22,6 +22,9 @@
#include "config.h" #include "config.h"
#endif #endif

3
bash-4.0-patches.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b64645f66d1d3121f0fc26215a902d5ca5ec6b4d59a14981617fdf69554ce259
size 18292

View File

@ -1,5 +1,7 @@
--- locale.c Index: locale.c
+++ locale.c 2008-11-25 13:41:50.000000000 +0000 ===================================================================
--- locale.c.orig
+++ locale.c
@@ -47,6 +47,7 @@ extern int dump_translatable_strings, du @@ -47,6 +47,7 @@ extern int dump_translatable_strings, du
/* The current locale when the program begins */ /* The current locale when the program begins */

22
bash-4.0.10-typo.patch Normal file
View File

@ -0,0 +1,22 @@
| Date: Sat, 14 Mar 2009 21:14:06 +0100
| From: Andreas Schwab <schwab@linux-m68k.org>
| 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

61
bash-4.0.24-acl.dif Normal file
View File

@ -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);

View File

@ -1,5 +1,7 @@
Index: .pkgextract
===================================================================
--- /dev/null --- /dev/null
+++ .pkgextract 2006-03-27 12:15:25.000000000 +0000 +++ .pkgextract
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
+tar Oxfj ../bash-4.0-patches.tar.bz2 | patch -p0 -s +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=".manual" < ../bash-2.03-manual.patch
@ -15,8 +17,10 @@
+patch -p0 -s --suffix=".zerotty" < ../readline-4.3-input.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=".wrap" < ../readline-6.0-wrap.patch
+patch -p0 -s --suffix=".conf" < ../readline-5.2-conf.patch +patch -p0 -s --suffix=".conf" < ../readline-5.2-conf.patch
--- config-top.h Index: config-top.h
+++ config-top.h 2007-12-04 14:44:39.314025629 +0000 ===================================================================
--- config-top.h.orig
+++ config-top.h
@@ -54,14 +54,14 @@ @@ -54,14 +54,14 @@
/* The default value of the PATH variable. */ /* The default value of the PATH variable. */
#ifndef DEFAULT_PATH_VALUE #ifndef DEFAULT_PATH_VALUE
@ -59,8 +63,10 @@
/* Define if you want the case-capitalizing operators (~[~]) and the /* Define if you want the case-capitalizing operators (~[~]) and the
`capcase' variable attribute (declare -c). */ `capcase' variable attribute (declare -c). */
--- general.h Index: general.h
+++ general.h 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- general.h.orig
+++ general.h
@@ -21,10 +21,13 @@ @@ -21,10 +21,13 @@
#if !defined (_GENERAL_H_) #if !defined (_GENERAL_H_)
#define _GENERAL_H_ #define _GENERAL_H_
@ -75,8 +81,10 @@
#if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE) #if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE)
# if defined (HAVE_SYS_TIME_H) # if defined (HAVE_SYS_TIME_H)
--- jobs.c Index: jobs.c
+++ jobs.c 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- jobs.c.orig
+++ jobs.c
@@ -199,10 +199,10 @@ int previous_job = NO_JOB; @@ -199,10 +199,10 @@ int previous_job = NO_JOB;
#endif #endif
@ -99,8 +107,10 @@
/* Functions local to this file. */ /* Functions local to this file. */
--- jobs.h Index: jobs.h
+++ jobs.h 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- jobs.h.orig
+++ jobs.h
@@ -165,7 +165,7 @@ extern pid_t fork (), getpid (), getpgrp @@ -165,7 +165,7 @@ extern pid_t fork (), getpid (), getpgrp
extern struct jobstats js; extern struct jobstats js;
@ -110,8 +120,10 @@
extern int asynchronous_notification; extern int asynchronous_notification;
extern JOB **jobs; extern JOB **jobs;
--- parse.y Index: parse.y
+++ parse.y 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- parse.y.orig
+++ parse.y
@@ -1283,7 +1283,7 @@ input_file_descriptor () @@ -1283,7 +1283,7 @@ input_file_descriptor ()
#if defined (READLINE) #if defined (READLINE)
@ -121,8 +133,10 @@
int current_readline_line_index = 0; int current_readline_line_index = 0;
static int static int
--- shell.c Index: shell.c
+++ shell.c 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- shell.c.orig
+++ shell.c
@@ -479,7 +479,7 @@ main (argc, argv, env) @@ -479,7 +479,7 @@ main (argc, argv, env)
if (dump_translatable_strings) if (dump_translatable_strings)
read_but_dont_execute = 1; read_but_dont_execute = 1;
@ -132,8 +146,10 @@
disable_priv_mode (); disable_priv_mode ();
/* Need to get the argument to a -c option processed in the /* Need to get the argument to a -c option processed in the
--- subst.c Index: subst.c
+++ subst.c 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- subst.c.orig
+++ subst.c
@@ -2962,6 +2962,7 @@ call_expand_word_internal (w, q, i, c, e @@ -2962,6 +2962,7 @@ call_expand_word_internal (w, q, i, c, e
last_command_exit_value = EXECUTION_FAILURE; last_command_exit_value = EXECUTION_FAILURE;
exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF); exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF);
@ -142,8 +158,10 @@
} }
else else
return (result); return (result);
--- builtins/shopt.def Index: builtins/shopt.def
+++ builtins/shopt.def 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- builtins/shopt.def.orig
+++ builtins/shopt.def
@@ -279,9 +279,9 @@ reset_shopt_options () @@ -279,9 +279,9 @@ reset_shopt_options ()
allow_null_glob_expansion = glob_dot_filenames = 0; allow_null_glob_expansion = glob_dot_filenames = 0;
cdable_vars = mail_warning = 0; cdable_vars = mail_warning = 0;
@ -156,8 +174,10 @@
#if defined (EXTENDED_GLOB) #if defined (EXTENDED_GLOB)
extended_glob = 0; extended_glob = 0;
--- doc/Makefile.in Index: doc/Makefile.in
+++ doc/Makefile.in 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- doc/Makefile.in.orig
+++ doc/Makefile.in
@@ -142,7 +142,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $ @@ -142,7 +142,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $
${RM} $@ ${RM} $@
-${DVIPS} $< -${DVIPS} $<
@ -167,8 +187,10 @@
nodvi: ps info text html nodvi: ps info text html
everything: all pdf everything: all pdf
--- doc/bash.1 Index: doc/bash.1
+++ doc/bash.1 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- doc/bash.1.orig
+++ doc/bash.1
@@ -4620,8 +4620,8 @@ file (the \fIinputrc\fP file). @@ -4620,8 +4620,8 @@ file (the \fIinputrc\fP file).
The name of this file is taken from the value of the The name of this file is taken from the value of the
.SM .SM
@ -190,8 +212,10 @@
.PD .PD
.SH AUTHORS .SH AUTHORS
Brian Fox, Free Software Foundation Brian Fox, Free Software Foundation
--- support/printenv.c Index: support/printenv.c
+++ support/printenv.c 2007-12-06 15:33:46.899561365 +0000 ===================================================================
--- support/printenv.c.orig
+++ support/printenv.c
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
#if defined (HAVE_CONFIG_H) #if defined (HAVE_CONFIG_H)
# include <config.h> # include <config.h>
@ -200,8 +224,10 @@
#include "bashansi.h" #include "bashansi.h"
--- support/rlvers.sh Index: support/rlvers.sh
+++ support/rlvers.sh 2006-03-27 12:15:25.000000000 +0000 ===================================================================
--- support/rlvers.sh.orig
+++ support/rlvers.sh
@@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers @@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers
# defaults # defaults
@ -216,10 +242,12 @@
# cannot rely on the presence of getopts # cannot rely on the presence of getopts
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
--- support/shobj-conf Index: support/shobj-conf
+++ support/shobj-conf 2006-09-22 14:11:58.000000000 +0000 ===================================================================
--- support/shobj-conf.orig
+++ support/shobj-conf
@@ -112,10 +112,11 @@ sunos5*|solaris2*) @@ -112,10 +112,11 @@ sunos5*|solaris2*)
linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) linux*-*|gnu*-*|k*bsd*-gnu-*)
SHOBJ_CFLAGS=-fPIC SHOBJ_CFLAGS=-fPIC
SHOBJ_LD='${CC}' SHOBJ_LD='${CC}'
- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' - SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
@ -232,16 +260,20 @@
;; ;;
freebsd2*) freebsd2*)
--- tests/run-intl Index: tests/run-intl
+++ tests/run-intl 2009-08-26 11:13:13.000000000 +0000 ===================================================================
--- tests/run-intl.orig
+++ tests/run-intl
@@ -5,4 +5,4 @@ echo "warning: some of these tests will @@ -5,4 +5,4 @@ echo "warning: some of these tests will
echo "warning: locales installed on your system." >&2 echo "warning: locales installed on your system." >&2
echo "warning: please ignore any differences consisting only of white space" >&2 echo "warning: please ignore any differences consisting only of white space" >&2
${THIS_SH} ./intl.tests > /tmp/xx ${THIS_SH} ./intl.tests > /tmp/xx
-diff $AFLAG /tmp/xx intl.right && rm -f /tmp/xx -diff $AFLAG /tmp/xx intl.right && rm -f /tmp/xx
+diff -w $AFLAG /tmp/xx intl.right && rm -f /tmp/xx +diff -w $AFLAG /tmp/xx intl.right && rm -f /tmp/xx
--- tests/run-read Index: tests/run-read
+++ tests/run-read 2009-08-26 11:13:13.000000000 +0000 ===================================================================
--- tests/run-read.orig
+++ tests/run-read
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
echo "warning: please do not consider output differing only in the amount of" >&2 echo "warning: please do not consider output differing only in the amount of" >&2
echo "warning: white space to be an error." >&2 echo "warning: white space to be an error." >&2

3
bash-4.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:690aaee489da2dcd0749109f89efa30a486299ac8a9a199c48ddfd2c53757c08
size 4706830

View File

@ -1,33 +0,0 @@
|BNC#577221 - Non-login, interactive bash executes /etc/bash.bashrc
| yet not documented
|
|Jared Hudson 2010-02-04 22:47:01 UTC
|
|bash-3.2-147.4.1 executes /etc/bash.bashrc when invoking an interactive,
|non-login shell yet this is not documented. The man page should mention
|this in its INVOCATION section. I've checked the source code and it's
|hard coded to execute /etc/bash.bashrc (SYS_BASHRC macro)
|
--- doc/bash.1
+++ doc/bash.1 2010-02-18 09:47:36.864126675 +0000
@@ -323,8 +323,8 @@ exists.
.PP
When an interactive shell that is not a login shell is started,
.B bash
-reads and executes commands from \fI~/.bashrc\fP, if that file exists.
-This may be inhibited by using the
+reads and executes commands from \fI/etc/bash.bashrc\fP then \fI~/.bashrc\fP
+when those files exist and are readable. This may be inhibited by using the
.B \-\-norc
option.
The \fB\-\-rcfile\fP \fIfile\fP option will force
@@ -415,7 +415,8 @@ daemon, usually \fIrshd\fP, or the secur
If
.B bash
determines it is being run in this fashion, it reads and executes
-commands from \fI~/.bashrc\fP, if that file exists and is readable.
+commands from \fI/etc/bash.bashrc\fP then \fI~/.bashrc\fP when
+those files exist and are readable.
It will not do this if invoked as \fBsh\fP.
The
.B \-\-norc

View File

@ -1,123 +0,0 @@
--- parse.y
+++ parse.y 2010-01-20 13:51:39.000000000 +0000
@@ -1434,10 +1434,11 @@ yy_readline_get ()
current_readline_prompt : "");
terminate_immediately = 0;
- if (signal_is_ignored (SIGINT) == 0 && old_sigint)
+ if (signal_is_ignored (SIGINT) == 0)
{
interrupt_immediately--;
- set_signal_handler (SIGINT, old_sigint);
+ if (old_sigint)
+ set_signal_handler (SIGINT, old_sigint);
}
#if 0
--- xmalloc.c
+++ xmalloc.c 2010-02-15 15:36:40.113797875 +0000
@@ -35,6 +35,11 @@
# include "ansi_stdlib.h"
#endif /* HAVE_STDLIB_H */
+/* Determine which kind of system this is. */
+#include <signal.h>
+extern int interrupt_immediately;
+extern int signal_is_trapped __P((int));
+
#include "error.h"
#include "bashintl.h"
@@ -94,6 +99,34 @@ allocerr (func, bytes)
#endif /* !HAVE_SBRK */
}
+static void
+block_signals (setp, osetp)
+ sigset_t *setp, *osetp;
+{
+#ifdef HAVE_POSIX_SIGNALS
+ sigfillset (setp);
+ sigemptyset (osetp);
+ sigprocmask (SIG_BLOCK, setp, osetp);
+#else
+# if defined (HAVE_BSD_SIGNALS)
+ *osetp = sigsetmask (-1);
+# endif
+#endif
+}
+
+static void
+unblock_signals (setp, osetp)
+ sigset_t *setp, *osetp;
+{
+#ifdef HAVE_POSIX_SIGNALS
+ sigprocmask (SIG_SETMASK, osetp, (sigset_t *)NULL);
+#else
+# if defined (HAVE_BSD_SIGNALS)
+ sigsetmask (*osetp);
+# endif
+#endif
+}
+
/* Return a pointer to free()able block of memory large enough
to hold BYTES number of bytes. If the memory cannot be allocated,
print an error message and abort. */
@@ -102,15 +135,28 @@ xmalloc (bytes)
size_t bytes;
{
PTR_T temp;
+ sigset_t set, oset;
+ int blocked_sigs;
#if defined (DEBUG)
if (bytes == 0)
internal_warning("xmalloc: size argument is 0");
#endif
+ /* Block all signals in case we are executed from a signal handler. */
+ blocked_sigs = 0;
+ if (interrupt_immediately || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD))
+ {
+ block_signals (&set, &oset);
+ blocked_sigs = 1;
+ }
+
FINDBRK();
temp = malloc (bytes);
+ if (blocked_sigs)
+ unblock_signals (&set, &oset);
+
if (temp == 0)
allocerr ("xmalloc", bytes);
@@ -123,15 +169,28 @@ xrealloc (pointer, bytes)
size_t bytes;
{
PTR_T temp;
+ sigset_t set, oset;
+ int blocked_sigs;
#if defined (DEBUG)
if (bytes == 0)
internal_warning("xrealloc: size argument is 0");
#endif
+ /* Block all signals in case we are executed from a signal handler. */
+ blocked_sigs = 0;
+ if (interrupt_immediately || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD))
+ {
+ block_signals (&set, &oset);
+ blocked_sigs = 1;
+ }
+
FINDBRK();
temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
+ if (blocked_sigs)
+ unblock_signals (&set, &oset);
+
if (temp == 0)
allocerr ("xrealloc", bytes);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:04b5bbbf7fd0560da491e1a7610daea5ffc06a2df0b028fce25bd75d8d6c34e0
size 1506

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eca4613deba32743e2d0edf8666f5537734bbec85d7cb4e5f5e6ce22bb1d8bd3
size 4875797

View File

@ -1,90 +1,3 @@
-------------------------------------------------------------------
Thu Feb 18 11:05:13 CET 2010 - werner@suse.de
- Add patch to reflect the usage of /etc/bash.bashrc (bnc#577221)
-------------------------------------------------------------------
Mon Feb 15 17:24:46 CET 2010 - werner@suse.de
- Update bash 4.1 to patch level 2
* Here-documents within $(...) command substitutions may once more be
delimited by the closing right paren, instead of requiring a newline.
* Bash's file status checks (executable, readable, etc.) now take file
system ACLs into account on file systems that support them.
* Bash now passes environment variables with names that are not valid
shell variable names through into the environment passed to child
processes.
* The `execute-unix-command' readline function now attempts to clear and
reuse the current line rather than move to a new one after the command
executes.
* `printf -v' can now assign values to array indices.
* New `complete -E' and `compopt -E' options that work on the "empty"
completion: completion attempted on an empty command line.
* New complete/compgen/compopt -D option to define a `default' completion:
a completion to be invoked on command for which no completion has been
defined. If this function returns 124, programmable completion is
attempted again, allowing a user to dynamically build a set of completions
as completion is attempted by having the default completion function
install individual completion functions each time it is invoked.
* When displaying associative arrays, subscripts are now quoted.
* Changes to dabbrev-expand to make it more `emacs-like': no space appended
after matches, completions are not sorted, and most recent history entries
are presented first.
* The [[ and (( commands are now subject to the setting of `set -e' and the
ERR trap.
* The source/. builtin now removes NUL bytes from the file before attempting
to parse commands.
* There is a new configuration option (in config-top.h) that forces bash to
forward all history entries to syslog.
* A new variable $BASHOPTS to export shell options settable using `shopt' to
child processes.
* There is a new confgure option that forces the extglob option to be
enabled by default.
* New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
output to that file descriptor.
* If the optional left-hand-side of a redirection is of the form {var}, the
shell assigns the file descriptor used to $var or uses $var as the file
descriptor to move or close, depending on the redirection operator.
* The < and > operators to the [[ conditional command now do string
comparison according to the current locale if the compatibility level
is greater than 40.
* Programmable completion now uses the completion for `b' instead of `a'
when completion is attempted on a line like: a $(b c.
* Force extglob on temporarily when parsing the pattern argument to
the == and != operators to the [[ command, for compatibility.
* Changed the behavior of interrupting the wait builtin when a SIGCHLD is
received and a trap on SIGCHLD is set to be Posix-mode only.
* The read builtin has a new `-N nchars' option, which reads exactly NCHARS
characters, ignoring delimiters like newline.
* The mapfile/readarray builtin no longer stores the commands it invokes via
callbacks in the history list.
* There is a new `compat40' shopt option.
- Update readline 6.1 to patch level 1
* New bindable function: menu-complete-backward.
* In the vi insertion keymap, C-n is now bound to menu-complete by default,
and C-p to menu-complete-backward.
* When in vi command mode, repeatedly hitting ESC now does nothing, even
when ESC introduces a bound key sequence. This is closer to how
historical vi behaves.
* New bindable function: skip-csi-sequence. Can be used as a default to
consume key sequences generated by keys like Home and End without having
to bind all keys.
* New application-settable function: rl_filename_rewrite_hook. Can be used
to rewite or modify filenames read from the file system before they are
compared to the word to be completed.
* New bindable variable: skip-completed-text, active when completing in the
middle of a word. If enabled, it means that characters in the completion
that match characters in the remainder of the word are "skipped" rather
than inserted into the line.
* The pre-readline-6.0 version of menu completion is available as
"old-menu-complete" for users who do not like the readline-6.0 version.
* New bindable variable: echo-control-characters. If enabled, and the
tty ECHOCTL bit is set, controls the echoing of characters corresponding
to keyboard-generated signals.
* New bindable variable: enable-meta-key. Controls whether or not readline
sends the smm/rmm sequences if the terminal indicates it has a meta key
that enables eight-bit characters.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 16 10:48:09 CET 2009 - jengelh@medozas.de Wed Dec 16 10:48:09 CET 2009 - jengelh@medozas.de
@ -1302,6 +1215,3 @@ new version with security patches
Fri Aug 23 16:13:49 MET DST 1996 - florian@suse.de Fri Aug 23 16:13:49 MET DST 1996 - florian@suse.de
security fix included (0xff was command separator) security fix included (0xff was command separator)
This document details the changes between this version, bash-4.1-rc,
and the previous version, bash-4.1-beta.

View File

@ -1,7 +1,7 @@
# #
# spec file for package bash (Version 4.0) # spec file for package bash (Version 4.0)
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -21,14 +21,14 @@ Name: bash
BuildRequires: bison fdupes ncurses-devel BuildRequires: bison fdupes ncurses-devel
License: GPLv2+ License: GPLv2+
Group: System/Shells Group: System/Shells
%define bash_vers 4.1 %define bash_vers 4.0
%define rl_vers 6.1 %define rl_vers 6.0
Recommends: bash-doc = %bash_vers Recommends: bash-doc = %bash_vers
Recommends: bash-lang = %bash_vers Recommends: bash-lang = %bash_vers
Suggests: command-not-found Suggests: command-not-found
AutoReqProv: on AutoReqProv: on
Version: 4.1 Version: 4.0
Release: 1 Release: 20
Summary: The GNU Bourne-Again Shell Summary: The GNU Bourne-Again Shell
Url: http://www.gnu.org/software/bash/bash.html Url: http://www.gnu.org/software/bash/bash.html
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2 Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2
@ -46,6 +46,7 @@ Patch2: bash-4.0-security.patch
Patch3: bash-3.2-2.4.4.patch Patch3: bash-3.2-2.4.4.patch
Patch4: bash-3.0-evalexp.patch Patch4: bash-3.0-evalexp.patch
Patch5: bash-3.0-warn-locale.patch Patch5: bash-3.0-warn-locale.patch
Patch6: bash-3.0-nfs_redir.patch
Patch7: bash-3.0-decl.patch Patch7: bash-3.0-decl.patch
Patch8: bash-4.0-async-bnc523667.dif Patch8: bash-4.0-async-bnc523667.dif
Patch9: bash-4.0-extended_quote.patch Patch9: bash-4.0-extended_quote.patch
@ -57,12 +58,12 @@ Patch16: bash-4.0-setlocale.dif
Patch17: bash-4.0-headers.dif Patch17: bash-4.0-headers.dif
Patch20: readline-%{rl_vers}.dif Patch20: readline-%{rl_vers}.dif
Patch21: readline-4.3-input.dif Patch21: readline-4.3-input.dif
Patch22: readline-6.1-wrap.patch Patch22: readline-6.0-wrap.patch
Patch23: readline-5.2-conf.patch Patch23: readline-5.2-conf.patch
Patch24: readline-6.0-metamode.patch Patch24: readline-6.0-metamode.patch
Patch30: readline-6.1-destdir.patch Patch30: readline-6.0-destdir.patch
Patch40: bash-4.1-bash.bashrc.dif Patch40: bash-4.0.10-typo.patch
Patch41: bash-4.1-intr.dif Patch42: bash-4.0.24-acl.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc %global _sysconfdir /etc
%global _incdir %{_includedir} %global _incdir %{_includedir}
@ -90,12 +91,10 @@ Summary: Documentation how to Use the GNU Bourne-Again Shell
Group: Documentation/Man Group: Documentation/Man
Provides: bash:%{_infodir}/bash.info.gz Provides: bash:%{_infodir}/bash.info.gz
PreReq: %install_info_prereq PreReq: %install_info_prereq
Version: 4.1 Version: 4.0
Release: 20 Release: 20
AutoReqProv: on AutoReqProv: on
%if %suse_version > 1120
BuildArch: noarch BuildArch: noarch
%endif
%description -n bash-doc %description -n bash-doc
This package contains the documentation for using the bourne shell This package contains the documentation for using the bourne shell
@ -113,7 +112,7 @@ Authors:
License: GPLv2+ License: GPLv2+
Summary: Include Files mandatory for Development of bash loadable builtins Summary: Include Files mandatory for Development of bash loadable builtins
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
Version: 4.1 Version: 4.0
Release: 9 Release: 9
AutoReqProv: on AutoReqProv: on
@ -133,7 +132,7 @@ Authors:
License: GPLv2+ License: GPLv2+
Summary: Loadable bash builtins Summary: Loadable bash builtins
Group: System/Shells Group: System/Shells
Version: 4.1 Version: 4.0
Release: 9 Release: 9
AutoReqProv: on AutoReqProv: on
@ -202,7 +201,7 @@ License: GPLv2+
Summary: The Readline Library Summary: The Readline Library
Group: System/Libraries Group: System/Libraries
Provides: bash:/%{_lib}/libreadline.so.%{rl_major} Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
Version: 6.1 Version: 6.0
Release: 20 Release: 20
Recommends: readline-doc = %{version} Recommends: readline-doc = %{version}
# bug437293 # bug437293
@ -210,7 +209,7 @@ Recommends: readline-doc = %{version}
Obsoletes: readline-64bit Obsoletes: readline-64bit
%endif %endif
# #
Provides: readline = 6.1 Provides: readline = 6.0
Obsoletes: readline <= 6.0 Obsoletes: readline <= 6.0
AutoReqProv: on AutoReqProv: on
@ -231,7 +230,7 @@ License: GPLv2+
Summary: Include Files and Libraries mandatory for Development Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Provides: bash:%{_libdir}/libreadline.a Provides: bash:%{_libdir}/libreadline.a
Version: 6.1 Version: 6.0
Release: 20 Release: 20
Requires: libreadline6 = %{version} Requires: libreadline6 = %{version}
Requires: ncurses-devel Requires: ncurses-devel
@ -260,12 +259,10 @@ Summary: Documentation how to Use and Program with the Readline Library
Group: System/Libraries Group: System/Libraries
Provides: readline:%{_infodir}/readline.info.gz Provides: readline:%{_infodir}/readline.info.gz
PreReq: %install_info_prereq PreReq: %install_info_prereq
Version: 6.1 Version: 6.0
Release: 20 Release: 20
AutoReqProv: on AutoReqProv: on
%if %suse_version > 1120
BuildArch: noarch BuildArch: noarch
%endif
%description -n readline-doc %description -n readline-doc
This package contains the documentation for using the readline library This package contains the documentation for using the readline library
@ -291,6 +288,7 @@ unset p
%patch3 -p0 -b .2.4.4 %patch3 -p0 -b .2.4.4
%patch4 -p0 -b .evalexp %patch4 -p0 -b .evalexp
%patch5 -p0 -b .warnlc %patch5 -p0 -b .warnlc
%patch6 -p0 -b .nfs_redir
%patch7 -p0 -b .decl %patch7 -p0 -b .decl
%patch8 -p0 -b .async %patch8 -p0 -b .async
%patch9 -p0 -b .extended_quote %patch9 -p0 -b .extended_quote
@ -304,8 +302,8 @@ unset p
%patch22 -p0 -b .wrap %patch22 -p0 -b .wrap
%patch23 -p0 -b .conf %patch23 -p0 -b .conf
%patch24 -p0 -b .metamode %patch24 -p0 -b .metamode
%patch40 -p0 -b .bashrc %patch40 -p0 -b .typo
%patch41 -p0 -b .intr %patch42 -p0 -b .acl
%patch0 -p0 %patch0 -p0
cd ../readline-%{rl_vers} cd ../readline-%{rl_vers}
for p in ../readline-%{rl_vers}-patches/*; do for p in ../readline-%{rl_vers}-patches/*; do

View File

@ -1,5 +1,7 @@
--- lib/readline/input.c Index: lib/readline/input.c
+++ lib/readline/input.c 2003-03-17 19:03:51.000000000 +0000 ===================================================================
--- lib/readline/input.c.orig
+++ lib/readline/input.c
@@ -459,6 +459,8 @@ rl_read_key () @@ -459,6 +459,8 @@ rl_read_key ()
return (c); return (c);
} }
@ -21,8 +23,10 @@
#if defined (__BEOS__) #if defined (__BEOS__)
if (errno == EINTR) if (errno == EINTR)
--- lib/readline/readline.c Index: lib/readline/readline.c
+++ lib/readline/readline.c 2003-03-17 19:02:52.000000000 +0000 ===================================================================
--- lib/readline/readline.c.orig
+++ lib/readline/readline.c
@@ -469,6 +469,9 @@ _rl_internal_char_cleanup () @@ -469,6 +469,9 @@ _rl_internal_char_cleanup ()
_rl_erase_entire_line (); _rl_erase_entire_line ();
} }

View File

@ -1,5 +1,7 @@
--- lib/readline/bind.c Index: lib/readline/bind.c
+++ lib/readline/bind.c 2006-11-13 16:20:23.000000000 +0000 ===================================================================
--- lib/readline/bind.c.orig
+++ lib/readline/bind.c
@@ -751,6 +751,9 @@ rl_function_of_keyseq (keyseq, map, type @@ -751,6 +751,9 @@ rl_function_of_keyseq (keyseq, map, type
/* The last key bindings file read. */ /* The last key bindings file read. */
static char *last_readline_init_file = (char *)NULL; static char *last_readline_init_file = (char *)NULL;
@ -93,8 +95,10 @@
static int sv_combegin PARAMS((const char *)); static int sv_combegin PARAMS((const char *));
static int sv_dispprefix PARAMS((const char *)); static int sv_dispprefix PARAMS((const char *));
static int sv_compquery PARAMS((const char *)); static int sv_compquery PARAMS((const char *));
--- lib/readline/rlconf.h Index: lib/readline/rlconf.h
+++ lib/readline/rlconf.h 2006-11-13 16:21:26.000000000 +0000 ===================================================================
--- lib/readline/rlconf.h.orig
+++ lib/readline/rlconf.h
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
#define HANDLE_SIGNALS #define HANDLE_SIGNALS
@ -104,8 +108,10 @@
/* The next-to-last-ditch effort file name for a user-specific init file. */ /* The next-to-last-ditch effort file name for a user-specific init file. */
#define DEFAULT_INPUTRC "~/.inputrc" #define DEFAULT_INPUTRC "~/.inputrc"
--- lib/readline/doc/rluser.texi Index: lib/readline/doc/rluser.texi
+++ lib/readline/doc/rluser.texi 2006-11-13 16:23:56.000000000 +0000 ===================================================================
--- lib/readline/doc/rluser.texi.orig
+++ lib/readline/doc/rluser.texi
@@ -347,7 +347,8 @@ file is taken from the value of the envi @@ -347,7 +347,8 @@ file is taken from the value of the envi
@end ifclear @end ifclear
that variable is unset, the default is @file{~/.inputrc}. If that that variable is unset, the default is @file{~/.inputrc}. If that

View File

@ -1,6 +1,6 @@
--- shlib/Makefile.in --- shlib/Makefile.in
+++ shlib/Makefile.in 2010-02-15 16:02:32.644391084 +0000 +++ shlib/Makefile.in 2009-02-27 17:21:24.428797577 +0100
@@ -59,6 +59,7 @@ bindir = @bindir@ @@ -58,6 +58,7 @@ bindir = @bindir@
libdir = @libdir@ libdir = @libdir@
datadir = @datadir@ datadir = @datadir@
localedir = @localedir@ localedir = @localedir@
@ -8,32 +8,32 @@
# Support an alternate destination root directory for package building # Support an alternate destination root directory for package building
DESTDIR = DESTDIR =
@@ -183,13 +184,13 @@ installdirs: $(topdir)/support/mkdirs @@ -182,13 +183,13 @@ installdirs: $(topdir)/support/mkdirs
-$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir) -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir)
install: installdirs $(SHLIB_STATUS) install: installdirs $(SHLIB_STATUS)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -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_HISTORY)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE) - $(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) -V $(host_vendor) -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_HISTORY)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(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_READLINE)
@echo install: you may need to run ldconfig @echo install: you may need to run ldconfig
uninstall: uninstall:
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -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_HISTORY)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE) - $(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) -V $(host_vendor) -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_HISTORY)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_READLINE) + $(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 @echo uninstall: you may need to run ldconfig
clean mostlyclean: force clean mostlyclean: force
--- support/shlib-install --- support/shlib-install
+++ support/shlib-install 2010-02-15 15:59:38.005297957 +0000 +++ support/shlib-install 2009-02-27 17:22:54.688001513 +0100
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# shlib-install - install a shared library and do any necessary host-specific # shlib-install - install a shared library and do any necessary host-specific
# post-installation configuration (like ldconfig) # post-installation configuration (like ldconfig)
# #
-# usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library -# 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 [-V host_vendor] -d installation-dir [-l linkage-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 Ramey
# chet@po.cwru.edu # chet@po.cwru.edu
@ -46,14 +46,14 @@
+DESTDIR= +DESTDIR=
PROGNAME=`basename $0` PROGNAME=`basename $0`
-USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library" -USAGE="$PROGNAME [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library"
+USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] [-l linkage-dir] -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 # process options
@@ -24,14 +26,19 @@ while [ $# -gt 0 ]; do @@ -23,14 +25,19 @@ while [ $# -gt 0 ]; do
case "$1" in
-O) shift; host_os="$1"; shift ;; -O) shift; host_os="$1"; shift ;;
-V) shift; host_vendor="$1"; shift ;;
-d) shift; INSTALLDIR="$1"; shift ;; -d) shift; INSTALLDIR="$1"; shift ;;
+ -dd) shift; DESTDIR=$1; shift ;; + -dd) shift; DESTDIR=$1; shift ;;
-b) shift; BINDIR="$1" ; shift ;; -b) shift; BINDIR="$1" ; shift ;;
@ -71,7 +71,7 @@
# set install target name # set install target name
LIBNAME="$1" LIBNAME="$1"
@@ -49,18 +56,18 @@ LN="ln -s" @@ -48,18 +55,18 @@ LN="ln -s"
# pre-install # pre-install
if [ -z "$uninstall" ]; then if [ -z "$uninstall" ]; then
@ -95,7 +95,7 @@
fi fi
# post-install/uninstall # post-install/uninstall
@@ -72,7 +79,7 @@ fi @@ -71,7 +78,7 @@ fi
case "$host_os" in case "$host_os" in
hpux*|darwin*|macosx*|linux*) hpux*|darwin*|macosx*|linux*)
if [ -z "$uninstall" ]; then if [ -z "$uninstall" ]; then
@ -104,7 +104,7 @@
fi ;; fi ;;
cygwin*|mingw*) cygwin*|mingw*)
IMPLIBNAME=`echo ${LIBNAME} \ IMPLIBNAME=`echo ${LIBNAME} \
@@ -110,8 +117,8 @@ case "$LIBNAME" in @@ -109,8 +116,8 @@ case "$LIBNAME" in
LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib
esac esac
@ -115,9 +115,9 @@
# #
# Create symlinks to the installed library. This section is incomplete. # Create symlinks to the installed library. This section is incomplete.
@@ -119,27 +126,27 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR && @@ -118,27 +125,27 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR &&
case "$host_os-$host_vendor" in case "$host_os" in
*linux*|freebsd*-gentoo) *linux*)
# libname.so.M -> libname.so.M.N # libname.so.M -> libname.so.M.N
- ${echo} ${RM} ${INSTALLDIR}/$LINK2 - ${echo} ${RM} ${INSTALLDIR}/$LINK2
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2 + ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
@ -134,7 +134,7 @@
fi fi
;; ;;
bsdi4*|*gnu*|darwin*|macosx*|netbsd*) bsdi4*|*gnu*|darwin*|macosx*|k*bsd*-gnu|netbsd*)
# libname.so.M -> libname.so.M.N # libname.so.M -> libname.so.M.N
- ${echo} ${RM} ${INSTALLDIR}/$LINK2 - ${echo} ${RM} ${INSTALLDIR}/$LINK2
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2 + ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
@ -148,7 +148,7 @@
if [ -z "$uninstall" ]; then if [ -z "$uninstall" ]; then
eval $INSTALL_LINK1 eval $INSTALL_LINK1
fi fi
@@ -147,7 +154,7 @@ bsdi4*|*gnu*|darwin*|macosx*|netbsd*) @@ -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*) solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|irix[56]*|sysv[45]*|dgux*|interix*)
# libname.so -> libname.so.M # libname.so -> libname.so.M
@ -157,8 +157,8 @@
if [ -z "$uninstall" ]; then if [ -z "$uninstall" ]; then
eval $INSTALL_LINK1 eval $INSTALL_LINK1
fi fi
@@ -158,19 +165,19 @@ solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|iri @@ -157,19 +164,19 @@ solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|iri
freebsd3*|freebsdaout*) freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*)
if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
# libname.so -> libname.so.M # libname.so -> libname.so.M
- ${echo} ${RM} ${INSTALLDIR}/$LINK1 - ${echo} ${RM} ${INSTALLDIR}/$LINK1
@ -180,8 +180,8 @@
if [ -z "$uninstall" ]; then if [ -z "$uninstall" ]; then
eval $INSTALL_LINK1 eval $INSTALL_LINK1
fi fi
@@ -187,7 +194,7 @@ freebsd[4-9]*|freebsdelf*|dragonfly*) @@ -178,7 +185,7 @@ freebsd[3-9]*|freebsdelf[3-9]*|freebsdao
hpux1*) hpux1*)
# libname.sl -> libname.M # libname.sl -> libname.M
- ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl - ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22b42db504a41a7f91efd06f0ab2891df8bcd056598e85f3cd7e5e323f73a6c1
size 2635

View File

@ -1,13 +1,15 @@
--- lib/readline/display.c Index: lib/readline/display.c
+++ lib/readline/display.c 2006-11-13 15:55:24.000000000 +0000 ===================================================================
--- lib/readline/display.c.orig
+++ lib/readline/display.c
@@ -714,7 +714,10 @@ rl_redisplay () @@ -714,7 +714,10 @@ rl_redisplay ()
inv_lbreaks[++newlines] = temp; inv_lbreaks[++newlines] = temp;
#if defined (HANDLE_MULTIBYTE) #if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
- lpos -= _rl_col_width (local_prompt, n0, num, 1); - lpos -= _rl_col_width (local_prompt, n0, num);
+ { + {
+ if (local_prompt_len > 0) + if (local_prompt_len > 0)
+ lpos -= _rl_col_width (local_prompt, n0, num, 1); + lpos -= _rl_col_width (local_prompt, n0, num);
+ } + }
else else
#endif #endif

View File

@ -124,7 +124,7 @@
--- support/shobj-conf --- support/shobj-conf
+++ support/shobj-conf 2006-09-22 16:17:48.000000000 +0200 +++ support/shobj-conf 2006-09-22 16:17:48.000000000 +0200
@@ -112,10 +112,11 @@ sunos5*|solaris2*) @@ -112,10 +112,11 @@ sunos5*|solaris2*)
linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) linux*-*|gnu*-*|k*bsd*-gnu-*)
SHOBJ_CFLAGS=-fPIC SHOBJ_CFLAGS=-fPIC
SHOBJ_LD='${CC}' SHOBJ_LD='${CC}'
- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' - SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'

3
readline-6.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1d5bf4673464aaf5605a5b4f0d5aa02ef97acafa037b7ffe398b96b1c6283308
size 1905460

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:28646085728346f5236c05f9e7c22cf430928eb2bf55f281cb9809bf621906df
size 1011

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8388cbde75bdea04bab9017f7fc3ff9fc7bec557743f1f943cd738ace915e0da
size 1889722