Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/booth.spec b/booth.spec
index 21d39bc..ea5cd8c 100644
--- a/booth.spec
+++ b/booth.spec
@@ -1,214 +1,221 @@
%bcond_with html_man
%if 0%{?fedora} > 18 || 0%{?centos} > 6 || 0%{?rhel} > 6
%bcond_with glue
%else
%bcond_without glue
%endif
%if 0%{?suse_version}
%global booth_docdir %{_defaultdocdir}/%{name}
%else
# newer fedora distros have _pkgdocdir, rely on that when
# available
%{!?_pkgdocdir: %global _pkgdocdir %%{_docdir}/%{name}-%{version}}
# Directory where we install documentation
%global booth_docdir %{_pkgdocdir}
%endif
%global test_path %{_datadir}/booth/tests
%if 0%{?suse_version}
%define _libexecdir %{_libdir}
+%define _fwdefdir %{_libexecdir}/firewalld/services
%endif
%define with_extra_warnings 0
%define with_debugging 0
%define without_fatal_warnings 1
-%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
%if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
%define pkg_group System Environment/Daemons
%else
%define pkg_group Productivity/Clustering/HA
%endif
Name: booth
Url: https://github.com/ClusterLabs/booth
Summary: Ticket Manager for Multi-site Clusters
%if 0%{?suse_version}
License: GPL-2.0+
%else
License: GPLv2+
%endif
Group: %{pkg_group}
Version: 1.0
Release: 0
Source: booth.tar.bz2
Source1: %name-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: asciidoc
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: pkgconfig
%if 0%{?suse_version}
BuildRequires: glib2-devel
+# SuSEFirewall2 replaced by Firewalld (fate#323460)
+BuildRequires: firewall-macros
%else
BuildRequires: pkgconfig(glib-2.0)
%endif
BuildRequires: libgcrypt-devel
%if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
BuildRequires: pacemaker-libs-devel
%else
BuildRequires: libpacemaker-devel
%endif
%if 0%{?with_glue}
%if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
BuildRequires: cluster-glue-libs-devel
%else
BuildRequires: libglue-devel
%endif
%else
# logging provider
BuildRequires: pkgconfig(libqb)
# random2range provider
BuildRequires: pkgconfig(glib-2.0)
# nametag provider
BuildRequires: pkgconfig(libsystemd)
%endif
BuildRequires: libxml2-devel
BuildRequires: zlib-devel
%if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
Requires: pacemaker >= 1.1.8
%if 0%{?with_glue}
Requires: cluster-glue-libs >= 1.0.6
%endif
%else
Requires: pacemaker-ticket-support >= 2.0
%endif
%description
Booth manages tickets which authorize cluster sites located in
geographically dispersed locations to run resources. It
facilitates support of geographically distributed clustering in
Pacemaker.
%prep
%setup -q -n %{name}
%build
./autogen.sh
%configure \
--with-initddir=%{_initrddir} \
--docdir=%{booth_docdir} \
%{!?with_html_man:--without-html_man} \
%{!?with_glue:--without-glue}
make
%install
make DESTDIR=$RPM_BUILD_ROOT install docdir=%{booth_docdir}
mkdir -p %{buildroot}/%{_mandir}/man8/
gzip < docs/boothd.8 > %{buildroot}/%{_mandir}/man8/booth.8.gz
ln %{buildroot}/%{_mandir}/man8/booth.8.gz %{buildroot}/%{_mandir}/man8/boothd.8.gz
%if %{defined _unitdir}
# systemd
mkdir -p %{buildroot}/%{_unitdir}
cp -a conf/booth@.service %{buildroot}/%{_unitdir}/booth@.service
cp -a conf/booth-arbitrator.service %{buildroot}/%{_unitdir}/booth-arbitrator.service
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcbooth-arbitrator
%else
# sysV init
ln -s ../../%{_initddir}/booth-arbitrator %{buildroot}%{_sbindir}/rcbooth-arbitrator
%endif
#install test-parts
mkdir -p %{buildroot}/%{test_path}/conf
cp -a unit-tests/ script/unit-test.py test %{buildroot}/%{test_path}/
cp -a conf/booth.conf.example %{buildroot}/%{test_path}/conf/
chmod +x %{buildroot}/%{test_path}/test/booth_path
chmod +x %{buildroot}/%{test_path}/test/live_test.sh
mkdir -p %{buildroot}/%{test_path}/src/
ln -s %{_sbindir}/boothd %{buildroot}/%{test_path}/src/
rm -f %{buildroot}/%{test_path}/test/*.pyc
%if 0%{?suse_version}
-#SUSE firewall rule
+#Firewalld rule
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
-install -m 644 contrib/geo-cluster.fwd $RPM_BUILD_ROOT/%{_fwdefdir}/booth
+install -m 644 contrib/geo-cluster.firewalld.xml $RPM_BUILD_ROOT/%{_fwdefdir}/booth.xml
#install -m 644 %{S:2} $RPM_BUILD_ROOT/%{_fwdefdir}/booth
+
+%post
+%firewalld_reload
%endif
%check
%if 0%{?run_build_tests}
echo "%%run_build_tests set to %run_build_tests; including tests"
make check
%else
echo "%%run_build_tests set to %run_build_tests; skipping tests"
%endif
%files
%defattr(-,root,root,-)
%{_sbindir}/booth
%{_sbindir}/boothd
%{_sbindir}/booth-keygen
%{_sbindir}/geostore
%{_mandir}/man8/booth.8.gz
%{_mandir}/man8/boothd.8.gz
%{_mandir}/man8/booth-keygen.8.gz
%{_mandir}/man8/geostore.8.gz
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
%dir /usr/lib/ocf/resource.d/pacemaker
%dir /usr/lib/ocf/resource.d/booth
%dir /usr/lib/ocf/lib
%dir /usr/lib/ocf/lib/booth
%dir %{_sysconfdir}/booth
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/booth/
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/booth/cores
%{_sbindir}/rcbooth-arbitrator
/usr/lib/ocf/resource.d/pacemaker/booth-site
/usr/lib/ocf/lib/booth/geo_attr.sh
/usr/lib/ocf/resource.d/booth/geostore
%config %{_sysconfdir}/booth/booth.conf.example
%if 0%{?suse_version}
-%config %{_fwdefdir}/booth
+%dir %{_libexecdir}/firewalld
+%dir %{_fwdefdir}
+%{_fwdefdir}/booth.xml
%endif
%if %{defined _unitdir}
%{_unitdir}/booth@.service
%{_unitdir}/booth-arbitrator.service
%exclude %{_initddir}/booth-arbitrator
%else
%{_initddir}/booth-arbitrator
%endif
%dir %{_datadir}/booth
%{_datadir}/booth/service-runnable
%doc AUTHORS README COPYING
%doc README.upgrade-from-v0.1
%package test
Summary: Test scripts for Booth
Group: %{pkg_group}
Requires: booth
Requires: python
%description test
This package contains automated tests for Booth,
the Cluster Ticket Manager for Pacemaker.
%files test
%defattr(-,root,root)
%doc README-testing
%{test_path}
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
%dir /usr/lib/ocf/resource.d/booth
/usr/lib/ocf/resource.d/booth/sharedrsc
%changelog
diff --git a/contrib/geo-cluster.firewalld.xml b/contrib/geo-cluster.firewalld.xml
new file mode 100644
index 0000000..9aa5a8b
--- /dev/null
+++ b/contrib/geo-cluster.firewalld.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<service>
+ <short>Booth</short>
+ <description>This allows you to open ports related to booth.</description>
+ <port protocol="tcp" port="9929"/>
+ <port protocol="udp" port="9929"/>
+</service>
diff --git a/contrib/geo-cluster.fwd b/contrib/geo-cluster.fwd
deleted file mode 100644
index 6affc29..0000000
--- a/contrib/geo-cluster.fwd
+++ /dev/null
@@ -1,17 +0,0 @@
-## Name: Booth
-## Description: Opens ports for Geo Cluster
-
-# space separated list of allowed TCP ports
-TCP="9929"
-
-# space separated list of allowed UDP ports
-UDP="9929"
-
-# space separated list of allowed RPC services
-RPC=""
-
-# space separated list of allowed IP protocols
-IP=""
-
-# space separated list of allowed UDP broadcast ports
-BROADCAST=""

File Metadata

Mime Type
text/x-diff
Expires
Wed, Feb 26, 1:07 PM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1465372
Default Alt Text
(7 KB)

Event Timeline