d1681e
From b8dab559ef4c4a4a08b060ccd77e68d002e1236b 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
d1681e
Subject: [PATCH 160/180] 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
BUG: 1544852
d1681e
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
d1681e
Reviewed-on: https://code.engineering.redhat.com/gerrit/130583
d1681e
Tested-by: RHGS Build Bot <nigelb@redhat.com>
d1681e
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
d1681e
Reviewed-by: Milind Changire <mchangir@redhat.com>
d1681e
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
d1681e
---
d1681e
 glusterfs.spec.in | 16 +++++++++++-----
d1681e
 1 file changed, 11 insertions(+), 5 deletions(-)
d1681e
d1681e
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
d1681e
index a230b24..3181d72 100644
d1681e
--- a/glusterfs.spec.in
d1681e
+++ b/glusterfs.spec.in
d1681e
@@ -409,11 +409,17 @@ Requires:         pcs, dbus
d1681e
 %if ( 0%{?rhel} && 0%{?rhel} == 6 )
d1681e
 Requires:         cman, pacemaker, corosync
d1681e
 %endif
d1681e
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
d1681e
+%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
d1681e
+
d1681e
 %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 5 )
d1681e
 # we need portblock resource-agent in 3.9.5 and later.
d1681e
 Requires:         resource-agents >= 3.9.5
d1681e
@@ -885,7 +891,7 @@ exit 0
d1681e
 %endif
d1681e
 
d1681e
 %if ( 0%{?_build_server} )
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
d1681e
@@ -1015,7 +1021,7 @@ fi
d1681e
 /sbin/ldconfig
d1681e
 
d1681e
 %if ( 0%{?_build_server} )
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
d1681e
@@ -1038,7 +1044,7 @@ exit 0
d1681e
 ## All %%trigger should be placed here and keep them sorted
d1681e
 ##
d1681e
 %if ( 0%{?_build_server} )
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
d1681e
@@ -1049,7 +1055,7 @@ exit 0
d1681e
 ## All %%triggerun should be placed here and keep them sorted
d1681e
 ##
d1681e
 %if ( 0%{?_build_server} )
d1681e
-%if ( 0%{?fedora} && 0%{?fedora} > 25 )
d1681e
+%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