Accepting request 932216 from Base:System
- Update bash 5.1 to patch level 12 * Add official patch bash51-009 The bash malloc implementation of malloc_usable_size() does not follow the specification. This can cause library functions that use it to overwrite memory bounds checking. * Add official patch bash51-010 If `wait -n' is interrupted by a trapped signal other than SIGINT, it does not completely clean up state, and that can prevent subsequent calls to `wait -n' from working correctly. * Add official patch bash51-011 When reading a compound assignment, and running it through the parser to split it into words, we need to save and restore any alias we're currently expanding. * Add official patch bash51-012 There is a possible race condition that arises when a child process receives a signal trapped by the parent before it can reset the signal dispositions. The child process is not supposed to trap the signal in this circumstance. - Using package bash-sh instead of the update-alternative mechanism. OBS-URL: https://build.opensuse.org/request/show/932216 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=173
This commit is contained in:
commit
dd9f9f1b37
@ -54,7 +54,7 @@
|
||||
signal_is_trapped (s)
|
||||
--- jobs.c
|
||||
+++ jobs.c 2020-10-12 16:00:37.267184666 +0000
|
||||
@@ -2221,6 +2221,15 @@ make_child (command, flags)
|
||||
@@ -2223,6 +2223,15 @@ make_child (command, flags)
|
||||
child process, go back and change callers who free `command' in
|
||||
the child process when this returns. */
|
||||
mypid = getpid ();
|
||||
@ -72,7 +72,7 @@
|
||||
0 because that's the file descriptor used when redirecting input,
|
||||
--- sig.c
|
||||
+++ sig.c 2020-10-12 16:00:37.267184666 +0000
|
||||
@@ -83,10 +83,10 @@ sigset_t top_level_mask;
|
||||
@@ -84,10 +84,10 @@ sigset_t top_level_mask;
|
||||
#endif /* JOB_CONTROL */
|
||||
|
||||
/* When non-zero, we throw_to_top_level (). */
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- sig.c
|
||||
+++ sig.c 2018-11-29 08:13:00.103944580 +0000
|
||||
@@ -788,6 +788,8 @@ set_signal_handler (sig, handler)
|
||||
@@ -796,6 +796,8 @@ set_signal_handler (sig, handler)
|
||||
if (sig == SIGCHLD)
|
||||
act.sa_flags |= SA_RESTART; /* XXX */
|
||||
#endif
|
||||
@ -13,7 +13,7 @@
|
||||
/* Let's see if we can keep SIGWINCH from interrupting interruptible system
|
||||
calls, like open(2)/read(2)/write(2) */
|
||||
#if defined (SIGWINCH)
|
||||
@@ -798,6 +800,10 @@ set_signal_handler (sig, handler)
|
||||
@@ -806,6 +808,10 @@ set_signal_handler (sig, handler)
|
||||
it to be as close to SIG_IGN as possible. */
|
||||
if (sig == SIGTERM && handler == sigterm_sighandler)
|
||||
act.sa_flags |= SA_RESTART; /* XXX */
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eae6def895cb3712538a395e821cd935b85928510419ef16ca59778955849f9c
|
||||
size 5494
|
||||
oid sha256:27c699e9b229528c1b4e71952b9a375a1bdc9276954d7d6031e64ccab7f5112b
|
||||
size 8455
|
||||
|
27
bash.changes
27
bash.changes
@ -1,3 +1,30 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 18 10:28:52 UTC 2021 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Update bash 5.1 to patch level 12
|
||||
* Add official patch bash51-009
|
||||
The bash malloc implementation of malloc_usable_size() does not follow the
|
||||
specification. This can cause library functions that use it to overwrite
|
||||
memory bounds checking.
|
||||
* Add official patch bash51-010
|
||||
If `wait -n' is interrupted by a trapped signal other than SIGINT, it does
|
||||
not completely clean up state, and that can prevent subsequent calls to
|
||||
`wait -n' from working correctly.
|
||||
* Add official patch bash51-011
|
||||
When reading a compound assignment, and running it through the parser to
|
||||
split it into words, we need to save and restore any alias we're currently
|
||||
expanding.
|
||||
* Add official patch bash51-012
|
||||
There is a possible race condition that arises when a child process receives
|
||||
a signal trapped by the parent before it can reset the signal dispositions.
|
||||
The child process is not supposed to trap the signal in this circumstance.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 22 09:28:06 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||
|
||||
- Using package bash-sh instead of the update-alternative
|
||||
mechanism.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 30 13:42:48 UTC 2021 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
|
49
bash.spec
49
bash.spec
@ -16,6 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_with alternatives
|
||||
%else
|
||||
%bcond_without alternatives
|
||||
%endif
|
||||
|
||||
%define bextend %{nil}
|
||||
%define bversion 5.1
|
||||
%define bpatchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir})
|
||||
@ -81,17 +87,26 @@ BuildRequires: patchutils
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: screen
|
||||
BuildRequires: sed
|
||||
%if %{with alternatives}
|
||||
BuildRequires: update-alternatives
|
||||
%endif
|
||||
BuildRequires: pkgconfig(audit)
|
||||
BuildRequires: pkgconfig(ncurses)
|
||||
# This has to be always the same version as included in the bash its self
|
||||
BuildRequires: pkgconfig(readline) = 8.1
|
||||
%if %{with alternatives}
|
||||
Requires(post): update-alternatives
|
||||
Requires(preun):update-alternatives
|
||||
%endif
|
||||
Suggests: bash-doc = %{version}
|
||||
Suggests: command-not-found
|
||||
Provides: /bin/bash
|
||||
%if %{with alternatives}
|
||||
Provides: /bin/sh
|
||||
%else
|
||||
Requires: /usr/bin/sh
|
||||
Suggests: bash-sh
|
||||
%endif
|
||||
|
||||
%description
|
||||
Bash is an sh-compatible command interpreter that executes commands
|
||||
@ -113,6 +128,18 @@ interpreter Bash.
|
||||
|
||||
%lang_package
|
||||
|
||||
%if %{without alternatives}
|
||||
%package sh
|
||||
Summary: Handle behaviour of /bin/sh
|
||||
Group: System/Shells
|
||||
Provides: alternative(sh)
|
||||
Conflicts: alternative(sh)
|
||||
Requires: bash = %{version}
|
||||
|
||||
%description sh
|
||||
Use bash as /bin/sh implementation.
|
||||
%endif
|
||||
|
||||
%package devel
|
||||
Summary: Include Files mandatory for Development of bash loadable builtins
|
||||
Group: Development/Languages/C and C++
|
||||
@ -444,7 +471,9 @@ test ${rl1[2]} = ${rl2[2]} || exit 1
|
||||
mv -vf %{buildroot}%{_ldldir}/*.inc %{buildroot}%{_datadir}/bash
|
||||
rm -rf %{buildroot}/%{_lib}/pkgconfig
|
||||
sed -ri '/CC = gcc/s@(CC = gcc).*@\1@' %{buildroot}%{_libdir}/pkgconfig/bash.pc
|
||||
%if %{with alternatives}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
%endif
|
||||
#
|
||||
# It should be noted that the move of /bin/bash to /usr/bin/bash
|
||||
# had NOT done by me at 2019/02/08. Now only a symbolic link
|
||||
@ -455,7 +484,11 @@ test ${rl1[2]} = ${rl2[2]} || exit 1
|
||||
ln -sf %{_bindir}/bash %{buildroot}/bin/bash
|
||||
ln -sf %{_bindir}/sh %{buildroot}/bin/sh
|
||||
ln -sf bash %{buildroot}%{_bindir}/rbash
|
||||
%if %{with alternatives}
|
||||
ln -sf %{_sysconfdir}/alternatives/sh %{buildroot}%{_bindir}/sh
|
||||
%else
|
||||
ln -sf %{_bindir}/bash %{buildroot}%{_bindir}/sh
|
||||
%endif
|
||||
install -m 644 COMPAT NEWS %{buildroot}%{_docdir}/%{name}
|
||||
install -m 644 COPYING %{buildroot}%{_docdir}/%{name}
|
||||
install -m 644 doc/FAQ %{buildroot}%{_docdir}/%{name}
|
||||
@ -493,6 +526,7 @@ EOF
|
||||
%fdupes -s %{buildroot}%{_datadir}/bash/helpfiles
|
||||
sed -ri '1{ s@/bin/sh@/bin/bash@ }' %{buildroot}%{_bindir}/bashbug
|
||||
|
||||
%if %{with alternatives}
|
||||
%post -p %{_bindir}/bash
|
||||
%{_sbindir}/update-alternatives --quiet --force \
|
||||
--install %{_bindir}/sh sh %{_bindir}/bash 10100
|
||||
@ -501,22 +535,29 @@ EOF
|
||||
if test "$1" = 0; then
|
||||
%{_sbindir}/update-alternatives --quiet --remove sh %{_bindir}/bash
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%config %attr(600,root,root) %{_sysconfdir}/skel/.bash_history
|
||||
%config %attr(644,root,root) %{_sysconfdir}/skel/.bashrc
|
||||
%config %attr(644,root,root) %{_sysconfdir}/skel/.profile
|
||||
%if %{with alternatives}
|
||||
%ghost %config %{_sysconfdir}/alternatives/sh
|
||||
%endif
|
||||
%dir %{_sysconfdir}/bash_completion.d
|
||||
%if !0%{?usrmerged}
|
||||
/bin/bash
|
||||
%if %{with alternatives}
|
||||
/bin/sh
|
||||
%endif
|
||||
%endif
|
||||
%{_bindir}/bash
|
||||
%{_bindir}/bashbug
|
||||
%{_bindir}/rbash
|
||||
%if %{with alternatives}
|
||||
%{_bindir}/sh
|
||||
%endif
|
||||
%dir %{_datadir}/bash
|
||||
%dir %{_datadir}/bash/helpfiles
|
||||
%{_datadir}/bash/helpfiles/*
|
||||
@ -525,6 +566,14 @@ fi
|
||||
%{_mandir}/man1/bashbug.1%{?ext_man}
|
||||
%{_mandir}/man1/rbash.1%{?ext_man}
|
||||
|
||||
%if %{without alternatives}
|
||||
%files sh
|
||||
%if !0%{?usrmerged}
|
||||
/bin/sh
|
||||
%endif
|
||||
%{_bindir}/sh
|
||||
%endif
|
||||
|
||||
%files lang -f bash.lang
|
||||
|
||||
%files doc
|
||||
|
Loading…
Reference in New Issue
Block a user