Use epoch in version dependency.

Provide SELinux scriptlets.
This commit is contained in:
Bojan Smojver 2017-04-13 15:22:09 +10:00
parent 294ba5281a
commit 4b1af7e079

View File

@ -7,7 +7,7 @@ Summary: Open source remote desktop protocol (RDP) server
Name: xrdp
Epoch: 1
Version: 0.9.2
Release: 9%{?dist}
Release: 10%{?dist}
License: ASL 2.0
Group: Applications/Internet
URL: http://www.xrdp.org/
@ -66,8 +66,10 @@ talk to xrdp.
%package selinux
Summary: SELinux policy module required tu run xrdp
Requires: %{name} = %{version}-%{release}
Requires: selinux-policy >= %{_selinux_policy_version}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: selinux-policy >= %{_selinux_policy_version}
Requires(post): /usr/sbin/semodule
Requires(postun): /usr/sbin/semodule
%description selinux
This package contains SELinux policy module necessary to run xrdp.
@ -166,6 +168,21 @@ fi
chmod 400 %{_sysconfdir}/xrdp/cert.pem
chmod 400 %{_sysconfdir}/xrdp/key.pem
%post selinux
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -i \
%{_datadir}/selinux/${selinuxvariant}/%{name}.pp &> /dev/null || :
done
%postun selinux
if [ $1 -eq 0 ] ; then
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -r %{name} &> /dev/null || :
done
fi
%files
%doc COPYING *.txt README.Fedora
@ -239,6 +256,10 @@ chmod 400 %{_sysconfdir}/xrdp/key.pem
%{_datadir}/selinux/*/%{name}.pp
%changelog
* Thu Apr 13 2017 Bojan Smojver <bojan@rexurive.com> - 1:0.9.2-10
- Use epoch in version dependency
- Provide selinux sub-package scriptlets
* Thu Apr 13 2017 Bojan Smojver <bojan@rexurive.com> - 1:0.9.2-9
- Adjust Fedora README file for SELinux changes