diff --git a/bash-4.4-sw.patch b/bash-4.4-sw.patch new file mode 100644 index 0000000000000000000000000000000000000000..3bfde47ff2c21476fc2d6602810943c5d74ef56c --- /dev/null +++ b/bash-4.4-sw.patch @@ -0,0 +1,67 @@ +diff -Naur bash-4.4.org/aclocal.m4 bash-4.4.sw/aclocal.m4 +--- bash-4.4.org/aclocal.m4 2023-05-12 17:24:14.286188860 +0800 ++++ bash-4.4.sw/aclocal.m4 2023-05-12 17:25:08.259079310 +0800 +@@ -2660,7 +2660,7 @@ + [ + # Guess based on the CPU. + case "$host_cpu" in +- alpha* | i[34567]86 | m68k | s390*) ++ sw_64* | alpha* | i[34567]86 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; +diff -Naur bash-4.4.org/configure bash-4.4.sw/configure +--- bash-4.4.org/configure 2016-09-08 04:57:01.000000000 +0800 ++++ bash-4.4.sw/configure 2023-05-12 17:25:49.091509507 +0800 +@@ -2842,6 +2842,7 @@ + #htmldir= + + case "${host_cpu}-${host_os}" in ++sw_64*-*) opt_bash_malloc=no ;; # sw_64 running osf/1 or linux + alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux + *[Cc]ray*-*) opt_bash_malloc=no ;; # Crays + *-osf1*) opt_bash_malloc=no ;; # other osf/1 machines +@@ -7228,7 +7229,7 @@ + + # Guess based on the CPU. + case "$host_cpu" in +- alpha* | i3456786 | m68k | s390*) ++ sw_64* | alpha* | i3456786 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; +diff -Naur bash-4.4.org/configure.ac bash-4.4.sw/configure.ac +--- bash-4.4.org/configure.ac 2023-05-12 17:24:14.355191277 +0800 ++++ bash-4.4.sw/configure.ac 2023-05-12 17:26:14.230390019 +0800 +@@ -64,6 +64,7 @@ + dnl look in the NOTES file for more + case "${host_cpu}-${host_os}" in + alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux ++sw_64*-*) opt_bash_malloc=no ;; # sw_64 running osf/1 or linux + *[[Cc]]ray*-*) opt_bash_malloc=no ;; # Crays + *-osf1*) opt_bash_malloc=no ;; # other osf/1 machines + sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 +diff -Naur bash-4.4.org/general.h bash-4.4.sw/general.h +--- bash-4.4.org/general.h 2016-08-11 23:17:13.000000000 +0800 ++++ bash-4.4.sw/general.h 2023-05-12 17:27:08.100276860 +0800 +@@ -57,7 +57,7 @@ + /* Hardly used anymore */ + #define pointer_to_int(x) (int)((char *)x - (char *)0) + +-#if defined (alpha) && defined (__GNUC__) && !defined (strchr) && !defined (__STDC__) ++#if (defined (alpha) || defined (sw_64)) && defined (__GNUC__) && !defined (strchr) && !defined (__STDC__) + extern char *strchr (), *strrchr (); + #endif + +diff -Naur bash-4.4.org/lib/intl/dcigettext.c bash-4.4.sw/lib/intl/dcigettext.c +--- bash-4.4.org/lib/intl/dcigettext.c 2009-01-05 03:32:30.000000000 +0800 ++++ bash-4.4.sw/lib/intl/dcigettext.c 2023-05-12 17:27:42.849493985 +0800 +@@ -74,7 +74,7 @@ + #ifdef _LIBC + /* Guess whether integer division by zero raises signal SIGFPE. + Set to 1 only if you know for sure. In case of doubt, set to 0. */ +-# if defined __alpha__ || defined __arm__ || defined __i386__ \ ++# if defined __alpha__ || defined __sw_64__ || defined __arm__ || defined __i386__ \ + || defined __m68k__ || defined __s390__ + # define INTDIV0_RAISES_SIGFPE 1 + # else diff --git a/bash.spec b/bash.spec index b2e431b2e8eb559fe0f277bbd7df96868c9fe112..71006ac4bfa2eefc15691db7acfbf44841ba8a0f 100644 --- a/bash.spec +++ b/bash.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 #% define beta_tag rc2 %global _hardened_build 1 %define patchleveltag .20 @@ -7,7 +8,7 @@ Version: %{baseversion}%{patchleveltag} Name: bash Summary: The GNU Bourne Again shell -Release: 4%{?dist} +Release: 4%{?anolis_release}%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/bash Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz @@ -117,6 +118,7 @@ Patch138: bash-5.0-histtimeformat-segfault.patch #2062291 - Segfault in 'buffered_getchar()' function in bash Patch139: bash-4.4-fix-buffered_getchar-crash.patch +Patch140: bash-4.4-sw.patch BuildRequires: texinfo bison BuildRequires: ncurses-devel @@ -341,6 +343,9 @@ end %{_libdir}/pkgconfig/%{name}.pc %changelog +* Fri May 12 2023 wxiat - 4.4.20-4.0.1 +- add sw patch + * Tue Apr 05 2022 Siteshwar Vashisht - 4.4.20-4 - Fix a crash in buffered_getchar() function Resolves: #2062291