Update to readline-8.1 patchlevel 2

Resolves: #2037430
This commit is contained in:
Siteshwar Vashisht 2022-01-17 02:18:54 +01:00
parent 72ad2827da
commit 61cf053863
3 changed files with 111 additions and 1 deletions

View File

@ -0,0 +1,68 @@
From 9ba3434aa5434e509300a3722b0479fd30480b44 Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
Date: Tue, 4 May 2021 14:26:34 -0400
Subject: [PATCH] Readline-8.1 patch 1: fix version comparisons in startup
files
---
bind.c | 15 ++++++++-------
patchlevel | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/bind.c b/bind.c
index 87596dc..7610378 100644
--- a/bind.c
+++ b/bind.c
@@ -1234,7 +1234,7 @@ parser_if (char *args)
#endif /* VI_MODE */
else if (_rl_strnicmp (args, "version", 7) == 0)
{
- int rlversion, versionarg, op, previ, major, minor;
+ int rlversion, versionarg, op, previ, major, minor, opresult;
_rl_parsing_conditionalized_out = 1;
rlversion = RL_VERSION_MAJOR*10 + RL_VERSION_MINOR;
@@ -1294,24 +1294,25 @@ parser_if (char *args)
switch (op)
{
case OP_EQ:
- _rl_parsing_conditionalized_out = rlversion == versionarg;
+ opresult = rlversion == versionarg;
break;
case OP_NE:
- _rl_parsing_conditionalized_out = rlversion != versionarg;
+ opresult = rlversion != versionarg;
break;
case OP_GT:
- _rl_parsing_conditionalized_out = rlversion > versionarg;
+ opresult = rlversion > versionarg;
break;
case OP_GE:
- _rl_parsing_conditionalized_out = rlversion >= versionarg;
+ opresult = rlversion >= versionarg;
break;
case OP_LT:
- _rl_parsing_conditionalized_out = rlversion < versionarg;
+ opresult = rlversion < versionarg;
break;
case OP_LE:
- _rl_parsing_conditionalized_out = rlversion <= versionarg;
+ opresult = rlversion <= versionarg;
break;
}
+ _rl_parsing_conditionalized_out = 1 - opresult;
}
/* Check to see if the first word in ARGS is the same as the
value stored in rl_readline_name. */
diff --git a/patchlevel b/patchlevel
index d8c9df7..fdf4740 100644
--- a/patchlevel
+++ b/patchlevel
@@ -1,3 +1,3 @@
# Do not edit -- exists only for use by patch
-0
+1
--
2.31.1

View File

@ -0,0 +1,36 @@
From 5263c0d88064fda96292335d12eec1733f91cdc9 Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
Date: Wed, 5 Jan 2022 11:09:58 -0500
Subject: [PATCH] Readline-8.1 patch 2: fix redisplay of some characters > 128
in certain single-byte encodings
---
display.c | 2 +-
patchlevel | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/display.c b/display.c
index 38b3d0e..f5d3294 100644
--- a/display.c
+++ b/display.c
@@ -1598,7 +1598,7 @@ puts_face (const char *str, const char *face, int n)
char cur_face;
for (cur_face = FACE_NORMAL, i = 0; i < n; i++)
- putc_face (str[i], face[i], &cur_face);
+ putc_face ((unsigned char) str[i], face[i], &cur_face);
putc_face (EOF, FACE_NORMAL, &cur_face);
}
diff --git a/patchlevel b/patchlevel
index fdf4740..7cbda82 100644
--- a/patchlevel
+++ b/patchlevel
@@ -1,3 +1,3 @@
# Do not edit -- exists only for use by patch
-1
+2
--
2.31.1

View File

@ -1,13 +1,15 @@
Summary: A library for editing typed command lines
Name: readline
Version: 8.1
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv3+
URL: https://tiswww.case.edu/php/chet/readline/rltop.html
Source: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz
# Official upstream patches
# Patches are converted to apply with '-p1'
Patch1: readline-8.1-patch-1.patch
Patch2: readline-8.1-patch-2.patch
# Other patches
# Remove RPATH, use CFLAGS
@ -81,6 +83,10 @@ rm -vf %{buildroot}%{_infodir}/dir*
%{_libdir}/libhistory.a
%changelog
* Mon Jan 17 2022 Siteshwar Vashisht <svashisht@redhat.com> - 8.1-4
- Update to readline-8.1 patchlevel 2
Resolves: #2037430
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 8.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild