packages: resource-agents/resource-agents.spec - merge ldirector stuff from...

glen glen at pld-linux.org
Wed Jan 13 18:53:07 CET 2010


Author: glen                         Date: Wed Jan 13 17:53:07 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- merge ldirector stuff from heartbeat.spec

---- Files affected:
packages/resource-agents:
   resource-agents.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/resource-agents/resource-agents.spec
diff -u packages/resource-agents/resource-agents.spec:1.2 packages/resource-agents/resource-agents.spec:1.3
--- packages/resource-agents/resource-agents.spec:1.2	Wed Jan 13 18:51:33 2010
+++ packages/resource-agents/resource-agents.spec	Wed Jan 13 18:53:01 2010
@@ -1,11 +1,9 @@
 # $Revision$, $Date$
 # TODO
-# - docbook deps
 # - avoid remote docbook.xsl include:
 #  /usr/bin/xsltproc --xinclude http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
-# - sync with heartbeat.spec (if any)
 %define		subver	rc2
-%define		rel		0.1
+%define		rel		0.2
 Summary:	Reusable cluster resource scripts
 Name:		resource-agents
 Version:	1.0.2
@@ -15,11 +13,11 @@
 URL:		http://www.linux-ha.org/
 Source0:	http://www.linux-ha.org/w/images/9/99/Resource-agents-%{version}-%{subver}.tar.bz2
 # Source0-md5:	fe1ec605e57279f689d893f0c85bef2c
+Source1:	ldirectord.init
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	cluster-glue-libs-devel
 BuildRequires:	docbook-dtd44-xml
-#BuildRequires:	docbook-dtds
 BuildRequires:	docbook-style-xsl
 BuildRequires:	glib2-devel
 BuildRequires:	libtool
@@ -39,12 +37,12 @@
 Summary:	A Monitoring Daemon for Maintaining High Availability Resources
 License:	GPL v2+
 Group:		Applications/System
-Requires(post):	/sbin/chkconfig
-Requires(preun):	/sbin/chkconfig
+Requires(post,preun):	/sbin/chkconfig
 Requires:	ipvsadm
 Requires:	perl-MailTools
 Requires:	perl-Net-SSLeay
 Requires:	perl-libwww-perl
+Requires:	rc-scripts
 Provides:	heartbeat-ldirectord
 Obsoletes:	heartbeat-ldirectord
 
@@ -77,15 +75,13 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/ha.d
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-#install -d $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d
-#ln -s %{_sbindir}/ldirectord $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord
-
-mkdir $RPM_BUILD_ROOT/sbin
-cd $RPM_BUILD_ROOT/sbin
-ln -sf %{_sysconfdir}/rc.d/init.d/ldirectord rcldirectord
+rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord
+cp -a ldirectord/ldirectord.cf $RPM_BUILD_ROOT%{_sysconfdir}/ha.d
 
 # Dont package static libs or compiled python
 find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
@@ -97,18 +93,20 @@
 find $RPM_BUILD_ROOT -name '.ocf-*' -type f -print0 | xargs -0 chmod a-x
 find $RPM_BUILD_ROOT -name 'ocf-*'  -type f -print0 | xargs -0 chmod a-x
 find $RPM_BUILD_ROOT -name '*.dtd'  -type f -print0 | xargs -0 chmod a-x
-chmod 0755 $RPM_BUILD_ROOT%{_sbindir}/ocf-tester
+chmod a+rx $RPM_BUILD_ROOT%{_sbindir}/ocf-tester
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%preun -n ldirectord
-/sbin/chkconfig --del ldirectord
-
-%postun -n ldirectord -p /sbin/ldconfig
-
-%post -n ldirectord
+%post	-n ldirectord
 /sbin/chkconfig --add ldirectord
+%service ldirectord restart
+
+%preun	-n ldirectord
+if [ "$1" = "0" ]; then
+	%service -q ldirectord stop
+	/sbin/chkconfig --del ldirectord
+fi
 
 %files
 %defattr(644,root,root,755)
@@ -134,14 +132,12 @@
 
 %files -n ldirectord
 %defattr(644,root,root,755)
-%doc ldirectord/ldirectord.cf
-%config(noreplace) /etc/logrotate.d/ldirectord
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ha.d/ldirectord.cf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ldirectord
+%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/ldirectord
 %attr(754,root,root) /etc/rc.d/init.d/ldirectord
-%dir %{_sysconfdir}/ha.d/resource.d
-%{_sysconfdir}/ha.d/resource.d/ldirectord
-%attr(755,root,root) %{_sbindir}/ldirectord
-%attr(755,root,root) /sbin/rcldirectord
-%{_mandir}/man8/ldirectord.8*
+%attr(755,root,root) %{_sbindir}/*ldirectord*
+%{_mandir}/man8/*ldirectord*.8*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -149,6 +145,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2010/01/13 17:53:01  glen
+- merge ldirector stuff from heartbeat.spec
+
 Revision 1.2  2010/01/13 17:51:33  sparky
 - BR: docbook-dtd44-xml, libtool, libxslt-progs, openssl-tools
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/resource-agents/resource-agents.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list