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