diff --git a/0001-Readline-8.2-patch-1-fix-crash-when-readline-is-star.patch b/0001-Readline-8.2-patch-1-fix-crash-when-readline-is-star.patch new file mode 100644 index 0000000000000000000000000000000000000000..7fca6046666c84bc49bf62285a52eeb38b149a99 --- /dev/null +++ b/0001-Readline-8.2-patch-1-fix-crash-when-readline-is-star.patch @@ -0,0 +1,38 @@ +From 7274faabe97ce53d6b464272d7e6ab6c1392837b Mon Sep 17 00:00:00 2001 +From: Chet Ramey +Date: Wed, 5 Oct 2022 10:41:16 -0400 +Subject: [PATCH] Readline-8.2 patch 1: fix crash when readline is started with + an invalid locale specification + +--- + nls.c | 4 ++++ + patchlevel | 2 +- + 3 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/nls.c b/nls.c +index 5c6a13b..8c027d6 100644 +--- a/nls.c ++++ b/nls.c +@@ -141,6 +141,10 @@ _rl_init_locale (void) + if (lspec == 0) + lspec = ""; + ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */ ++ if (ret == 0 || *ret == 0) ++ ret = setlocale (LC_CTYPE, (char *)NULL); ++ if (ret == 0 || *ret == 0) ++ ret = RL_DEFAULT_LOCALE; + #else + ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec; + #endif +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.19.1.6.gb485710b + diff --git a/readline.spec b/readline.spec index fff0ae9144d120908602a6c3cb9beaf32eaf850b..efd13d5af2263e6563b5d294ce1e6cda8044165b 100644 --- a/readline.spec +++ b/readline.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 Summary: A library for editing typed command lines Name: readline @@ -8,6 +8,7 @@ License: GPLv3+ URL: https://tiswww.case.edu/php/chet/readline/rltop.html Source: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz +Patch1: 0001-Readline-8.2-patch-1-fix-crash-when-readline-is-star.patch # Other patches # Remove RPATH, use CFLAGS Patch101: readline-8.2-shlib.patch @@ -92,6 +93,9 @@ rm -vrf %{buildroot}%{_docdir}/readline %{_libdir}/libhistory.a %changelog +* Tue Dec 13 2022 Chunmei Xu - 8.2-2 +- fix chroot crash with "bash -i" + * Tue Nov 22 2022 Funda Wang - 8.2-1 - New version 8.2