path: root/
diff options
authorNiels de Vos <>2012-11-06 10:13:07 +0100
committerAnand Avati <>2012-12-12 10:58:45 -0800
commit06d4cced24f9854e3439f03a0c940adc5306de48 (patch)
tree62f967cad18e85f5c35c106957bd1277af100f95 /
parent6d58cb0476dc13198596603a9efd5014ebcb0c45 (diff)
build: include OCF resource agents by default and package them
This change introduces a glusterfs-resource-agents sub-package that contains the Open Cluster Framework (OCF) Resource Agents (RA). It also changes the build infrastructure to include the RA by default, making them available for anyone who is interested in using them with a OCF compatible Hight-Availability solution like Pacemaker. Build the RPMs without RA: $ make dist && rpmbuild -ta --without ocf *.gz Build the RPMs with RA (default): $ make dist && rpmbuild -ta *.gz There is no need to run ./ from within the .spec, the whole autotools infrastructure is included in the 'make dist' tarball already. This also adds a test-case which builds the rpms with mock for the latest two EPEL releases. Change-Id: I12ef5f30f466868825352376156fb4e56b135c58 BUG: 869559 Signed-off-by: Niels de Vos <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Kaleb KEITHLEY <>
Diffstat (limited to '')
1 files changed, 45 insertions, 4 deletions
diff --git a/ b/
index eb5862e..a30f9e0 100644
--- a/
+++ b/
@@ -31,6 +31,10 @@
%{?_without_georeplication:%global _without_georeplication --disable-geo-replication}
+# if you wish to compile an rpm without the OCF resource agents...
+# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without ocf
+%{?_without_ocf:%global _without_ocf --without-ocf}
Summary: Cluster File System
Version: %{version}
@@ -42,7 +46,7 @@ Packager: @PACKAGE_BUGREPORT@
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-Requires: openssl >= 1.0
+Requires: openssl
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service
@@ -56,7 +60,6 @@ BuildRequires: python-devel
BuildRequires: python-ctypes
-BuildRequires: openssl-devel >= 1.0
Obsoletes: %{name}-libs <= 2.0.0
Obsoletes: %{name}-common < %{version}-%{release}
@@ -159,6 +162,35 @@ is in user space and easily manageable.
This package provides the glusterfs server daemon and translators that
are loaded on the server.
+%if 0%{!?_without_ocf:1}
+%package resource-agents
+Summary: OCF Resource Agents for GlusterFS
+License: GPLv3+
+# this Group handling comes from the Fedora resource-agents package
+%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
+Group: System Environment/Base
+Group: Productivity/Clustering/HA
+# for glusterd
+Requires: glusterfs-server
+# depending on the distribution, we need pacemaker or resource-agents
+Requires: %{_prefix}/lib/ocf/resource.d
+%description resource-agents
+GlusterFS is a clustered file-system capable of scaling to several
+petabytes. It aggregates various storage bricks over Infiniband RDMA
+or TCP/IP interconnect into one large parallel network file
+system. GlusterFS is one of the most sophisticated file systems in
+terms of features and extensibility. It borrows a powerful concept
+called Translators from GNU Hurd kernel. Much of the code in GlusterFS
+is in user space and easily manageable.
+This package provides the resource agents which plug glusterd into
+Open Cluster Framework (OCF) compliant cluster resource managers,
+like Pacemaker.
%package devel
Summary: Development Libraries
License: GPLv2 or LGPLv3+
@@ -180,8 +212,7 @@ This package provides the development libraries.
%setup -q -n %{name}-%{version}
-%configure %{?_without_rdma} %{?_without_epoll} %{?_with_fusermount} %{?_without_georeplication}
+%configure %{?_without_rdma} %{?_without_epoll} %{?_with_fusermount} %{?_without_georeplication} %{?_without_ocf}
# Remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@@ -427,6 +458,13 @@ fi
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/peers
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/groups
+%if 0%{!?_without_ocf:1}
+%files resource-agents
+# /usr/lib is the standard for OCF, also on x86_64
%files devel
@@ -438,6 +476,9 @@ fi
* Tue Dec 11 2012 Filip Pytloun <>
- add sysconfig file
+* Thu Oct 25 2012 Niels de Vos <>
+- Add a sub-package for the OCF resource agents
* Wed Sep 05 2012 Niels de Vos <>
- Don't use python-ctypes on SLES (from Jörg Petersen)