14f8ab
From a80743a3053798521ae4dd830adcde8bc7da11b6 Mon Sep 17 00:00:00 2001
14f8ab
From: Jiffin Tony Thottan <jthottan@redhat.com>
14f8ab
Date: Tue, 20 Feb 2018 11:50:33 +0530
14f8ab
Subject: [PATCH 083/124] common-ha: enable and disable selinux
14f8ab
 ganesha_use_fusefs
14f8ab
14f8ab
Adding missing changes in a downstream backport(https://code.engineering.redhat.com/gerrit/#/c/109845/)
14f8ab
14f8ab
Label: DOWNSTREAM ONLY
14f8ab
14f8ab
Change-Id: I59fd2fc2228ded9547c2d1e08c22f7a10c35f86f
14f8ab
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/167244
14f8ab
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
14f8ab
Reviewed-by: Kaleb Keithley <kkeithle@redhat.com>
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
14f8ab
---
14f8ab
 glusterfs.spec.in | 15 ++++++++++-----
14f8ab
 1 file changed, 10 insertions(+), 5 deletions(-)
14f8ab
14f8ab
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
14f8ab
index bc27058..2149f86 100644
14f8ab
--- a/glusterfs.spec.in
14f8ab
+++ b/glusterfs.spec.in
14f8ab
@@ -472,11 +472,16 @@ Requires:         resource-agents >= 3.9.5
14f8ab
 Requires:         net-tools
14f8ab
 %endif
14f8ab
 
14f8ab
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
14f8ab
+%if ( 0%{?fedora} && 0%{?fedora} > 25  || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
14f8ab
+%if ( 0%{?rhel} )
14f8ab
 Requires: selinux-policy >= 3.13.1-160
14f8ab
+Requires(post):   policycoreutils-python
14f8ab
+Requires(postun): policycoreutils-python
14f8ab
+%else
14f8ab
 Requires(post):   policycoreutils-python-utils
14f8ab
 Requires(postun): policycoreutils-python-utils
14f8ab
 %endif
14f8ab
+%endif
14f8ab
 
14f8ab
 %description ganesha
14f8ab
 GlusterFS is a distributed file-system capable of scaling to several
14f8ab
@@ -936,7 +941,7 @@ exit 0
14f8ab
 %endif
14f8ab
 
14f8ab
 %if ( 0%{!?_without_server:1} )
14f8ab
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
14f8ab
+%if ( 0%{?fedora} && 0%{?fedora} > 25 || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
14f8ab
 %post ganesha
14f8ab
 semanage boolean -m ganesha_use_fusefs --on
14f8ab
 exit 0
14f8ab
@@ -1076,7 +1081,7 @@ exit 0
14f8ab
 %endif
14f8ab
 
14f8ab
 %if ( 0%{!?_without_server:1} )
14f8ab
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
14f8ab
+%if ( 0%{?fedora} && 0%{?fedora} > 25  || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
14f8ab
 %postun ganesha
14f8ab
 semanage boolean -m ganesha_use_fusefs --off
14f8ab
 exit 0
14f8ab
@@ -1087,7 +1092,7 @@ exit 0
14f8ab
 ## All %%trigger should be placed here and keep them sorted
14f8ab
 ##
14f8ab
 %if ( 0%{!?_without_server:1} )
14f8ab
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
14f8ab
+%if ( 0%{?fedora} && 0%{?fedora} > 25  || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
14f8ab
 %trigger ganesha -- selinux-policy-targeted
14f8ab
 semanage boolean -m ganesha_use_fusefs --on
14f8ab
 exit 0
14f8ab
@@ -1098,7 +1103,7 @@ exit 0
14f8ab
 ## All %%triggerun should be placed here and keep them sorted
14f8ab
 ##
14f8ab
 %if ( 0%{!?_without_server:1} )
14f8ab
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
14f8ab
+%if ( 0%{?fedora} && 0%{?fedora} > 25  || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
14f8ab
 %triggerun ganesha -- selinux-policy-targeted
14f8ab
 semanage boolean -m ganesha_use_fusefs --off
14f8ab
 exit 0
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab