From 60acdbd87a2c3d5bf1b199b91a7d154467fe1b79 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 10 Jan 2017 10:49:07 +0100 Subject: rpm: depend on firewalld-filesystem for directory ownership Also use the %firewalld_reload macro that is provided by the firewalld-filesystem package. Cherry picked from commit f99750b4477538cd1f97ce6340e1813202f986e2: > BUG: 1410853 > Change-Id: Ibbbc18cc394f8b1e5ba74927effc41c466667479 > Signed-off-by: Niels de Vos > Reviewed-on: http://review.gluster.org/16351 > Smoke: Gluster Build System > Tested-by: Kaleb KEITHLEY > CentOS-regression: Gluster Build System > NetBSD-regression: NetBSD Build System > Reviewed-by: Kaleb KEITHLEY Change-Id: Ibbbc18cc394f8b1e5ba74927effc41c466667479 BUG: 1410854 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/16369 Reviewed-by: Kaleb KEITHLEY Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- configure.ac | 2 +- glusterfs.spec.in | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 591ba3e0b9f..df8891277be 100644 --- a/configure.ac +++ b/configure.ac @@ -810,7 +810,7 @@ AC_ARG_ENABLE([firewalld], [BUILD_FIREWALLD="${enableval}"], [BUILD_FIREWALLD="no"]) if test "x${BUILD_FIREWALLD}" = "xyes"; then - if !(which firewalld 1>/dev/null 2>&1) ; then + if !(test -d /usr/lib/firewalld/services 1>/dev/null 2>&1) ; then BUILD_FIREWALLD="no (firewalld not installed)" fi fi diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 20f39462b5e..e70c38bfac0 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -229,7 +229,7 @@ BuildRequires: libattr-devel %endif %if (0%{?_with_firewalld:1}) -BuildRequires: firewalld +BuildRequires: firewalld-filesystem %endif Obsoletes: hekafs @@ -544,6 +544,10 @@ Requires(preun): /sbin/service Requires(preun): /sbin/chkconfig Requires(postun): /sbin/service %endif +%if (0%{?_with_firewalld:1}) +# we install firewalld rules, so we need to have the directory owned +Requires: firewalld-filesystem +%endif %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) Requires: rpcbind %else @@ -838,11 +842,7 @@ if [ -e /etc/ld.so.conf.d/glusterfs.conf ]; then fi %if (0%{?_with_firewalld:1}) -#reload service files if firewalld running -if $(systemctl is-active firewalld 1>/dev/null 2>&1); then - #firewalld-filesystem is not available for rhel7, so command used for reload. - firewall-cmd --reload 1>/dev/null 2>&1 -fi + %firewalld_reload %endif pidof -c -o %PPID -x glusterd &> /dev/null @@ -921,9 +921,7 @@ exit 0 %postun server /sbin/ldconfig %if (0%{?_with_firewalld:1}) -#reload service files if firewalld running -if $(systemctl is-active firewalld 1>/dev/null 2>&1); then - firewall-cmd --reload + %firewalld_reload fi %endif exit 0 @@ -1256,6 +1254,9 @@ exit 0 %endif %changelog +* Fri Jan 6 2017 Niels de Vos +- use macro provided by firewalld-filesystem to reload firewalld + * Thu Dec 7 2016 Jiffin Tony Thottan - remove S31ganesha-reset.sh from hooks (#1402366) -- cgit