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