Add Requires(post) on policycoreutils for semodule and make sure post/postun cannot fail

This commit is contained in:
Kevin Fenzi 2019-01-10 12:23:05 -08:00
parent 45339f4452
commit 4f4cd0648d

View File

@ -5,13 +5,14 @@
Name: mysql-selinux Name: mysql-selinux
Version: 1.0.0 Version: 1.0.0
Release: 5%{?dist} Release: 6%{?dist}
License: GPLv3 License: GPLv3
URL: https://github.com/kubco2/mysql-selinux URL: https://github.com/kubco2/mysql-selinux
Summary: SELinux policies for product Summary: SELinux policies for product
Source0: mysql-selinux.tar.gz Source0: mysql-selinux.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: selinux-policy-devel BuildRequires: selinux-policy-devel
Requires(post): policycoreutils
%{?selinux_requires} %{?selinux_requires}
%description %description
@ -34,11 +35,11 @@ install -m 0644 %{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages
%check %check
%post %post
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{modulename}.pp.bz2 %selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{modulename}.pp.bz2 || :
%postun %postun
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
%selinux_modules_uninstall -s %{selinuxtype} %{modulename} %selinux_modules_uninstall -s %{selinuxtype} %{modulename} || :
fi fi
%posttrans %posttrans
@ -51,6 +52,9 @@ fi
%license COPYING %license COPYING
%changelog %changelog
* Thu Jan 10 2019 Kevin Fenzi <kevin@scrye.com> - 1.0.0-6
- Add Requires(post) on policycoreutils for semodule and make sure post/postun cannot fail
* Thu Dec 06 2018 Jakub Janco <jjanco@redhat.com> - 1.0.0-5 * Thu Dec 06 2018 Jakub Janco <jjanco@redhat.com> - 1.0.0-5
- Sync with upstream - Sync with upstream