summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkd <markd>2014-08-11 21:29:00 +0000
committermarkd <markd>2014-08-11 21:29:00 +0000
commit7c887a0e7c842ebbc6376a8beadff6a5e175e231 (patch)
tree6d342e48f1ea54687057523af893ab1f20e426ad
parent2a50ed12e1e8809d2c204115ee7892ef57ac1fae (diff)
downloadpkgsrc-7c887a0e7c842ebbc6376a8beadff6a5e175e231.tar.gz
Apply Readline-6.3 Official Patches 1 - 6
-rw-r--r--devel/readline/Makefile4
-rw-r--r--devel/readline/distinfo7
-rw-r--r--devel/readline/patches/patch-display.c49
-rw-r--r--devel/readline/patches/patch-patchlevel11
-rw-r--r--devel/readline/patches/patch-readline.c33
-rw-r--r--devel/readline/patches/patch-rltypedefs.h37
-rw-r--r--devel/readline/patches/patch-util.c26
7 files changed, 164 insertions, 3 deletions
diff --git a/devel/readline/Makefile b/devel/readline/Makefile
index aef5acf883f..8cee539c1f1 100644
--- a/devel/readline/Makefile
+++ b/devel/readline/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.57 2014/07/18 13:02:06 ryoon Exp $
+# $NetBSD: Makefile,v 1.58 2014/08/11 21:29:00 markd Exp $
READLINE_VERSION= 6.3
DISTNAME= readline-${READLINE_VERSION}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=readline/}
diff --git a/devel/readline/distinfo b/devel/readline/distinfo
index fd82394081b..d6427b60d2d 100644
--- a/devel/readline/distinfo
+++ b/devel/readline/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2014/07/18 13:02:06 ryoon Exp $
+$NetBSD: distinfo,v 1.23 2014/08/11 21:29:00 markd Exp $
SHA1 (readline-6.3.tar.gz) = 017b92dc7fd4e636a2b5c9265a77ccc05798c9e1
RMD160 (readline-6.3.tar.gz) = 986262d811d9dbe1e38bc9d714853272967dca7e
@@ -7,4 +7,9 @@ SHA1 (patch-ae) = 98ef48c55111de4a9cc9b19fb44b7d139f6de40f
SHA1 (patch-ag) = 3114e6959dfff3e2aae74c3df3ba4b0f692b79bb
SHA1 (patch-ah) = d812ea068415939beb42c72dd9bed8d210db57d1
SHA1 (patch-colors.c) = 42ffd2766a808a670a445a8ac34740cf4bdf02d5
+SHA1 (patch-display.c) = 8dc455e5cb3ad4208834518f55f93d1d60f52087
SHA1 (patch-examples_Makefile.in) = d8268b7de6d548f673b23eb0718394245e56ab1f
+SHA1 (patch-patchlevel) = 04d5af0e90455d7dcbc1917c07b30656afc725a5
+SHA1 (patch-readline.c) = ad9aef8a3e9a199d2b9a1a32fc3f715784136c89
+SHA1 (patch-rltypedefs.h) = 895bb236df834f890cbe23b20eba542773907d4d
+SHA1 (patch-util.c) = b7c22aa43cbd1d0225099e2ee1d4d1772d402b5f
diff --git a/devel/readline/patches/patch-display.c b/devel/readline/patches/patch-display.c
new file mode 100644
index 00000000000..111d2bc49e1
--- /dev/null
+++ b/devel/readline/patches/patch-display.c
@@ -0,0 +1,49 @@
+$NetBSD: patch-display.c,v 1.1 2014/08/11 21:29:00 markd Exp $
+
+Readline-6.3 Official Patch 4
+
+The signal handling changes to bash and readline (to avoid running any code
+in a signal handler context) cause the cursor to be placed on the wrong
+line of a multi-line command after a ^C interrupts editing.
+
+Readline-6.3 Official Patch 6
+
+Using reverse-i-search when horizontal scrolling is enabled does not redisplay
+the entire line containing the successful search results.
+
+--- display.c.orig 2013-12-27 18:10:56.000000000 +0000
++++ display.c
+@@ -1637,7 +1637,7 @@ update_line (old, new, current_line, oma
+ /* If we are changing the number of invisible characters in a line, and
+ the spot of first difference is before the end of the invisible chars,
+ lendiff needs to be adjusted. */
+- if (current_line == 0 && !_rl_horizontal_scroll_mode &&
++ if (current_line == 0 && /* !_rl_horizontal_scroll_mode && */
+ current_invis_chars != visible_wrap_offset)
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+@@ -1825,8 +1825,13 @@ update_line (old, new, current_line, oma
+ else
+ _rl_last_c_pos += bytes_to_insert;
+
++ /* XXX - we only want to do this if we are at the end of the line
++ so we move there with _rl_move_cursor_relative */
+ if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new)))
+- goto clear_rest_of_line;
++ {
++ _rl_move_cursor_relative (ne-new, new);
++ goto clear_rest_of_line;
++ }
+ }
+ }
+ /* Otherwise, print over the existing material. */
+@@ -2677,7 +2682,8 @@ _rl_clean_up_for_exit ()
+ {
+ if (_rl_echoing_p)
+ {
+- _rl_move_vert (_rl_vis_botlin);
++ if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */
++ _rl_move_vert (_rl_vis_botlin);
+ _rl_vis_botlin = 0;
+ fflush (rl_outstream);
+ rl_restart_output (1, 0);
diff --git a/devel/readline/patches/patch-patchlevel b/devel/readline/patches/patch-patchlevel
new file mode 100644
index 00000000000..6067f69fc73
--- /dev/null
+++ b/devel/readline/patches/patch-patchlevel
@@ -0,0 +1,11 @@
+$NetBSD: patch-patchlevel,v 1.1 2014/08/11 21:29:00 markd Exp $
+
+Apply Readline-6.3 Official Patches 1 - 6
+
+--- patchlevel.orig 2013-11-15 13:11:11.000000000 +0000
++++ patchlevel
+@@ -1,3 +1,3 @@
+ # Do not edit -- exists only for use by patch
+
+-5
++6
diff --git a/devel/readline/patches/patch-readline.c b/devel/readline/patches/patch-readline.c
new file mode 100644
index 00000000000..964f37af966
--- /dev/null
+++ b/devel/readline/patches/patch-readline.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-readline.c,v 1.1 2014/08/11 21:29:00 markd Exp $
+
+Readline-6.3 Official Patch 1
+
+The `.' command in vi mode cannot undo multi-key commands beginning with
+`c', `d', and `y' (command plus motion specifier).
+
+Readline-6.3 Official Patch 2
+
+When in callback mode, some readline commands can cause readline to seg
+fault by passing invalid contexts to callback functions.
+
+--- readline.c.orig 2013-10-28 18:58:06.000000000 +0000
++++ readline.c
+@@ -744,7 +744,8 @@ _rl_dispatch_callback (cxt)
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ RL_CHECK_SIGNALS ();
+- if (r == 0) /* success! */
++ /* We only treat values < 0 specially to simulate recursion. */
++ if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+@@ -964,7 +965,7 @@ _rl_dispatch_subseq (key, map, got_subse
+ #if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
+ key != ANYOTHERKEY &&
+- rl_key_sequence_length == 1 && /* XXX */
++ _rl_dispatching_keymap == vi_movement_keymap &&
+ _rl_vi_textmod_command (key))
+ _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
+ #endif
diff --git a/devel/readline/patches/patch-rltypedefs.h b/devel/readline/patches/patch-rltypedefs.h
new file mode 100644
index 00000000000..e85119ab0a3
--- /dev/null
+++ b/devel/readline/patches/patch-rltypedefs.h
@@ -0,0 +1,37 @@
+$NetBSD: patch-rltypedefs.h,v 1.1 2014/08/11 21:29:00 markd Exp $
+
+Readline-6.3 Official Patch 5
+
+There are still applications using the deprecated Function/VFunction/etc.
+typedefs in rltypedefs.h. This patch restores the typedefs, but attempts
+to mark them as deprecated using gcc/clang attributes. Thanks to Max Horn
+for the suggestion.
+
+--- rltypedefs.h.orig 2011-03-26 18:53:31.000000000 +0000
++++ rltypedefs.h
+@@ -26,6 +26,25 @@
+ extern "C" {
+ #endif
+
++/* Old-style, attempt to mark as deprecated in some way people will notice. */
++
++#if !defined (_FUNCTION_DEF)
++# define _FUNCTION_DEF
++
++#if defined(__GNUC__) || defined(__clang__)
++typedef int Function () __attribute__ ((deprecated));
++typedef void VFunction () __attribute__ ((deprecated));
++typedef char *CPFunction () __attribute__ ((deprecated));
++typedef char **CPPFunction () __attribute__ ((deprecated));
++#else
++typedef int Function ();
++typedef void VFunction ();
++typedef char *CPFunction ();
++typedef char **CPPFunction ();
++#endif
++
++#endif /* _FUNCTION_DEF */
++
+ /* New style. */
+
+ #if !defined (_RL_FUNCTION_TYPEDEF)
diff --git a/devel/readline/patches/patch-util.c b/devel/readline/patches/patch-util.c
new file mode 100644
index 00000000000..0adc7c50f71
--- /dev/null
+++ b/devel/readline/patches/patch-util.c
@@ -0,0 +1,26 @@
+$NetBSD: patch-util.c,v 1.1 2014/08/11 21:29:00 markd Exp $
+
+Readline-6.3 Official Patch 3
+
+There are debugging functions in the readline release that are theoretically
+exploitable as security problems. They are not public functions, but have
+global linkage.
+
+--- util.c.orig 2013-09-02 17:36:12.000000000 +0000
++++ util.c
+@@ -476,6 +476,7 @@ _rl_savestring (s)
+ return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s)));
+ }
+
++#if defined (DEBUG)
+ #if defined (USE_VARARGS)
+ static FILE *_rl_tracefp;
+
+@@ -538,6 +539,7 @@ _rl_settracefp (fp)
+ _rl_tracefp = fp;
+ }
+ #endif
++#endif /* DEBUG */
+
+
+ #if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT)