From b8dab559ef4c4a4a08b060ccd77e68d002e1236b Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Tue, 20 Feb 2018 11:50:33 +0530 Subject: [PATCH 160/180] common-ha: enable and disable selinux ganesha_use_fusefs Adding missing changes in a downstream backport(https://code.engineering.redhat.com/gerrit/#/c/109845/) Label: DOWNSTREAM ONLY Change-Id: I59fd2fc2228ded9547c2d1e08c22f7a10c35f86f BUG: 1544852 Signed-off-by: Jiffin Tony Thottan Reviewed-on: https://code.engineering.redhat.com/gerrit/130583 Tested-by: RHGS Build Bot Reviewed-by: Sunil Kumar Heggodu Gopala Acharya Reviewed-by: Milind Changire Reviewed-by: Atin Mukherjee --- glusterfs.spec.in | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/glusterfs.spec.in b/glusterfs.spec.in index a230b24..3181d72 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -409,11 +409,17 @@ Requires: pcs, dbus %if ( 0%{?rhel} && 0%{?rhel} == 6 ) Requires: cman, pacemaker, corosync %endif -%if ( 0%{?fedora} && 0%{?fedora} > 25 ) +%if ( ( 0%{?fedora} && 0%{?fedora} > 25 ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) ) +%if ( 0%{?rhel} ) Requires: selinux-policy >= 3.13.1-160 +Requires(post): policycoreutils-python +Requires(postun): policycoreutils-python +%else Requires(post): policycoreutils-python-utils Requires(postun): policycoreutils-python-utils %endif +%endif + %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 5 ) # we need portblock resource-agent in 3.9.5 and later. Requires: resource-agents >= 3.9.5 @@ -885,7 +891,7 @@ exit 0 %endif %if ( 0%{?_build_server} ) -%if ( 0%{?fedora} && 0%{?fedora} > 25 ) +%if ( 0%{?fedora} && 0%{?fedora} > 25 || ( 0%{?rhel} && 0%{?rhel} > 6 ) ) %post ganesha semanage boolean -m ganesha_use_fusefs --on exit 0 @@ -1015,7 +1021,7 @@ fi /sbin/ldconfig %if ( 0%{?_build_server} ) -%if ( 0%{?fedora} && 0%{?fedora} > 25 ) +%if ( 0%{?fedora} && 0%{?fedora} > 25 || ( 0%{?rhel} && 0%{?rhel} > 6 ) ) %postun ganesha semanage boolean -m ganesha_use_fusefs --off exit 0 @@ -1038,7 +1044,7 @@ exit 0 ## All %%trigger should be placed here and keep them sorted ## %if ( 0%{?_build_server} ) -%if ( 0%{?fedora} && 0%{?fedora} > 25 ) +%if ( 0%{?fedora} && 0%{?fedora} > 25 || ( 0%{?rhel} && 0%{?rhel} > 6 ) ) %trigger ganesha -- selinux-policy-targeted semanage boolean -m ganesha_use_fusefs --on exit 0 @@ -1049,7 +1055,7 @@ exit 0 ## All %%triggerun should be placed here and keep them sorted ## %if ( 0%{?_build_server} ) -%if ( 0%{?fedora} && 0%{?fedora} > 25 ) +%if ( 0%{?fedora} && 0%{?fedora} > 25 || ( 0%{?rhel} && 0%{?rhel} > 6 ) ) %triggerun ganesha -- selinux-policy-targeted semanage boolean -m ganesha_use_fusefs --off exit 0 -- 1.8.3.1