a3470f
From b8dab559ef4c4a4a08b060ccd77e68d002e1236b Mon Sep 17 00:00:00 2001
a3470f
From: Jiffin Tony Thottan <jthottan@redhat.com>
a3470f
Date: Tue, 20 Feb 2018 11:50:33 +0530
a3470f
Subject: [PATCH 160/180] common-ha: enable and disable selinux
a3470f
 ganesha_use_fusefs
a3470f
a3470f
Adding missing changes in a downstream backport(https://code.engineering.redhat.com/gerrit/#/c/109845/)
a3470f
a3470f
Label: DOWNSTREAM ONLY
a3470f
a3470f
Change-Id: I59fd2fc2228ded9547c2d1e08c22f7a10c35f86f
a3470f
BUG: 1544852
a3470f
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/130583
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
a3470f
Reviewed-by: Milind Changire <mchangir@redhat.com>
a3470f
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
a3470f
---
a3470f
 glusterfs.spec.in | 16 +++++++++++-----
a3470f
 1 file changed, 11 insertions(+), 5 deletions(-)
a3470f
a3470f
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
a3470f
index a230b24..3181d72 100644
a3470f
--- a/glusterfs.spec.in
a3470f
+++ b/glusterfs.spec.in
a3470f
@@ -409,11 +409,17 @@ Requires:         pcs, dbus
a3470f
 %if ( 0%{?rhel} && 0%{?rhel} == 6 )
a3470f
 Requires:         cman, pacemaker, corosync
a3470f
 %endif
a3470f
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
a3470f
+%if ( ( 0%{?fedora} && 0%{?fedora} > 25 ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
a3470f
+%if ( 0%{?rhel} )
a3470f
 Requires: selinux-policy >= 3.13.1-160
a3470f
+Requires(post):   policycoreutils-python
a3470f
+Requires(postun): policycoreutils-python
a3470f
+%else
a3470f
 Requires(post):   policycoreutils-python-utils
a3470f
 Requires(postun): policycoreutils-python-utils
a3470f
 %endif
a3470f
+%endif
a3470f
+
a3470f
 %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 5 )
a3470f
 # we need portblock resource-agent in 3.9.5 and later.
a3470f
 Requires:         resource-agents >= 3.9.5
a3470f
@@ -885,7 +891,7 @@ exit 0
a3470f
 %endif
a3470f
 
a3470f
 %if ( 0%{?_build_server} )
a3470f
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
a3470f
+%if ( 0%{?fedora} && 0%{?fedora} > 25 || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
a3470f
 %post ganesha
a3470f
 semanage boolean -m ganesha_use_fusefs --on
a3470f
 exit 0
a3470f
@@ -1015,7 +1021,7 @@ fi
a3470f
 /sbin/ldconfig
a3470f
 
a3470f
 %if ( 0%{?_build_server} )
a3470f
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
a3470f
+%if ( 0%{?fedora} && 0%{?fedora} > 25  || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
a3470f
 %postun ganesha
a3470f
 semanage boolean -m ganesha_use_fusefs --off
a3470f
 exit 0
a3470f
@@ -1038,7 +1044,7 @@ exit 0
a3470f
 ## All %%trigger should be placed here and keep them sorted
a3470f
 ##
a3470f
 %if ( 0%{?_build_server} )
a3470f
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
a3470f
+%if ( 0%{?fedora} && 0%{?fedora} > 25  || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
a3470f
 %trigger ganesha -- selinux-policy-targeted
a3470f
 semanage boolean -m ganesha_use_fusefs --on
a3470f
 exit 0
a3470f
@@ -1049,7 +1055,7 @@ exit 0
a3470f
 ## All %%triggerun should be placed here and keep them sorted
a3470f
 ##
a3470f
 %if ( 0%{?_build_server} )
a3470f
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
a3470f
+%if ( 0%{?fedora} && 0%{?fedora} > 25 || ( 0%{?rhel} && 0%{?rhel} > 6 ) )
a3470f
 %triggerun ganesha -- selinux-policy-targeted
a3470f
 semanage boolean -m ganesha_use_fusefs --off
a3470f
 exit 0
a3470f
-- 
a3470f
1.8.3.1
a3470f