Set SELinux policy to permissive for insights_client_t module

Signed-off-by: Alba Hita Catala <ahitacat@redhat.com>

Resolves:rhbz#2141443
This commit is contained in:
Alba Hita Catala 2022-11-11 15:10:58 +01:00
parent fd806927e5
commit eb84bc9b92

View File

@ -3,7 +3,7 @@
Name: insights-client
Summary: Uploads Insights information to Red Hat on a periodic basis
Version: 3.1.7
Release: 11%{?dist}
Release: 12%{?dist}
Source0: https://github.com/RedHatInsights/insights-client/releases/download/v%{version}/insights-client-%{version}.tar.gz
Source1: https://api.access.redhat.com/r/insights/v1/static/core/insights-core.egg
Source2: https://api.access.redhat.com/r/insights/v1/static/core/insights-core.egg.asc
@ -44,6 +44,7 @@ BuildRequires: python3-devel
BuildRequires: platform-python-devel
BuildRequires: systemd
BuildRequires: pam
Requires(post): policycoreutils-python-utils
%description
@ -83,7 +84,7 @@ if [ -d %{_sysconfdir}/motd.d ]; then
fi
fi
semanage permissive --add insights_client_t
%preun
%systemd_preun %{name}.timer
@ -95,6 +96,10 @@ fi
%systemd_postun %{name}.service
%systemd_postun %{name}-boot.service
if [ $1 -eq 0 ]; then
%{_sbindir}/semanage permissive -d insights_client_t || true
fi
# Clean up files created by insights-client that are unowned by the RPM
if [ $1 -eq 0 ]; then
rm -f %{_sysconfdir}/cron.daily/insights-client
@ -136,6 +141,9 @@ rm -rf %{buildroot}
%changelog
* Thu Nov 10 2022 Alba Hita Catala <ahitacat@redhat.com> 0:3.1.7-12
- Set SELinux policy to permissive for rhcd_t module (RHBZ#2141443)
* Wed Nov 09 2022 Link Dupont <link@redhat.com> 0:3.1.7-11
- Include insights-core.egg as RPM source (RHBZ#2141087)