Update to bash-5.2 patchlevel 2

This commit is contained in:
Siteshwar Vashisht 2022-10-06 09:58:20 +02:00
parent 4df6ba11b8
commit e26a2b6a87
3 changed files with 58 additions and 4 deletions

24
bash-5.2-patch-1.patch Normal file
View File

@ -0,0 +1,24 @@
diff --git a/patchlevel.h b/patchlevel.h
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 0
+#define PATCHLEVEL 1
#endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index d9feabca..93b91606 100644
--- a/subst.c
+++ b/subst.c
@@ -10857,7 +10857,7 @@ expand_array_subscript (string, sindex, quoted, flags)
exp = substring (string, si+1, ni);
t = expand_subscript_string (exp, quoted & ~(Q_ARITH|Q_DOUBLE_QUOTES));
free (exp);
- exp = sh_backslash_quote (t, abstab, 0);
+ exp = t ? sh_backslash_quote (t, abstab, 0) : savestring ("");
free (t);
slen = STRLEN (exp);

25
bash-5.2-patch-2.patch Normal file
View File

@ -0,0 +1,25 @@
diff --git a/lib/readline/nls.c b/lib/readline/nls.c
--- a/lib/readline/nls.c
+++ b/lib/readline/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.h b/patchlevel.h
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 1
+#define PATCHLEVEL 2
#endif /* _PATCHLEVEL_H_ */

View File

@ -1,12 +1,12 @@
#% define beta_tag rc2 #% define beta_tag rc2
%define patchleveltag .0 %define patchlevel 2
%define baseversion 5.2 %define baseversion 5.2
%bcond_without tests %bcond_without tests
Version: %{baseversion}%{patchleveltag} Version: %{baseversion}.%{patchlevel}
Name: bash Name: bash
Summary: The GNU Bourne Again shell Summary: The GNU Bourne Again shell
Release: 2%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
Url: https://www.gnu.org/software/bash Url: https://www.gnu.org/software/bash
Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz
@ -20,7 +20,9 @@ Source3: dot-bash_logout
# Official upstream patches # Official upstream patches
# Patches are converted to apply with '-p1' # Patches are converted to apply with '-p1'
#{lua:for i=1,16 do print(string.format("Patch%u: bash-5.1-patch-%u.patch\n", i, i)) end} %{lua:for i=1,rpm.expand('%{patchlevel}') do
print(string.format('Patch%u: bash-%s-patch-%u.patch\n', i, rpm.expand('%{baseversion}'), i))
end}
# Other patches # Other patches
# We don't want to add '/etc:/usr/etc' in standard utils path. # We don't want to add '/etc:/usr/etc' in standard utils path.
@ -318,6 +320,9 @@ end
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%changelog %changelog
* Thu Oct 06 2022 Siteshwar Vashisht <svashisht@redhat.com> - 5.2.2-1
- Update to bash-5.2 patchlevel 2
* Wed Oct 05 2022 Siteshwar Vashisht <svashisht@redhat.com> - 5.2.0-2 * Wed Oct 05 2022 Siteshwar Vashisht <svashisht@redhat.com> - 5.2.0-2
- Bump version number - Bump version number
Related: #2129927 Related: #2129927