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