Changes of Revision 7
[-] | Added | heartbeat.spec |
x 1
2 +%define ENABLE_SNMP_SUBAGENT 0 3 +%define ENABLE_MGMT 1 4 +%define uid 24 5 +%define gname haclient 6 +%define uname hacluster 7 +Summary: Heartbeat subsystem for High-Availability Linux 8 +Name: heartbeat 9 +Version: 2.0.8 10 +Release: 1%{?dist} 11 +License: GPL/LGPL 12 +URL: http://linux-ha.org/ 13 +Group: System Environment/Daemons 14 +Source0: http://linux-ha.org/download/%{name}-%{version}.tar.gz 15 +Patch0: heartbeat-fedora-pam.patch 16 +Patch1: heartbeat-fedora-chkconfig.patch 17 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 18 +BuildRequires: glib2-devel 19 +BuildRequires: iputils 20 +BuildRequires: libnet-devel 21 +BuildRequires: libtool-ltdl-devel 22 +BuildRequires: net-snmp-devel >= 5.4 23 +BuildRequires: bzip2-devel 24 +BuildRequires: ncurses-devel 25 +%if %{ENABLE_MGMT} 26 +BuildRequires: gnutls-devel 27 +BuildRequires: pam-devel 28 +BuildRequires: python-devel 29 +BuildRequires: swig 30 +%endif 31 +Requires: stonith = %{version}-%{release} 32 +Requires: pils = %{version}-%{release} 33 +Requires: ldirectord = %{version}-%{release} 34 +Requires: pygtk2 >= 2.4 35 +Requires(pre): fedora-usermgmt 36 +Requires(postun): fedora-usermgmt 37 +Requires(post): /sbin/chkconfig 38 +Requires(preun): /sbin/chkconfig 39 +%if %{ENABLE_MGMT} 40 +Requires: gettext 41 +%endif 42 + 43 +%description 44 +heartbeat is a basic high-availability subsystem for Linux-HA. 45 +It will run scripts at initialization, and when machines go up or down. 46 +This version will also perform IP address takeover using gratuitous ARPs. 47 +It supports "n-node" clusters with significant capabilities for managing 48 +resources and dependencies. 49 + 50 +In addition it continues to support the older release 1 style of 51 +2-node clustering. 52 + 53 +It implements the following kinds of heartbeats: 54 + - Serial ports 55 + - UDP/IP multicast (ethernet, etc) 56 + - UDP/IP broadcast (ethernet, etc) 57 + - UDP/IP heartbeats 58 + - "ping" heartbeats (for routers, switches, etc.) 59 + (to be used for breaking ties in 2-node systems) 60 + 61 +%package -n ldirectord 62 +Summary: Monitor daemon for maintaining high availability resources 63 +Group: System Environment/Daemons 64 +Requires: ipvsadm 65 +Requires(post): /sbin/chkconfig 66 +Requires(preun): /sbin/chkconfig 67 + 68 +%description -n ldirectord 69 +ldirectord is a stand-alone daemon to monitor services of real 70 +for virtual services provided by The Linux Virtual Server 71 +(http://www.linuxvirtualserver.org/). It is simple to install 72 +and works with the heartbeat code (http://www.linux-ha.org/). 73 + 74 +%package -n stonith 75 +Requires: pils = %{version}-%{release} 76 +Requires: net-snmp-libs 77 +Summary: Provides an interface to Shoot The Other Node In The Head 78 +Group: System Environment/Daemons 79 + 80 +%description -n stonith 81 +The STONITH module (a.k.a. STOMITH) provides an extensible interface 82 +for remotely powering down a node in the cluster. The idea is quite simple: 83 +When the software running on one machine wants to make sure another 84 +machine in the cluster is not using a resource, pull the plug on the other 85 +machine. It's simple and reliable, albeit admittedly brutal. 86 + 87 +%package -n pils 88 +Summary: Provides a general plugin and interface loading library 89 +Group: System Environment/Daemons 90 + 91 +%description -n pils 92 +PILS is an generalized and portable open source Plugin and Interface Loading 93 +System. PILS was developed as part of the Open Cluster Framework reference 94 +implementation, and is designed to be directly usable by a wide variety of 95 +other applications. 96 +PILS manages both plugins (loadable objects), and the interfaces these plugins 97 +implement. PILS is designed to support any number of plugins implementing any 98 +number of interfaces. 99 + 100 +%package devel 101 +Summary: Heartbeat development package 102 +Group: System Environment/Daemons 103 +Requires: heartbeat = %{version}-%{release} 104 + 105 +%description devel 106 +Heartbeat development package 107 + 108 +%prep 109 +%setup -q 110 +%patch0 -p1 111 +%patch1 -p1 112 + 113 +%build 114 +# disable-fatal-warnings flag used to disable gcc4.x warnings of 'difference in signedness' 115 +CFLAGS=${RPM_OPT_FLAGS} \ 116 +%configure \ 117 + --disable-fatal-warnings \ 118 + --disable-static \ 119 +%if %{ENABLE_MGMT} 120 + --enable-mgmt 121 +%else 122 + --disable-mgmt 123 +%endif 124 +make 125 + 126 +%install 127 +rm -rf $RPM_BUILD_ROOT 128 +mkdir -p $RPM_BUILD_ROOT 129 +make DESTDIR=$RPM_BUILD_ROOT install 130 +( 131 + cd $RPM_BUILD_ROOT/etc/ha.d/resource.d 132 + ln -s /usr/sbin/ldirectord ldirectord 133 +) 134 + 135 +# cleanup 136 +[ -d $RPM_BUILD_ROOT/usr/man ] && rm -rf $RPM_BUILD_ROOT/usr/man 137 +[ -d $RPM_BUILD_ROOT/usr/share/libtool ] && rm -rf $RPM_BUILD_ROOT/usr/share/libtool 138 +find $RPM_BUILD_ROOT -type f -name *.la -exec rm -f {} ';' 139 + 140 +sed -i -e '1i# -*-Shell-script-*-' $RPM_BUILD_ROOT/%{_libdir}/heartbeat/ocf-shellfuncs 141 +sed -i -e '1i# -*-Shell-script-*-' $RPM_BUILD_ROOT/%{_sysconfdir}/ha.d/shellfuncs 142 +chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/ocf-shellfuncs 143 +chmod -x $RPM_BUILD_ROOT/%{_sysconfdir}/ha.d/shellfuncs 144 +chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat-gui/pymgmt.py 145 + 146 +%clean 147 +if [ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]; then 148 + rm -rf $RPM_BUILD_ROOT 149 +fi 150 +rm -rf $RPM_BUILD_DIR/heartbeat-%{version} 151 + 152 +%pre 153 +/usr/sbin/fedora-groupadd %{uid} -r %{gname} &>/dev/null || : 154 +/usr/sbin/fedora-useradd %{uid} -r -s /sbin/nologin -d /var/lib/heartbeat/cores/hacluster -M \ 155 + -c 'heartbeat user' -g %{gname} %{uname} &>/dev/null || : 156 + 157 +%post 158 +/sbin/ldconfig 159 +/sbin/chkconfig --add heartbeat 160 + 161 +%preun 162 +if [ $1 = 0 ] ; then 163 + /sbin/service heartbeat stop 164 + /sbin/chkconfig --del heartbeat 165 +fi 166 + 167 +%postun 168 +if [ "$1" -ge "1" ] ; then 169 + /sbin/service heartbeat condrestart 170 +fi 171 +/sbin/ldconfig 172 +test "$1" != 0 || /usr/sbin/fedora-userdel %{uname} &>/dev/null || : 173 +test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : 174 + 175 +%post -n ldirectord 176 +/sbin/chkconfig --add ldirectord 177 + 178 +%preun -n ldirectord 179 +/sbin/chkconfig --del ldirectord 180 + 181 +%post -n stonith -p /sbin/ldconfig 182 + 183 +%postun -n stonith -p /sbin/ldconfig 184 + 185 +%files 186 +%doc %{_datadir}/doc/%{name}-%{version} 187 +%defattr(-,root,root) 188 +%dir %{_sysconfdir}/ha.d 189 +%{_sysconfdir}/ha.d/harc 190 +%config(noreplace) %{_sysconfdir}/ha.d/shellfuncs 191 +%{_sysconfdir}/ha.d/rc.d 192 +%config(noreplace) %{_sysconfdir}/ha.d/README.config 193 +%{_libdir}/heartbeat 194 +%{_libdir}/heartbeat-gui 195 +%{_libdir}/libapphb.so.* 196 +%{_libdir}/libccmclient.so.* 197 +%{_libdir}/libcib.so.* 198 +%{_libdir}/libclm.so.* 199 +%{_libdir}/libcrmcommon.so.* 200 +%{_libdir}/libtransitioner.so.* 201 |
||
[+] | Added | heartbeat-fedora-chkconfig.patch ^ |
@@ -0,0 +1,63 @@ +diff -Nur heartbeat-2.0.5.orig/heartbeat/init.d/heartbeat.in heartbeat-2.0.5/heartbeat/init.d/heartbeat.in +--- heartbeat-2.0.5.orig/heartbeat/init.d/heartbeat.in 2006-04-14 21:25:33.000000000 +0200 ++++ heartbeat-2.0.5/heartbeat/init.d/heartbeat.in 2006-04-27 20:32:29.000000000 +0200 +@@ -13,7 +13,7 @@ + # We don't hate anyone, and like for everyone to use + # our software, no matter what OS or distribution you're using. + # +-# chkconfig: 2345 @HB_INITSTARTPRI@ @HB_INITSTOPPRI@ ++# chkconfig: - @HB_INITSTARTPRI@ @HB_INITSTOPPRI@ + # description: Startup script high-availability services. + # processname: heartbeat + # pidfile: @localstatedir@/run/heartbeat.pid +@@ -391,12 +391,7 @@ + StartHA + RC=$? + Echo +- if +- [ $RC -eq 0 ] +- then +- [ ! -d $LOCKDIR ] && mkdir -p $LOCKDIR +- touch $LOCKDIR/$SUBSYS +- fi ++ [ $RC -eq 0 ] && touch /var/lock/subsys/heartbeat + RunStartStop post-start $RC + ;; + +@@ -413,11 +408,7 @@ + StopHA + RC=$? + Echo +- if +- [ $RC -eq 0 ] +- then +- rm -f $LOCKDIR/$SUBSYS +- fi ++ [ $RC -eq 0 ] && rm -f /var/lock/subsys/heartbeat + RunStartStop post-stop $RC + StopLogd + ;; +diff -Nur heartbeat-2.0.5.orig/ldirectord/init.d/ldirectord heartbeat-2.0.5/ldirectord/init.d/ldirectord +--- heartbeat-2.0.5.orig/ldirectord/init.d/ldirectord 2005-10-17 14:49:21.000000000 +0200 ++++ heartbeat-2.0.5/ldirectord/init.d/ldirectord 2006-04-27 20:33:35.000000000 +0200 +@@ -2,7 +2,7 @@ + # + # ldirectord Linux Director Daemon + # +-# chkconfig: 2345 92 40 ++# chkconfig: - 92 40 + # description: Start and stop ldirectord on non-heartbeat systems + # Using the config file /etc/ha.d/ldirectord.cf + # +@@ -59,9 +59,11 @@ + case "$1" in + start) + action "Starting ldirectord" $DAEMON start ++ touch /var/lock/subsys/ldirectord + ;; + stop) + action "Stopping ldirectord" $DAEMON stop ++ rm -f /var/lock/subsys/ldirectord + ;; + restart) + action "Restarting ldirectord" $DAEMON restart | ||
[+] | Added | heartbeat-fedora-pam.patch ^ |
@@ -0,0 +1,15 @@ +diff -Nur heartbeat-2.0.5.orig/mgmt/daemon/mgmtd.pam heartbeat-2.0.5/mgmt/daemon/mgmtd.pam +--- heartbeat-2.0.5.orig/mgmt/daemon/mgmtd.pam 2005-12-30 09:35:27.000000000 +0100 ++++ heartbeat-2.0.5/mgmt/daemon/mgmtd.pam 2006-04-27 20:36:29.000000000 +0200 +@@ -1,3 +1,8 @@ +-auth required pam_unix.so +-account required pam_unix.so +- ++#%PAM-1.0 ++auth sufficient pam_rootok.so ++auth sufficient pam_timestamp.so ++auth required pam_stack.so service=system-auth ++session required pam_permit.so ++session optional pam_xauth.so ++session optional pam_timestamp.so ++account required pam_permit.so | ||
Added | heartbeat-2.0.8-1.fc7.src.rpm ^ | |
Added | heartbeat-2.0.8.tar.gz ^ |