Accepting request 723956 from Base:System

- Rework patch readline-7.0-screen.patch again for bug boo#1143055
  * Map all "screen(-xxx)?.yyy(-zzz)?" to "screen" as well as
    map "konsole(-xxx)?" and "gnome(-xxx)?" to "xterm"

- Add official patch readline80-001
  The history file reading code doesn't close the file descriptor open to
  the history file when it encounters a zero-length file.

- Use FAT LTO objects in order to provide proper static library.

OBS-URL: https://build.opensuse.org/request/show/723956
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/readline?expand=0&rev=5
This commit is contained in:
Dominique Leuenberger 2019-09-05 10:30:56 +00:00 committed by Git OBS Bridge
commit a2bdf0d227
4 changed files with 62 additions and 17 deletions

View File

@ -1,24 +1,49 @@
Special for screen and its new TERM setting like TERM=screen.xterm-256color Special for screen and its new TERM setting like TERM=screen.xterm-256color
Map all "screen(-xxx)?.yyy(-zzz)?" to "screen" as well as map "konsole(-xxx)?"
and "gnome(-xxx)?" to "xterm".
This helps to get /etc/inputrc work for most users.
--- ---
readline-7.0/bind.c | 9 +++++++++ lib/readline/bind.c | 19 +++++++++++++++++--
1 file changed, 9 insertions(+) 1 file changed, 17 insertions(+), 2 deletions(-)
--- lib/readline/bind.c --- lib/readline/bind.c
+++ readline-7.0/bind.c 2018-09-28 11:22:31.001503017 +0000 +++ lib/readline/bind.c 2019-08-16 08:26:42.327029248 +0000
@@ -1209,6 +1209,15 @@ parser_if (args) @@ -1195,19 +1195,34 @@ parser_if (char *args)
word in ARGS is the same as the value stored in rl_readline_name. */
if (rl_terminal_name && _rl_strnicmp (args, "term=", 5) == 0)
{
- char *tem, *tname;
+ char *tem, *tname, *talias;
- /* Terminals like "aaa-60" are equivalent to "aaa". */
tname = savestring (rl_terminal_name);
+ /* Various terminal types of screen are equivalent to "screen" */
+ if (_rl_strnicmp (rl_terminal_name, "screen", 6) == 0)
+ {
+ tem = strchr (tname, '.');
+ if (tem)
+ *tem = '\0';
+ }
+ /* Terminals like "aaa-60" are equivalent to "aaa". */
tem = strchr (tname, '-');
if (tem)
*tem = '\0';
+ /* Map terminal types "konsole" and "gnome" to "xterm" nowadays */
+ talias = tname;
+ if (_rl_stricmp("konsole", tname) == 0)
+ talias = "xterm";
+ if (_rl_stricmp("gnome", tname) == 0)
+ talias = "xterm";
+
/* Test the `long' and `short' forms of the terminal name so that
if someone has a `sun-cmd' and does not want to have bindings
that will be executed if the terminal is a `sun', they can put
`$if term=sun-cmd' into their .inputrc. */ `$if term=sun-cmd' into their .inputrc. */
_rl_parsing_conditionalized_out = _rl_stricmp (args + 5, tname) && _rl_parsing_conditionalized_out = _rl_stricmp (args + 5, tname) &&
+ _rl_stricmp (args + 5, talias) &&
_rl_stricmp (args + 5, rl_terminal_name); _rl_stricmp (args + 5, rl_terminal_name);
+
+ /* Skip the prefix `screen.' if any to use the underlying bindings */
+ if (_rl_parsing_conditionalized_out &&
+ _rl_strnicmp (rl_terminal_name, "screen.", 7) == 0)
+ {
+ _rl_parsing_conditionalized_out = _rl_stricmp (args + 5, tname + 7) &&
+ _rl_stricmp (args + 5, rl_terminal_name + 7);
+ }
+
xfree (tname); xfree (tname);
} }
#if defined (VI_MODE)

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:0be8450c126e2b0048fae7a139f1140f48456ae6e794010f81a166ddfb5b9a66 oid sha256:a620bd4af0db8392f3e6d68ddf1c211f121c6e78950fae7fe7db65a5800b90e9
size 249 size 753

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Aug 16 10:05:11 UTC 2019 - Dr. Werner Fink <werner@suse.de>
- Rework patch readline-7.0-screen.patch again for bug boo#1143055
* Map all "screen(-xxx)?.yyy(-zzz)?" to "screen" as well as
map "konsole(-xxx)?" and "gnome(-xxx)?" to "xterm"
-------------------------------------------------------------------
Thu Aug 15 13:45:15 UTC 2019 - Dr. Werner Fink <werner@suse.de>
- Add official patch readline80-001
The history file reading code doesn't close the file descriptor open to
the history file when it encounters a zero-length file.
-------------------------------------------------------------------
Fri Aug 2 08:20:41 UTC 2019 - Martin Liška <mliska@suse.cz>
- Use FAT LTO objects in order to provide proper static library.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jan 9 12:51:18 UTC 2019 - Dr. Werner Fink <werner@suse.de> Wed Jan 9 12:51:18 UTC 2019 - Dr. Werner Fink <werner@suse.de>

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
@ -120,6 +120,7 @@ done
%patch0 -p0 -b .0 %patch0 -p0 -b .0
%build %build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
LANG=POSIX LANG=POSIX
LC_ALL=$LANG LC_ALL=$LANG
unset LC_CTYPE unset LC_CTYPE