53 lines
1.2 KiB
RPMSpec
53 lines
1.2 KiB
RPMSpec
%global selinuxtype targeted
|
|
%global moduletype contrib
|
|
%global modulename mysql
|
|
Name: mysql-selinux
|
|
Version: 1.0.0
|
|
Release: 1
|
|
License: GPLv3
|
|
URL: https://github.com/kubco2/mysql-selinux
|
|
Summary: SELinux policies for product
|
|
Source0: https://github.com/kubco2/mysql-selinux/archive/1.0.0.tar.gz
|
|
BuildArch: noarch
|
|
BuildRequires: selinux-policy-devel
|
|
Requires(post): policycoreutils
|
|
%{?selinux_requires}
|
|
%description
|
|
SELinux policy modules for product.
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version}
|
|
|
|
%pre
|
|
%selinux_relabel_pre -s %{selinuxtype}
|
|
|
|
%build
|
|
make
|
|
|
|
%install
|
|
install -d %{buildroot}%{_datadir}/selinux/packages
|
|
install -m 0644 %{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages
|
|
|
|
%check
|
|
|
|
%post
|
|
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{modulename}.pp.bz2 || :
|
|
|
|
%postun
|
|
if [ $1 -eq 0 ]; then
|
|
%selinux_modules_uninstall -s %{selinuxtype} %{modulename} || :
|
|
fi
|
|
|
|
%posttrans
|
|
%selinux_relabel_post -s %{selinuxtype} || :
|
|
|
|
%files
|
|
%defattr(-,root,root,0755)
|
|
%attr(0644,root,root) %{_datadir}/selinux/packages/%{modulename}.pp.bz2
|
|
%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename}
|
|
%license COPYING
|
|
|
|
%changelog
|
|
* Tue Jul 21 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.0.0-1
|
|
- package init
|