From 9930178fda4fe4b8a40bae19961c3eeadcb0b3cf Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Jun 28 2007 03:06:39 +0000 Subject: Add openssl-devel BuildRequires Remove restart from postun (bz #223949) Fix up Requires (bz #245704) Remove duplicate libraries in subpackages (bz #245704) Add smp_mflags Fix typo in stonith subpackage description Simplify clean section. Use find_lang macro Fix some multilib issues with ocf dir (bz #228165) Kill rpath Add ldconfig to postun --- diff --git a/heartbeat.spec b/heartbeat.spec index 3bf02a2..4b6ef16 100644 --- a/heartbeat.spec +++ b/heartbeat.spec @@ -6,7 +6,7 @@ Summary: Heartbeat subsystem for High-Availability Linux Name: heartbeat Version: 2.0.8 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL/LGPL URL: http://linux-ha.org/ Group: System Environment/Daemons @@ -21,14 +21,14 @@ BuildRequires: libtool-ltdl-devel BuildRequires: net-snmp-devel >= 5.4 BuildRequires: bzip2-devel BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: libtool %if %{ENABLE_MGMT} BuildRequires: gnutls-devel BuildRequires: pam-devel BuildRequires: python-devel BuildRequires: swig %endif -Requires: stonith = %{version}-%{release} -Requires: pils = %{version}-%{release} Requires: ldirectord = %{version}-%{release} Requires: pygtk2 >= 2.4 Requires(pre): fedora-usermgmt @@ -71,13 +71,12 @@ for virtual services provided by The Linux Virtual Server and works with the heartbeat code (http://www.linux-ha.org/). %package -n stonith -Requires: pils = %{version}-%{release} Requires: net-snmp-libs Summary: Provides an interface to Shoot The Other Node In The Head Group: System Environment/Daemons %description -n stonith -The STONITH module (a.k.a. STOMITH) provides an extensible interface +The STONITH module (a.k.a. STONITH) provides an extensible interface for remotely powering down a node in the cluster. The idea is quite simple: When the software running on one machine wants to make sure another machine in the cluster is not using a resource, pull the plug on the other @@ -113,6 +112,7 @@ Heartbeat development package # disable-fatal-warnings flag used to disable gcc4.x warnings of 'difference in signedness' CFLAGS=${RPM_OPT_FLAGS} \ %configure \ + --with-ocf-root=%{_libdir}/ocf \ --disable-fatal-warnings \ --disable-static \ %if %{ENABLE_MGMT} @@ -120,7 +120,12 @@ CFLAGS=${RPM_OPT_FLAGS} \ %else --disable-mgmt %endif -make + +# get rid of rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT @@ -142,11 +147,14 @@ chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/ocf-shellfuncs chmod -x $RPM_BUILD_ROOT/%{_sysconfdir}/ha.d/shellfuncs chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat-gui/pymgmt.py +# fix some wrong line endings issues +sed -i 's/\r//' $RPM_BUILD_ROOT/%{_libdir}/ocf/resource.d/heartbeat/SAPDatabase +sed -i 's/\r//' $RPM_BUILD_ROOT/%{_libdir}/ocf/resource.d/heartbeat/SAPInstance + +%find_lang haclient + %clean -if [ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]; then - rm -rf $RPM_BUILD_ROOT -fi -rm -rf $RPM_BUILD_DIR/heartbeat-%{version} +rm -rf $RPM_BUILD_ROOT %pre /usr/sbin/fedora-groupadd %{uid} -r %{gname} &>/dev/null || : @@ -157,16 +165,14 @@ rm -rf $RPM_BUILD_DIR/heartbeat-%{version} /sbin/ldconfig /sbin/chkconfig --add heartbeat +%postun -p /sbin/ldconfig + %preun if [ $1 = 0 ] ; then /sbin/service heartbeat stop /sbin/chkconfig --del heartbeat fi -%postun -if [ "$1" -ge "1" ] ; then - /sbin/service heartbeat restart -fi /sbin/ldconfig test "$1" != 0 || /usr/sbin/fedora-userdel %{uname} &>/dev/null || : test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : @@ -174,6 +180,8 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : %post -n ldirectord /sbin/chkconfig --add ldirectord +%postun -n ldirectord -p /sbin/ldconfig + %preun -n ldirectord /sbin/chkconfig --del ldirectord @@ -181,9 +189,13 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : %postun -n stonith -p /sbin/ldconfig -%files +%post -n pils -p /sbin/ldconfig + +%postun -n pils -p /sbin/ldconfig + +%files -f haclient.lang %doc %{_datadir}/doc/%{name}-%{version} -%defattr(-,root,root) +%defattr(-,root,root,-) %dir %{_sysconfdir}/ha.d %{_sysconfdir}/ha.d/harc %config(noreplace) %{_sysconfdir}/ha.d/shellfuncs @@ -204,7 +216,9 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : %{_libdir}/libplumbgpl.so.* %{_libdir}/librecoverymgr.so.* %{_libdir}/libstonithd.so.* -%{_prefix}/lib/ocf +%{_libdir}/libpe_rules.so.* +%{_libdir}/libpe_status.so.* +%{_libdir}/ocf/ %{_sysconfdir}/ha.d/resource.d/ %exclude %{_sysconfdir}/ha.d/resource.d/ldirectord %{_sysconfdir}/init.d/heartbeat @@ -257,14 +271,13 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : %{_libdir}/libhbmgmtcommon.so.* %{_libdir}/libhbmgmttls.so.* %config(noreplace) %{_sysconfdir}/pam.d/hbmgmtd -%{_datadir}/locale/zh_CN/LC_MESSAGES/haclient.mo %endif %files -n ldirectord %doc doc/COPYING %doc doc/README %doc ldirectord/ldirectord.cf -%defattr(-,root,root) +%defattr(-,root,root,-) %{_sbindir}/ldirectord %{_sbindir}/supervise-ldirectord-config %config(noreplace) %{_sysconfdir}/logrotate.d/ldirectord @@ -276,8 +289,8 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : %files -n stonith %doc doc/COPYING %doc doc/README -%defattr(-,root,root) -%{_libdir}/*.so.* +%defattr(-,root,root,-) +%{_libdir}/libstonith.so.* %{_libdir}/stonith/ %{_sbindir}/stonith %{_sbindir}/meatclient @@ -287,14 +300,14 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : %files -n pils %doc doc/COPYING %doc doc/README -%defattr(-,root,root) +%defattr(-,root,root,-) /usr/include/pils %{_libdir}/libpils.* %{_libdir}/pils/ %files devel %doc %{_datadir}/doc/%{name}-%{version} -%defattr(-,root,root) +%defattr(-,root,root,-) %{_includedir}/heartbeat/ %{_includedir}/clplumbing/ %{_includedir}/saf/ @@ -304,6 +317,19 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : %{_libdir}/*.so %changelog +* Tue Jun 26 2007 Kevin Fenzi - 2.0.8-3 +- Add openssl-devel BuildRequires +- Remove restart from postun (bz #223949) +- Fix up Requires (bz #245704) +- Remove duplicate libraries in subpackages (bz #245704) +- Add smp_mflags +- Fix typo in stonith subpackage description +- Simplify clean section. +- Use find_lang macro +- Fix some multilib issues with ocf dir (bz #228165) +- Kill rpath +- Add ldconfig to postun + * Fri Feb 9 2007 Joost Soeterbroek - 2.0.8-2 - change condrestart -> restart (bz #223949)