Blob Blame History Raw
From f28df85573914d1ccb57fdc7bae5121a9a24576c Mon Sep 17 00:00:00 2001
From: Federico Simoncelli <fsimonce@redhat.com>
Date: Tue, 11 Dec 2012 04:01:21 -0500
Subject: [PATCH 13/22] spec: require policycoreutils and skip sebool errors

In order to avoid a policycoreutils bug (rhbz 883355) when selinux is
disabled we now require the version 2.1.13-44 (or newer) of Fedora.
Additionally we now skip any error in the rpm scriptlets for the sebool
configuration (sebool-config) since they could interfere with the rpm
installation potentially leaving multiple packages installed.

Change-Id: Iefd5f53c9118eeea6817ce9660ea18abcfd1955c
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/9840
Reviewed-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/11363
---
 vdsm.spec.in | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/vdsm.spec.in b/vdsm.spec.in
index 5b13419..e153880 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -131,6 +131,12 @@ Requires: selinux-policy-targeted >= 3.10.0-149
 Requires: lvm2 >= 2.02.95
 %endif
 
+# In order to avoid a policycoreutils bug (rhbz 883355) when selinux is
+# disabled we now require the version 2.1.13-44 (or newer) of Fedora.
+%if 0%{?fedora} >= 18
+Requires: policycoreutils >= 2.1.13-44
+%endif
+
 Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client
 Requires: psmisc >= 22.6-15
 Requires: fence-agents
@@ -479,7 +485,7 @@ export LC_ALL=C
 /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user}
 
 %post
-%{_bindir}/vdsm-tool sebool-config
+%{_bindir}/vdsm-tool sebool-config || :
 # set the vdsm "secret" password for libvirt
 %{_bindir}/vdsm-tool set-saslpasswd
 
@@ -521,7 +527,7 @@ then
     /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \
         /etc/sysctl.conf
 
-    %{_bindir}/vdsm-tool sebool-unconfig
+    %{_bindir}/vdsm-tool sebool-unconfig || :
 
     /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@ovirt
 
-- 
1.8.1