https://bugzilla.redhat.com/show_bug.cgi?id=2052407
--- Comment #2 from Neal Gompa <ngompa13(a)gmail.com> ---
Requires: (%{name}-selinux = %{version}-%{release} if
selinux-policy-%{selinuxtype})
You can use just "selinux-policy" here instead.
Requires: selinux-policy-%{selinuxtype}
Requires(post): selinux-policy-%{selinuxtype}
This is redundant with %{?selinux_requires}
%pre selinux
# SELinux contexts are saved so that only affected files can be
# relabeled after the policy module installation
%selinux_relabel_pre -s %{selinuxtype}
%post selinux
%selinux_modules_install -s %{selinuxtype}
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
%selinux_relabel_post -s %{selinuxtype}
%postun selinux
if [ $1 -eq 0 ]; then
%selinux_modules_uninstall -s %{selinuxtype} %{name}
%selinux_relabel_post -s %{selinuxtype}
fi
You're assuming some kind of policy type, which is a bad assumption to make,
since these can be swapped.
You do not need to assume SELinux policy type, as seen here:
https://src.fedoraproject.org/rpms/snapd/blob/ff9639a57941497bac4272d06a9...
Also, install your policy module *above* the policy type, so it's available
regardless of policy type.
See an example of this here:
https://src.fedoraproject.org/rpms/snapd/blob/ff9639a57941497bac4272d06a9...
--
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2052407