Browse Source

bash-5.2.2-1

Tomohiro "Tomo-p" KATO 1 year ago
parent
commit
b6356764b3
1 changed files with 72 additions and 87 deletions
  1. 72 87
      b/bash/bash-vl.spec

+ 72 - 87
b/bash/bash-vl.spec

@@ -1,5 +1,5 @@
-%define bashversion 5.1
-%define patchlevel 16
+%define bashversion 5.2
+%define patchlevel 2
 
 Summary:      The GNU Bourne Again shell (bash).
 Summary(ja):  GNU Bourne Again シェル (bash).
@@ -16,70 +16,76 @@ Source0:      http://ftp.gnu.org/pub/gnu/bash/bash-%{bashversion}.tar.gz
 Source10:     bashrc-vine
 
 # Official upstream patches
-Patch1: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-001
-Patch2: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-002
-Patch3: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-003
-Patch4: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-004
-Patch5: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-005
-Patch6: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-006
-Patch7: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-007
-Patch8: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-008
-Patch9: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-009
-Patch10: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-010
-Patch11: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-011
-Patch12: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-012
-Patch13: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-013
-Patch14: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-014
-Patch15: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-015
-Patch16: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash51-016
-
-# Other patches
-Patch102: bash-2.03-paths.patch
-Patch103: bash-2.03-profile.patch
-Patch104: bash-2.05a-interpreter.patch
-Patch105: bash-2.05b-debuginfo.patch
-Patch107: bash-2.05b-pgrp_sync.patch
-Patch110: bash-3.2-audit.patch
-Patch111: bash-3.2-ssh_source_bash.patch
-Patch113: bash-infotags.patch
-Patch114: bash-requires.patch
-Patch115: bash-setlocale.patch
-Patch116: bash-tty-tests.patch
+Patch1: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash52-001
+Patch2: https://ftp.gnu.org/gnu/bash/bash-%{bashversion}-patches/bash52-002
+
+# We don't want to add '/etc:/usr/etc' in standard utils path.
+Patch101: bash-2.03-paths.patch
+# Non-interactive shells beginning with argv[0][0] == '-' should run the startup files when not in posix mode.
+Patch102: bash-2.03-profile.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=60870
+Patch103: bash-2.05a-interpreter.patch
+# Generate info for debuginfo files.
+Patch104: bash-2.05b-debuginfo.patch
+# Pid passed to setpgrp() can not be pid of a zombie process.
+Patch105: bash-2.05b-pgrp_sync.patch
+# Enable audit logs
+Patch106: bash-3.2-audit.patch
+# Source bashrc file when bash is run under ssh.
+Patch107: bash-3.2-ssh_source_bash.patch
+# Use makeinfo to generate .texi file
+# Patch108: bash-infotags.patch
+# Try to pick up latest `--rpm-requires` patch from http://git.altlinux.org/gears/b/bash4.git
+Patch109: bash-requires.patch
+Patch110: bash-setlocale.patch
+# Disable tty tests while doing bash builds
+Patch111: bash-tty-tests.patch
 
 # 484809, check if interp section is NOBITS
-Patch117: bash-4.0-nobits.patch
+Patch116: bash-4.0-nobits.patch
 
 # Do the same CFLAGS in generated Makefile in examples
-Patch118: bash-4.1-examples.patch
+Patch117: bash-4.1-examples.patch
 
 # Builtins like echo and printf won't report errors
 # when output does not succeed due to EPIPE
-Patch119: bash-4.1-broken_pipe.patch
+Patch118: bash-4.1-broken_pipe.patch
 
 # Enable system-wide .bash_logout for login shells
-Patch120: bash-4.2-rc2-logout.patch
+Patch119: bash-4.2-rc2-logout.patch
 
 # Static analyzis shows some issues in bash-2.05a-interpreter.patch
-Patch121: bash-4.2-coverity.patch
+Patch120: bash-4.2-coverity.patch
 
 # 799958, updated info about trap
-Patch123: bash-4.2-manpage_trap.patch
+# This patch should be upstreamed.
+Patch122: bash-4.2-manpage_trap.patch
 
 # https://www.securecoding.cert.org/confluence/display/seccode/INT32-C.+Ensure+that+operations+on+signed+integers+do+not+result+in+overflow
-Patch125: bash-4.2-size_type.patch
+# This patch should be upstreamed.
+Patch123: bash-4.2-size_type.patch
 
 # 1112710 - mention ulimit -c and -f POSIX block size
-Patch128: bash-4.3-man-ulimit.patch
+# This patch should be upstreamed.
+Patch124: bash-4.3-man-ulimit.patch
 
 # 1102815 - fix double echoes in vi visual mode
-Patch135: bash-4.3-noecho.patch
+Patch125: bash-4.3-noecho.patch
 
 #1241533,1224855 - bash leaks memory when LC_ALL set
