Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions SPECS/readline/readline-8.2-patch-1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 7274faabe97ce53d6b464272d7e6ab6c1392837b Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
Date: Wed, 5 Oct 2022 10:41:16 -0400
Subject: Readline-8.2 patch 1: fix crash when readline is started with an
invalid locale specification

---
._.gitignore | Bin 4096 -> 0 bytes
nls.c | 4 ++++
patchlevel | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
delete mode 100644 ._.gitignore

diff --git a/._.gitignore b/._.gitignore
deleted file mode 100644
index aa90ec6..0000000
Binary files a/._.gitignore and /dev/null differ
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
--
cgit v1.1

9 changes: 7 additions & 2 deletions SPECS/readline/readline.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: Command-line editing and history capabilities
Name: readline
Version: 8.2
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3+
Vendor: Microsoft Corporation
Distribution: Azure Linux
Expand All @@ -11,6 +11,8 @@ Source0: https://ftp.gnu.org/gnu/readline/%{name}-%{version}.tar.gz
BuildRequires: ncurses-devel
Requires: ncurses-libs

Patch: readline-8.2-patch-1.patch

%description
The Readline package is a set of libraries that offers command-line
editing and history capabilities.
Expand All @@ -23,7 +25,7 @@ Requires: %{name} = %{version}
It contains the libraries and header files to create applications

%prep
%setup -q
%autosetup -p1
sed -i '/MV.*old/d' Makefile.in
sed -i '/{OLDSUFF}/c:' support/shlib-install

Expand Down Expand Up @@ -109,6 +111,9 @@ make %{?_smp_mflags} check
%{_libdir}/pkgconfig/history.pc

%changelog
* Tue Mar 11 2025 Thien Trung Vuong <tvuong@microsoft.com> - 8.2-2
- Add patch to fix readline crash when initialized with an invalid locale specification

* Mon Oct 16 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 8.2-1
- Auto-upgrade to 8.2 - Azure Linux 3.0 - package upgrades

Expand Down
4 changes: 2 additions & 2 deletions toolkit/resources/manifests/package/pkggen_core_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ ncurses-compat-6.4-2.azl3.aarch64.rpm
ncurses-devel-6.4-2.azl3.aarch64.rpm
ncurses-libs-6.4-2.azl3.aarch64.rpm
ncurses-term-6.4-2.azl3.aarch64.rpm
readline-8.2-1.azl3.aarch64.rpm
readline-devel-8.2-1.azl3.aarch64.rpm
readline-8.2-2.azl3.aarch64.rpm
readline-devel-8.2-2.azl3.aarch64.rpm
libattr-2.5.2-1.azl3.aarch64.rpm
attr-2.5.2-1.azl3.aarch64.rpm
libacl-2.3.1-2.azl3.aarch64.rpm
Expand Down
4 changes: 2 additions & 2 deletions toolkit/resources/manifests/package/pkggen_core_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ ncurses-compat-6.4-2.azl3.x86_64.rpm
ncurses-devel-6.4-2.azl3.x86_64.rpm
ncurses-libs-6.4-2.azl3.x86_64.rpm
ncurses-term-6.4-2.azl3.x86_64.rpm
readline-8.2-1.azl3.x86_64.rpm
readline-devel-8.2-1.azl3.x86_64.rpm
readline-8.2-2.azl3.x86_64.rpm
readline-devel-8.2-2.azl3.x86_64.rpm
libattr-2.5.2-1.azl3.x86_64.rpm
attr-2.5.2-1.azl3.x86_64.rpm
libacl-2.3.1-2.azl3.x86_64.rpm
Expand Down
6 changes: 3 additions & 3 deletions toolkit/resources/manifests/package/toolchain_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,9 @@ python3-setuptools-69.0.3-4.azl3.noarch.rpm
python3-test-3.12.3-6.azl3.aarch64.rpm
python3-tools-3.12.3-6.azl3.aarch64.rpm
python3-wheel-0.43.0-1.azl3.noarch.rpm
readline-8.2-1.azl3.aarch64.rpm
readline-debuginfo-8.2-1.azl3.aarch64.rpm
readline-devel-8.2-1.azl3.aarch64.rpm
readline-8.2-2.azl3.aarch64.rpm
readline-debuginfo-8.2-2.azl3.aarch64.rpm
readline-devel-8.2-2.azl3.aarch64.rpm
rpm-4.18.2-1.azl3.aarch64.rpm
rpm-build-4.18.2-1.azl3.aarch64.rpm
rpm-build-libs-4.18.2-1.azl3.aarch64.rpm
Expand Down
6 changes: 3 additions & 3 deletions toolkit/resources/manifests/package/toolchain_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,9 @@ python3-setuptools-69.0.3-4.azl3.noarch.rpm
python3-test-3.12.3-6.azl3.x86_64.rpm
python3-tools-3.12.3-6.azl3.x86_64.rpm
python3-wheel-0.43.0-1.azl3.noarch.rpm
readline-8.2-1.azl3.x86_64.rpm
readline-debuginfo-8.2-1.azl3.x86_64.rpm
readline-devel-8.2-1.azl3.x86_64.rpm
readline-8.2-2.azl3.x86_64.rpm
readline-debuginfo-8.2-2.azl3.x86_64.rpm
readline-devel-8.2-2.azl3.x86_64.rpm
rpm-4.18.2-1.azl3.x86_64.rpm
rpm-build-4.18.2-1.azl3.x86_64.rpm
rpm-build-libs-4.18.2-1.azl3.x86_64.rpm
Expand Down