firewalld fixes

This commit is contained in:
Kaleb S. KEITHLEY 2017-01-06 12:57:26 -05:00
parent 222bc9ec95
commit c1dc434dbb
2 changed files with 24 additions and 10 deletions

View File

@ -0,0 +1,11 @@
--- glusterfs-3.9.0/configure.ac.orig 2017-01-06 12:44:28.270940821 -0500
+++ glusterfs-3.9.0/configure.ac 2017-01-06 12:46:19.781940821 -0500
@@ -810,7 +810,7 @@
[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

View File

@ -168,7 +168,7 @@ Summary: Distributed File System
%if ( 0%{_for_fedora_koji_builds} ) %if ( 0%{_for_fedora_koji_builds} )
Name: glusterfs Name: glusterfs
Version: 3.9.0 Version: 3.9.0
Release: 1%{?prereltag:.%{prereltag}}%{?dist} Release: 2%{?prereltag:.%{prereltag}}%{?dist}
Vendor: Fedora Project Vendor: Fedora Project
%else %else
Name: @PACKAGE_NAME@ Name: @PACKAGE_NAME@
@ -190,6 +190,7 @@ Source8: glusterfsd.init
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
%endif %endif
Patch0: glusterfs-3.9.0rc2.api.glfs_free.patch Patch0: glusterfs-3.9.0rc2.api.glfs_free.patch
Patch1: glusterfs-3.9.0.configure.ac.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -234,7 +235,7 @@ BuildRequires: libattr-devel
%endif %endif
%if (0%{?_with_firewalld:1}) %if (0%{?_with_firewalld:1})
BuildRequires: firewalld BuildRequires: firewalld-filesystem
%endif %endif
Obsoletes: hekafs Obsoletes: hekafs
@ -599,6 +600,10 @@ Requires(preun): /sbin/service
Requires(preun): /sbin/chkconfig Requires(preun): /sbin/chkconfig
Requires(postun): /sbin/service Requires(postun): /sbin/service
%endif %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 ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 )
Requires: rpcbind Requires: rpcbind
%else %else
@ -627,6 +632,7 @@ This package provides the glusterfs server daemon.
%prep %prep
%setup -q -n %{name}-%{version}%{?prereltag} %setup -q -n %{name}-%{version}%{?prereltag}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
%if ( 0%{?rhel} && 0%{?rhel} < 6 ) %if ( 0%{?rhel} && 0%{?rhel} < 6 )
@ -859,10 +865,7 @@ if [ -e /etc/ld.so.conf.d/glusterfs.conf ]; then
fi fi
%if (0%{?_with_firewalld:1}) %if (0%{?_with_firewalld:1})
#reload service files if firewalld running %firewalld_reload
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 fi
%endif %endif
@ -945,10 +948,7 @@ exit 0
%postun server %postun server
/sbin/ldconfig /sbin/ldconfig
%if (0%{?_with_firewalld:1}) %if (0%{?_with_firewalld:1})
#reload service files if firewalld running %firewalld_reload
if $(systemctl is-active firewalld 1>/dev/null 2>&1); then
firewall-cmd --reload
fi
%endif %endif
exit 0 exit 0
@ -1289,6 +1289,9 @@ exit 0
%endif %endif
%changelog %changelog
* Fri Jan 6 2017 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.9.0-2
- firewalld fixes
* Tue Nov 15 2016 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.9.0-1 * Tue Nov 15 2016 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.9.0-1
- 3.9.0 GA - 3.9.0 GA
- w/ glfs_free(), needed for nfs-ganesha-2.4.1 w/ patched FSAL_GLUSTER - w/ glfs_free(), needed for nfs-ganesha-2.4.1 w/ patched FSAL_GLUSTER