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