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