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