From d08e4992568b50e9bfbaa857a14dcbc789f96533 Mon Sep 17 00:00:00 2001 From: Alba Hita Catala Date: Wed, 23 Aug 2023 10:03:43 +0200 Subject: [PATCH] insights-client-3.2.0-2 Changelog: - Remove setting selinux permissive insights_client_t scripts Resolves: RHBZ#2226684 Signed-off-by: Alba Hita Catala --- insights-client.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/insights-client.spec b/insights-client.spec index dcf599d..5726eac 100644 --- a/insights-client.spec +++ b/insights-client.spec @@ -5,7 +5,7 @@ Name: insights-client Summary: Uploads Insights information to Red Hat on a periodic basis Version: 3.2.0 -Release: 1%{?dist} +Release: 2%{?dist} Source0: https://github.com/RedHatInsights/insights-client/releases/download/v%{version}/insights-client-%{version}.tar.xz Epoch: 0 License: GPLv2+ @@ -27,6 +27,7 @@ Requires: python3-magic Requires: python3-six Requires: python3dist(setuptools) Requires: coreutils +Requires: ((selinux-policy >= 38.1.21-1) if selinux-policy) BuildRequires: wget BuildRequires: binutils @@ -72,8 +73,11 @@ if [ -d %{_sysconfdir}/motd.d ]; then fi fi -if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then - /usr/sbin/semanage permissive --add insights_client_t || true +if [ $1 -eq 2 ]; then + /usr/sbin/semanage permissive --list | grep -q 'insights_client_t' + if [ $? -eq 0 ]; then + /usr/sbin/semanage permissive -q --delete insights_client_t + fi fi %preun @@ -86,12 +90,6 @@ fi %systemd_postun %{name}.service %systemd_postun %{name}-boot.service -if [ $1 -eq 0 ]; then - if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then - /usr/sbin/semanage permissive --delete insights_client_t || true - fi -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 @@ -135,6 +133,9 @@ rm -rf %{buildroot} %changelog +* Wed Aug 23 2023 Alba Hita Catala - 0:3.2.0-2 +- Remove setting selinux permissive insights_client_t scripts (RHBZ#2226684) + * Fri Jun 23 2023 Alba Hita Catala - 0:3.2.0-1 - Add logrotate (RHBZ#2189281) - Fix constant not imported (RHBZ#2091919)