From c6a319b054da671746306e738872aa4849be145e Mon Sep 17 00:00:00 2001 From: Rmys Date: Sat, 11 Aug 2018 11:17:47 +0300 Subject: [PATCH] readline:rebuild patch --- system/base/readline/actions.py | 3 + .../base/readline/files/readline70-004.patch | 47 +++++++++++++++ .../base/readline/files/readline70-005.patch | 58 +++++++++++++++++++ system/base/readline/pspec.xml | 4 +- 4 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 system/base/readline/files/readline70-004.patch create mode 100644 system/base/readline/files/readline70-005.patch diff --git a/system/base/readline/actions.py b/system/base/readline/actions.py index 71ca12da..b361e8fd 100644 --- a/system/base/readline/actions.py +++ b/system/base/readline/actions.py @@ -7,8 +7,11 @@ from pisi.actionsapi import get from pisi.actionsapi import autotools from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools def setup(): + shelltools.system("sed -i '/MV.*old/d' Makefile.in") + shelltools.system("sed -i '/{OLDSUFF}/c:' support/shlib-install") pisitools.cflags.add("-fPIC") #Force link to ncurses instead of tinfo, which we don't have, will be needed when we use as-needed ;) diff --git a/system/base/readline/files/readline70-004.patch b/system/base/readline/files/readline70-004.patch new file mode 100644 index 00000000..e2f68060 --- /dev/null +++ b/system/base/readline/files/readline70-004.patch @@ -0,0 +1,47 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 7.0 +Patch-ID: readline70-004 + +Bug-Reported-by: Kieran Grant +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2018-02/msg00002.html + +Bug-Description: + +With certain values for PS1, especially those that wrap onto three or more +lines, readline will miscalculate the number of invisible characters, +leading to crashes and core dumps. + +Patch (apply with `patch -p0'): + +*** ../readline-7.0.3/display.c 2016-07-28 14:49:33.000000000 -0400 +--- display.c 2018-02-03 19:19:35.000000000 -0500 +*************** +*** 772,776 **** + wadjust = (newlines == 0) + ? prompt_invis_chars_first_line +! : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line); + + /* fix from Darin Johnson for prompt string with +--- 788,794 ---- + wadjust = (newlines == 0) + ? prompt_invis_chars_first_line +! : ((newlines == prompt_lines_estimate) +! ? (wrap_offset - prompt_invis_chars_first_line) +! : 0); + + /* fix from Darin Johnson for prompt string with +*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 3 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 4 + diff --git a/system/base/readline/files/readline70-005.patch b/system/base/readline/files/readline70-005.patch new file mode 100644 index 00000000..99753224 --- /dev/null +++ b/system/base/readline/files/readline70-005.patch @@ -0,0 +1,58 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 7.0 +Patch-ID: readline70-005 + +Bug-Reported-by: Nuzhna Pomoshch +Bug-Reference-ID: <1317167476.1492079.1495999776464@mail.yahoo.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2017-05/msg00005.html + +Bug-Description: + +There are cases where a failing readline command (e.g., delete-char at the end +of a line) can cause a multi-character key sequence to `back up' and attempt +to re-read some of the characters in the sequence. + +Patch (apply with `patch -p0'): + +*** ../readline-7.0/readline.c 2016-04-20 15:53:52.000000000 -0400 +--- readline.c 2018-05-26 17:19:00.000000000 -0400 +*************** +*** 1058,1062 **** + r = _rl_dispatch (ANYOTHERKEY, m); + } +! else if (r && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to +--- 1056,1060 ---- + r = _rl_dispatch (ANYOTHERKEY, m); + } +! else if (r < 0 && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to +*************** +*** 1070,1074 **** + return -2; + } +! else if (r && got_subseq) + { + /* OK, back up the chain. */ +--- 1068,1072 ---- + return -2; + } +! else if (r < 0 && got_subseq) /* XXX */ + { + /* OK, back up the chain. */ +*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 4 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 5 + diff --git a/system/base/readline/pspec.xml b/system/base/readline/pspec.xml index 5fd57eaa..9cc57fe8 100644 --- a/system/base/readline/pspec.xml +++ b/system/base/readline/pspec.xml @@ -20,6 +20,8 @@ readline70-001.patch readline70-002.patch readline70-003.patch + readline70-004.patch + readline70-005.patch @@ -71,7 +73,7 @@ 2018-07-18 7.0 - Rebuild + Rebuild. Ertuğrul Erata ertugrulerata@gmail.com