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