diff --git a/readline-5.2-conf.patch b/readline-5.2-conf.patch index 9bfe826..4b79e15 100644 --- a/readline-5.2-conf.patch +++ b/readline-5.2-conf.patch @@ -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 */ diff --git a/readline-6.2-metamode.patch b/readline-6.2-metamode.patch index 41caf39..3dd12b9 100644 --- a/readline-6.2-metamode.patch +++ b/readline-6.2-metamode.patch @@ -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 */ diff --git a/readline.changes b/readline.changes index e174eb0..d29a161 100644 --- a/readline.changes +++ b/readline.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 5 15:02:23 UTC 2021 - Dr. Werner Fink + + - 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 diff --git a/readline.spec b/readline.spec index 62a8e72..afcd65a 100644 --- a/readline.spec +++ b/readline.spec @@ -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 diff --git a/readline81-001 b/readline81-001 new file mode 100644 index 0000000..c393c12 --- /dev/null +++ b/readline81-001 @@ -0,0 +1,92 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.1 +Patch-ID: readline81-001 + +Bug-Reported-by: Tom Tromey +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 diff --git a/readline81-001.sig b/readline81-001.sig new file mode 100644 index 0000000..4f426a2 Binary files /dev/null and b/readline81-001.sig differ