From eca682b5df1628d6dff56c71ee45ea74ab43a772 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 22 Oct 2014 12:53:54 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=185 --- audit-patch | 107 ------- audit-rl-patch | 99 ------- bash-3.0-decl.patch | 10 - bash-4.2-error-getpwd.patch | 16 -- bash-4.2-nsec.dif | 20 -- bash-4.2-patches.tar.bz2 | 3 - bash-4.2-winch.dif | 25 -- bash-4.2.tar.gz | 3 - bash-4.2-2.4.4.patch => bash-4.3-2.4.4.patch | 61 +--- bash-4.3-decl.patch | 10 + ....patch => bash-4.3-extra-import-func.patch | 36 +-- bash-4.0-headers.dif => bash-4.3-headers.dif | 9 +- ....0-loadables.dif => bash-4.3-loadables.dif | 105 ++----- bash-4.3-patches.tar.bz2 | 3 + bash-4.3-sigrestart.patch | 21 ++ bash-4.3-winch.dif | 11 + bash-4.2.dif => bash-4.3.dif | 190 ++++++------ bash-4.3.tar.gz | 3 + bash.changes | 272 ++++++++++++++---- bash.spec | 102 +++---- readline-6.2-msgdynamic.patch | 71 ----- readline-6.2-patches.tar.bz2 | 3 - readline-6.2.tar.gz | 3 - ...estdir.patch => readline-6.3-destdir.patch | 42 +-- ...ne-4.3-input.dif => readline-6.3-input.dif | 14 +- readline-6.3-patches.tar.bz2 | 3 + ...ltrace.patch => readline-6.3-rltrace.patch | 12 +- readline-6.2.dif => readline-6.3.dif | 123 ++++---- readline-6.3.tar.gz | 3 + 29 files changed, 573 insertions(+), 807 deletions(-) delete mode 100644 audit-patch delete mode 100644 audit-rl-patch delete mode 100644 bash-3.0-decl.patch delete mode 100644 bash-4.2-error-getpwd.patch delete mode 100644 bash-4.2-nsec.dif delete mode 100644 bash-4.2-patches.tar.bz2 delete mode 100644 bash-4.2-winch.dif delete mode 100644 bash-4.2.tar.gz rename bash-4.2-2.4.4.patch => bash-4.3-2.4.4.patch (55%) create mode 100644 bash-4.3-decl.patch rename bash-4.2-extra-import-func.patch => bash-4.3-extra-import-func.patch (75%) rename bash-4.0-headers.dif => bash-4.3-headers.dif (89%) rename bash-4.0-loadables.dif => bash-4.3-loadables.dif (85%) create mode 100644 bash-4.3-patches.tar.bz2 create mode 100644 bash-4.3-sigrestart.patch create mode 100644 bash-4.3-winch.dif rename bash-4.2.dif => bash-4.3.dif (71%) create mode 100644 bash-4.3.tar.gz delete mode 100644 readline-6.2-msgdynamic.patch delete mode 100644 readline-6.2-patches.tar.bz2 delete mode 100644 readline-6.2.tar.gz rename readline-6.2-destdir.patch => readline-6.3-destdir.patch (85%) rename readline-4.3-input.dif => readline-6.3-input.dif (75%) create mode 100644 readline-6.3-patches.tar.bz2 rename readline-6.2-rltrace.patch => readline-6.3-rltrace.patch (73%) rename readline-6.2.dif => readline-6.3.dif (76%) create mode 100644 readline-6.3.tar.gz diff --git a/audit-patch b/audit-patch deleted file mode 100644 index 8de49808..00000000 --- a/audit-patch +++ /dev/null @@ -1,107 +0,0 @@ -diff -up bash-4.0/config.h.in.audit bash-4.0/config.h.in ---- bash-4.0/config.h.in.audit 2009-01-21 11:34:34.000000000 -0500 -+++ bash-4.0/config.h.in 2009-01-21 11:34:35.000000000 -0500 -@@ -1077,6 +1077,14 @@ - - /* End additions for lib/intl */ - -+ -+/* Additions for lib/readline */ -+ -+/* Define if you have and it defines AUDIT_USER_TTY */ -+#undef HAVE_DECL_AUDIT_USER_TTY -+ -+/* End additions for lib/readline */ -+ - #include "config-bot.h" - - #endif /* _CONFIG_H_ */ -diff -up bash-4.0/configure.in.audit bash-4.0/configure.in ---- bash-4.0/configure.in.audit 2009-01-21 11:34:34.000000000 -0500 -+++ bash-4.0/configure.in 2009-01-21 11:34:35.000000000 -0500 -@@ -875,6 +875,8 @@ BASH_FUNC_DUP2_CLOEXEC_CHECK - BASH_SYS_PGRP_SYNC - BASH_SYS_SIGNAL_VINTAGE - -+AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]]) -+ - dnl checking for the presence of certain library symbols - BASH_SYS_ERRLIST - BASH_SYS_SIGLIST -diff -up bash-4.0/lib/readline/readline.c.audit bash-4.0/lib/readline/readline.c ---- bash-4.0/lib/readline/readline.c.audit 2009-01-21 11:34:34.000000000 -0500 -+++ bash-4.0/lib/readline/readline.c 2009-01-21 11:40:12.000000000 -0500 -@@ -55,6 +55,12 @@ - extern int errno; - #endif /* !errno */ - -+#if defined (HAVE_DECL_AUDIT_USER_TTY) -+# include -+# include -+# include -+#endif -+ - /* System-specific feature definitions and include files. */ - #include "rldefs.h" - #include "rlmbutil.h" -@@ -297,7 +303,47 @@ rl_set_prompt (prompt) - rl_visible_prompt_length = rl_expand_prompt (rl_prompt); - return 0; - } -- -+ -+#if defined (HAVE_DECL_AUDIT_USER_TTY) -+/* Report STRING to the audit system. */ -+static void -+audit_tty (char *string) -+{ -+ struct sockaddr_nl addr; -+ struct msghdr msg; -+ struct nlmsghdr nlm; -+ struct iovec iov[2]; -+ size_t size; -+ int fd; -+ -+ size = strlen (string) + 1; -+ fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_AUDIT); -+ if (fd < 0) -+ return; -+ nlm.nlmsg_len = NLMSG_LENGTH (size); -+ nlm.nlmsg_type = AUDIT_USER_TTY; -+ nlm.nlmsg_flags = NLM_F_REQUEST; -+ nlm.nlmsg_seq = 0; -+ nlm.nlmsg_pid = 0; -+ iov[0].iov_base = &nlm; -+ iov[0].iov_len = sizeof (nlm); -+ iov[1].iov_base = string; -+ iov[1].iov_len = size; -+ addr.nl_family = AF_NETLINK; -+ addr.nl_pid = 0; -+ addr.nl_groups = 0; -+ msg.msg_name = &addr; -+ msg.msg_namelen = sizeof (addr); -+ msg.msg_iov = iov; -+ msg.msg_iovlen = 2; -+ msg.msg_control = NULL; -+ msg.msg_controllen = 0; -+ msg.msg_flags = 0; -+ (void)sendmsg (fd, &msg, 0); -+ close (fd); -+} -+#endif -+ - /* Read a line of input. Prompt with PROMPT. An empty PROMPT means - none. A return value of NULL means that EOF was encountered. */ - char * -@@ -348,6 +394,11 @@ readline (prompt) - RL_SETSTATE (RL_STATE_CALLBACK); - #endif - -+#if defined (HAVE_DECL_AUDIT_USER_TTY) -+ if (value != NULL) -+ audit_tty (value); -+#endif -+ - return (value); - } - diff --git a/audit-rl-patch b/audit-rl-patch deleted file mode 100644 index 259a55e6..00000000 --- a/audit-rl-patch +++ /dev/null @@ -1,99 +0,0 @@ ---- readline-6.2/config.h.in -+++ readline-6.2/config.h.in 2013-01-09 09:31:06.833952652 +0000 -@@ -251,6 +251,9 @@ - - #undef CTYPE_NON_ASCII - -+/* Define if you have and it defines AUDIT_USER_TTY */ -+#undef HAVE_DECL_AUDIT_USER_TTY -+ - /* modify settings or make new ones based on what autoconf tells us. */ - - /* Ultrix botches type-ahead when switching from canonical to ---- readline-6.2/configure.in -+++ readline-6.2/configure.in 2013-01-09 09:33:09.125452625 +0000 -@@ -159,6 +159,8 @@ AC_CHECK_HEADERS(sys/ptem.h,,, - - AC_SYS_LARGEFILE - -+AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]]) -+ - BASH_SYS_SIGNAL_VINTAGE - BASH_SYS_REINSTALL_SIGHANDLERS - ---- readline-6.2/readline.c -+++ readline-6.2/readline.c 2009-01-21 16:40:12.000000000 +0000 -@@ -55,6 +55,12 @@ - extern int errno; - #endif /* !errno */ - -+#if defined (HAVE_DECL_AUDIT_USER_TTY) -+# include -+# include -+# include -+#endif -+ - /* System-specific feature definitions and include files. */ - #include "rldefs.h" - #include "rlmbutil.h" -@@ -297,7 +303,47 @@ rl_set_prompt (prompt) - rl_visible_prompt_length = rl_expand_prompt (rl_prompt); - return 0; - } -- -+ -+#if defined (HAVE_DECL_AUDIT_USER_TTY) -+/* Report STRING to the audit system. */ -+static void -+audit_tty (char *string) -+{ -+ struct sockaddr_nl addr; -+ struct msghdr msg; -+ struct nlmsghdr nlm; -+ struct iovec iov[2]; -+ size_t size; -+ int fd; -+ -+ size = strlen (string) + 1; -+ fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_AUDIT); -+ if (fd < 0) -+ return; -+ nlm.nlmsg_len = NLMSG_LENGTH (size); -+ nlm.nlmsg_type = AUDIT_USER_TTY; -+ nlm.nlmsg_flags = NLM_F_REQUEST; -+ nlm.nlmsg_seq = 0; -+ nlm.nlmsg_pid = 0; -+ iov[0].iov_base = &nlm; -+ iov[0].iov_len = sizeof (nlm); -+ iov[1].iov_base = string; -+ iov[1].iov_len = size; -+ addr.nl_family = AF_NETLINK; -+ addr.nl_pid = 0; -+ addr.nl_groups = 0; -+ msg.msg_name = &addr; -+ msg.msg_namelen = sizeof (addr); -+ msg.msg_iov = iov; -+ msg.msg_iovlen = 2; -+ msg.msg_control = NULL; -+ msg.msg_controllen = 0; -+ msg.msg_flags = 0; -+ (void)sendmsg (fd, &msg, 0); -+ close (fd); -+} -+#endif -+ - /* Read a line of input. Prompt with PROMPT. An empty PROMPT means - none. A return value of NULL means that EOF was encountered. */ - char * -@@ -348,6 +394,11 @@ readline (prompt) - RL_SETSTATE (RL_STATE_CALLBACK); - #endif - -+#if defined (HAVE_DECL_AUDIT_USER_TTY) -+ if (value != NULL) -+ audit_tty (value); -+#endif -+ - return (value); - } - diff --git a/bash-3.0-decl.patch b/bash-3.0-decl.patch deleted file mode 100644 index 48f82a4b..00000000 --- a/bash-3.0-decl.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- support/printenv.c -+++ support/printenv.c 2005-09-19 13:09:08.000000000 +0000 -@@ -30,6 +30,7 @@ - - #include "bashansi.h" - -+#include - extern char **environ; - - int diff --git a/bash-4.2-error-getpwd.patch b/bash-4.2-error-getpwd.patch deleted file mode 100644 index 2e8a501f..00000000 --- a/bash-4.2-error-getpwd.patch +++ /dev/null @@ -1,16 +0,0 @@ -Backport of the corrected error message for a failing getpwd (bnc#895475) ---- - po/de.po | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- po/de.po -+++ po/de.po 2014-09-15 08:46:03.482235134 +0000 -@@ -267,7 +267,7 @@ msgstr "Fehler beim Ermitteln der Termin - #: builtins/common.c:563 - #, c-format - msgid "%s: error retrieving current directory: %s: %s\n" --msgstr "%s: Kann das nicht aktuelle Verzeichnis wiederfinden: %s: %s\n" -+msgstr "%s: Kann das aktuelle Verzeichnis nicht wiederfinden: %s: %s\n" - - #: builtins/common.c:629 builtins/common.c:631 - #, c-format diff --git a/bash-4.2-nsec.dif b/bash-4.2-nsec.dif deleted file mode 100644 index f3be2828..00000000 --- a/bash-4.2-nsec.dif +++ /dev/null @@ -1,20 +0,0 @@ ---- test.c -+++ test.c 2012-03-06 11:14:00.149934027 +0000 -@@ -309,8 +309,17 @@ filecomp (s, t, op) - - switch (op) - { -+#if defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || (defined(_XOPEN_SOURCE) && ((_XOPEN_SOURCE - 0) >= 700)) || (defined(_POSIX_C_SOURCE) && ((_POSIX_C_SOURCE - 0) >= 200809L)) -+# define st_mtimcmp(t1, t2, CMP) \ -+ (((t1).st_mtim.tv_sec == (t2).st_mtim.tv_sec) ? \ -+ ((t1).st_mtim.tv_nsec CMP (t2).st_mtim.tv_nsec) : \ -+ ((t1).st_mtim.tv_sec CMP (t2).st_mtim.tv_sec)) -+ case OT: return (r1 < r2 || (r2 == 0 && st_mtimcmp(st1, st2, <))); -+ case NT: return (r1 > r2 || (r1 == 0 && st_mtimcmp(st1, st2, >))); -+#else - case OT: return (r1 < r2 || (r2 == 0 && st1.st_mtime < st2.st_mtime)); - case NT: return (r1 > r2 || (r1 == 0 && st1.st_mtime > st2.st_mtime)); -+#endif - case EF: return (same_file (s, t, &st1, &st2)); - } - return (FALSE); diff --git a/bash-4.2-patches.tar.bz2 b/bash-4.2-patches.tar.bz2 deleted file mode 100644 index f2c66a06..00000000 --- a/bash-4.2-patches.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:951cdc3d800ad2d4ef928250ffeeae7bd6b4c40993c9063c339cfeac45dc30fc -size 32638 diff --git a/bash-4.2-winch.dif b/bash-4.2-winch.dif deleted file mode 100644 index ecce70c8..00000000 --- a/bash-4.2-winch.dif +++ /dev/null @@ -1,25 +0,0 @@ ---- jobs.c -+++ jobs.c 2013-07-12 12:19:03.000000000 +0000 -@@ -219,7 +219,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. */ - ---- builtins/shopt.def -+++ builtins/shopt.def 2006-03-27 12:15:25.000000000 +0000 -@@ -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; diff --git a/bash-4.2.tar.gz b/bash-4.2.tar.gz deleted file mode 100644 index 55a9b300..00000000 --- a/bash-4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a27a1179ec9c0830c65c6aa5d7dab60f7ce1a2a608618570f96bfa72e95ab3d8 -size 7009201 diff --git a/bash-4.2-2.4.4.patch b/bash-4.3-2.4.4.patch similarity index 55% rename from bash-4.2-2.4.4.patch rename to bash-4.3-2.4.4.patch index b0ba1b33..f0c8dfb4 100644 --- a/bash-4.2-2.4.4.patch +++ b/bash-4.3-2.4.4.patch @@ -1,6 +1,6 @@ --- array.c +++ array.c 2006-11-14 09:54:22.000000000 +0000 -@@ -922,7 +922,7 @@ char *s, *sep; +@@ -940,7 +940,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 */ @@ -41,7 +41,7 @@ signal_is_trapped (s) --- jobs.c +++ jobs.c 2001-05-02 16:20:31.000000000 +0000 -@@ -1769,6 +1769,15 @@ make_child (command, async_p) +@@ -1783,6 +1783,15 @@ make_child (command, async_p) pid_t mypid; mypid = getpid (); @@ -57,44 +57,9 @@ #if defined (BUFFERED_INPUT) /* Close default_buffered_input if it's > 0. We don't close it if it's 0 because that's the file descriptor used when redirecting input, ---- quit.h -+++ quit.h 2006-11-14 09:43:18.000000000 +0000 -@@ -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 --- sig.c +++ sig.c 2006-11-14 09:53:51.000000000 +0000 -@@ -66,13 +66,13 @@ extern int history_lines_this_session; - extern void initialize_siglist (); - - /* 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. */ -@@ -84,10 +84,10 @@ sigset_t top_level_mask; +@@ -92,10 +92,10 @@ sigset_t top_level_mask; #endif /* JOB_CONTROL */ /* When non-zero, we throw_to_top_level (). */ @@ -108,22 +73,14 @@ #if defined (SIGWINCH) static SigHandler *old_winch = (SigHandler *)SIG_DFL; --- sig.h -+++ sig.h 2006-11-14 09:49:32.000000000 +0000 -@@ -108,11 +108,15 @@ do { \ ++++ sig.h 2014-04-17 09:42:15.030235662 +0000 +@@ -111,8 +111,8 @@ do { \ + extern volatile sig_atomic_t sigwinch_received; + extern volatile sig_atomic_t sigterm_received; - #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 interrupt_immediately; /* no longer used */ -extern int terminate_immediately; -+extern volatile sig_atomic_t interrupt_immediately; ++extern volatile sig_atomic_t interrupt_immediately; /* no longer used */ +extern volatile sig_atomic_t terminate_immediately; /* Functions from sig.c. */ diff --git a/bash-4.3-decl.patch b/bash-4.3-decl.patch new file mode 100644 index 00000000..dc3cf67f --- /dev/null +++ b/bash-4.3-decl.patch @@ -0,0 +1,10 @@ +--- support/printenv.c ++++ support/printenv.c 2014-04-17 09:46:25.874236036 +0000 +@@ -31,6 +31,7 @@ + #include "bashansi.h" + #include /* puts */ + ++#include + extern char **environ; + + int diff --git a/bash-4.2-extra-import-func.patch b/bash-4.3-extra-import-func.patch similarity index 75% rename from bash-4.2-extra-import-func.patch rename to bash-4.3-extra-import-func.patch index 8364af19..5901a5f7 100644 --- a/bash-4.2-extra-import-func.patch +++ b/bash-4.3-extra-import-func.patch @@ -7,7 +7,7 @@ --- shell.c +++ shell.c 2014-09-25 20:11:51.000000000 +0000 -@@ -225,6 +225,7 @@ int posixly_correct = 1; /* Non-zero mea +@@ -230,6 +230,7 @@ int posixly_correct = 1; /* Non-zero mea #else int posixly_correct = 0; /* Non-zero means posix.2 superset. */ #endif @@ -15,7 +15,7 @@ /* Some long-winded argument names. These are obviously new. */ #define Int 1 -@@ -244,6 +245,7 @@ static const struct { +@@ -249,6 +250,7 @@ static const struct { { "help", Int, &want_initial_help, (char **)0x0 }, { "init-file", Charp, (int *)0x0, &bashrc_file }, { "login", Int, &make_login_shell, (char **)0x0 }, @@ -24,8 +24,8 @@ { "noprofile", Int, &no_profile, (char **)0x0 }, { "norc", Int, &no_rc, (char **)0x0 }, --- variables.c -+++ variables.c 2014-09-30 11:54:58.994735738 +0000 -@@ -105,6 +105,7 @@ extern time_t shell_start_time; ++++ variables.c 2014-10-06 08:36:41.299837915 +0000 +@@ -110,6 +110,7 @@ extern time_t shell_start_time; extern int assigning_in_environment; extern int executing_builtin; extern int funcnest_max; @@ -33,15 +33,15 @@ #if defined (READLINE) extern int no_line_editing; -@@ -317,6 +318,7 @@ initialize_shell_variables (env, privmod +@@ -328,6 +329,7 @@ initialize_shell_variables (env, privmod char *name, *string, *temp_string; - int c, char_index, string_index, string_length; + int c, char_index, string_index, string_length, ro; SHELL_VAR *temp_var; + int skipped_import; create_variable_tables (); -@@ -341,9 +343,12 @@ initialize_shell_variables (env, privmod +@@ -352,9 +354,12 @@ initialize_shell_variables (env, privmod temp_var = (SHELL_VAR *)NULL; @@ -50,12 +50,12 @@ + /* If exported function, define it now. Don't import functions from the environment in privileged mode. */ -- if (privmode == 0 && read_but_dont_execute == 0 && -+ if (skipped_import == 0 && privmode == 0 && read_but_dont_execute == 0 && - STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) && - STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) && +- if (privmode == 0 && read_but_dont_execute == 0 && ++ if (skipped_import == 0 && privmode == 0 && read_but_dont_execute == 0 && + STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) && + STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) && STREQN ("() {", string, 4)) -@@ -356,6 +361,12 @@ initialize_shell_variables (env, privmod +@@ -367,6 +372,12 @@ initialize_shell_variables (env, privmod tname = name + BASHFUNC_PREFLEN; /* start of func name */ tname[namelen] = '\0'; /* now tname == func name */ @@ -69,16 +69,16 @@ temp_string = (char *)xmalloc (namelen + string_length + 2); --- builtins/shopt.def -+++ builtins/shopt.def 2014-09-30 11:58:13.714235365 +0000 -@@ -89,6 +89,7 @@ extern int check_jobs_at_exit; - extern int autocd; ++++ builtins/shopt.def 2014-09-30 11:58:14.000000000 +0000 +@@ -90,6 +90,7 @@ extern int autocd; extern int glob_star; + extern int glob_asciirange; extern int lastpipe_opt; +extern int import_functions; #if defined (EXTENDED_GLOB) extern int extended_glob; -@@ -186,6 +187,7 @@ static struct { +@@ -192,6 +193,7 @@ static struct { { "hostcomplete", &perform_hostname_completion, shopt_enable_hostname_completion }, #endif { "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL }, @@ -87,8 +87,8 @@ { "lastpipe", &lastpipe_opt, (shopt_set_func_t *)NULL }, #if defined (HISTORY) --- doc/bash.1 -+++ doc/bash.1 2014-09-30 12:09:39.698234623 +0000 -@@ -235,6 +235,13 @@ The shell becomes restricted (see ++++ doc/bash.1 2014-09-30 12:09:40.000000000 +0000 +@@ -240,6 +240,13 @@ The shell becomes restricted (see .B "RESTRICTED SHELL" below). .TP diff --git a/bash-4.0-headers.dif b/bash-4.3-headers.dif similarity index 89% rename from bash-4.0-headers.dif rename to bash-4.3-headers.dif index a657f856..92f738c7 100644 --- a/bash-4.0-headers.dif +++ b/bash-4.3-headers.dif @@ -1,5 +1,5 @@ --- examples/loadables/Makefile.in -+++ examples/loadables/Makefile.in 2009-06-09 16:16:25.000000000 +0000 ++++ examples/loadables/Makefile.in 2014-04-17 10:10:12.450235258 +0000 @@ -28,6 +28,9 @@ includedir = @includedir@ datarootdir = @datarootdir@ @@ -27,7 +27,7 @@ # # 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 +@@ -79,20 +92,46 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/l -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \ -I$(BUILD_DIR)/builtins $(INTL_INC) @@ -40,9 +40,9 @@ +SUPPORT_SRC = $(topdir)/support/ - ALLPROG = print sleep finfo logname basename dirname \ + ALLPROG = print truefalse sleep pushd finfo logname basename dirname \ tty pathchk tee head mkdir rmdir printenv id whoami \ - uname sync push ln unlink cut realpath getconf strftime mypid + uname sync push ln unlink realpath strftime mypid OTHERPROG = necho hello cat +HEADERS = @@ -53,6 +53,7 @@ +dependlist: template.d +-include template.d ++ +install-headers: HEADERS = $(sort $(filter %.h,$(realpath $^))) +install-headers: + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(includedir)/$(Name)/$(Version)/builtins diff --git a/bash-4.0-loadables.dif b/bash-4.3-loadables.dif similarity index 85% rename from bash-4.0-loadables.dif rename to bash-4.3-loadables.dif index a1e6e707..b3c47cad 100644 --- a/bash-4.0-loadables.dif +++ b/bash-4.3-loadables.dif @@ -1,17 +1,6 @@ ---- examples/loadables/Makefile.in -+++ examples/loadables/Makefile.in 2006-09-25 11:31:55.000000000 +0000 -@@ -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 --- examples/loadables/basename.c +++ examples/loadables/basename.c 2006-09-25 11:49:31.000000000 +0000 -@@ -9,10 +9,13 @@ +@@ -27,10 +27,13 @@ #endif #include @@ -40,29 +29,6 @@ #ifndef errno extern int errno; ---- examples/loadables/cut.c -+++ examples/loadables/cut.c 2006-09-25 12:00:21.000000000 +0000 -@@ -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++) --- examples/loadables/dirname.c +++ examples/loadables/dirname.c 2006-09-25 11:49:38.000000000 +0000 @@ -27,10 +27,13 @@ @@ -82,7 +48,7 @@ { --- examples/loadables/finfo.c +++ examples/loadables/finfo.c 2006-09-25 11:48:52.000000000 +0000 -@@ -20,6 +20,8 @@ +@@ -38,6 +38,8 @@ #include "bashansi.h" #include "shell.h" #include "builtins.h" @@ -91,7 +57,7 @@ #include "common.h" #ifndef errno -@@ -81,7 +83,7 @@ int argc; +@@ -99,7 +101,7 @@ int argc; char **argv; { register int i; @@ -100,7 +66,7 @@ sh_optind = 0; /* XXX */ prog = base_pathname(argv[0]); -@@ -174,7 +176,7 @@ int m; +@@ -192,7 +194,7 @@ int m; return (m & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID)); } @@ -109,7 +75,7 @@ perms(m) int m; { -@@ -218,7 +220,7 @@ int m; +@@ -236,7 +238,7 @@ int m; printf ("u=%s,g=%s,o=%s", ubits, gbits, obits); } @@ -118,7 +84,7 @@ printmode(mode) int mode; { -@@ -313,13 +315,13 @@ int flags; +@@ -331,13 +333,13 @@ int flags; else printf("%ld\n", st->st_ctime); } else if (flags & OPT_DEV) @@ -136,7 +102,7 @@ else if (flags & OPT_LNKNAM) { #ifdef S_ISLNK b = xmalloc(4096); -@@ -369,7 +371,6 @@ finfo_builtin(list) +@@ -387,7 +389,6 @@ finfo_builtin(list) { int c, r; char **v; @@ -144,44 +110,6 @@ v = make_builtin_argv (list, &c); r = finfo_main (c, v); ---- examples/loadables/getconf.c -+++ examples/loadables/getconf.c 2006-09-25 12:02:33.000000000 +0000 -@@ -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"); --- examples/loadables/head.c +++ examples/loadables/head.c 2006-09-25 11:55:24.000000000 +0000 @@ -38,6 +38,8 @@ @@ -215,7 +143,7 @@ reset_internal_getopt (); --- examples/loadables/hello.c +++ examples/loadables/hello.c 2006-09-25 11:38:25.000000000 +0000 -@@ -11,8 +11,10 @@ +@@ -29,8 +29,10 @@ #include @@ -565,7 +493,7 @@ #if !defined (errno) --- examples/loadables/truefalse.c +++ examples/loadables/truefalse.c 2006-09-25 11:40:42.000000000 +0000 -@@ -20,18 +20,24 @@ +@@ -20,31 +20,37 @@ #include @@ -592,6 +520,21 @@ WORD_LIST *list; { return EXECUTION_FAILURE; + } + +-static char *true_doc[] = { ++char * const true_doc[] = { + "Exit successfully.", + "", + "Return a successful result.", + (char *)NULL + }; + +-static char *false_doc[] = { ++char * const false_doc[] = { + "Exit unsuccessfully.", + "", + "Return an unsuccessful result.", --- examples/loadables/tty.c +++ examples/loadables/tty.c 2006-09-25 11:49:53.000000000 +0000 @@ -23,13 +23,16 @@ diff --git a/bash-4.3-patches.tar.bz2 b/bash-4.3-patches.tar.bz2 new file mode 100644 index 00000000..c6feb010 --- /dev/null +++ b/bash-4.3-patches.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49ddb97d874d4d969a4f7dcefb239d472a18d75f42f7f72104a0dab87a305fad +size 24452 diff --git a/bash-4.3-sigrestart.patch b/bash-4.3-sigrestart.patch new file mode 100644 index 00000000..68f2dfbc --- /dev/null +++ b/bash-4.3-sigrestart.patch @@ -0,0 +1,21 @@ +--- sig.c ++++ sig.c 2014-04-17 10:02:57.078235890 +0000 +@@ -722,10 +722,18 @@ set_signal_handler (sig, handler) + if (sig == SIGCHLD) + act.sa_flags |= SA_RESTART; /* XXX */ + #endif ++ if (sig != SIGALRM && handler != (termsig_sighandler)) ++ act.sa_flags |= SA_RESTART; /* XXX */ ++ if (handler == (trap_handler)) ++ act.sa_flags |= SA_NODEFER; /* XXX */ + /* If we're installing a SIGTERM handler for interactive shells, we want + it to be as close to SIG_IGN as possible. */ + if (sig == SIGTERM && handler == sigterm_sighandler) + act.sa_flags |= SA_RESTART; /* XXX */ ++ else 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 */ + + sigemptyset (&act.sa_mask); + sigemptyset (&oact.sa_mask); diff --git a/bash-4.3-winch.dif b/bash-4.3-winch.dif new file mode 100644 index 00000000..a1e2b846 --- /dev/null +++ b/bash-4.3-winch.dif @@ -0,0 +1,11 @@ +--- config-top.h ++++ config-top.h 2014-04-17 10:19:39.698805960 +0000 +@@ -122,7 +122,7 @@ + + /* Define to 0 if you want the checkwinsize option off by default, 1 if you + want it on. */ +-#define CHECKWINSIZE_DEFAULT 0 ++#define CHECKWINSIZE_DEFAULT 1 + + /* Define to 1 if you want to optimize for sequential array assignment when + using indexed arrays, 0 if you want bash-4.2 behavior, which favors diff --git a/bash-4.2.dif b/bash-4.3.dif similarity index 71% rename from bash-4.2.dif rename to bash-4.3.dif index c0897285..47b0ca0f 100644 --- a/bash-4.2.dif +++ b/bash-4.3.dif @@ -1,11 +1,18 @@ --- config-top.h -+++ config-top.h 2007-12-04 14:44:39.314025629 +0000 -@@ -54,14 +54,14 @@ ++++ config-top.h 2014-04-17 10:41:21.918735368 +0000 +@@ -56,17 +56,21 @@ + due to EPIPE. */ + /* #define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS */ + ++#ifndef _PATH_DEFPATH ++# include ++#endif ++ /* 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:." +- "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:." ++ "/usr/local/bin:" _PATH_DEFPATH ":." #endif /* The value for PATH when invoking `command -p'. This is only used when @@ -13,11 +20,11 @@ #ifndef STANDARD_UTILS_PATH #define STANDARD_UTILS_PATH \ - "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc" -+ "/bin:/usr/bin:/sbin:/usr/sbin" ++ _PATH_STDPATH #endif /* Default primary and secondary prompt strings. */ -@@ -75,20 +75,20 @@ +@@ -80,20 +84,20 @@ #define KSH_COMPATIBLE_SELECT /* System-wide .bashrc file for interactive shells. */ @@ -42,6 +49,40 @@ /* Define if you want the case-capitalizing operators (~[~]) and the `capcase' variable attribute (declare -c). */ +--- doc/Makefile.in ++++ doc/Makefile.in 2006-03-27 12:15:25.000000000 +0000 +@@ -146,7 +146,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 + +--- doc/bash.1 ++++ doc/bash.1 2006-03-27 12:15:25.000000000 +0000 +@@ -5080,8 +5080,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. +@@ -10266,6 +10266,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 --- general.h +++ general.h 2006-03-27 12:15:25.000000000 +0000 @@ -21,10 +21,13 @@ @@ -58,35 +99,9 @@ #if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE) # if defined (HAVE_SYS_TIME_H) ---- jobs.c -+++ jobs.c 2006-03-27 12:15:25.000000000 +0000 -@@ -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; ---- jobs.h -+++ jobs.h 2006-03-27 12:15:25.000000000 +0000 -@@ -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; --- parse.y +++ parse.y 2006-03-27 12:15:25.000000000 +0000 -@@ -1283,7 +1283,7 @@ input_file_descriptor () +@@ -1413,7 +1413,7 @@ input_file_descriptor () #if defined (READLINE) char *current_readline_prompt = (char *)NULL; @@ -95,18 +110,9 @@ int current_readline_line_index = 0; static int -@@ -5983,6 +5983,8 @@ save_input_line_state (ls) - /* force reallocation */ - shell_input_line = 0; - shell_input_line_size = shell_input_line_len = shell_input_line_index = 0; -+ -+ return ls; - } - - void --- shell.c +++ shell.c 2006-03-27 12:15:25.000000000 +0000 -@@ -479,7 +479,7 @@ main (argc, argv, env) +@@ -492,7 +492,7 @@ main (argc, argv, env) if (dump_translatable_strings) read_but_dont_execute = 1; @@ -115,53 +121,9 @@ disable_priv_mode (); /* Need to get the argument to a -c option processed in the ---- subst.c -+++ subst.c 2006-03-27 12:15:25.000000000 +0000 -@@ -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); ---- doc/Makefile.in -+++ doc/Makefile.in 2006-03-27 12:15:25.000000000 +0000 -@@ -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 - ---- doc/bash.1 -+++ doc/bash.1 2006-03-27 12:15:25.000000000 +0000 -@@ -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 --- support/man2html.c -+++ support/man2html.c 2011-11-25 17:07:28.895646776 +0000 -@@ -77,6 +77,7 @@ ++++ support/man2html.c 2011-11-25 17:07:29.000000000 +0000 +@@ -78,6 +78,7 @@ #include #include #include @@ -169,16 +131,6 @@ #define NULL_TERMINATED(n) ((n) + 1) ---- support/printenv.c -+++ support/printenv.c 2007-12-06 15:33:46.899561365 +0000 -@@ -27,6 +27,7 @@ - #if defined (HAVE_CONFIG_H) - # include - #endif -+#include - - #include "bashansi.h" - --- support/rlvers.sh +++ support/rlvers.sh 2006-03-27 12:15:25.000000000 +0000 @@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers @@ -197,7 +149,7 @@ while [ $# -gt 0 ]; do --- support/shobj-conf +++ support/shobj-conf 2006-09-22 14:11:58.000000000 +0000 -@@ -112,10 +112,11 @@ sunos5*|solaris2*) +@@ -126,10 +126,11 @@ sunos5*|solaris2*) linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' @@ -227,3 +179,41 @@ ${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 +--- execute_cmd.c ++++ execute_cmd.c 2014-04-17 11:56:03.742234753 +0000 +@@ -5225,7 +5225,8 @@ shell_execve (command, args, env) + run it for some reason. See why. */ + #if defined (HAVE_HASH_BANG_EXEC) + READ_SAMPLE_BUF (command, sample, sample_len); +- sample[sample_len - 1] = '\0'; ++ if (sample_len > 0) ++ sample[sample_len - 1] = '\0'; + if (sample_len > 2 && sample[0] == '#' && sample[1] == '!') + { + char *interp; +--- support/bashbug.sh ++++ support/bashbug.sh 2014-04-17 12:01:05.678235918 +0000 +@@ -1,4 +1,4 @@ +-#!/bin/sh - ++#!/bin/bash - + # + # bashbug - create a bug report and mail it to the bug address + # +--- shell.c ++++ shell.c 2014-04-17 12:19:01.758235040 +0000 +@@ -42,6 +42,7 @@ + #if defined (HAVE_UNISTD_H) + # include + # include ++# include + #endif + + #include "bashintl.h" +@@ -1226,6 +1227,7 @@ uidget () + void + disable_priv_mode () + { ++ setgroups(0, NULL); + setuid (current_user.uid); + setgid (current_user.gid); + current_user.euid = current_user.uid; diff --git a/bash-4.3.tar.gz b/bash-4.3.tar.gz new file mode 100644 index 00000000..5850f147 --- /dev/null +++ b/bash-4.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4 +size 7955839 diff --git a/bash.changes b/bash.changes index 2eb5436c..76aab962 100644 --- a/bash.changes +++ b/bash.changes @@ -1,79 +1,251 @@ +------------------------------------------------------------------- +Wed Oct 22 12:53:11 UTC 2014 - werner@suse.de + +- Bump bash version to 4.3 + ------------------------------------------------------------------- Tue Oct 21 21:18:20 UTC 2014 - brian@aljex.com - Allow building on targets from SL 10.1 to current since it's free ------------------------------------------------------------------- -Mon Oct 6 08:07:48 UTC 2014 - werner@suse.de +Mon Oct 6 08:38:54 UTC 2014 - werner@suse.de -- Replace patches bash-4.2-heredoc-eof-delim.patch and - bash-4.2-parse-exportfunc.patch with the official upstream - patch levels bash42-052 and bash42-053 +- Add upstream patches + bash43-030 which fixes CVE-2014-6278 + bash43-029 which fixes CVE-2014-6277 + bash43-028 which fixes CVE-2014-7186/CVE-2014-7187 ------------------------------------------------------------------- -Thu Oct 2 13:11:50 UTC 2014 - werner@suse.de +Mon Sep 29 12:19:29 UTC 2014 - werner@suse.de -- Replace patch bash-4.2-CVE-2014-7187.patch with upstream patch - level bash42-051 - -------------------------------------------------------------------- -Wed Oct 1 12:12:55 UTC 2014 - werner@suse.de - -- Add patches - bash-4.2-heredoc-eof-delim.patch for bsc#898812, CVE-2014-6277: - more troubles with functions - bash-4.2-parse-exportfunc.patch for bsc#898884, CVE-2014-6278: - code execution after original 6271 fix - -------------------------------------------------------------------- -Tue Sep 30 13:49:12 UTC 2014 - werner@suse.de - -- Make bash-4.2-extra-import-func.patch an optional patch due - instruction - -------------------------------------------------------------------- -Tue Sep 30 11:45:52 UTC 2014 - werner@suse.de - -- Remove and replace patches - bash-4.2-CVE-2014-6271.patch - bash-4.2-BSC898604.patch - bash-4.2-CVE-2014-7169.patch - with bash upstream patch 48, patch 49, and patch 50 -- Add patch bash-4.2-extra-import-func.patch which is based on the - BSD patch of Christos. As further enhancements the option - import-functions is mentioned in the manual page and a shopt - switch is added to enable and disable import-functions on the fly - -------------------------------------------------------------------- -Fri Sep 26 11:07:24 UTC 2014 - werner@suse.de - -- Add patches - bash-4.2-BSC898604.patch for bsc#898604: functions via environment - hardening - bash-4.2-CVE-2014-7169.patch for bsc#898346, CVE-2014-7169: - incremental parsing fix for function environment issue - bash-4.2-CVE-2014-7187.patch for bsc#898603, CVE-2014-7186, +- Add upstream patches + bash43-027 which fixed bsc#898604 + bash43-026 which fixes CVE-2014-7169 and bsc#898346 + bash43-025 which replaces bash-4.3-CVE-2014-6271.patch and + fixes bnc#896776 +- Remove patch bash-4.3-CVE-2014-6271.patch due patch bash43-027 +- Add patch bash-4.2-CVE-2014-7187.patch for bsc#898603, CVE-2014-7186, CVE-2014-7187: bad handling of HERE documents and for loop issue +------------------------------------------------------------------- +Fri Sep 26 08:07:16 UTC 2014 - werner@suse.de + +- Use a version linker script for libreadline 6.3 as there are new + symbols in this 6.3 version like the rl_executing_keyseq and those + are used by the new bash 4.3 + ------------------------------------------------------------------- Thu Sep 18 12:10:17 UTC 2014 - werner@suse.de -- Add bash-4.2-CVE-2014-6271.patch +- Add bash-4.3-CVE-2014-6271.patch to fix CVE-2014-6271, the unexpected code execution with environment variables (bnc#896776) ------------------------------------------------------------------- -Mon Sep 15 08:52:13 UTC 2014 - werner@suse.de +Tue Aug 19 13:49:46 UTC 2014 - werner@suse.de -- Add patch bash-4.2-error-getpwd.patch - which is the backport of the corrected german error message for - a failing getpwd (bnc#895475) +- Update to bash 4.3 with patch level 24 + * The -t timeout option to `read' does not work when the -e option is used + * When PS2 contains a command substitution, here-documents entered in an + interactive shell can sometimes cause a segmentation fault. + * When the readline `revert-all-at-newline' option is set, pressing newline + when the current line is one retrieved from history results in a double free + and a segmentation fault. + * Using nested pipelines within loops with the `lastpipe' option set can result + in a segmentation fault. + * Bash does not correctly parse process substitution constructs that contain + unbalanced parentheses as part of the contained command. + * Indirect variable references do not work correctly if the reference + variable expands to an array reference using a subscript other than 0 ------------------------------------------------------------------- Sun Jun 29 13:24:47 UTC 2014 - schwab@linux-m68k.org - Don't use outdated C standard +------------------------------------------------------------------- +Tue May 20 16:35:55 UTC 2014 - werner@suse.de + +- Update to bash 4.3 with patch level 18 + *When a SIGCHLD trap runs a command containing a shell builtin while + a script is running `wait' to wait for all running children to complete, + the SIGCHLD trap will not be run once for each child that terminates. + * Using reverse-i-search when horizontal scrolling is enabled doe + not redisplay the entire line containing the successful search results. + * Under certain circumstances, $@ is expanded incorrectly in contexts where + word splitting is not performed. + * When completing directory names, the directory name is dequoted twice. + This causes problems for directories with single and double quotes in + their names. + * An extended glob pattern containing a slash (`/') causes the globbing code + to misinterpret it as a directory separator. + * The code that creates local variables should not clear the `invisible' + attribute when returning an existing local variable. Let the code that + actually assigns a value clear it. + * When assigning an array variable using the compound assignment syntax, + but using `declare' with the rhs of the compound assignment quoted, the + shell did not mark the variable as visible after successfully performing + the assignment. +- Update to readline library 6.3 with patch level 6 + * Using reverse-i-search when horizontal scrolling is enabled does + not redisplay the entire line containing the successful search results. +- Remove readline-horizontal-redisplay.patch as now upstream + +------------------------------------------------------------------- +Wed Apr 30 11:51:24 UTC 2014 - werner@suse.de + +- Add readline-horizontal-redisplay.patch from upstream as a temporary + fix for failing incremental search in horizontal-scroll-mode + +------------------------------------------------------------------- +Thu Apr 17 12:56:56 UTC 2014 - werner@suse.de + +- Make patch command work on older products + +------------------------------------------------------------------- +Thu Apr 17 11:09:35 UTC 2014 - werner@suse.de + +- Update to bash 4.3 with patch level 11 + * The `helptopic' completion action now maps to all the help topics, not just + the shell builtins. + * The `help' builtin no longer does prefix substring matching first, so + `help read' does not match `readonly', but will do it if exact string + matching fails. + * The shell can be compiled to not display a message about processes that + terminate due to SIGTERM. + * Non-interactive shells now react to the setting of checkwinsize and set + LINES and COLUMNS after a foreground job exits. + * There is a new shell option, `globasciiranges', which, when set to on, + forces globbing range comparisons to use character ordering as if they + were run in the C locale. + * There is a new shell option, `direxpand', which makes filename completion + expand variables in directory names in the way bash-4.1 did. + * In Posix mode, the `command' builtin does not change whether or not a + builtin it shadows is treated as an assignment builtin. + * The `return' and `exit' builtins accept negative exit status arguments. + * The word completion code checks whether or not a filename containing a + shell variable expands to a directory name and appends `/' to the word + as appropriate. The same code expands shell variables in command names + when performing command completion. + * In Posix mode, it is now an error to attempt to define a shell function + with the same name as a Posix special builtin. + * When compiled for strict Posix conformance, history expansion is disabled + by default. + * The history expansion character (!) does not cause history expansion when + followed by the closing quote in a double-quoted string. + * `complete' and its siblings compgen/compopt now takes a new `-o noquote' + option to inhibit quoting of the completions. + * Setting HISTSIZE to a value less than zero causes the history list to be + unlimited (setting it 0 zero disables the history list). + * Setting HISTFILESIZE to a value less than zero causes the history file size + to be unlimited (setting it to 0 causes the history file to be truncated + to zero size). + * The `read' builtin now skips NUL bytes in the input. + * There is a new `bind -X' option to print all key sequences bound to Unix + commands. + * When in Posix mode, `read' is interruptible by a trapped signal. After + running the trap handler, read returns 128+signal and throws away any + partially-read input. + * The command completion code skips whitespace and assignment statements + before looking for the command name word to be completed. + * The build process has a new mechanism for constructing separate help files + that better reflects the current set of compilation options. + * The -nt and -ot options to test now work with files with nanosecond + timestamp resolution. + * The shell saves the command history in any shell for which history is + enabled and HISTFILE is set, not just interactive shells. + * The shell has `nameref' variables and new -n(/+n) options to declare and + unset to use them, and a `test -R' option to test for them. + * The shell now allows assigning, referencing, and unsetting elements of + indexed arrays using negative subscripts (a[-1]=2, echo ${a[-1]}) which + count back from the last element of the array. + * The {x} 1020 Recommends: bash-lang = %bash_vers @@ -42,7 +43,7 @@ Recommends: bash-lang = %bash_vers Suggests: command-not-found Recommends: bash-doc = %bash_vers %endif -Version: 4.2 +Version: %{bash_vers} Release: 0 Summary: The GNU Bourne-Again Shell License: GPL-3.0+ @@ -66,43 +67,36 @@ Source9: bash-4.2-history-myown.dif.bz2 Patch0: bash-%{bash_vers}.dif Patch1: bash-2.03-manual.patch Patch2: bash-4.0-security.patch -Patch3: bash-4.2-2.4.4.patch +Patch3: bash-4.3-2.4.4.patch Patch4: bash-3.0-evalexp.patch Patch5: bash-3.0-warn-locale.patch Patch6: bash-4.2-endpw.dif -Patch7: bash-3.0-decl.patch +Patch7: bash-4.3-decl.patch Patch8: bash-4.0-async-bnc523667.dif Patch10: bash-3.2-printf.patch -Patch11: bash-4.0-loadables.dif +Patch11: bash-4.3-loadables.dif Patch12: bash-4.1-completion.dif Patch13: bash-4.2-nscdunmap.dif -Patch14: bash-4.2-sigrestart.patch +Patch14: bash-4.3-sigrestart.patch # PATCH-FIX-UPSTREAM bnc#382214 -- disabled due bnc#806628 by -DBNC382214=0 Patch15: bash-3.2-longjmp.dif Patch16: bash-4.0-setlocale.dif -Patch17: bash-4.0-headers.dif -Patch18: bash-4.2-nsec.dif +Patch17: bash-4.3-headers.dif # PATCH-EXTEND-SUSE bnc#828877 -- xterm resizing does not pass to all sub clients -Patch19: bash-4.2-winch.dif +Patch18: bash-4.3-winch.dif Patch20: readline-%{rl_vers}.dif -Patch21: readline-4.3-input.dif +Patch21: readline-6.3-input.dif Patch22: readline-6.1-wrap.patch Patch23: readline-5.2-conf.patch Patch24: readline-6.2-metamode.patch Patch25: readline-6.2-endpw.dif -Patch26: readline-6.2-msgdynamic.patch Patch27: readline-6.2-xmalloc.dif -Patch30: readline-6.2-destdir.patch -Patch31: readline-6.2-rltrace.patch +Patch30: readline-6.3-destdir.patch +Patch31: readline-6.3-rltrace.patch Patch40: bash-4.1-bash.bashrc.dif -# PATCH-FIX-UPSTREAM bnc#895475 -- locale de_DE.utf8 has wrong translations -Patch41: bash-4.2-error-getpwd.patch -Patch42: audit-patch -Patch43: audit-rl-patch Patch46: man2html-no-timestamp.patch -Patch47: config-guess-sub-update.patch -# PATCH-FIX-SUSE CVE-2014-6271 -Patch48: bash-4.2-extra-import-func.patch +# PATCH-FIX-SUSE +Patch48: bash-4.3-extra-import-func.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir /etc %global _incdir %{_includedir} @@ -122,7 +116,7 @@ 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.2 +Version: %{bash_vers} Release: 0 %if %suse_version > 1120 BuildArch: noarch @@ -139,8 +133,8 @@ interpreter Bash. %package -n bash-lang Summary: Languages for package bash Group: System/Localization -Provides: bash-lang = %{version} -Requires: bash = %{version} +Provides: bash-lang = %{bash_vers} +Requires: bash = %{bash_vers} %description -n bash-lang Provides translations to the package bash @@ -150,7 +144,7 @@ Provides translations to the package bash %package -n bash-devel Summary: Include Files mandatory for Development of bash loadable builtins Group: Development/Languages/C and C++ -Version: 4.2 +Version: %{bash_vers} Release: 0 %description -n bash-devel @@ -162,7 +156,7 @@ on the compilers command line. %package -n bash-loadables Summary: Loadable bash builtins Group: System/Shells -Version: 4.2 +Version: %{bash_vers} Release: 0 %description -n bash-loadables @@ -223,7 +217,7 @@ whoami Print out username of current user. Summary: The Readline Library Group: System/Libraries Provides: bash:/%{_lib}/libreadline.so.%{rl_major} -Version: 6.2 +Version: %{rl_vers} Release: 0 %if 0%suse_version > 1020 Recommends: readline-doc = %{version} @@ -233,8 +227,8 @@ Recommends: readline-doc = %{version} Obsoletes: readline-64bit %endif # -Provides: readline = 6.2 -Obsoletes: readline <= 6.1 +Provides: readline = %{rl_vers} +Obsoletes: readline <= 6.2 %description -n libreadline6 The readline library is used by the Bourne Again Shell (bash, the @@ -245,12 +239,12 @@ includes history and search functionality. Summary: Include Files and Libraries mandatory for Development Group: Development/Libraries/C and C++ Provides: bash:%{_libdir}/libreadline.a -Version: 6.2 +Version: %{rl_vers} Release: 0 -Requires: libreadline6 = %{version} +Requires: libreadline6 = %{rl_vers} Requires: ncurses-devel %if 0%suse_version > 1020 -Recommends: readline-doc = %{version} +Recommends: readline-doc = %{rl_vers} %endif # bug437293 %ifarch ppc64 @@ -267,7 +261,7 @@ 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.2 +Version: %{rl_vers} Release: 0 %if 0%suse_version > 1120 BuildArch: noarch @@ -289,6 +283,7 @@ for patch in ../bash-%{bash_vers}-patches/*; do let level++ || true fi test -e $file || exit 1 + sed -ri '/^\*\*\* \.\./{ s@\.\./bash-%{bash_vers}[^/]*/@@p }' $patch echo Patch $patch patch -s -p$level < $patch done @@ -308,24 +303,17 @@ done %patch15 -p0 -b .longjmp %patch16 -p0 -b .setlocale %patch17 -p0 -b .headers -%patch18 -p0 -b .nsec -%patch19 -p0 -b .winch +%patch18 -p0 -b .winch %patch21 -p0 -b .zerotty %patch22 -p0 -b .wrap %patch23 -p0 -b .conf %patch24 -p0 -b .metamode #%patch25 -p0 -b .endpw -%patch26 -p0 -b .msgdy %patch31 -p0 -b .tmp %patch40 -p0 -b .bashrc -%patch41 -p0 -b .errgetpwd -%if 0%suse_version >= 1100 -%patch42 -p1 -b .audit -%endif %patch46 -p0 -b .notimestamp -%patch47 -p0 %if %{with import_function} -%patch48 -p0 +%patch48 %endif %patch0 -p0 -b .0 pushd ../readline-%{rl_vers}%{extend} @@ -337,6 +325,7 @@ for patch in ../readline-%{rl_vers}-patches/*; do file=${file#*/} let level++ || true fi + sed -ri '/^\*\*\* \.\./{ s@\.\./readline-%{rl_vers}[^/]*/@@p }' $patch echo Patch $patch patch -s -p$level < $patch done @@ -345,15 +334,10 @@ done %patch23 -p2 -b .conf %patch24 -p2 -b .metamode #%patch25 -p2 -b .endpw -%patch26 -p2 -b .msgdy %patch31 -p2 -b .tmp %patch27 -p0 -b .xm %patch30 -p0 -b .destdir -%if 0%suse_version >= 1100 -%patch43 -p1 -b .audit -%endif %patch20 -p0 -b .0 -%patch47 %build LANG=POSIX @@ -420,7 +404,21 @@ pushd ../readline-%{rl_vers}%{extend} { *; !rl_*stream; - } + }; + EOF + (cat > rl.map)<<-'EOF' + READLINE_6.3 { + rl_change_environment; + rl_clear_history; + rl_executing_key; + rl_executing_keyseq; + rl_filename_stat_hook; + rl_history_substr_search_backward; + rl_history_substr_search_forward; + rl_input_available_hook; + rl_print_last_kbd_macro; + rl_signal_event_hook; + }; EOF CFLAGS="$RPM_OPT_FLAGS $LARGEFILE -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g" LDFLAGS="" @@ -430,14 +428,17 @@ pushd ../readline-%{rl_vers}%{extend} cflags -Wno-switch-enum CFLAGS cflags -Wno-unused-variable CFLAGS cflags -Wno-unused-parameter CFLAGS + cflags -Wno-parentheses CFLAGS cflags -ftree-loop-linear CFLAGS cflags -pipe CFLAGS cflags -DBNC382214=0 CFLAGS + cflags -DMUST_UNBLOCK_CHLD=1 CFLAGS cflags -DIMPORT_FUNCTIONS_DEF=0 CFLAGS cflags -Wl,--as-needed LDFLAGS cflags -Wl,-O2 LDFLAGS cflags -Wl,--hash-size=8599 LDFLAGS cflags -Wl,-rpath,%{_ldldir}/%{bash_vers} LDFLAGS + cflags -Wl,--version-script=${PWD}/rl.map LDFLAGS cflags -Wl,--dynamic-list=${PWD}/dyn.map LDFLAGS CC=gcc CC_FOR_BUILD="$CC" @@ -450,6 +451,7 @@ pushd ../readline-%{rl_vers}%{extend} --with-curses \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ + --docdir=%{_defaultdocdir}/readline \ --libdir=%{_libdir} make make documentation @@ -535,6 +537,7 @@ popd --mandir=%{_mandir} \ --infodir=%{_infodir} \ --libdir=%{_libdir} \ + --docdir=%{_defaultdocdir}/bash \ --with-curses \ --with-afs \ $SYSMALLOC \ @@ -559,10 +562,10 @@ popd all printenv recho zecho xcase TMPDIR=$(mktemp -d /tmp/bash.XXXXXXXXXX) || exit 1 > $SCREENLOG - tail -q -s 0.5 -f $SCREENLOG & pid=$! env -i HOME=$PWD TERM=$TERM LD_LIBRARY_PATH=$LD_LIBRARY_PATH TMPDIR=$TMPDIR \ SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \ screen -L -D -m make TESTSCRIPT=%{SOURCE4} check + cat $SCREENLOG make %{?do_profiling:CFLAGS="$CFLAGS %cflags_profile_feedback" clean} all make -C examples/loadables/ make documentation @@ -628,6 +631,7 @@ EOF rm -fv %{buildroot}%{_libdir}/libreadline.so.* rm -fv %{buildroot}%{_infodir}/rluserman.info.gz rm -fv %{buildroot}%{_mandir}/man3/history.3* + rm -fv %{buildroot}%{_defaultdocdir}/readline/INSTALL mkdir -p %{buildroot}%{_sysconfdir}/skel install -m 644 %{S:5} %{buildroot}%{_sysconfdir}/skel/.bashrc install -m 644 %{S:6} %{buildroot}%{_sysconfdir}/skel/.profile diff --git a/readline-6.2-msgdynamic.patch b/readline-6.2-msgdynamic.patch deleted file mode 100644 index 0e7b3c83..00000000 --- a/readline-6.2-msgdynamic.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- lib/readline/display.c -+++ lib/readline/display.c 2012-07-18 08:04:36.456009352 +0000 -@@ -176,7 +176,8 @@ int _rl_vis_botlin = 0; - static int last_lmargin; - - /* A buffer for `modeline' messages. */ --static char msg_buf[128]; -+static char *msg_buf; -+static size_t msg_buf_sz = 128; - - /* Non-zero forces the redisplay even if we thought it was unnecessary. */ - static int forced_display; -@@ -2139,6 +2140,32 @@ rl_message (va_alist) - #if defined (PREFER_VARARGS) - char *format; - #endif -+#if defined (HAVE_VSNPRINTF) -+ int vsnprbytes; -+#endif -+ -+ if (!msg_buf) -+ msg_buf = xmalloc(msg_buf_sz); -+ -+#if defined (HAVE_VSNPRINTF) -+ do -+ { -+ va_end (args); -+#if defined (PREFER_STDARG) -+ va_start (args, format); -+#else -+ va_start (args); -+ format = va_arg (args, char *); -+#endif -+ vsnprbytes = vsnprintf (msg_buf, msg_buf_sz - 1, format, args); -+ if (vsnprbytes < msg_buf_sz - 1) -+ break; -+ -+ msg_buf_sz += 64; -+ msg_buf = xrealloc (msg_buf, msg_buf_sz); -+ } -+ while (1); -+#else - - #if defined (PREFER_STDARG) - va_start (args, format); -@@ -2147,11 +2174,8 @@ rl_message (va_alist) - format = va_arg (args, char *); - #endif - --#if defined (HAVE_VSNPRINTF) -- vsnprintf (msg_buf, sizeof (msg_buf) - 1, format, args); --#else - vsprintf (msg_buf, format, args); -- msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ -+ msg_buf[msg_buf_sz - 1] = '\0'; /* overflow? */ - #endif - va_end (args); - -@@ -2176,8 +2200,11 @@ int - rl_message (format, arg1, arg2) - char *format; - { -+ if (!msg_buf) -+ msg_buf = xmalloc(msg_buf_sz); -+ - sprintf (msg_buf, format, arg1, arg2); -- msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ -+ msg_buf[msg_buf_sz - 1] = '\0'; /* overflow? */ - - rl_display_prompt = msg_buf; - if (saved_local_prompt == 0) diff --git a/readline-6.2-patches.tar.bz2 b/readline-6.2-patches.tar.bz2 deleted file mode 100644 index fb1f1cdf..00000000 --- a/readline-6.2-patches.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:646e52eef0944ffac4440410a0e55d1db9c98243266098271523124acb7924e0 -size 3126 diff --git a/readline-6.2.tar.gz b/readline-6.2.tar.gz deleted file mode 100644 index 980dea6f..00000000 --- a/readline-6.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79a696070a058c233c72dd6ac697021cc64abd5ed51e59db867d66d196a89381 -size 2277926 diff --git a/readline-6.2-destdir.patch b/readline-6.3-destdir.patch similarity index 85% rename from readline-6.2-destdir.patch rename to readline-6.3-destdir.patch index c6257c0f..593bc544 100644 --- a/readline-6.2-destdir.patch +++ b/readline-6.3-destdir.patch @@ -1,5 +1,5 @@ --- shlib/Makefile.in -+++ shlib/Makefile.in 2010-02-15 16:02:33.000000000 +0000 ++++ shlib/Makefile.in 2014-04-17 10:51:05.898235056 +0000 @@ -59,6 +59,7 @@ bindir = @bindir@ libdir = @libdir@ datadir = @datadir@ @@ -8,26 +8,30 @@ # Support an alternate destination root directory for package building DESTDIR = -@@ -184,13 +185,13 @@ installdirs: $(topdir)/support/mkdirs +@@ -192,8 +193,8 @@ installdirs: $(topdir)/support/mkdirs -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(bindir) - install: installdirs $(SHLIB_STATUS) + install-supported: 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) -V $(host_vendor) -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) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE) @echo install: you may need to run ldconfig - uninstall: + install-unsupported: +@@ -202,8 +203,8 @@ install-unsupported: + install: install-$(SHLIB_STATUS) + + uninstall-supported: - $(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) -V $(host_vendor) -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) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_READLINE) @echo uninstall: you may need to run ldconfig - clean mostlyclean: force + uninstall-unsupported: --- support/shlib-install -+++ support/shlib-install 2010-02-15 15:59:38.000000000 +0000 ++++ support/shlib-install 2014-04-17 10:54:11.938235782 +0000 @@ -3,7 +3,7 @@ # shlib-install - install a shared library and do any necessary host-specific # post-installation configuration (like ldconfig) @@ -95,16 +99,16 @@ fi # post-install/uninstall -@@ -72,7 +79,7 @@ fi +@@ -73,7 +80,7 @@ fi case "$host_os" in - hpux*|darwin*|macosx*|linux*) + hpux*|darwin*|macosx*|linux*|solaris2*) if [ -z "$uninstall" ]; then - chmod 555 ${INSTALLDIR}/${LIBNAME} + chmod 555 ${DESTDIR}${INSTALLDIR}/${LIBNAME} fi ;; cygwin*|mingw*) IMPLIBNAME=`echo ${LIBNAME} \ -@@ -110,8 +117,8 @@ case "$LIBNAME" in +@@ -111,8 +118,8 @@ case "$LIBNAME" in LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib esac @@ -115,40 +119,40 @@ # # Create symlinks to the installed library. This section is incomplete. -@@ -119,27 +126,27 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR && +@@ -120,27 +127,27 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR && case "$host_os-$host_vendor" in *linux*|freebsd*-gentoo) # libname.so.M -> libname.so.M.N - ${echo} ${RM} ${INSTALLDIR}/$LINK2 -+ ${echo} ${RM} ${DESTDIR}${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 ++ ${echo} ${RM} {DESTDIR}${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then - ${echo} cd $INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1 -+ ${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1 ++ ${echo} cd {DESTDIR}$INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1 fi ;; - bsdi4*|*gnu*|darwin*|macosx*|netbsd*) + bsdi4*|*gnu*|darwin*|macosx*|netbsd*|mirbsd*) # libname.so.M -> libname.so.M.N - ${echo} ${RM} ${INSTALLDIR}/$LINK2 -+ ${echo} ${RM} ${DESTDIR}${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 ++ ${echo} ${RM} {DESTDIR}${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi -@@ -147,7 +154,7 @@ bsdi4*|*gnu*|darwin*|macosx*|netbsd*) +@@ -148,7 +155,7 @@ bsdi4*|*gnu*|darwin*|macosx*|netbsd*|mir solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|irix[56]*|sysv[45]*|dgux*|interix*) # libname.so -> libname.so.M @@ -157,7 +161,7 @@ if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi -@@ -158,19 +165,19 @@ solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|iri +@@ -159,19 +166,19 @@ solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|iri freebsd3*|freebsdaout*) if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then # libname.so -> libname.so.M @@ -180,7 +184,7 @@ if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi -@@ -187,7 +194,7 @@ freebsd[4-9]*|freebsdelf*|dragonfly*) +@@ -188,7 +195,7 @@ freebsd[4-9]*|freebsd1[0-9]*|freebsdelf* hpux1*) # libname.sl -> libname.M diff --git a/readline-4.3-input.dif b/readline-6.3-input.dif similarity index 75% rename from readline-4.3-input.dif rename to readline-6.3-input.dif index e5e0c4d3..924d9d6e 100644 --- a/readline-4.3-input.dif +++ b/readline-6.3-input.dif @@ -1,6 +1,6 @@ --- lib/readline/input.c +++ lib/readline/input.c 2003-03-17 19:03:51.000000000 +0000 -@@ -459,6 +459,8 @@ rl_read_key () +@@ -468,6 +468,8 @@ rl_read_key () return (c); } @@ -9,7 +9,7 @@ int rl_getc (stream) FILE *stream; -@@ -482,7 +484,10 @@ rl_getc (stream) +@@ -493,7 +495,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) @@ -22,8 +22,8 @@ #if defined (__BEOS__) if (errno == EINTR) --- lib/readline/readline.c -+++ lib/readline/readline.c 2003-03-17 19:02:52.000000000 +0000 -@@ -469,6 +469,9 @@ _rl_internal_char_cleanup () ++++ lib/readline/readline.c 2014-04-17 10:24:16.302236347 +0000 +@@ -515,6 +515,9 @@ _rl_internal_char_cleanup () _rl_erase_entire_line (); } @@ -33,14 +33,14 @@ STATIC_CALLBACK int #if defined (READLINE_CALLBACKS) readline_internal_char () -@@ -513,6 +516,10 @@ readline_internal_charloop () +@@ -564,6 +567,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); ++ 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. */ + a newline; assume that rl_read_key has already called the signal diff --git a/readline-6.3-patches.tar.bz2 b/readline-6.3-patches.tar.bz2 new file mode 100644 index 00000000..d57b76ce --- /dev/null +++ b/readline-6.3-patches.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85d1dde68eee9436479947f9c9c75dda2eafe80682a642c1f64f1f18551539b5 +size 3812 diff --git a/readline-6.2-rltrace.patch b/readline-6.3-rltrace.patch similarity index 73% rename from readline-6.2-rltrace.patch rename to readline-6.3-rltrace.patch index dfd7a32e..d27116ca 100644 --- a/readline-6.2-rltrace.patch +++ b/readline-6.3-rltrace.patch @@ -2,12 +2,12 @@ Even if used only by developers to debug readline library do not open temporary files from public location without O_EXCL (bcn#868822). --- - util.c | 10 ++++++---- + lib/readline/util.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- lib/readline/util.c -+++ lib/readline/util.c 2014-03-18 11:18:25.774735305 +0000 -@@ -493,10 +493,12 @@ _rl_trace (va_alist) ++++ lib/readline/util.c 2014-04-17 10:29:43.157274616 +0000 +@@ -501,10 +501,12 @@ _rl_trace (va_alist) if (_rl_tracefp == 0) _rl_tropen (); @@ -21,16 +21,16 @@ temporary files from public location without O_EXCL (bcn#868822). va_end (args); } -@@ -509,7 +511,7 @@ _rl_tropen () +@@ -517,7 +519,7 @@ _rl_tropen () fclose (_rl_tracefp); - sprintf (fnbuf, "/var/tmp/rltrace.%ld", getpid()); + sprintf (fnbuf, "/var/tmp/rltrace.%ld", (long)getpid()); unlink(fnbuf); - _rl_tracefp = fopen (fnbuf, "w+"); + _rl_tracefp = fopen (fnbuf, "w+xe"); return _rl_tracefp != 0; } -@@ -517,8 +519,8 @@ int +@@ -525,8 +527,8 @@ int _rl_trclose () { int r; diff --git a/readline-6.2.dif b/readline-6.3.dif similarity index 76% rename from readline-6.2.dif rename to readline-6.3.dif index ecfa1f56..acf2e8f3 100644 --- a/readline-6.2.dif +++ b/readline-6.3.dif @@ -1,6 +1,6 @@ --- Makefile.in -+++ Makefile.in 2009-02-27 17:25:01.076001005 +0100 -@@ -222,10 +222,8 @@ uninstall-headers: ++++ Makefile.in 2014-04-17 10:57:38.386235678 +0000 +@@ -235,10 +235,8 @@ uninstall-headers: maybe-uninstall-headers: uninstall-headers install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-examples @@ -11,8 +11,8 @@ $(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 +@@ -268,7 +266,7 @@ install-doc: installdirs + $(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir) -( if test -d doc ; then \ cd doc && \ - ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \ @@ -21,8 +21,8 @@ uninstall-doc: --- complete.c -+++ complete.c 2009-02-27 17:25:26.616935393 +0100 -@@ -942,7 +942,7 @@ _rl_find_completion_word (fp, dp) ++++ complete.c 2014-04-17 10:58:11.042235308 +0000 +@@ -1082,7 +1082,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. */ @@ -31,16 +31,16 @@ { scan = rl_line_buffer[rl_point]; -@@ -1884,7 +1884,7 @@ rl_completion_matches (text, entry_funct +@@ -2116,7 +2116,7 @@ rl_completion_matches (text, entry_funct + match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *)); 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 (RL_SIG_RECEIVED ()) + { +@@ -2190,7 +2190,7 @@ rl_username_completion_function (text, s } #if defined (HAVE_GETPWENT) @@ -49,53 +49,9 @@ { /* Null usernames should result in all users as possible completions. */ if (namelen == 0 || (STREQN (username, entry->pw_name, namelen))) ---- history.h -+++ history.h 2012-07-18 08:06:55.693903477 +0000 -@@ -32,6 +32,7 @@ extern "C" { - # include "rlstdc.h" - # include "rltypedefs.h" - #else -+# include - # include - # include - #endif ---- 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 2012-07-18 08:07:11.560009784 +0000 -@@ -32,6 +32,7 @@ extern "C" { - # include "keymaps.h" - # include "tilde.h" - #else -+# include - # include - # include - # include -@@ -448,7 +449,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 ++++ doc/Makefile.in 2009-02-27 16:27:31.000000000 +0000 +@@ -101,7 +101,7 @@ DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ $(RM) $@ -${DVIPDF} $< @@ -105,7 +61,7 @@ xdist: $(DIST_DOCS) --- doc/readline.3 -+++ doc/readline.3 2006-11-13 17:33:27.000000000 +0100 ++++ doc/readline.3 2006-11-13 16:33:27.000000000 +0000 @@ -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 @@ -121,7 +77,7 @@ 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 +@@ -1402,6 +1410,9 @@ VI Command Mode functions .TP .FN ~/.inputrc Individual \fBreadline\fP initialization file @@ -131,9 +87,54 @@ .PD .SH AUTHORS Brian Fox, Free Software Foundation +--- history.h ++++ history.h 2012-07-18 08:06:56.000000000 +0000 +@@ -32,6 +32,7 @@ extern "C" { + # include "rlstdc.h" + # include "rltypedefs.h" + #else ++# include + # include + # include + #endif +--- readline.c ++++ readline.c 2014-04-17 10:59:21.258235067 +0000 +@@ -824,8 +824,11 @@ _rl_dispatch_subseq (key, map, got_subse + { + /* Special case rl_do_lowercase_version (). */ + if (func == rl_do_lowercase_version) +- /* Should we do anything special if key == ANYOTHERKEY? */ +- 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; + rl_executing_key = key; +--- readline.h ++++ readline.h 2012-07-18 08:07:12.000000000 +0000 +@@ -32,6 +32,7 @@ extern "C" { + # include "keymaps.h" + # include "tilde.h" + #else ++# include + # include + # include + # include +@@ -459,7 +460,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)); --- support/shobj-conf -+++ support/shobj-conf 2006-09-22 16:17:48.000000000 +0200 -@@ -112,10 +112,11 @@ sunos5*|solaris2*) ++++ support/shobj-conf 2006-09-22 14:17:48.000000000 +0000 +@@ -126,10 +126,11 @@ sunos5*|solaris2*) linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' diff --git a/readline-6.3.tar.gz b/readline-6.3.tar.gz new file mode 100644 index 00000000..6cfe8001 --- /dev/null +++ b/readline-6.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43 +size 2468560