parent
a3eba03679
commit
9079c90a77
@ -1,137 +0,0 @@
|
||||
From 376cae023be94f55ba846f2170c129bd0873e872 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Thu, 3 Apr 2014 14:38:44 +0200
|
||||
Subject: [PATCH 1/4] upstream patches
|
||||
|
||||
Conflicts:
|
||||
callback.c
|
||||
---
|
||||
callback.c | 44 ++++++++++++--------------------------------
|
||||
1 file changed, 12 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/callback.c b/callback.c
|
||||
index 6bb2c3e..7682cd0 100644
|
||||
--- a/callback.c
|
||||
+++ b/callback.c
|
||||
@@ -62,10 +62,8 @@ _rl_callback_generic_arg *_rl_callback_data = 0;
|
||||
whenever a complete line of input is ready. The user must then
|
||||
call rl_callback_read_char() every time some input is available, and
|
||||
rl_callback_read_char() will call the user's function with the complete
|
||||
- text read in at each end of line. The terminal is kept prepped
|
||||
- all the time, except during calls to the user's function. Signal
|
||||
- handlers are only installed when the application calls back into
|
||||
- readline, so readline doesn't `steal' signals from the application. */
|
||||
+ text read in at each end of line. The terminal is kept prepped and
|
||||
+ signals handled all the time, except during calls to the user's function. */
|
||||
|
||||
rl_vcpfunc_t *rl_linefunc; /* user callback function */
|
||||
static int in_handler; /* terminal_prepped and signals set? */
|
||||
@@ -82,6 +80,10 @@ _rl_callback_newline ()
|
||||
|
||||
if (rl_prep_term_function)
|
||||
(*rl_prep_term_function) (_rl_meta_flag);
|
||||
+
|
||||
+#if defined (HANDLE_SIGNALS)
|
||||
+ rl_set_signals ();
|
||||
+#endif
|
||||
}
|
||||
|
||||
readline_internal_setup ();
|
||||
@@ -100,16 +102,6 @@ rl_callback_handler_install (prompt, linefunc)
|
||||
_rl_callback_newline ();
|
||||
}
|
||||
|
||||
-#if defined (HANDLE_SIGNALS)
|
||||
-#define CALLBACK_READ_RETURN() \
|
||||
- do { \
|
||||
- rl_clear_signals (); \
|
||||
- return; \
|
||||
- } while (0)
|
||||
-#else
|
||||
-#define CALLBACK_READ_RETURN() return
|
||||
-#endif
|
||||
-
|
||||
/* Read one character, and dispatch to the handler if it ends the line. */
|
||||
void
|
||||
rl_callback_read_char ()
|
||||
@@ -125,24 +117,15 @@ rl_callback_read_char ()
|
||||
}
|
||||
|
||||
memcpy ((void *)olevel, (void *)_rl_top_level, sizeof (procenv_t));
|
||||
-#if defined (HAVE_POSIX_SIGSETJMP)
|
||||
- jcode = sigsetjmp (_rl_top_level, 0);
|
||||
-#else
|
||||
jcode = setjmp (_rl_top_level);
|
||||
-#endif
|
||||
if (jcode)
|
||||
{
|
||||
(*rl_redisplay_function) ();
|
||||
_rl_want_redisplay = 0;
|
||||
memcpy ((void *)_rl_top_level, (void *)olevel, sizeof (procenv_t));
|
||||
- CALLBACK_READ_RETURN ();
|
||||
+ return;
|
||||
}
|
||||
|
||||
-#if defined (HANDLE_SIGNALS)
|
||||
- /* Install signal handlers only when readline has control. */
|
||||
- rl_set_signals ();
|
||||
-#endif
|
||||
-
|
||||
do
|
||||
{
|
||||
RL_CHECK_SIGNALS ();
|
||||
@@ -152,13 +135,12 @@ rl_callback_read_char ()
|
||||
if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
|
||||
rl_callback_read_char ();
|
||||
|
||||
- CALLBACK_READ_RETURN ();
|
||||
+ return;
|
||||
}
|
||||
else if (RL_ISSTATE (RL_STATE_NSEARCH))
|
||||
{
|
||||
eof = _rl_nsearch_callback (_rl_nscxt);
|
||||
-
|
||||
- CALLBACK_READ_RETURN ();
|
||||
+ return;
|
||||
}
|
||||
#if defined (VI_MODE)
|
||||
else if (RL_ISSTATE (RL_STATE_VIMOTION))
|
||||
@@ -169,7 +151,7 @@ rl_callback_read_char ()
|
||||
if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
|
||||
_rl_internal_char_cleanup ();
|
||||
|
||||
- CALLBACK_READ_RETURN ();
|
||||
+ return;
|
||||
}
|
||||
#endif
|
||||
else if (RL_ISSTATE (RL_STATE_NUMERICARG))
|
||||
@@ -181,7 +163,7 @@ rl_callback_read_char ()
|
||||
else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
|
||||
_rl_internal_char_cleanup ();
|
||||
|
||||
- CALLBACK_READ_RETURN ();
|
||||
+ return;
|
||||
}
|
||||
else if (RL_ISSTATE (RL_STATE_MULTIKEY))
|
||||
{
|
||||
@@ -198,7 +180,7 @@ rl_callback_read_char ()
|
||||
{
|
||||
/* This allows functions that simply need to read an additional
|
||||
character (like quoted-insert) to register a function to be
|
||||
- called when input is available. _rl_callback_data is a
|
||||
+ called when input is available. _rl_callback_data is simply a
|
||||
pointer to a struct that has the argument count originally
|
||||
passed to the registering function and space for any additional
|
||||
parameters. */
|
||||
@@ -248,8 +230,6 @@ rl_callback_read_char ()
|
||||
}
|
||||
}
|
||||
while (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT));
|
||||
-
|
||||
- CALLBACK_READ_RETURN ();
|
||||
}
|
||||
|
||||
/* Remove the handler, and make sure the terminal is in its normal state. */
|
||||
--
|
||||
1.8.5.3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,7 @@
|
||||
From 311f25363e35f5058fc8a8f1ba9c0835f169fd96 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Thu, 3 Apr 2014 14:41:42 +0200
|
||||
Subject: [PATCH 4/4] add workaround for problem in gdb
|
||||
|
||||
---
|
||||
complete.c | 2 +-
|
||||
readline.h | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/complete.c b/complete.c
|
||||
index cd9aebe..35d86e9 100644
|
||||
--- a/complete.c
|
||||
+++ b/complete.c
|
||||
@@ -518,7 +518,7 @@ get_y_or_n (for_pager)
|
||||
diff -up ./complete.c.old ./complete.c
|
||||
--- ./complete.c.old 2012-01-11 14:26:23.610354454 +0100
|
||||
+++ ./complete.c 2012-01-11 14:31:44.073348115 +0100
|
||||
@@ -485,7 +485,7 @@ get_y_or_n (for_pager)
|
||||
driven functions. Have to wait until next major version to add new
|
||||
state definition, since it will change value of RL_STATE_DONE. */
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
@ -21,11 +10,10 @@ index cd9aebe..35d86e9 100644
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
diff --git a/readline.h b/readline.h
|
||||
index 08dcd2b..1df0639 100644
|
||||
--- a/readline.h
|
||||
+++ b/readline.h
|
||||
@@ -870,6 +870,8 @@ extern int rl_inhibit_completion;
|
||||
diff -up ./readline.h.old ./readline.h
|
||||
--- ./readline.h.old 2012-01-11 14:25:55.049711510 +0100
|
||||
+++ ./readline.h 2012-01-11 14:28:22.854863691 +0100
|
||||
@@ -840,6 +840,8 @@ extern int rl_inhibit_completion;
|
||||
|
||||
#define RL_STATE_DONE 0x1000000 /* done; accepted line */
|
||||
|
||||
@ -34,6 +22,3 @@ index 08dcd2b..1df0639 100644
|
||||
#define RL_SETSTATE(x) (rl_readline_state |= (x))
|
||||
#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
|
||||
#define RL_ISSTATE(x) (rl_readline_state & (x))
|
||||
--
|
||||
1.8.5.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 5c47ed8ba5edfd5bd91b79d5eaf42833ea91afe1 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Thu, 3 Apr 2014 15:17:55 +0200
|
||||
Subject: [PATCH 2/4] fix file permissions, remove RPATH, use CFLAGS
|
||||
From 5f7f73a57b16ef58769004fe2f4111baf1c81690 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Chaloupka <jchaloup@redhat.com>
|
||||
Date: Mon, 21 Jul 2014 13:50:01 +0200
|
||||
Subject: [PATCH] shlib
|
||||
|
||||
---
|
||||
shlib/Makefile.in | 2 +-
|
||||
@ -54,5 +54,5 @@ index 1f64433..40827a4 100644
|
||||
|
||||
freebsd2*)
|
||||
--
|
||||
1.8.5.3
|
||||
1.9.3
|
||||
|
@ -1,17 +1,19 @@
|
||||
Summary: A library for editing typed command lines
|
||||
Name: readline
|
||||
Version: 6.3
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv3+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
|
||||
Source: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz
|
||||
|
||||
Patch1: 0001-upstream-patches.patch
|
||||
Patch2: 0002-fix-file-permissions-remove-RPATH-use-CFLAGS.patch
|
||||
Patch3: 0003-add-TTY-input-audit-support.patch
|
||||
Patch4: 0004-add-workaround-for-problem-in-gdb.patch
|
||||
Patch5: 0005-readline6.3upstreampatches1-6.patch
|
||||
Patch5: readline6.3-upstream-patches1-6.patch
|
||||
# add workaround for problem in gdb
|
||||
# in new version of readline needs to be deleted
|
||||
# bz701131
|
||||
Patch8: readline-6.2-gdb.patch
|
||||
# fix file permissions, remove RPATH, use CFLAGS
|
||||
Patch9: readline-6.2-shlib.patch
|
||||
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
@ -51,14 +53,10 @@ The readline-static package contains the static version of the readline
|
||||
library.
|
||||
|
||||
%prep
|
||||
%autosetup -S git
|
||||
|
||||
pushd examples
|
||||
rm -f rlfe/configure
|
||||
iconv -f iso8859-1 -t utf8 -o rl-fgets.c{_,}
|
||||
touch -r rl-fgets.c{,_}
|
||||
mv -f rl-fgets.c{_,}
|
||||
popd
|
||||
%setup -q
|
||||
%patch5 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%build
|
||||
export CPPFLAGS="-I%{_includedir}/ncurses"
|
||||
@ -129,6 +127,10 @@ fi
|
||||
%{_libdir}/lib*.a
|
||||
|
||||
%changelog
|
||||
* Tue Jul 22 2014 jchaloup <jchaloup@redhat.com> - 6.3-3
|
||||
- related: #1071336
|
||||
new rebase for readline 6.3
|
||||
|
||||
* Wed Jul 2 2014 Paul Howarth <paul@city-fan.org> - 6.3-2
|
||||
- resolves: #1115432
|
||||
fix 0003-add-TTY-input-audit-support.patch not to revert readline version
|
||||
|
@ -1,17 +1,17 @@
|
||||
From a2c66e1d9efc5ee263ba06ff8755b3594c3d8481 Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Thu, 19 Jun 2014 10:07:26 +0200
|
||||
Subject: [PATCH] readline6.3upstreampatches1-6
|
||||
From 549b257cc32325658360b2e349dfc9cadc33ff80 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Chaloupka <jchaloup@redhat.com>
|
||||
Date: Mon, 21 Jul 2014 14:40:03 +0200
|
||||
Subject: [PATCH] upstream
|
||||
|
||||
---
|
||||
display.c | 8 ++++++--
|
||||
readline.c | 4 +++-
|
||||
display.c | 10 ++++++++--
|
||||
readline.c | 6 ++++--
|
||||
rltypedefs.h | 19 +++++++++++++++++++
|
||||
util.c | 3 ++-
|
||||
4 files changed, 30 insertions(+), 4 deletions(-)
|
||||
4 files changed, 33 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/display.c b/display.c
|
||||
index 913e0da..23f53ea 100644
|
||||
index 913e0da..10a7b81 100644
|
||||
--- a/display.c
|
||||
+++ b/display.c
|
||||
@@ -1637,7 +1637,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
|
||||
@ -23,19 +23,22 @@ index 913e0da..23f53ea 100644
|
||||
current_invis_chars != visible_wrap_offset)
|
||||
{
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
@@ -1826,7 +1826,10 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
|
||||
@@ -1825,8 +1825,13 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
|
||||
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;
|
||||
+ }
|
||||
+ _rl_move_cursor_relative (ne-new, new);
|
||||
+ goto clear_rest_of_line;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
/* Otherwise, print over the existing material. */
|
||||
@@ -2677,6 +2680,7 @@ _rl_clean_up_for_exit ()
|
||||
@@ -2677,6 +2682,7 @@ _rl_clean_up_for_exit ()
|
||||
{
|
||||
if (_rl_echoing_p)
|
||||
{
|
||||
@ -44,23 +47,25 @@ index 913e0da..23f53ea 100644
|
||||
_rl_vis_botlin = 0;
|
||||
fflush (rl_outstream);
|
||||
diff --git a/readline.c b/readline.c
|
||||
index 6ff8a8d..6e16a6c 100644
|
||||
index 03eefa6..684a589 100644
|
||||
--- a/readline.c
|
||||
+++ b/readline.c
|
||||
@@ -753,7 +753,8 @@ _rl_dispatch_callback (cxt)
|
||||
@@ -744,7 +744,9 @@ _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! */
|
||||
+ if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or
|
||||
+failure! */
|
||||
{
|
||||
_rl_keyseq_chain_dispose ();
|
||||
RL_UNSETSTATE (RL_STATE_MULTIKEY);
|
||||
@@ -943,6 +944,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
|
||||
@@ -964,7 +966,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
|
||||
#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);
|
@ -1,46 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 6.2
|
||||
Patch-ID: readline62-001
|
||||
|
||||
Bug-Reported-by: Clark J. Wang <dearvoid@gmail.com>
|
||||
Bug-Reference-ID: <AANLkTimGbW7aC4E5infXP6ku5WPci4t=xVc+L1SyHqrD@mail.gmail.com>
|
||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00157.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
The readline vi-mode `cc', `dd', and `yy' commands failed to modify the
|
||||
entire line.
|
||||
|
||||
[This patch intentionally does not modify patchlevel]
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-6.2-patched/vi_mode.c 2010-11-20 19:51:39.000000000 -0500
|
||||
--- vi_mode.c 2011-02-17 20:24:25.000000000 -0500
|
||||
***************
|
||||
*** 1115,1119 ****
|
||||
_rl_vi_last_motion = c;
|
||||
RL_UNSETSTATE (RL_STATE_VIMOTION);
|
||||
! return (0);
|
||||
}
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
--- 1115,1119 ----
|
||||
_rl_vi_last_motion = c;
|
||||
RL_UNSETSTATE (RL_STATE_VIMOTION);
|
||||
! return (vidomove_dispatch (m));
|
||||
}
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
*** ../readline-6.2-patched/callback.c 2010-06-06 12:18:58.000000000 -0400
|
||||
--- callback.c 2011-02-17 20:43:28.000000000 -0500
|
||||
***************
|
||||
*** 149,152 ****
|
||||
--- 149,155 ----
|
||||
/* Should handle everything, including cleanup, numeric arguments,
|
||||
and turning off RL_STATE_VIMOTION */
|
||||
+ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
|
||||
+ _rl_internal_char_cleanup ();
|
||||
+
|
||||
return;
|
||||
}
|
Loading…
Reference in New Issue
Block a user