Accepting request 927737 from home:schubi2:Factory
- Using package bash-sh instead of the update-alternative mechanism. - removed BuildRequires: /bin/sh OBS-URL: https://build.opensuse.org/request/show/927737 OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=335
This commit is contained in:
parent
9650f7fc85
commit
3c7b1f94d6
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
Thu Sep 30 13:42:48 UTC 2021 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
48
bash.spec
48
bash.spec
@ -16,6 +16,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_with alternatives
|
||||||
|
%else
|
||||||
|
%bcond_without alternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
%define bextend %{nil}
|
%define bextend %{nil}
|
||||||
%define bversion 5.1
|
%define bversion 5.1
|
||||||
%define bpatchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir})
|
%define bpatchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir})
|
||||||
@ -81,17 +87,26 @@ BuildRequires: patchutils
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: screen
|
BuildRequires: screen
|
||||||
BuildRequires: sed
|
BuildRequires: sed
|
||||||
|
%if %{with alternatives}
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
|
%endif
|
||||||
BuildRequires: pkgconfig(audit)
|
BuildRequires: pkgconfig(audit)
|
||||||
BuildRequires: pkgconfig(ncurses)
|
BuildRequires: pkgconfig(ncurses)
|
||||||
# This has to be always the same version as included in the bash its self
|
# This has to be always the same version as included in the bash its self
|
||||||
BuildRequires: pkgconfig(readline) = 8.1
|
BuildRequires: pkgconfig(readline) = 8.1
|
||||||
|
%if %{with alternatives}
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun):update-alternatives
|
||||||
|
%endif
|
||||||
Suggests: bash-doc = %{version}
|
Suggests: bash-doc = %{version}
|
||||||
Suggests: command-not-found
|
Suggests: command-not-found
|
||||||
Provides: /bin/bash
|
Provides: /bin/bash
|
||||||
|
%if %{with alternatives}
|
||||||
Provides: /bin/sh
|
Provides: /bin/sh
|
||||||
|
%else
|
||||||
|
Requires: /usr/bin/sh
|
||||||
|
Suggests: bash-sh
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Bash is an sh-compatible command interpreter that executes commands
|
Bash is an sh-compatible command interpreter that executes commands
|
||||||
@ -113,6 +128,17 @@ interpreter Bash.
|
|||||||
|
|
||||||
%lang_package
|
%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
|
%package devel
|
||||||
Summary: Include Files mandatory for Development of bash loadable builtins
|
Summary: Include Files mandatory for Development of bash loadable builtins
|
||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
@ -444,7 +470,9 @@ test ${rl1[2]} = ${rl2[2]} || exit 1
|
|||||||
mv -vf %{buildroot}%{_ldldir}/*.inc %{buildroot}%{_datadir}/bash
|
mv -vf %{buildroot}%{_ldldir}/*.inc %{buildroot}%{_datadir}/bash
|
||||||
rm -rf %{buildroot}/%{_lib}/pkgconfig
|
rm -rf %{buildroot}/%{_lib}/pkgconfig
|
||||||
sed -ri '/CC = gcc/s@(CC = gcc).*@\1@' %{buildroot}%{_libdir}/pkgconfig/bash.pc
|
sed -ri '/CC = gcc/s@(CC = gcc).*@\1@' %{buildroot}%{_libdir}/pkgconfig/bash.pc
|
||||||
|
%if %{with alternatives}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
|
%endif
|
||||||
#
|
#
|
||||||
# It should be noted that the move of /bin/bash to /usr/bin/bash
|
# 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
|
# had NOT done by me at 2019/02/08. Now only a symbolic link
|
||||||
@ -455,7 +483,11 @@ test ${rl1[2]} = ${rl2[2]} || exit 1
|
|||||||
ln -sf %{_bindir}/bash %{buildroot}/bin/bash
|
ln -sf %{_bindir}/bash %{buildroot}/bin/bash
|
||||||
ln -sf %{_bindir}/sh %{buildroot}/bin/sh
|
ln -sf %{_bindir}/sh %{buildroot}/bin/sh
|
||||||
ln -sf bash %{buildroot}%{_bindir}/rbash
|
ln -sf bash %{buildroot}%{_bindir}/rbash
|
||||||
|
%if %{with alternatives}
|
||||||
ln -sf %{_sysconfdir}/alternatives/sh %{buildroot}%{_bindir}/sh
|
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 COMPAT NEWS %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 COPYING %{buildroot}%{_docdir}/%{name}
|
install -m 644 COPYING %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 doc/FAQ %{buildroot}%{_docdir}/%{name}
|
install -m 644 doc/FAQ %{buildroot}%{_docdir}/%{name}
|
||||||
@ -493,6 +525,7 @@ EOF
|
|||||||
%fdupes -s %{buildroot}%{_datadir}/bash/helpfiles
|
%fdupes -s %{buildroot}%{_datadir}/bash/helpfiles
|
||||||
sed -ri '1{ s@/bin/sh@/bin/bash@ }' %{buildroot}%{_bindir}/bashbug
|
sed -ri '1{ s@/bin/sh@/bin/bash@ }' %{buildroot}%{_bindir}/bashbug
|
||||||
|
|
||||||
|
%if %{with alternatives}
|
||||||
%post -p %{_bindir}/bash
|
%post -p %{_bindir}/bash
|
||||||
%{_sbindir}/update-alternatives --quiet --force \
|
%{_sbindir}/update-alternatives --quiet --force \
|
||||||
--install %{_bindir}/sh sh %{_bindir}/bash 10100
|
--install %{_bindir}/sh sh %{_bindir}/bash 10100
|
||||||
@ -501,22 +534,29 @@ EOF
|
|||||||
if test "$1" = 0; then
|
if test "$1" = 0; then
|
||||||
%{_sbindir}/update-alternatives --quiet --remove sh %{_bindir}/bash
|
%{_sbindir}/update-alternatives --quiet --remove sh %{_bindir}/bash
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%config %attr(600,root,root) %{_sysconfdir}/skel/.bash_history
|
%config %attr(600,root,root) %{_sysconfdir}/skel/.bash_history
|
||||||
%config %attr(644,root,root) %{_sysconfdir}/skel/.bashrc
|
%config %attr(644,root,root) %{_sysconfdir}/skel/.bashrc
|
||||||
%config %attr(644,root,root) %{_sysconfdir}/skel/.profile
|
%config %attr(644,root,root) %{_sysconfdir}/skel/.profile
|
||||||
|
%if %{with alternatives}
|
||||||
%ghost %config %{_sysconfdir}/alternatives/sh
|
%ghost %config %{_sysconfdir}/alternatives/sh
|
||||||
|
%endif
|
||||||
%dir %{_sysconfdir}/bash_completion.d
|
%dir %{_sysconfdir}/bash_completion.d
|
||||||
%if !0%{?usrmerged}
|
%if !0%{?usrmerged}
|
||||||
/bin/bash
|
/bin/bash
|
||||||
|
%if %{with alternatives}
|
||||||
/bin/sh
|
/bin/sh
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%{_bindir}/bash
|
%{_bindir}/bash
|
||||||
%{_bindir}/bashbug
|
%{_bindir}/bashbug
|
||||||
%{_bindir}/rbash
|
%{_bindir}/rbash
|
||||||
|
%if %{with alternatives}
|
||||||
%{_bindir}/sh
|
%{_bindir}/sh
|
||||||
|
%endif
|
||||||
%dir %{_datadir}/bash
|
%dir %{_datadir}/bash
|
||||||
%dir %{_datadir}/bash/helpfiles
|
%dir %{_datadir}/bash/helpfiles
|
||||||
%{_datadir}/bash/helpfiles/*
|
%{_datadir}/bash/helpfiles/*
|
||||||
@ -525,6 +565,14 @@ fi
|
|||||||
%{_mandir}/man1/bashbug.1%{?ext_man}
|
%{_mandir}/man1/bashbug.1%{?ext_man}
|
||||||
%{_mandir}/man1/rbash.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 lang -f bash.lang
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
|
Loading…
Reference in New Issue
Block a user