[resource-agents] new upstream release
Fabio M. Di Nitto
fabbione at fedoraproject.org
Tue Jun 21 07:52:56 UTC 2011
commit b73718d6c29872c20f43a5b26b45aa1e32a4a5de
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue Jun 21 09:52:33 2011 +0200
new upstream release
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
.gitignore | 1 +
resource-agents.spec | 355 +++++++++++++++++++++++++++++++-------------------
sources | 3 +-
3 files changed, 221 insertions(+), 138 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 88274f9..4e94b8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ resource-agents-3.0.14.tar.bz2
/resource-agents-3.1.1.tar.xz
/agents-1.0.4.tar.bz2
/1.0.4.tar.bz2
+/resource-agents-3.9.1.tar.bz2
diff --git a/resource-agents.spec b/resource-agents.spec
index 231807f..f97dbf4 100644
--- a/resource-agents.spec
+++ b/resource-agents.spec
@@ -1,35 +1,81 @@
-###############################################################################
-###############################################################################
-##
-## Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
-##
-## This copyrighted material is made available to anyone wishing to use,
-## modify, copy, or redistribute it subject to the terms and conditions
-## of the GNU General Public License v.2.
-##
-###############################################################################
-###############################################################################
-
-# keep around ready for later user
-## global alphatag rc4
-
-# When downloading directly from Mercurial, it will automatically add this prefix
-# Invoking 'hg archive' wont but you can add one with:
-# hg archive -t tgz -p "Cluster-Resource-Agents-" -r $altversion $altversion.tar.gz
-%global altprefix Cluster-Resource-Agents-
-%global altversion agents-1.0.4
-
-Name: resource-agents
-Summary: Open Source HA Resource Agents for Red Hat Cluster
-Version: 3.1.1
-Release: 1%{?alphatag:.%{alphatag}}%{?dist}
-License: GPLv2+ and LGPLv2+
-Group: System Environment/Base
-URL: http://sourceware.org/cluster/wiki/
-Source0: https://fedorahosted.org/releases/r/e/resource-agents/%{name}-%{version}.tar.xz
-Source1: http://hg.linux-ha.org/agents/archive/%{altversion}.tar.bz2
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+#
+
+
+
+
+
+
+#
+# Since this spec file supports multiple distributions, ensure we
+# use the correct group for each.
+#
+
+# SSLeay (required by ldirectord)
+%if 0%{?suse_version}
+%global SSLeay perl-Net_SSLeay
+%else
+%global SSLeay perl-Net-SSLeay
+%endif
+
+# determine the ras-set to process based on configure invokation
+%bcond_without rgmanager
+%bcond_without linuxha
+
+Name: resource-agents
+Summary: Open Source HA Reusable Cluster Resource Scripts
+Version: 3.9.1
+Release: 1%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
+License: GPLv2+ and LGPLv2+
+URL: http://to.be.defined.com/
+%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
+Group: System Environment/Base
+%else
+Group: Productivity/Clustering/HA
+%endif
+Source0: %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.bz2
+Obsoletes: heartbeat-resources <= %{version}
+Provides: heartbeat-resources = %{version}
+
+## Setup/build bits
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+# Build dependencies
+BuildRequires: automake autoconf pkgconfig
+BuildRequires: perl python-devel
+BuildRequires: libxslt glib2-devel
+BuildRequires: which
+
+%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
+BuildRequires: cluster-glue-libs-devel
+BuildRequires: docbook-style-xsl docbook-dtds
+%if 0%{?rhel} == 0
+BuildRequires: libnet-devel
+%endif
+%endif
+
+%if 0%{?suse_version}
+%if 0%{?suse_version} >= 1140
+BuildRequires: libnet1
+%else
+BuildRequires: libnet
+%endif
+BuildRequires: libglue-devel
+BuildRequires: libxslt docbook_4 docbook-xsl-stylesheets
+%endif
## Runtime deps
+## These apply to rgmanager agents only to guarantee agents
+## are functional
+%if %{with rgmanager}
# system tools shared by several agents
Requires: /bin/bash /bin/grep /bin/sed /bin/gawk
Requires: /bin/ps /usr/bin/pkill /bin/hostname
@@ -52,18 +98,6 @@ Requires: /sbin/lvm
# netfs.sh
Requires: /sbin/mount.nfs /sbin/mount.nfs4 /sbin/mount.cifs
Requires: /usr/sbin/rpc.nfsd /sbin/rpc.statd /usr/sbin/rpc.mountd
-
-## Setup/build bits
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-
-# Build dependencies
-BuildRequires: cluster-glue-libs-devel glib2-devel
-BuildRequires: automake autoconf pkgconfig
-BuildRequires: libxslt docbook-style-xsl
-BuildRequires: python perl
-
-%if 0%{?rhel} == 0
-BuildRequires: libnet-devel
%endif
%description
@@ -71,148 +105,197 @@ A set of scripts to interface with several services to operate in a
High Availability environment for both Pacemaker and rgmanager
service managers.
-%if 0%{?rhel} == 0
+%if %{with linuxha}
%package -n ldirectord
-Summary: Monitor daemon for maintaining high availability resources
-Group: System Environment/Daemons
-Requires: ipvsadm
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig
-
-# We were originally ldirectord, then renamed with a heartbeat- prefix.
-# Upstream maintainer wishes to use no prefix, which is consistent with
-# how it is packaged for other distributions
-Provides: ldirectord = 3.0.0-15
-Obsoletes: ldirectord < 3.0.0-15
-Provides: heartbeat-ldirectord = 3.0.0-15
-Obsoletes: heartbeat-ldirectord < 3.0.0-15
-
-# removed for now until it's in Fedora
-#Requires: perl(Net::IMAP::Simple::SSL)
+License: GPLv2+
+Summary: A Monitoring Daemon for Maintaining High Availability Resources
+%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
+Group: System Environment/Daemons
+%else
+Group: Productivity/Clustering/HA
+%endif
+Obsoletes: heartbeat-ldirectord <= %{version}
+Provides: heartbeat-ldirectord = %{version}
+Requires: %{SSLeay} perl-libwww-perl perl-MailTools
+Requires: ipvsadm logrotate
+%if 0%{?fedora_version}
+Requires: perl-Net-IMAP-Simple-SSL
+Requires(post): /sbin/chkconfig
+Requires(preun):/sbin/chkconfig
+%endif
%description -n ldirectord
-ldirectord is a stand-alone daemon to monitor services of real
-for virtual services provided by The Linux Virtual Server
-(http://www.linuxvirtualserver.org/). It is simple to install
-and works with the heartbeat code (http://www.linux-ha.org/).
+The Linux Director Daemon (ldirectord) was written by Jacob Rief.
+<jacob.rief at tiscover.com>
+
+ldirectord is a stand alone daemon for monitoring the services on real
+servers. Currently, HTTP, HTTPS, and FTP services are supported.
+lditrecord is simple to install and works with the heartbeat code
+(http://www.linux-ha.org/).
+
+See 'ldirectord -h' and linux-ha/doc/ldirectord for more information.
%endif
-# we inherit configure from cluster project. Configure it for vars we need.
-# building from source directly without those parameters will NOT work.
-# See http://www.redhat.com/archives/cluster-devel/2009-February/msg00003.html
%prep
-%setup -q -n %{name}-%{version} -a 1
+%if 0%{?suse_version} == 0 && 0%{?fedora} == 0 && 0%{?centos_version} == 0 && 0%{?rhel} == 0
+%{error:Unable to determine the distribution/version. This is generally caused by missing /etc/rpm/macros.dist. Please install the correct build packages or define the required macros manually.}
+exit 1
+%endif
+%setup -q -n %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
-# prepare rgmanager RAs
-%{_configure}
+%build
+if [ ! -f configure ]; then
+ ./autogen.sh
+fi
+
+%if 0%{?fedora} >= 11 || 0%{?centos_version} > 5 || 0%{?rhel} > 5
+CFLAGS="$(echo '%{optflags}')"
+%global conf_opt_rsctmpdir "--with-rsctmpdir=%{_var}/run/heartbeat/rsctmp"
+%global conf_opt_fatal "--enable-fatal-warnings=no"
+%else
+CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
+%global conf_opt_fatal "--enable-fatal-warnings=yes"
+%endif
-# prepare pacemaker RAs
-cd %{altprefix}%{altversion}
-./autogen.sh
-%{configure} --enable-fatal-warnings=no --with-rsctmpdir=%{_var}/run/heartbeat/rsctmp
+%if %{with rgmanager}
+%global rasset rgmanager
+%endif
+%if %{with linuxha}
+%global rasset linux-ha
+%endif
+%if %{with rgmanager} && %{with linuxha}
+%global rasset all
+%endif
-%build
-CFLAGS="$(echo '%{optflags}')" make %{_smp_mflags}
-make -C %{altprefix}%{altversion} %{_smp_mflags}
+export CFLAGS
+
+%configure \
+ %{?conf_opt_rsctmpdir:%conf_opt_rsctmpdir} \
+ %{conf_opt_fatal} \
+ --with-pkg-name=%{name} \
+ --with-ras-set=%{rasset}
+
+%if %{defined jobs}
+JFLAGS="$(echo '-j%{jobs}')"
+%else
+JFLAGS="$(echo '%{_smp_mflags}')"
+%endif
+
+make $JFLAGS
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
-make -C %{altprefix}%{altversion} install DESTDIR=%{buildroot}
-# tree fixup
-#rm %{buildroot}/%{_libdir}/heartbeat/ocf-*
-find %{buildroot} -type f -name '.ocf-*' -exec chmod 644 {} \;
-find %{buildroot} -type f -name 'ocf-*' -exec chmod 644 {} \;
-find %{buildroot} -type f -name '*.dtd' -exec chmod 644 {} \;
-chmod 755 %{buildroot}/%{_sbindir}/ocf-tester
-chmod 755 %{buildroot}/%{_datadir}/cluster/ocf-shellfuncs
+## tree fixup
+# remove docs (there is only one and they should come from doc sections in files)
+rm -rf %{buildroot}/usr/share/doc/resource-agents
+%if %{with linuxha}
+%if 0%{?suse_version}
+test -d %{buildroot}/sbin || mkdir %{buildroot}/sbin
(
-cd %{buildroot}/usr/lib/ocf/resource.d/heartbeat
-for f in ocf-binaries ocf-directories ocf-returncodes ocf-shellfuncs
-do
- ln -s ../../lib/heartbeat/$f .$f
-done
-)
-
-# Strange location, remove until we can confirm
-rm -f %{buildroot}%{_libdir}/heartbeat/tickle_tcp
-
-# Test harness, worth creating a devel package for?
-rm -rf %{buildroot}%{_datadir}/resource-agents/ocft
-rm -f %{buildroot}%{_sbindir}/ocft
-
-%if 0%{?rhel} != 0
-# ldirectord isn't included on RHEL
-find %{buildroot} -name 'ldirectord.*' -exec rm -f {} \;
-find %{buildroot} -name 'ldirectord' -exec rm -f {} \;
+ cd %{buildroot}/sbin
+ ln -sf /%{_sysconfdir}/init.d/ldirectord rcldirectord
+) || true
+%endif
%endif
-
-# symlink to allow pacemaker to use rgmanager RAs
-cd %{buildroot}/usr/lib/ocf/resource.d/ && \
- ln -sf %{_datadir}/cluster/ redhat
-
-# remove docs
-rm -rf %{buildroot}/usr/share/doc/resource-agents
%clean
rm -rf %{buildroot}
-%if 0%{?rhel} == 0
-%post -n ldirectord
-/sbin/chkconfig --add ldirectord
-
-%postun -n ldirectord -p /sbin/ldconfig
-
-%preun -n ldirectord
-/sbin/chkconfig --del ldirectord
+%files
+%defattr(-,root,root)
+%doc AUTHORS COPYING COPYING.GPLv3 ChangeLog
+%if %{with linuxha}
+%doc doc/README.webapps
+%doc %{_datadir}/%{name}/ra-api-1.dtd
%endif
-%files
-%defattr(-,root,root,-)
-%doc doc/COPYING.* doc/COPYRIGHT doc/README.licence
-%doc %{altprefix}%{altversion}/AUTHORS
+%if %{with rgmanager}
%{_datadir}/cluster
+%{_sbindir}/rhev-check.sh
+%endif
+%if %{with linuxha}
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
%dir /usr/lib/ocf/lib
-%dir /usr/lib/ocf/lib/heartbeat
-/usr/lib/ocf/lib/heartbeat/ocf-*
+
+/usr/lib/ocf/lib/heartbeat
+
/usr/lib/ocf/resource.d/heartbeat
+%if %{with rgmanager}
/usr/lib/ocf/resource.d/redhat
+%endif
+
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/ocft
+%{_datadir}/%{name}/ocft/configs
+%{_datadir}/%{name}/ocft/caselib
+%{_datadir}/%{name}/ocft/README
+%{_datadir}/%{name}/ocft/README.zh_CN
+
%{_sbindir}/ocf-tester
+%{_sbindir}/ocft
%{_sbindir}/sfex_init
%{_sbindir}/sfex_stat
-%dir %{_datadir}/resource-agents
-%doc %{_datadir}/resource-agents/ra-api-1.dtd
+%{_includedir}/heartbeat
+
+%if 0%{?fedora} >= 11 || 0%{?centos_version} > 5 || 0%{?rhel} > 5
+%dir %{_var}/run/heartbeat/rsctmp
+%else
+%dir %attr (1755, root, root) %{_var}/run/resource-agents
+%endif
+
%{_mandir}/man7/*.7*
+%{_mandir}/man8/ocf-tester.8*
+# For compatability with pre-existing agents
%dir %{_sysconfdir}/ha.d
%{_sysconfdir}/ha.d/shellfuncs
-%dir %{_libdir}/heartbeat
-%{_libdir}/heartbeat/findif
-%{_libdir}/heartbeat/send_arp
-%{_libdir}/heartbeat/sfex_daemon
-%{_includedir}/heartbeat/agent_config.h
+%{_libdir}/heartbeat
+
+%if 0%{?suse_version}
+%preun -n ldirectord
+%stop_on_removal ldirectord
+%postun -n ldirectord
+%insserv_cleanup
+%endif
+
+%if 0%{?fedora}
+%preun -n ldirectord
+/sbin/chkconfig --del ldirectord
+%postun -n ldirectord -p /sbin/ldconfig
+%post -n ldirectord
+/sbin/chkconfig --add ldirectord
+%endif
-%if 0%{?rhel} == 0
%files -n ldirectord
-%defattr(-,root,root,-)
-%doc %{altprefix}%{altversion}/COPYING
-%doc %{altprefix}%{altversion}/ldirectord/ldirectord.cf
+%defattr(-,root,root)
%{_sbindir}/ldirectord
+%doc ldirectord/ldirectord.cf COPYING
+%{_mandir}/man8/ldirectord.8*
%config(noreplace) %{_sysconfdir}/logrotate.d/ldirectord
-%{_sysconfdir}/init.d/ldirectord
+%dir %{_sysconfdir}/ha.d
+%dir %{_sysconfdir}/ha.d/resource.d
%{_sysconfdir}/ha.d/resource.d/ldirectord
-%{_mandir}/man8/ldirectord.8*
+%{_sysconfdir}/init.d/ldirectord
+%if 0%{?suse_version}
+/sbin/rcldirectord
+%endif
+%if 0%{?fedora}
/usr/lib/ocf/resource.d/heartbeat/ldirectord
%endif
+%endif
%changelog
+* Mon Jun 20 2011 Fabio M. Di Nitto <fdinitto at redhat.com> - 3.9.1-1
+- new upstream release
+- import spec file from upstream
+
* Tue Mar 1 2011 Fabio M. Di Nitto <fdinitto at redhat.com> - 3.1.1-1
- new upstream release 3.1.1 and 1.0.4
diff --git a/sources b/sources
index 63c139b..88aa27e 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-d63cacb4291307775993b49093397098 agents-1.0.4.tar.bz2
-ae864cc42c851cdd34bf22607a99e36b resource-agents-3.1.1.tar.xz
+9082c407515926d1c7c8aedbc4383844 resource-agents-3.9.1.tar.bz2
More information about the scm-commits
mailing list