Accepting request 890764 from Base:System

- Add official patch readline81-001 and its signature
  * The code to check readline versions in an inputrc file had the sense of the
    comparisons reversed.

OBS-URL: https://build.opensuse.org/request/show/890764
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/readline?expand=0&rev=11
This commit is contained in:
Dominique Leuenberger 2021-05-11 21:03:25 +00:00 committed by Git OBS Bridge
commit 75decb49e2
6 changed files with 106 additions and 4 deletions

View File

@ -80,7 +80,7 @@
#if defined (__MSDOS__)
if (_rl_read_init_file (filename, 0) == 0)
return 0;
@@ -1725,7 +1752,14 @@ rl_parse_and_bind (char *string)
@@ -1726,7 +1753,14 @@ rl_parse_and_bind (char *string)
rl_macro_bind (seq, &funname[1], _rl_keymap);
}
else
@ -96,7 +96,7 @@
xfree (seq);
return 0;
@@ -1896,7 +1930,6 @@ typedef int _rl_sv_func_t PARAMS((const
@@ -1897,7 +1931,6 @@ typedef int _rl_sv_func_t PARAMS((const
#define V_INT 2
/* Forward declarations */

View File

@ -4,7 +4,7 @@
--- lib/readline/bind.c
+++ lib/readline/bind.c 2018-09-20 06:40:06.799183658 +0000
@@ -1871,6 +1871,7 @@ static const struct {
@@ -1872,6 +1872,7 @@ static const struct {
#if defined (VISIBLE_STATS)
{ "visible-stats", &rl_visible_stats, 0 },
#endif /* VISIBLE_STATS */

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed May 5 15:02:23 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Add official patch readline81-001 and its signature
* The code to check readline versions in an inputrc file had the sense of the
comparisons reversed.
-------------------------------------------------------------------
Mon Jan 11 11:21:58 UTC 2021 - Dr. Werner Fink <werner@suse.de>

View File

@ -30,7 +30,9 @@ Source1: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz.sig
Source2: baselibs.conf
Source4: https://tiswww.case.edu/php/chet/gpgkey.asc#/%{name}.keyring
# signatures for official patches
Source100: readline81-001.sig
# official patches
Patch100: readline81-001
# local patches
Patch200: readline-%{version}.dif
Patch201: readline-6.3-input.dif
@ -101,6 +103,7 @@ as well as programming with the interface of the readline library.
%prep
%setup -q
# official patches
%patch100 -p0
# local patches
%patch201 -p2 -b .zerotty
%patch202 -p2 -b .conf
@ -200,7 +203,7 @@ export CC_FOR_BUILD CFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
%make_build documentation
%install
%make_install htmldir=%{_docdir}/%{name} installdir=%{_docdir}/%{name}/examples
%make_install everything htmldir=%{_docdir}/%{name} installdir=%{_docdir}/%{name}/examples
%post -n libreadline%{rl_major} -p /sbin/ldconfig
%postun -n libreadline%{rl_major} -p /sbin/ldconfig

92
readline81-001 Normal file
View File

@ -0,0 +1,92 @@
READLINE PATCH REPORT
=====================
Readline-Release: 8.1
Patch-ID: readline81-001
Bug-Reported-by: Tom Tromey <tom@tromey.com>
Bug-Reference-ID: <875z3u9fd0.fsf@tromey.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2021-01/msg00009.html
Bug-Description:
The code to check readline versions in an inputrc file had the sense of the
comparisons reversed.
Patch (apply with `patch -p0'):
*** ../readline-8.1-patched/bind.c 2020-10-26 10:03:14.000000000 -0400
--- bind.c 2021-01-18 16:38:48.000000000 -0500
***************
*** 1235,1239 ****
else if (_rl_strnicmp (args, "version", 7) == 0)
{
! int rlversion, versionarg, op, previ, major, minor;
_rl_parsing_conditionalized_out = 1;
--- 1235,1239 ----
else if (_rl_strnicmp (args, "version", 7) == 0)
{
! int rlversion, versionarg, op, previ, major, minor, opresult;
_rl_parsing_conditionalized_out = 1;
***************
*** 1295,1316 ****
{
case OP_EQ:
! _rl_parsing_conditionalized_out = rlversion == versionarg;
break;
case OP_NE:
! _rl_parsing_conditionalized_out = rlversion != versionarg;
break;
case OP_GT:
! _rl_parsing_conditionalized_out = rlversion > versionarg;
break;
case OP_GE:
! _rl_parsing_conditionalized_out = rlversion >= versionarg;
break;
case OP_LT:
! _rl_parsing_conditionalized_out = rlversion < versionarg;
break;
case OP_LE:
! _rl_parsing_conditionalized_out = rlversion <= versionarg;
break;
}
}
/* Check to see if the first word in ARGS is the same as the
--- 1295,1317 ----
{
case OP_EQ:
! opresult = rlversion == versionarg;
break;
case OP_NE:
! opresult = rlversion != versionarg;
break;
case OP_GT:
! opresult = rlversion > versionarg;
break;
case OP_GE:
! opresult = rlversion >= versionarg;
break;
case OP_LT:
! opresult = rlversion < versionarg;
break;
case OP_LE:
! opresult = rlversion <= versionarg;
break;
}
+ _rl_parsing_conditionalized_out = 1 - opresult;
}
/* Check to see if the first word in ARGS is the same as the
*** ../readline-8.1/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
! 0
--- 1,3 ----
# Do not edit -- exists only for use by patch
! 1

BIN
readline81-001.sig Normal file

Binary file not shown.