]>
Commit | Line | Data |
---|---|---|
288e7c20 | 1 | # |
9b9d4954 | 2 | %include /usr/lib/rpm/macros.perl |
dba30e8d | 3 | Summary: Heartbeat - subsystem for High-Availability Linux |
38bf5a19 ER |
4 | Summary(es.UTF-8): Subsistema heartbeat para Linux "High-Availability" |
5 | Summary(pl.UTF-8): Podsystem heartbeat dla systemów o podwyższonej niezawodności | |
6 | Summary(pt_BR.UTF-8): Implementa sistema de monitoração (heartbeats) visando Alta Disponibilidade | |
49245a93 | 7 | Name: heartbeat |
335d776e JK |
8 | Version: 2.99.2 |
9 | Release: 0.1 | |
0149c089 | 10 | License: GPL v2+ |
dba30e8d | 11 | Group: Applications/System |
335d776e JK |
12 | Source0: http://hg.linux-ha.org/dev/archive/beta-%{version}.tar.bz2 |
13 | # Source0-md5: ef79dc10100451bfcbb55b4707d28eb1 | |
80a56156 | 14 | Source1: %{name}.init |
15 | Source2: ldirectord.init | |
43707702 | 16 | Patch0: %{name}-ac.patch |
288e7c20 | 17 | Patch1: %{name}-no_ipmilan_test.patch |
253e454e | 18 | URL: http://www.linux-ha.org/Heartbeat |
9b9d4954 | 19 | BuildRequires: OpenIPMI-devel >= 2.0.3 |
be5c114d JB |
20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
80a56156 | 22 | BuildRequires: gdbm-devel |
23 | BuildRequires: glib2-devel | |
e4375587 | 24 | BuildRequires: gnutls-devel |
be5c114d | 25 | BuildRequires: libltdl-devel |
8c7f88c8 | 26 | BuildRequires: libnet-devel >= 1.1.0 |
0eec7f7b | 27 | BuildRequires: libnl-devel |
be5c114d | 28 | BuildRequires: libtool |
80a56156 | 29 | BuildRequires: libuuid-devel |
30 | BuildRequires: libwrap-devel | |
5cabf613 | 31 | BuildRequires: libxml2-devel |
43707702 | 32 | BuildRequires: lm_sensors-devel |
ecdd12e5 | 33 | BuildRequires: ncurses-devel >= 5.4 |
38cf68bf | 34 | BuildRequires: net-snmp-devel >= 5.1 |
e4375587 | 35 | BuildRequires: pam-devel |
80a56156 | 36 | BuildRequires: pkgconfig |
e4375587 | 37 | BuildRequires: python-devel |
9b9d4954 | 38 | BuildRequires: rpm-perlprov |
43707702 | 39 | BuildRequires: rpm-pythonprov |
89b00739 | 40 | BuildRequires: rpmbuild(macros) >= 1.268 |
1a1643fc | 41 | BuildRequires: swig-perl >= 1.3.25 |
45cd814e | 42 | BuildRequires: swig-python >= 1.3.25 |
8c7f88c8 ER |
43 | Requires(post,postun): /sbin/ldconfig |
44 | Requires(post,preun): /sbin/chkconfig | |
45 | Requires(postun): /usr/sbin/groupdel | |
46 | Requires(postun): /usr/sbin/userdel | |
2dbb1cca | 47 | Requires(pre): /bin/id |
7efcd267 | 48 | Requires(pre): /usr/bin/getgid |
49 | Requires(pre): /usr/sbin/groupadd | |
2dbb1cca | 50 | Requires(pre): /usr/sbin/useradd |
d503e966 | 51 | Requires: psmisc >= 22.5-2 |
89b00739 | 52 | Requires: rc-scripts |
4eef1bae | 53 | Requires: syslogdaemon |
b52d72b7 | 54 | Requires: which |
d709f63f | 55 | Requires: %{name}-libs = %{version}-%{release} |
5a6adc8b | 56 | Provides: group(haclient) |
2dbb1cca | 57 | Provides: user(hacluster) |
cb667f50 JB |
58 | # disappeared |
59 | Obsoletes: perl-heartbeat | |
c8d761f0 | 60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7f88c8 ER |
61 | |
62 | %define specflags -fgnu89-inline | |
63 | %define filterout_ld -Wl,--as-needed | |
814ecbcd | 64 | |
8060f5e4 | 65 | %description |
49245a93 MP |
66 | heartbeat is a basic heartbeat subsystem for Linux-HA. It will run |
67 | scripts at initialization, and when machines go up or down. This | |
68 | version will also perform IP address takeover using gratuitous ARPs. | |
69 | It works correctly for a 2-node configuration, and is extensible to | |
70 | larger configurations. | |
8060f5e4 | 71 | |
6585451e | 72 | It implements the following kinds of heartbeats: |
49245a93 MP |
73 | - Bidirectional Serial Rings ("raw" serial ports) |
74 | ||
48caa1d6 JR |
75 | %description -l es.UTF-8 |
76 | heartbeat es un sistema básico para Linux-HA. La función de este | |
77 | software es ejecutar scripts en la inicialización y al apagar las | |
78 | máquinas que lo utilizan. | |
79 | ||
80 | %description -l pl.UTF-8 | |
81 | heartbeat jest podstawowym podsystemem dla systemów o podwyższonej | |
82 | dostępności budowanych w oparciu o Linuksa. Zajmuje się uruchamianiem | |
83 | skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala | |
84 | na przejmowanie adresów IP. Oprogramowanie działa poprawnie dla | |
85 | konfiguracji składającej się z 2 hostów, można je również stosować do | |
49245a93 | 86 | bardziej skomplikowanych konfiguracji. |
814ecbcd | 87 | |
80a56156 | 88 | %package stonith |
ae97f5d3 | 89 | Summary: Provides an interface to Shoot The Other Node In The Head |
38bf5a19 | 90 | Summary(pl.UTF-8): Interfejs do "odstrzelenia" drugiego węzła w klastrze |
ae97f5d3 | 91 | Group: Applications/System |
ed0906f5 | 92 | Requires: OpenIPMI >= 2.0.3 |
80a56156 | 93 | |
94 | %description stonith | |
ae97f5d3 JB |
95 | Provides an interface to Shoot The Other Node In The Head. |
96 | ||
48caa1d6 JR |
97 | %description stonith -l pl.UTF-8 |
98 | STONITH (Shoot The Other Node In The Head) to interfejs służący do | |
99 | "odstrzelenia" drugiego węzła w klastrze. | |
80a56156 | 100 | |
101 | %package ldirectord | |
2dbb1cca | 102 | Summary: Monitor virtual services provided by LVS |
38bf5a19 | 103 | Summary(pl.UTF-8): Demon monitorujący wirtualne usługi dostarczane poprzez LVS |
ae97f5d3 | 104 | Group: Applications/System |
aa4f0c56 | 105 | Requires(post,preun): /sbin/chkconfig |
80a56156 | 106 | Requires: ipvsadm |
8c7f88c8 | 107 | Requires: rc-scripts |
80a56156 | 108 | |
109 | %description ldirectord | |
8c7f88c8 ER |
110 | ldirectord is a stand-alone daemon to monitor services of real for |
111 | virtual services provided by The Linux Virtual Server | |
2dbb1cca | 112 | (http://www.linuxvirtualserver.org/). |
80a56156 | 113 | |
48caa1d6 JR |
114 | %description ldirectord -l pl.UTF-8 |
115 | ldirectord to samodzielny demon monitorujący rzeczywiste usługi dla | |
116 | wirtualnych usług dostarczanych poprzez Linux Virtual Server | |
931cb2c1 JB |
117 | (http://www.linuxvirtualserver.org/). |
118 | ||
d709f63f JK |
119 | %package libs |
120 | Summary: Heartbeat libraries | |
121 | Summary(pl.UTF-8): Biblioteki heartbeat | |
122 | Group: Libraries | |
123 | ||
124 | %description libs | |
125 | Heartbeat libraries. | |
126 | ||
127 | %description libs -l pl.UTF-8 | |
128 | Biblioteki heartbeat. | |
129 | ||
80a56156 | 130 | %package devel |
2dbb1cca | 131 | Summary: Heartbeat developement header files and libraries |
38bf5a19 | 132 | Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki heartbeat |
ae97f5d3 | 133 | Group: Development/Libraries |
d709f63f | 134 | Requires: %{name}-libs = %{version}-%{release} |
80a56156 | 135 | |
136 | %description devel | |
2dbb1cca | 137 | Heartbeat developement header files and libraries. |
ae97f5d3 | 138 | |
48caa1d6 JR |
139 | %description devel -l pl.UTF-8 |
140 | Pliki nagłówkowe i biblioteki heartbeat. | |
80a56156 | 141 | |
142 | %package static | |
2dbb1cca | 143 | Summary: Heartbeat static libraries |
38bf5a19 | 144 | Summary(pl.UTF-8): Biblioteki statyczne heartbeat |
ae97f5d3 JB |
145 | Group: Development/Libraries |
146 | Requires: %{name}-devel = %{version}-%{release} | |
147 | ||
80a56156 | 148 | %description static |
2dbb1cca | 149 | Heartbeat static libraries. |
80a56156 | 150 | |
48caa1d6 | 151 | %description static -l pl.UTF-8 |
2dbb1cca | 152 | Biblioteki statyczne heartbeat. |
dba30e8d | 153 | |
9b9d4954 | 154 | %package cts |
155 | Summary: Cluster Test Suite | |
38bf5a19 | 156 | Summary(pl.UTF-8): Zestaw testów klastra |
9b9d4954 | 157 | Group: Applications/System |
158 | Requires: %{name} = %{version}-%{release} | |
159 | ||
160 | %description cts | |
161 | Cluster Test Suite for heartbeat. | |
162 | ||
48caa1d6 JR |
163 | %description cts -l pl.UTF-8 |
164 | Zestaw testów klastra opartego o heartbeat. | |
9b9d4954 | 165 | |
6585451e | 166 | %prep |
335d776e | 167 | %setup -qn Linux-HA-Dev-beta-%{version} |
38cf68bf | 168 | %patch0 -p1 |
69a12e93 | 169 | %patch1 -p1 |
b8ab022e | 170 | |
be5c114d JB |
171 | rm -rf libltdl |
172 | ||
6585451e | 173 | %build |
be5c114d JB |
174 | %{__libtoolize} --ltdl |
175 | %{__aclocal} | |
176 | %{__autoconf} | |
4a602b4b | 177 | %{__autoheader} |
be5c114d JB |
178 | %{__automake} |
179 | %configure \ | |
69a12e93 | 180 | FSCK=/sbin/fsck \ |
f39e1b28 | 181 | FUSER=/bin/fuser \ |
69a12e93 | 182 | IPTABLES=/usr/sbin/iptables \ |
9b9d4954 | 183 | MAILCMD=/bin/mail \ |
80a56156 | 184 | MOUNT=/bin/mount \ |
69a12e93 | 185 | PING=/bin/ping \ |
80a56156 | 186 | --with-initdir=/etc/rc.d/init.d \ |
253e454e | 187 | --enable-fatal-warnings=no \ |
e4375587 | 188 | --enable-mgmt \ |
335d776e | 189 | --enable-quorumd \ |
43707702 | 190 | --enable-snmp-subagent |
be5c114d | 191 | |
49245a93 | 192 | %{__make} |
dba30e8d | 193 | |
814ecbcd | 194 | %install |
49245a93 | 195 | rm -rf $RPM_BUILD_ROOT |
be5c114d JB |
196 | |
197 | %{__make} install \ | |
198 | DESTDIR=$RPM_BUILD_ROOT | |
9b9d4954 | 199 | install -d $RPM_BUILD_ROOT/var/run/heartbeat |
78882913 PG |
200 | |
201 | rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord | |
202 | ln -sf %{_sbindir}/ldirectord $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord | |
814ecbcd | 203 | |
84d8fd23 JB |
204 | # plugins are lt_dlopened, but using *.so names, so *.la are not used |
205 | rm -f $RPM_BUILD_ROOT%{_libdir}/{heartbeat,pils,stonith}/plugins/*/*.{la,a} | |
814ecbcd | 206 | |
80a56156 | 207 | rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat |
208 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat | |
209 | ||
210 | > $RPM_BUILD_ROOT/etc/ha.d/haresources | |
211 | echo -e "auth 2\n2 crc" > $RPM_BUILD_ROOT/etc/ha.d/authkeys | |
212 | install doc/ha.cf $RPM_BUILD_ROOT/etc/ha.d | |
213 | ||
214 | rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord | |
215 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord | |
216 | install ldirectord/ldirectord.cf $RPM_BUILD_ROOT%{_sysconfdir}/ha.d | |
217 | ||
288e7c20 JK |
218 | rm -f $RPM_BUILD_ROOT%{_datadir}/heartbeat/cts/README |
219 | ||
220 | for tool in ha_logger hb_addnode hb_delnode hb_standby hb_takeover; do | |
8c7f88c8 | 221 | ln -sf %{_libdir}/heartbeat/$tool $RPM_BUILD_ROOT%{_bindir} |
288e7c20 JK |
222 | done |
223 | ||
224 | sed -i -e's, /%{_lib}/libpam.la, /usr/%{_lib}/libpam.la,g' $RPM_BUILD_ROOT%{_libdir}/*.la | |
225 | ||
6585451e | 226 | %clean |
6585451e | 227 | rm -rf $RPM_BUILD_ROOT |
6585451e | 228 | |
7f78f119 | 229 | %pre |
e64246bf | 230 | %groupadd -g 60 haclient |
80a56156 | 231 | %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster |
7f78f119 | 232 | |
dba30e8d | 233 | %post |
84d8fd23 | 234 | /sbin/ldconfig |
dba30e8d | 235 | /sbin/chkconfig --add heartbeat |
89b00739 | 236 | %service %{name} restart |
6585451e | 237 | |
6585451e | 238 | %preun |
dba30e8d | 239 | if [ "$1" = "0" ]; then |
89b00739 | 240 | %service -q %{name} stop |
dba30e8d | 241 | /sbin/chkconfig --del heartbeat |
6585451e | 242 | fi |
dba30e8d | 243 | |
7f78f119 | 244 | %postun |
84d8fd23 | 245 | /sbin/ldconfig |
7f78f119 | 246 | if [ "$1" = "0" ]; then |
2dbb1cca | 247 | %userremove hacluster |
5a6adc8b | 248 | %groupremove haclient |
7f78f119 | 249 | fi |
250 | ||
ae97f5d3 JB |
251 | %post stonith -p /sbin/ldconfig |
252 | %postun stonith -p /sbin/ldconfig | |
253 | ||
335d776e | 254 | %files |
78882913 | 255 | %defattr(644,root,root,755) |
48ddbfa1 | 256 | %doc doc/{*.html,AUTHORS,apphbd.cf,authkeys,ha.cf,logd.cf,haresources,startstop} |
84d8fd23 | 257 | %dir %{_libdir}/heartbeat |
84d8fd23 JB |
258 | %dir %{_libdir}/heartbeat/plugins |
259 | %dir %{_libdir}/heartbeat/plugins/* | |
260 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/*/*.so | |
931cb2c1 JB |
261 | %attr(755,root,root) %{_libdir}/heartbeat/[!cp]* |
262 | %attr(755,root,root) %{_libdir}/heartbeat/c[!t]* | |
84d8fd23 JB |
263 | %dir %{_libdir}/pils |
264 | %dir %{_libdir}/pils/plugins | |
265 | %dir %{_libdir}/pils/plugins/* | |
288e7c20 JK |
266 | %dir %{_datadir}/heartbeat |
267 | %attr(755,root,root) %{_datadir}/heartbeat/BasicSanityCheck | |
268 | %attr(755,root,root) %{_datadir}/heartbeat/ResourceManager | |
288e7c20 JK |
269 | %attr(755,root,root) %{_datadir}/heartbeat/TestHeartbeatComm |
270 | %attr(755,root,root) %{_datadir}/heartbeat/ha_* | |
271 | %attr(755,root,root) %{_datadir}/heartbeat/hb_* | |
272 | %attr(755,root,root) %{_datadir}/heartbeat/lrmtest | |
273 | %attr(755,root,root) %{_datadir}/heartbeat/mach_down | |
274 | %attr(755,root,root) %{_datadir}/heartbeat/req_resource | |
48ddbfa1 | 275 | %attr(755,root,root) %{_datadir}/heartbeat/utillib.sh |
4a602b4b | 276 | %{_datadir}/heartbeat/ra-api-1.dtd |
84d8fd23 | 277 | %attr(755,root,root) %{_libdir}/pils/plugins/*/*.so |
84d8fd23 | 278 | %dir %{_sysconfdir}/ha.d |
84d8fd23 JB |
279 | %attr(755,root,root) %{_sysconfdir}/ha.d/rc.d |
280 | %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d | |
288e7c20 | 281 | %exclude %{_sysconfdir}/ha.d/resource.d/ldirectord |
84d8fd23 JB |
282 | %{_sysconfdir}/ha.d/README.config |
283 | %attr(755,root,root) %{_sysconfdir}/ha.d/harc | |
284 | %{_sysconfdir}/ha.d/shellfuncs | |
80a56156 | 285 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/heartbeat |
84d8fd23 | 286 | %attr(754,root,root) /etc/rc.d/init.d/heartbeat |
ecdd12e5 | 287 | %attr(755,root,root) %{_prefix}/lib/ocf |
9b9d4954 | 288 | %dir /var/run/heartbeat |
288e7c20 | 289 | %attr(750,hacluster,haclient) %dir /var/run/heartbeat/ccm |
288e7c20 JK |
290 | %dir /var/lib/heartbeat |
291 | %attr(770,root,haclient) %dir /var/lib/heartbeat/lrm | |
288e7c20 JK |
292 | %attr(711,root,root) %dir /var/lib/heartbeat/cores |
293 | %attr(700,root,root) %dir /var/lib/heartbeat/cores/root | |
294 | # we don't want any files owned by nobody | |
295 | %attr(700,root,root) %dir /var/lib/heartbeat/cores/nobody | |
296 | %attr(700,hacluster,root) %dir /var/lib/heartbeat/cores/hacluster | |
80a56156 | 297 | %{_mandir}/man1/*.1* |
2dbb1cca | 298 | %{_mandir}/man8/[a-h]*.8* |
d2309f7c JB |
299 | %attr(755,root,root) %{_bindir}/cl_respawn |
300 | %attr(2755,root,haclient) %{_bindir}/cl_status | |
288e7c20 JK |
301 | %attr(755,root,root) %{_bindir}/ha_logger |
302 | %attr(755,root,root) %{_bindir}/hb_addnode | |
303 | %attr(755,root,root) %{_bindir}/hb_delnode | |
304 | %attr(755,root,root) %{_bindir}/hb_standby | |
305 | %attr(755,root,root) %{_bindir}/hb_takeover | |
89b00739 | 306 | %attr(755,root,root) %{_sbindir}/[a-i]* |
ecdd12e5 | 307 | %attr(755,root,root) %{_sbindir}/ocf-tester |
335d776e JK |
308 | %attr(755,root,root) %{_sbindir}/sbd |
309 | %attr(755,root,root) %{_sbindir}/sfex_init | |
80a56156 | 310 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/haresources |
311 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/authkeys | |
2dbb1cca | 312 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/ha.cf |
80a56156 | 313 | |
314 | %files stonith | |
315 | %defattr(644,root,root,755) | |
316 | %dir %{_libdir}/stonith | |
317 | %dir %{_libdir}/stonith/plugins | |
318 | %dir %{_libdir}/stonith/plugins/external | |
319 | %dir %{_libdir}/stonith/plugins/stonith2 | |
2dbb1cca | 320 | %attr(755,root,root) %{_libdir}/stonith/plugins/*/* |
4a602b4b | 321 | %attr(755,root,root) %{_libdir}/stonith/plugins/xen0-ha-dom0-stonith-helper |
80a56156 | 322 | %attr(755,root,root) %{_sbindir}/meatclient |
323 | %attr(755,root,root) %{_sbindir}/stonith | |
931cb2c1 JB |
324 | %{_mandir}/man8/stonith.8* |
325 | %{_mandir}/man8/meatclient.8* | |
80a56156 | 326 | |
327 | %files ldirectord | |
328 | %defattr(644,root,root,755) | |
80a56156 | 329 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/ldirectord.cf |
330 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ldirectord | |
288e7c20 | 331 | %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/ldirectord |
80a56156 | 332 | %attr(754,root,root) /etc/rc.d/init.d/ldirectord |
333 | %attr(755,root,root) %{_sbindir}/*ldirectord* | |
ae97f5d3 | 334 | %{_mandir}/man8/*ldirectord*.8* |
80a56156 | 335 | |
d709f63f JK |
336 | %files libs |
337 | %defattr(644,root,root,755) | |
338 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* | |
339 | %attr(755,root,root) %ghost %{_libdir}/lib*.so.[0-9] | |
340 | ||
80a56156 | 341 | %files devel |
342 | %defattr(644,root,root,755) | |
ae97f5d3 | 343 | %{_includedir}/* |
253e454e | 344 | %attr(755,root,root) %{_libdir}/lib*.so |
80a56156 | 345 | %{_libdir}/*.la |
931cb2c1 | 346 | |
38cf68bf JB |
347 | %files static |
348 | %defattr(644,root,root,755) | |
349 | %{_libdir}/*.a | |
350 | ||
9b9d4954 | 351 | %files cts |
352 | %defattr(644,root,root,755) | |
353 | %doc cts/README | |
4a602b4b | 354 | %{_libdir}/heartbeat/cts |
288e7c20 JK |
355 | %dir %{_datadir}/heartbeat/cts |
356 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*.py | |
357 | %{_datadir}/heartbeat/cts/*.py[co] | |
358 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*.sh | |
359 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*Dummy |