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