50dc83
From f410cd9f9b9455373a9612423558d8d0f83cd0fc Mon Sep 17 00:00:00 2001
e7a346
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
e7a346
Date: Wed, 12 Jul 2017 07:43:51 -0400
50dc83
Subject: [PATCH 070/124] packaging: glusterfs-ganesha update sometimes fails
e7a346
 semanage
e7a346
e7a346
Depending on how dnf orders updates, the updated version of
e7a346
selinux-policy-targeted with ganesha_use_fusefs may not be updated
e7a346
before the glusterfs-ganesha update execute its %post scriptlet
e7a346
containing the `semanage ganesha_use_fusefs ...` command. In such
e7a346
situations the semanage command (silently) fails.
e7a346
e7a346
Use a %trigger (and %triggerun) to run the scriptlet (again) after
e7a346
selinux-policy-targeted with ganesha_use_fusefs has been installed
e7a346
or updated.
e7a346
e7a346
Note: the %triggerun is probably unnecessary, but it doesn't hurt.
e7a346
e7a346
The release-3.10 branch is the "upstream master" for the glusterfs-
e7a346
ganesha subpackage.
e7a346
e7a346
Note: to be merged after https://review.gluster.org/17806
e7a346
50dc83
Label: DOWNSTREAM ONLY
50dc83
e7a346
Change-Id: I1ad06d79fa1711e4abf038baf9f0a5b7bb665934
e7a346
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
e7a346
Reviewed-on: https://review.gluster.org/17756
e7a346
Smoke: Gluster Build System <jenkins@build.gluster.org>
e7a346
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
e7a346
Reviewed-by: Niels de Vos <ndevos@redhat.com>
e7a346
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
50dc83
Reviewed-on: https://code.engineering.redhat.com/gerrit/167155
50dc83
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
50dc83
Tested-by: RHGS Build Bot <nigelb@redhat.com>
50dc83
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
---
50dc83
 glusterfs.spec.in | 22 ++++++++++++++++++++++
50dc83
 1 file changed, 22 insertions(+)
e7a346
e7a346
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
50dc83
index b01c94f..1d99a3d 100644
e7a346
--- a/glusterfs.spec.in
e7a346
+++ b/glusterfs.spec.in
50dc83
@@ -1077,6 +1077,28 @@ exit 0
e7a346
 %endif
e7a346
 
e7a346
 ##-----------------------------------------------------------------------------
e7a346
+## All %%trigger should be placed here and keep them sorted
e7a346
+##
50dc83
+%if ( 0%{!?_without_server:1} )
e7a346
+%if ( 0%{?fedora} && 0%{?fedora} > 25 )
e7a346
+%trigger ganesha -- selinux-policy-targeted
e7a346
+semanage boolean -m ganesha_use_fusefs --on
e7a346
+exit 0
e7a346
+%endif
50dc83
+%endif
e7a346
+
e7a346
+##-----------------------------------------------------------------------------
e7a346
+## All %%triggerun should be placed here and keep them sorted
e7a346
+##
50dc83
+%if ( 0%{!?_without_server:1} )
e7a346
+%if ( 0%{?fedora} && 0%{?fedora} > 25 )
e7a346
+%triggerun ganesha -- selinux-policy-targeted
e7a346
+semanage boolean -m ganesha_use_fusefs --off
e7a346
+exit 0
e7a346
+%endif
50dc83
+%endif
e7a346
+
e7a346
+##-----------------------------------------------------------------------------
e7a346
 ## All %%files should be placed here and keep them grouped
e7a346
 ##
e7a346
 %files
e7a346
-- 
e7a346
1.8.3.1
e7a346