bd974cd
###############################################################################
bd974cd
###############################################################################
bd974cd
##
20a62bb
##  Copyright (C) 2004-2010 Red Hat, Inc.  All rights reserved.
bd974cd
##
bd974cd
##  This copyrighted material is made available to anyone wishing to use,
bd974cd
##  modify, copy, or redistribute it subject to the terms and conditions
bd974cd
##  of the GNU General Public License v.2.
bd974cd
##
bd974cd
###############################################################################
bd974cd
###############################################################################
bd974cd
bd974cd
# keep around ready for later user
5662127
## global alphatag rc4
bd974cd
dedd4aa
# When downloading directly from Mercurial, it will automatically add this prefix
dedd4aa
# Invoking 'hg archive' wont but you can add one with:
dedd4aa
#  hg archive -t tgz -p "Cluster-Resource-Agents-" -r $altversion $altversion.tar.gz
5662127
%global altprefix Cluster-Resource-Agents-
1880889
%global altversion c76b4a6eb576
dedd4aa
bd974cd
Name: resource-agents
bd974cd
Summary: Open Source HA Resource Agents for Red Hat Cluster
4c37a8a
Version: 3.0.10
4c37a8a
Release: 1%{?alphatag:.%{alphatag}}%{?dist}
bd974cd
License: GPLv2+ and LGPLv2+
bd974cd
Group: System Environment/Base
bd974cd
URL: http://sources.redhat.com/cluster/wiki/
20a62bb
Source0: https://fedorahosted.org/releases/c/l/cluster/%{name}-%{version}.tar.bz2
bd554ab
Source1: http://hg.linux-ha.org/agents/archive/%{altversion}.tar.bz2
9e4d306
Patch1: ldirectord-man.patch
bd974cd
bd974cd
## Runtime deps
bd974cd
Requires: bash grep sed gawk
bd974cd
Requires: net-tools mount e2fsprogs
bd974cd
bd974cd
## Setup/build bits
8da1d6b
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
bd974cd
dedd4aa
# Build dependencies
dedd4aa
BuildRequires: cluster-glue-libs-devel glib2-devel
dedd4aa
BuildRequires: automake autoconf pkgconfig
5662127
BuildRequires: libxslt docbook-style-xsl
9e4d306
BuildRequires: python perl libnet-devel
bd974cd
5facebe
%description
5facebe
A set of scripts to interface with several services to operate in a
5facebe
High Availability environment for both Pacemaker and rgmanager
5facebe
service managers.
5facebe
5facebe
%package -n ldirectord
5facebe
Summary:          Monitor daemon for maintaining high availability resources
5facebe
Group:            System Environment/Daemons
5facebe
Requires:         ipvsadm
5facebe
Requires(post):   /sbin/chkconfig
5facebe
Requires(preun):  /sbin/chkconfig
5facebe
5facebe
# We were originally ldirectord, then renamed with a heartbeat- prefix.
5facebe
# Upstream maintainer wishes to use no prefix, which is consistent with 
5facebe
# how it is packaged for other distributions
5facebe
Provides:  ldirectord = 3.0.0-15
5facebe
Obsoletes: ldirectord < 3.0.0-15
5facebe
Provides:  heartbeat-ldirectord = 3.0.0-15
5facebe
Obsoletes: heartbeat-ldirectord < 3.0.0-15
5facebe
5facebe
# removed for now until it's in Fedora
5facebe
#Requires:  perl(Net::IMAP::Simple::SSL)
5facebe
5facebe
%description -n ldirectord
5facebe
ldirectord is a stand-alone daemon to monitor services of real 
5facebe
for virtual services provided by The Linux Virtual Server
5facebe
(http://www.linuxvirtualserver.org/). It is simple to install 
5facebe
and works with the heartbeat code (http://www.linux-ha.org/).
5facebe
bd974cd
# we inherit configure from cluster project. Configure it for vars we need.
bd974cd
# building from source directly without those parameters will NOT work.
bd974cd
# See http://www.redhat.com/archives/cluster-devel/2009-February/msg00003.html
dedd4aa
%prep
5662127
%setup -q -n %{name}-%{version} -a 1
9e4d306
%patch1 -p0
dedd4aa
dedd4aa
# prepare rgmanager RAs
dedd4aa
%{_configure} \
bd974cd
  --sbindir=%{_sbindir} \
bd974cd
  --initddir=%{_sysconfdir}/rc.d/init.d \
bd974cd
  --libdir=%{_libdir} \
bd974cd
  --without_fence_agents \
bd974cd
  --disable_kernel_check
bd974cd
dedd4aa
# prepare pacemaker RAs
dedd4aa
cd %{altprefix}%{altversion}
dedd4aa
./autogen.sh
5facebe
%{configure} --enable-fatal-warnings=no
dedd4aa
dedd4aa
%build
bd974cd
##CFLAGS="$(echo '%{optflags}')" make %{_smp_mflags}
bd974cd
# %{_smp_mflags} is broken from upstream and unrequired for this project.
bd974cd
CFLAGS="$(echo '%{optflags}')" make -C rgmanager/src/resources
dedd4aa
cd %{altprefix}%{altversion}
dedd4aa
make %{_smp_mflags}
bd974cd
bd974cd
%install
8da1d6b
rm -rf %{buildroot}
8da1d6b
make -C rgmanager/src/resources install DESTDIR=%{buildroot}
dedd4aa
make -C %{altprefix}%{altversion} install DESTDIR=%{buildroot}
dedd4aa
dedd4aa
# tree fixup
dedd4aa
rm %{buildroot}/%{_libdir}/heartbeat/ocf-*
dedd4aa
find %{buildroot} -type f -name '.ocf-*' -exec chmod 644 {} \;
dedd4aa
find %{buildroot} -type f -name 'ocf-*' -exec chmod 644 {} \;
dedd4aa
find %{buildroot} -type f -name '*.dtd' -exec chmod 644 {} \;
dedd4aa
chmod 755 %{buildroot}/%{_sbindir}/ocf-tester
dedd4aa
chmod 755 %{buildroot}/%{_datadir}/cluster/ocf-shellfuncs
bd974cd
43f6088
# symlink to allow pacemaker to use rgmanager RAs
43f6088
cd %{buildroot}/usr/lib/ocf/resource.d/ && \
43f6088
 ln -sf %{_datadir}/cluster/ redhat
43f6088
bd974cd
%clean
8da1d6b
rm -rf %{buildroot}
bd974cd
5facebe
%post -n ldirectord
5facebe
/sbin/chkconfig --add ldirectord
5facebe
5facebe
%postun -n ldirectord -p /sbin/ldconfig
5facebe
5facebe
%preun -n ldirectord
5facebe
/sbin/chkconfig --del ldirectord
bd974cd
bd974cd
%files
bd974cd
%defattr(-,root,root,-)
bd974cd
%doc doc/COPYING.* doc/COPYRIGHT doc/README.licence
dedd4aa
%doc %{altprefix}%{altversion}/AUTHORS
bd974cd
%{_datadir}/cluster
bd974cd
dedd4aa
%dir /usr/lib/ocf
dedd4aa
%dir /usr/lib/ocf/resource.d
dedd4aa
/usr/lib/ocf/resource.d/heartbeat
43f6088
/usr/lib/ocf/resource.d/redhat
dedd4aa
%{_sbindir}/ocf-tester
dedd4aa
%{_sbindir}/sfex_init
dedd4aa
5facebe
%dir %{_datadir}/resource-agents
5facebe
%doc %{_datadir}/resource-agents/ra-api-1.dtd
7b81861
%{_mandir}/man7/*.7*
dedd4aa
51f002d
%dir %{_sysconfdir}/ha.d
51f002d
%{_sysconfdir}/ha.d/shellfuncs
51f002d
dedd4aa
%dir %{_libdir}/heartbeat
5facebe
%{_libdir}/heartbeat/findif
dedd4aa
%{_libdir}/heartbeat/send_arp  
dedd4aa
%{_libdir}/heartbeat/sfex_daemon
dedd4aa
5facebe
%files -n ldirectord
5facebe
%defattr(-,root,root,-)
5facebe
%doc %{altprefix}%{altversion}/COPYING 
5facebe
%doc %{altprefix}%{altversion}/ldirectord/ldirectord.cf
5facebe
%{_sbindir}/ldirectord
5facebe
%config(noreplace) %{_sysconfdir}/logrotate.d/ldirectord
5facebe
%{_sysconfdir}/init.d/ldirectord
5facebe
%{_sysconfdir}/ha.d/resource.d/ldirectord
5facebe
%{_mandir}/man8/ldirectord.8*
5facebe
/usr/lib/ocf/resource.d/heartbeat/ldirectord
5facebe
bd974cd
%changelog
4c37a8a
* Fri Apr  9 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.10-1
4c37a8a
- New rgmanager resource agents upstream release
4c37a8a
  Resolves: rhbz#519491, rhbz#570525, rhbz#571806, rhbz#574027
4c37a8a
  Resolves: rhbz#574215, rhbz#574886, rhbz#576322, rhbz#576335
4c37a8a
  Resolves: rhbz#575103, rhbz#577856, rhbz#577874, rhbz#578249
4c37a8a
  Resolves: rhbz#578625, rhbz#578626, rhbz#578628, rhbz#578626
4c37a8a
  Resolves: rhbz#579621, rhbz#579623, rhbz#579625, rhbz#579626
4c37a8a
  Resolves: rhbz#579059
4c37a8a
9e4d306
* Wed Mar 24 2010 Andrew Beekhof <andrew@beekhof.net> - 3.0.9-2
9e4d306
- Resolves: rhbz#572993 - Patched build process to correctly generate ldirectord man page
9e4d306
- Resolves: rhbz#574732 - Add libnet-devel as a dependancy to ensure IPaddrv6 is built
9e4d306
5310bd5
* Mon Mar  1 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.9-1
5310bd5
- New rgmanager resource agents upstream release
5310bd5
  Resolves: rhbz#455300, rhbz#568446, rhbz#561862, rhbz#536902
5310bd5
  Resolves: rhbz#512171, rhbz#519491
5310bd5
20a62bb
* Mon Feb 22 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.8-1
20a62bb
- New rgmanager resource agents upstream release
20a62bb
  Resolves: rhbz#548133, rhbz#565907, rhbz#545602, rhbz#555901
20a62bb
  Resolves: rhbz#564471, rhbz#515717, rhbz#557128, rhbz#536157
20a62bb
  Resolves: rhbz#455300, rhbz#561416, rhbz#562237, rhbz#537201
20a62bb
  Resolves: rhbz#536962, rhbz#553383, rhbz#556961, rhbz#555363
20a62bb
  Resolves: rhbz#557128, rhbz#455300, rhbz#557167, rhbz#459630
20a62bb
  Resolves: rhbz#532808, rhbz#556603, rhbz#554968, rhbz#555047
20a62bb
  Resolves: rhbz#554968, rhbz#555047
20a62bb
- spec file update:
20a62bb
  * update spec file copyright date
20a62bb
  * use bz2 tarball
20a62bb
f476a0e
* Fri Jan 15 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.7-2
f476a0e
- Add python as BuildRequires
f476a0e
39ad74e
* Mon Jan 11 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.7-1
39ad74e
- New rgmanager resource agents upstream release
39ad74e
  Resolves: rhbz#526286, rhbz#533461
39ad74e
1880889
* Mon Jan 11 2010 Andrew Beekhof <andrew@beekhof.net> - 3.0.6-2
1880889
- Update Pacameker agents to upstream version: c76b4a6eb576
1880889
  + High: RA: VirtualDomain: fix forceful stop (LF 2283)
1880889
  + High: apache: monitor operation of depth 10 for web applications (LF 2234)
1880889
  + Medium: IPaddr2: CLUSTERIP/iptables rule not always inserted on failed monitor (LF 2281)
1880889
  + Medium: RA: Route: improve validate (LF 2232)
1880889
  + Medium: mark obsolete RAs as deprecated (LF 2244)
1880889
  + Medium: mysql: escalate stop to KILL if regular shutdown doesn't work
1880889
5662127
* Mon Dec 7 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.6-1
5662127
- New rgmanager resource agents upstream release
5662127
- spec file update:
5662127
  * use global instead of define
5662127
  * use new Source0 url
5662127
  * use %name macro more aggressively
5662127
7b81861
* Mon Dec 7 2009 Andrew Beekhof <andrew@beekhof.net> - 3.0.5-2
7b81861
- Update Pacameker agents to upstream version: bc00c0b065d9
7b81861
  + High: RA: introduce OCF_FUNCTIONS_DIR, allow it to be overridden (LF2239)
7b81861
  + High: doc: add man pages for all RAs (LF2237)
7b81861
  + High: syslog-ng: new RA
7b81861
  + High: vmware: make meta-data work and several cleanups (LF 2212)
7b81861
  + Medium: .ocf-shellfuncs: add ocf_is_probe function
7b81861
  + Medium: Dev: make RAs executable (LF2239)
7b81861
  + Medium: IPv6addr: ifdef out the ip offset hack for libnet v1.1.4 (LF 2034)
7b81861
  + Medium: add mercurial repository version information to .ocf-shellfuncs
7b81861
  + Medium: build: add perl-MailTools runtime dependency to ldirectord package (LF 1469)
7b81861
  + Medium: iSCSITarget, iSCSILogicalUnit: support LIO
7b81861
  + Medium: nfsserver: use check_binary properly in validate (LF 2211)
7b81861
  + Medium: nfsserver: validate should not check if nfs_shared_infodir exists (thanks to eelco@procolix.com) (LF 2219)
7b81861
  + Medium: oracle/oralsnr: export variables properly
7b81861
  + Medium: pgsql: remove the previous backup_label if it exists
7b81861
  + Medium: postfix: fix double stop (thanks to Dinh N. Quoc)
7b81861
  + RA: LVM: Make monitor operation quiet in logs (bnc#546353)
7b81861
  + RA: Xen: Remove instance_attribute "allow_migrate" (bnc#539968)
7b81861
  + ldirectord: OCF agent: overhaul
7b81861
43f6088
* Fri Nov 20 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.5-1
43f6088
- New rgmanager resource agents upstream release
43f6088
- Allow pacemaker to use rgmanager resource agents
43f6088
815019e
* Wed Oct 28 2009 Andrew Beekhof <andrew@beekhof.net> - 3.0.4-2
815019e
- Update Pacameker agents to upstream version: e2338892f59f
815019e
  + High: send_arp - turn on unsolicited mode for compatibilty with the libnet version's exit codes
815019e
  + High: Trap sigterm for compatibility with the libnet version of send_arp
815019e
  + Medium: Bug - lf#2147: IPaddr2: behave if the interface is down
815019e
  + Medium: IPv6addr: recognize network masks properly
815019e
  + Medium: RA: VirtualDomain: avoid needlessly invoking "virsh define"
815019e
4099e3f
* Wed Oct 21 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.4-1
4099e3f
- New rgmanager resource agents upstream release
4099e3f
51f002d
* Mon Oct 12 2009 Andrew Beekhof <andrew@beekhof.net> - 3.0.3-3
51f002d
- Update Pacameker agents to upstream version: 099c0e5d80db
51f002d
  + Add the ha_parameter function back into .ocf-shellfuncs.
51f002d
  + Bug bnc#534803 - Provide a default for MAILCMD
51f002d
  + Fix use of undefined macro @HA_NOARCHDATAHBDIR@
51f002d
  + High (LF 2138): IPsrcaddr: replace 0/0 with proper ip prefix (thanks to Michael Ricordeau and Michael Schwartzkopff)
51f002d
  + Import shellfuncs from heartbeat as badly written RAs use it
51f002d
  + Medium (LF 2173): nfsserver: exit properly in nfsserver_validate
51f002d
  + Medium: RA: Filesystem: implement monitor operation
51f002d
  + Medium: RA: VirtualDomain: loop on status if libvirtd is unreachable
51f002d
  + Medium: RA: VirtualDomain: loop on status if libvirtd is unreachable (addendum)
51f002d
  + Medium: RA: iSCSILogicalUnit: use a 16-byte default SCSI ID
51f002d
  + Medium: RA: iSCSITarget: be more persistent deleting targets on stop
51f002d
  + Medium: RA: portblock: add per-IP filtering capability
51f002d
  + Medium: mysql-proxy: log_level and keepalive parameters
51f002d
  + Medium: oracle: drop spurious output from sqlplus
51f002d
  + RA: Filesystem: allow configuring smbfs mounts as clones
51f002d
15e4673
* Wed Sep 23 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.3-1
15e4673
- New rgmanager resource agents upstream release
15e4673
e89d49e
* Thu Aug 20 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.1-1
e89d49e
- New rgmanager resource agents upstream release
e89d49e
5facebe
* Tue Aug 18 2009 Andrew Beekhof <andrew@beekhof.net> - 3.0.0-16
5facebe
- Create an ldirectord package
5facebe
- Update Pacameker agents to upstream version: 2198dc90bec4
5facebe
  + Build: Import ldirectord.
5facebe
  + Ensure HA_VARRUNDIR has a value to substitute
5facebe
  + High: Add findif tool (mandatory for IPaddr/IPaddr2)
5facebe
  + High: IPv6addr: new nic and cidr_netmask parameters
5facebe
  + High: postfix: new resource agent
5facebe
  + Include license information
5facebe
  + Low (LF 2159): Squid: make the regexp match more precisely output of netstat
5facebe
  + Low: configure: Fix package name.
5facebe
  + Low: ldirectord: add dependency on $remote_fs.
5facebe
  + Low: ldirectord: add mandatory required header to init script.
5facebe
  + Medium (LF 2165): IPaddr2: remove all colons from the mac address before passing it to send_arp
5facebe
  + Medium: VirtualDomain: destroy domain shortly before timeout expiry
5facebe
  + Medium: shellfuncs: Make the mktemp wrappers work.
5facebe
  + Remove references to Echo function
5facebe
  + Remove references to heartbeat shellfuncs.
5facebe
  + Remove useless path lookups
5facebe
  + findif: actually include the right header. Simplify configure.
5facebe
  + ldirectord: Remove superfluous configure artifact.
5facebe
  + ocf-tester: Fix package reference and path to DTD.
5facebe
bd554ab
* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 3.0.0-15
bd554ab
- Use bzipped upstream hg tarball.
bd554ab
dedd4aa
* Wed Jul 29 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-14
dedd4aa
- Merge Pacemaker cluster resource agents:
dedd4aa
  * Add Source1.
dedd4aa
  * Drop noarch. We have real binaries now.
dedd4aa
  * Update BuildRequires.
dedd4aa
  * Update all relevant prep/build/install/files/description sections.
dedd4aa
874d942
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-13
874d942
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
874d942
d5afd52
* Wed Jul  8 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-12
dedd4aa
- spec file updates:
d5afd52
  * Update copyright header
d5afd52
  * final release.. undefine alphatag
d5afd52
9edb429
* Thu Jul  2 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-11.rc4
9edb429
- New upstream release.
9edb429
cbea272
* Sat Jun 20 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-10.rc3
cbea272
- New upstream release.
cbea272
70abb4c
* Wed Jun 10 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-9.rc2
70abb4c
- New upstream release + git94df30ca63e49afb1e8aeede65df8a3e5bcd0970
70abb4c
8da1d6b
* Tue Mar 24 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-8.rc1
8da1d6b
- New upstream release.
8da1d6b
- Update BuildRoot usage to preferred versions/names
8da1d6b
8eed883
* Mon Mar  9 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-7.beta1
8eed883
- New upstream release.
8eed883
dd09b6c
* Fri Mar  6 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-6.alpha7
dd09b6c
- New upstream release.
dd09b6c
904a40a
* Tue Mar  3 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-5.alpha6
904a40a
- New upstream release.
904a40a
6eef531
* Tue Feb 24 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-4.alpha5
6eef531
- Drop Conflicts with rgmanager.
6eef531
bd974cd
* Mon Feb 23 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-3.alpha5
bd974cd
- New upstream release.
bd974cd
bd974cd
* Thu Feb 19 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-2.alpha4
bd974cd
- Add comments on how to build this package.
bd974cd
bd974cd
* Thu Feb  5 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-1.alpha4
bd974cd
- New upstream release.
bd974cd
- Fix datadir/cluster directory ownership.
bd974cd
bd974cd
* Tue Jan 27 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-1.alpha3
bd974cd
  - Initial packaging