Changes of Revision 11
[-] | 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.1.2 10 +Release: 2%{?dist} 11 +License: GPLv2 and LGPLv2+ 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 +Patch2: heartbeat-2.1.2-open.patch 18 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 19 +BuildRequires: glib2-devel 20 +BuildRequires: iputils 21 +BuildRequires: libnet-devel 22 +BuildRequires: libtool-ltdl-devel 23 +BuildRequires: net-snmp-devel >= 5.4 24 +BuildRequires: bzip2-devel 25 +BuildRequires: ncurses-devel 26 +BuildRequires: openssl-devel 27 +BuildRequires: libtool 28 +BuildRequires: libxml2-devel 29 +BuildRequires: gettext 30 +%if %{ENABLE_MGMT} 31 +BuildRequires: gnutls-devel 32 +BuildRequires: pam-devel 33 +BuildRequires: python-devel 34 +BuildRequires: swig 35 +%endif 36 +Requires: ldirectord = %{version}-%{release} 37 +Requires: pygtk2 >= 2.4 38 +Requires(pre): fedora-usermgmt 39 +Requires(postun): fedora-usermgmt 40 +Requires(post): /sbin/chkconfig 41 +Requires(preun): /sbin/chkconfig 42 +%if %{ENABLE_MGMT} 43 +Requires: gettext 44 +%endif 45 + 46 +%description 47 +heartbeat is a basic high-availability subsystem for Linux-HA. 48 +It will run scripts at initialization, and when machines go up or down. 49 +This version will also perform IP address takeover using gratuitous ARPs. 50 +It supports "n-node" clusters with significant capabilities for managing 51 +resources and dependencies. 52 + 53 +In addition it continues to support the older release 1 style of 54 +2-node clustering. 55 + 56 +It implements the following kinds of heartbeats: 57 + - Serial ports 58 + - UDP/IP multicast (ethernet, etc) 59 + - UDP/IP broadcast (ethernet, etc) 60 + - UDP/IP heartbeats 61 + - "ping" heartbeats (for routers, switches, etc.) 62 + (to be used for breaking ties in 2-node systems) 63 + 64 +%package -n ldirectord 65 +Summary: Monitor daemon for maintaining high availability resources 66 +Group: System Environment/Daemons 67 +Requires: ipvsadm 68 +Requires(post): /sbin/chkconfig 69 +Requires(preun): /sbin/chkconfig 70 + 71 +%description -n ldirectord 72 +ldirectord is a stand-alone daemon to monitor services of real 73 +for virtual services provided by The Linux Virtual Server 74 +(http://www.linuxvirtualserver.org/). It is simple to install 75 +and works with the heartbeat code (http://www.linux-ha.org/). 76 + 77 +%package -n stonith 78 +Requires: net-snmp-libs 79 +Summary: Provides an interface to Shoot The Other Node In The Head 80 +Group: System Environment/Daemons 81 + 82 +%description -n stonith 83 +The STONITH module (a.k.a. STONITH) provides an extensible interface 84 +for remotely powering down a node in the cluster. The idea is quite simple: 85 +When the software running on one machine wants to make sure another 86 +machine in the cluster is not using a resource, pull the plug on the other 87 +machine. It's simple and reliable, albeit admittedly brutal. 88 + 89 +%package -n pils 90 +Summary: Provides a general plugin and interface loading library 91 +Group: System Environment/Daemons 92 + 93 +%description -n pils 94 +PILS is an generalized and portable open source Plugin and Interface Loading 95 +System. PILS was developed as part of the Open Cluster Framework reference 96 +implementation, and is designed to be directly usable by a wide variety of 97 +other applications. 98 +PILS manages both plugins (loadable objects), and the interfaces these plugins 99 +implement. PILS is designed to support any number of plugins implementing any 100 +number of interfaces. 101 + 102 +%package devel 103 +Summary: Heartbeat development package 104 +Group: System Environment/Daemons 105 +Requires: heartbeat = %{version}-%{release} 106 + 107 +%description devel 108 +Heartbeat development package 109 + 110 +%prep 111 +%setup -q 112 +%patch0 -p1 113 +%patch1 -p1 114 +%patch2 -p1 115 + 116 +%build 117 +# disable-fatal-warnings flag used to disable gcc4.x warnings of 'difference in signedness' 118 +CFLAGS=${RPM_OPT_FLAGS} \ 119 +%configure \ 120 + --with-ocf-root=%{_datadir}/ocf \ 121 + --disable-fatal-warnings \ 122 + --disable-static \ 123 +%if %{ENABLE_MGMT} 124 + --enable-mgmt 125 +%else 126 + --disable-mgmt 127 +%endif 128 + 129 +# get rid of rpath 130 +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool 131 +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool 132 + 133 +make %{?_smp_mflags} 134 + 135 +%install 136 +rm -rf $RPM_BUILD_ROOT 137 +mkdir -p $RPM_BUILD_ROOT 138 +make DESTDIR=$RPM_BUILD_ROOT install 139 +( 140 + cd $RPM_BUILD_ROOT/etc/ha.d/resource.d 141 + ln -s /usr/sbin/ldirectord ldirectord 142 +) 143 + 144 +# cleanup 145 +[ -d $RPM_BUILD_ROOT/usr/man ] && rm -rf $RPM_BUILD_ROOT/usr/man 146 +[ -d $RPM_BUILD_ROOT/usr/share/libtool ] && rm -rf $RPM_BUILD_ROOT/usr/share/libtool 147 +find $RPM_BUILD_ROOT -type f -name *.la -exec rm -f {} ';' 148 + 149 +sed -i -e '1i# -*-Shell-script-*-' $RPM_BUILD_ROOT/%{_libdir}/heartbeat/ocf-shellfuncs 150 +sed -i -e '1i# -*-Shell-script-*-' $RPM_BUILD_ROOT/%{_sysconfdir}/ha.d/shellfuncs 151 +chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/ocf-shellfuncs 152 +chmod -x $RPM_BUILD_ROOT/%{_sysconfdir}/ha.d/shellfuncs 153 +chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat-gui/pymgmt.py 154 + 155 +# fix some wrong line endings issues 156 +sed -i 's/\r//' $RPM_BUILD_ROOT/%{_datadir}/ocf/resource.d/heartbeat/SAPDatabase 157 +sed -i 's/\r//' $RPM_BUILD_ROOT/%{_datadir}/ocf/resource.d/heartbeat/SAPInstance 158 + 159 +%find_lang haclient 160 + 161 +%clean 162 +rm -rf $RPM_BUILD_ROOT 163 + 164 +%pre 165 +/usr/sbin/fedora-groupadd %{uid} -r %{gname} &>/dev/null || : 166 +/usr/sbin/fedora-useradd %{uid} -r -s /sbin/nologin -d /var/lib/heartbeat/cores/hacluster -M \ 167 + -c 'heartbeat user' -g %{gname} %{uname} &>/dev/null || : 168 + 169 +%post 170 +/sbin/ldconfig 171 +/sbin/chkconfig --add heartbeat 172 + 173 +%postun -p /sbin/ldconfig 174 + 175 +%preun 176 +if [ $1 = 0 ] ; then 177 + /sbin/service heartbeat stop 178 + /sbin/chkconfig --del heartbeat 179 +fi 180 + 181 +/sbin/ldconfig 182 +test "$1" != 0 || /usr/sbin/fedora-userdel %{uname} &>/dev/null || : 183 +test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || : 184 + 185 +%post -n ldirectord 186 +/sbin/chkconfig --add ldirectord 187 + 188 +%postun -n ldirectord -p /sbin/ldconfig 189 + 190 +%preun -n ldirectord 191 +/sbin/chkconfig --del ldirectord 192 + 193 +%post -n stonith -p /sbin/ldconfig 194 + 195 +%postun -n stonith -p /sbin/ldconfig 196 + 197 +%post -n pils -p /sbin/ldconfig 198 + 199 +%postun -n pils -p /sbin/ldconfig 200 + 201 |
||
[+] | Added | heartbeat-2.1.2-open.patch ^ |
@@ -0,0 +1,24 @@ +diff -Nur heartbeat-2.1.2.orig/heartbeat/heartbeat.c heartbeat-2.1.2/heartbeat/heartbeat.c +--- heartbeat-2.1.2.orig/heartbeat/heartbeat.c 2007-08-01 20:06:54.000000000 -0600 ++++ heartbeat-2.1.2/heartbeat/heartbeat.c 2007-08-14 22:21:46.000000000 -0600 +@@ -862,7 +862,7 @@ + + ourproc = procinfo->nprocs; + +- if (mp->vf->open(mp) != HA_OK){ ++ if ((mp->vf->open)(mp) != HA_OK){ + cl_log(LOG_ERR, "cannot open %s %s", + mp->type, + mp->name); +diff -Nur heartbeat-2.1.2.orig/lib/clplumbing/cl_msg.c heartbeat-2.1.2/lib/clplumbing/cl_msg.c +--- heartbeat-2.1.2.orig/lib/clplumbing/cl_msg.c 2007-08-01 20:06:54.000000000 -0600 ++++ heartbeat-2.1.2/lib/clplumbing/cl_msg.c 2007-08-14 21:36:14.000000000 -0600 +@@ -145,7 +145,7 @@ + return -1; + } + +- return open(filename, O_WRONLY|O_CREAT|O_APPEND); ++ return open(filename, O_WRONLY|O_CREAT|O_APPEND, 0755); + + } + | ||
[+] | 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.1.2-2.fc8.src.rpm ^ | |
Added | heartbeat-2.1.2.tar.gz ^ |