a7f188
%global selinuxtype targeted
a7f188
%global moduletype contrib
a7f188
%global modulename glusterd
a7f188
a7f188
a7f188
Name:		glusterfs-selinux
a7f188
Version:	0.1.0
a7f188
Release:	3%{?dist}
a7f188
Summary:	Glusterfs targeted SELinux policy
a7f188
a7f188
License:	GPLv2
a7f188
URL:		https://github.com/gluster/glusterfs-selinux
a7f188
Source0:	https://github.com/gluster/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
a7f188
a7f188
BuildArch:      noarch
a7f188
BuildRequires:  git
a7f188
Requires:       selinux-policy-targeted
a7f188
Requires(post): selinux-policy-targeted
a7f188
BuildRequires:  pkgconfig(systemd)
a7f188
BuildRequires:  selinux-policy-devel
a7f188
Requires(post): selinux-policy-targeted
a7f188
Requires(post): libselinux-utils
a7f188
Requires(post): policycoreutils
a7f188
%{?selinux_requires}
a7f188
a7f188
a7f188
%description
a7f188
SELinux targeted policy modules for glusterfs
a7f188
a7f188
a7f188
%prep
a7f188
%setup -q -n %{name}-%{version}
a7f188
a7f188
a7f188
%build
a7f188
make %{?_smp_mflags}
a7f188
a7f188
a7f188
%install
a7f188
%make_install
a7f188
a7f188
a7f188
%pre
a7f188
%selinux_relabel_pre -s %{selinuxtype}
a7f188
a7f188
a7f188
%post
a7f188
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2
a7f188
a7f188
a7f188
%postun
a7f188
if [ $1 -eq 0 ]; then
a7f188
    %selinux_modules_uninstall -s %{selinuxtype} %{modulename}
a7f188
fi
a7f188
a7f188
a7f188
%posttrans
a7f188
%selinux_relabel_post -s %{selinuxtype}
a7f188
a7f188
a7f188
%files
a7f188
%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.*
a7f188
%{_datadir}/selinux/devel/include/%{moduletype}/ipp-%{modulename}.if
a7f188
%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename}
a7f188
a7f188
a7f188
a7f188
%changelog
a7f188
* Thu Jan 14 2021 Niels de Vos <ndevos@redhat.com> - 0.1.0-3
a7f188
- import into CentOS Storage SIG
a7f188
- correct reference to source tarball
a7f188
a7f188
* Thu May 07 2020 Vit Mojzis <vmojzis@redhat.com> - 0.1.0-2
a7f188
- Update based on DSP guidelines
a7f188
  https://fedoraproject.org/wiki/SELinux/IndependentPolicy
a7f188
a7f188
* Thu Nov 15 2018 Milind Changire <mchangir@redhat.com> - 0.1.0-2
a7f188
- corrections toward review request comments from misc - bz#1649713
a7f188
a7f188
* Mon Jul 02 2018 Milind Changire <mchangir@redhat.com> - 0.1.0-1
a7f188
- first build
a7f188