diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4701ab9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/mysql-selinux.tar.gz diff --git a/mysql-selinux.spec b/mysql-selinux.spec new file mode 100644 index 0000000..f3bd1a1 --- /dev/null +++ b/mysql-selinux.spec @@ -0,0 +1,62 @@ +# defining macros needed by SELinux +%global selinuxtype targeted +%global moduletype contrib +%global modulename mysql + +Name: mysql-selinux +Version: 1.0.0 +Release: 3%{?dist} +License: GPLv3 +URL: https://github.com/kubco2/mysql-selinux +Summary: SELinux policies for product +Source0: mysql-selinux.tar.gz +BuildArch: noarch +BuildRequires: selinux-policy-devel +%{?selinux_requires} + +%description +SELinux policy modules for product. + +%prep +%setup -q -n %{name} + +%pre +%selinux_relabel_pre -s %{selinuxtype} + +%build +make + +%install +# install policy modules +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 +* Mon Aug 20 2018 Jakub Janco - 1.0.0-3 +- reflect latest changes of mysql policy + +* Fri Jul 27 2018 Jakub Janco - 1.0.0-2 +- reflect latest changes of Independent Product Policy + +* Wed Jul 18 2018 Jakub Janco - 1.0.0-1 +- First Build + diff --git a/sources b/sources new file mode 100644 index 0000000..3b7a429 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mysql-selinux.tar.gz) = 728d8344deaa7622b5dcdeb5b5b9dd6488c27579a18ca8e053429b7148747e34d648b4ad155d1f088df5643d402675c9e6d4e54adb8de9061802bc9808ba56cc