Add mysql-selinux package to slove the dependency of installing mysql-server
This commit is contained in:
parent
edca2b4c8b
commit
8c2d8275b4
BIN
1.0.0.tar.gz
Normal file
BIN
1.0.0.tar.gz
Normal file
Binary file not shown.
52
mysql-selinux.spec
Normal file
52
mysql-selinux.spec
Normal file
@ -0,0 +1,52 @@
|
||||
%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
|
||||
Loading…
x
Reference in New Issue
Block a user