-Patch138: bash-4.3-memleak-lc_all.patch
+Patch126: bash-4.3-memleak-lc_all.patch
 
 # bash-4.4 builds loadable builtin examples by default
 # this patch disables it
-Patch140: bash-4.4-no-loadable-builtins.patch
+Patch127: bash-4.4-no-loadable-builtins.patch
+
+# 2020528 - Add a runtime option to enable history logging to syslog
+# This option is undocumented in upstream and is documented by this patch
+Patch128: bash-5.0-syslog-history.patch
+
+# 2133097 - bash fails to handle nested expansions
+# This patch should be removed with next rebase
+Patch129: bash-5.2-nested-expansion.patch
 
 Buildroot:    %{_tmppath}/%{name}-%{version}-root
 BuildRequires: texinfo, bison, ncurses-devel, autoconf, gettext
@@ -118,65 +124,41 @@ Again shell.
 
 %prep
 %setup -q -n %{name}-%{bashversion}
-
-# Official upstream patches
-%patch1 -p0 -b .001
-%patch2 -p0 -b .002
-%patch3 -p0 -b .003
-%patch4 -p0 -b .004
-%patch5 -p0 -b .005
-%patch6 -p0 -b .006
-%patch7 -p0 -b .007
-%patch8 -p0 -b .008
-%patch9 -p0 -b .009
-%patch10 -p0 -b .010
-%patch11 -p0 -b .011
-%patch12 -p0 -b .012
-%patch13 -p0 -b .013
-%patch14 -p0 -b .014
-%patch15 -p0 -b .015
-%patch16 -p0 -b .016
-
-# Other patches
-%patch102 -p1 -b .paths
-%patch103 -p1 -b .profile
-%patch104 -p1 -b .interpreter
-%patch105 -p1 -b .debuginfo
-%patch107 -p1 -b .pgrp_sync
-%patch110 -p1 -b .audit
-%patch111 -p1 -b .ssh_source_bash
-%patch113 -p1 -b .infotags
-%patch114 -p1 -b .requires
-%patch115 -p1 -b .setlocale
-%patch116 -p1 -b .tty_tests
-%patch117 -p1 -b .nobits
-%patch118 -p1 -b .examples
-%patch119 -p1 -b .broken_pipe
-%patch120 -p1 -b .logout
-%patch121 -p1 -b .coverity
-%patch123 -p1
-%patch125 -p1 -b .size_type
-%patch128 -p1 -b .ulimit
-%patch135 -p1 -b .noecho
-%patch138 -p1 -b .lc_all
-%patch140 -p1 -b .no_loadable_builtin
+%autopatch -p0 -m1 -M99
+%autopatch -p1 -m100
 
 echo %{version} > _distribution
 echo %{release} |sed 's/vl.*//' > _patchlevel
 
 
 %build
+autoconf
 %configure --with-bash-malloc=no
-make CPPFLAGS="-D_GNU_SOURCE -DRECYCLES_PIDS `getconf LFS_CFLAGS`"
+
+# Recycles pids is neccessary. When bash's last fork's pid was X
+# and new fork's pid is also X, bash has to wait for this same pid.
+# Without Recycles pids bash will not wait.
+MFLAGS="CPPFLAGS=-D_GNU_SOURCE -DRECYCLES_PIDS `getconf LFS_CFLAGS` -DSYSLOG_HISTORY -DSYSLOG_SHOPT=0"
+
+# work around missing deps in Makefiles
+make "$MFLAGS" version.h
+make "$MFLAGS" %{?_smp_mflags} -C builtins
+make "$MFLAGS" %{?_smp_mflags}
+
 
 %install
-rm -rf %{buildroot}
+if [ -e autoconf ]; then
+  # Yuck. We're using autoconf 2.1x.
+  export PATH=.:$PATH
+fi
 
 # Fix bug #83776
 perl -pi -e 's,bashref\.info,bash.info,' doc/bashref.info
 
 make DESTDIR=$RPM_BUILD_ROOT install
 
+mkdir -p %{buildroot}/%{_sysconfdir}
+
 pushd $RPM_BUILD_ROOT
  mkdir ./bin
  mv ./usr/bin/bash ./bin/bash
@@ -224,6 +206,7 @@ popd
 
 rm -rf $RPM_BUILD_ROOT/%{_docdir}/bash
 
+
 %clean
 rm -rf %{buildroot}
 
@@ -280,7 +263,6 @@ f:close()
 %{_mandir}/*/..1*
 %{_bindir}/bashbug
 
-
 %files doc
 %defattr(-,root,root)
 %doc COMPAT NEWS NOTES POSIX RBASH
@@ -292,6 +274,9 @@ f:close()
 
 
 %changelog
+* Sun Nov 06 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.2.2-1
+- updated to 5.2 patch level 2.
+
 * Fri Jan 14 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.1.16-1
 - updated to 5.1 patch level 16.