]>
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 | 8 | Version: 2.99.2 |
7987ba0c | 9 | Release: 2 |
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 |
86e3ff4a | 51 | Requires: %{name}-libs = %{version}-%{release} |
d503e966 | 52 | Requires: psmisc >= 22.5-2 |
89b00739 | 53 | Requires: rc-scripts |
4eef1bae | 54 | Requires: syslogdaemon |
b52d72b7 | 55 | Requires: which |
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 | |
86e3ff4a | 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 | |
86e3ff4a | 117 | <http://www.linuxvirtualserver.org/>. |
931cb2c1 | 118 | |
d709f63f JK |
119 | %package libs |
120 | Summary: Heartbeat libraries | |
121 | Summary(pl.UTF-8): Biblioteki heartbeat | |
122 | Group: Libraries | |
86e3ff4a | 123 | Conflicts: heartbeat < 2.99.2-0.1 |
d709f63f JK |
124 | |
125 | %description libs | |
126 | Heartbeat libraries. | |
127 | ||
128 | %description libs -l pl.UTF-8 | |
129 | Biblioteki heartbeat. | |
130 | ||
80a56156 | 131 | %package devel |
2dbb1cca | 132 | Summary: Heartbeat developement header files and libraries |
38bf5a19 | 133 | Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki heartbeat |
ae97f5d3 | 134 | Group: Development/Libraries |
d709f63f | 135 | Requires: %{name}-libs = %{version}-%{release} |
80a56156 | 136 | |
137 | %description devel | |
2dbb1cca | 138 | Heartbeat developement header files and libraries. |
ae97f5d3 | 139 | |
48caa1d6 JR |
140 | %description devel -l pl.UTF-8 |
141 | Pliki nagłówkowe i biblioteki heartbeat. | |
80a56156 | 142 | |
143 | %package static | |
2dbb1cca | 144 | Summary: Heartbeat static libraries |
38bf5a19 | 145 | Summary(pl.UTF-8): Biblioteki statyczne heartbeat |
ae97f5d3 JB |
146 | Group: Development/Libraries |
147 | Requires: %{name}-devel = %{version}-%{release} | |
148 | ||
80a56156 | 149 | %description static |
2dbb1cca | 150 | Heartbeat static libraries. |
80a56156 | 151 | |
48caa1d6 | 152 | %description static -l pl.UTF-8 |
2dbb1cca | 153 | Biblioteki statyczne heartbeat. |
dba30e8d | 154 | |
9b9d4954 | 155 | %package cts |
156 | Summary: Cluster Test Suite | |
38bf5a19 | 157 | Summary(pl.UTF-8): Zestaw testów klastra |
9b9d4954 | 158 | Group: Applications/System |
159 | Requires: %{name} = %{version}-%{release} | |
160 | ||
161 | %description cts | |
162 | Cluster Test Suite for heartbeat. | |
163 | ||
48caa1d6 JR |
164 | %description cts -l pl.UTF-8 |
165 | Zestaw testów klastra opartego o heartbeat. | |
9b9d4954 | 166 | |
6585451e | 167 | %prep |
335d776e | 168 | %setup -qn Linux-HA-Dev-beta-%{version} |
38cf68bf | 169 | %patch0 -p1 |
69a12e93 | 170 | %patch1 -p1 |
b8ab022e | 171 | |
be5c114d JB |
172 | rm -rf libltdl |
173 | ||
6585451e | 174 | %build |
be5c114d JB |
175 | %{__libtoolize} --ltdl |
176 | %{__aclocal} | |
177 | %{__autoconf} | |
4a602b4b | 178 | %{__autoheader} |
be5c114d JB |
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 \ |
253e454e | 188 | --enable-fatal-warnings=no \ |
e4375587 | 189 | --enable-mgmt \ |
335d776e | 190 | --enable-quorumd \ |
43707702 | 191 | --enable-snmp-subagent |
be5c114d | 192 | |
49245a93 | 193 | %{__make} |
dba30e8d | 194 | |
814ecbcd | 195 | %install |
49245a93 | 196 | rm -rf $RPM_BUILD_ROOT |
be5c114d | 197 | |
b38331b3 | 198 | %{__make} -j1 install \ |
be5c114d | 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 | |
8c7f88c8 | 222 | ln -sf %{_libdir}/heartbeat/$tool $RPM_BUILD_ROOT%{_bindir} |
288e7c20 JK |
223 | done |
224 | ||
225 | sed -i -e's, /%{_lib}/libpam.la, /usr/%{_lib}/libpam.la,g' $RPM_BUILD_ROOT%{_libdir}/*.la | |
226 | ||
6585451e | 227 | %clean |
6585451e | 228 | rm -rf $RPM_BUILD_ROOT |
6585451e | 229 | |
7f78f119 | 230 | %pre |
e64246bf | 231 | %groupadd -g 60 haclient |
80a56156 | 232 | %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster |
7f78f119 | 233 | |
dba30e8d | 234 | %post |
84d8fd23 | 235 | /sbin/ldconfig |
dba30e8d | 236 | /sbin/chkconfig --add heartbeat |
89b00739 | 237 | %service %{name} restart |
6585451e | 238 | |
6585451e | 239 | %preun |
dba30e8d | 240 | if [ "$1" = "0" ]; then |
89b00739 | 241 | %service -q %{name} stop |
dba30e8d | 242 | /sbin/chkconfig --del heartbeat |
6585451e | 243 | fi |
dba30e8d | 244 | |
7f78f119 | 245 | %postun |
84d8fd23 | 246 | /sbin/ldconfig |
7f78f119 | 247 | if [ "$1" = "0" ]; then |
2dbb1cca | 248 | %userremove hacluster |
5a6adc8b | 249 | %groupremove haclient |
7f78f119 | 250 | fi |
251 | ||
ae97f5d3 JB |
252 | %post stonith -p /sbin/ldconfig |
253 | %postun stonith -p /sbin/ldconfig | |
254 | ||
335d776e | 255 | %files |
78882913 | 256 | %defattr(644,root,root,755) |
48ddbfa1 | 257 | %doc doc/{*.html,AUTHORS,apphbd.cf,authkeys,ha.cf,logd.cf,haresources,startstop} |
84d8fd23 | 258 | %dir %{_libdir}/heartbeat |
84d8fd23 JB |
259 | %dir %{_libdir}/heartbeat/plugins |
260 | %dir %{_libdir}/heartbeat/plugins/* | |
261 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/*/*.so | |
931cb2c1 JB |
262 | %attr(755,root,root) %{_libdir}/heartbeat/[!cp]* |
263 | %attr(755,root,root) %{_libdir}/heartbeat/c[!t]* | |
84d8fd23 JB |
264 | %dir %{_libdir}/pils |
265 | %dir %{_libdir}/pils/plugins | |
266 | %dir %{_libdir}/pils/plugins/* | |
288e7c20 JK |
267 | %dir %{_datadir}/heartbeat |
268 | %attr(755,root,root) %{_datadir}/heartbeat/BasicSanityCheck | |
269 | %attr(755,root,root) %{_datadir}/heartbeat/ResourceManager | |
288e7c20 JK |
270 | %attr(755,root,root) %{_datadir}/heartbeat/TestHeartbeatComm |
271 | %attr(755,root,root) %{_datadir}/heartbeat/ha_* | |
272 | %attr(755,root,root) %{_datadir}/heartbeat/hb_* | |
273 | %attr(755,root,root) %{_datadir}/heartbeat/lrmtest | |
274 | %attr(755,root,root) %{_datadir}/heartbeat/mach_down | |
275 | %attr(755,root,root) %{_datadir}/heartbeat/req_resource | |
48ddbfa1 | 276 | %attr(755,root,root) %{_datadir}/heartbeat/utillib.sh |
4a602b4b | 277 | %{_datadir}/heartbeat/ra-api-1.dtd |
84d8fd23 | 278 | %attr(755,root,root) %{_libdir}/pils/plugins/*/*.so |
84d8fd23 | 279 | %dir %{_sysconfdir}/ha.d |
84d8fd23 JB |
280 | %attr(755,root,root) %{_sysconfdir}/ha.d/rc.d |
281 | %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d | |
288e7c20 | 282 | %exclude %{_sysconfdir}/ha.d/resource.d/ldirectord |
84d8fd23 JB |
283 | %{_sysconfdir}/ha.d/README.config |
284 | %attr(755,root,root) %{_sysconfdir}/ha.d/harc | |
285 | %{_sysconfdir}/ha.d/shellfuncs | |
80a56156 | 286 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/heartbeat |
84d8fd23 | 287 | %attr(754,root,root) /etc/rc.d/init.d/heartbeat |
ecdd12e5 | 288 | %attr(755,root,root) %{_prefix}/lib/ocf |
9b9d4954 | 289 | %dir /var/run/heartbeat |
288e7c20 | 290 | %attr(750,hacluster,haclient) %dir /var/run/heartbeat/ccm |
288e7c20 JK |
291 | %dir /var/lib/heartbeat |
292 | %attr(770,root,haclient) %dir /var/lib/heartbeat/lrm | |
288e7c20 JK |
293 | %attr(711,root,root) %dir /var/lib/heartbeat/cores |
294 | %attr(700,root,root) %dir /var/lib/heartbeat/cores/root | |
295 | # we don't want any files owned by nobody | |
296 | %attr(700,root,root) %dir /var/lib/heartbeat/cores/nobody | |
297 | %attr(700,hacluster,root) %dir /var/lib/heartbeat/cores/hacluster | |
80a56156 | 298 | %{_mandir}/man1/*.1* |
2dbb1cca | 299 | %{_mandir}/man8/[a-h]*.8* |
d2309f7c JB |
300 | %attr(755,root,root) %{_bindir}/cl_respawn |
301 | %attr(2755,root,haclient) %{_bindir}/cl_status | |
288e7c20 JK |
302 | %attr(755,root,root) %{_bindir}/ha_logger |
303 | %attr(755,root,root) %{_bindir}/hb_addnode | |
304 | %attr(755,root,root) %{_bindir}/hb_delnode | |
305 | %attr(755,root,root) %{_bindir}/hb_standby | |
306 | %attr(755,root,root) %{_bindir}/hb_takeover | |
89b00739 | 307 | %attr(755,root,root) %{_sbindir}/[a-i]* |
ecdd12e5 | 308 | %attr(755,root,root) %{_sbindir}/ocf-tester |
335d776e JK |
309 | %attr(755,root,root) %{_sbindir}/sbd |
310 | %attr(755,root,root) %{_sbindir}/sfex_init | |
80a56156 | 311 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/haresources |
312 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/authkeys | |
2dbb1cca | 313 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/ha.cf |
80a56156 | 314 | |
315 | %files stonith | |
316 | %defattr(644,root,root,755) | |
317 | %dir %{_libdir}/stonith | |
318 | %dir %{_libdir}/stonith/plugins | |
319 | %dir %{_libdir}/stonith/plugins/external | |
320 | %dir %{_libdir}/stonith/plugins/stonith2 | |
2dbb1cca | 321 | %attr(755,root,root) %{_libdir}/stonith/plugins/*/* |
4a602b4b | 322 | %attr(755,root,root) %{_libdir}/stonith/plugins/xen0-ha-dom0-stonith-helper |
80a56156 | 323 | %attr(755,root,root) %{_sbindir}/meatclient |
324 | %attr(755,root,root) %{_sbindir}/stonith | |
931cb2c1 JB |
325 | %{_mandir}/man8/stonith.8* |
326 | %{_mandir}/man8/meatclient.8* | |
80a56156 | 327 | |
328 | %files ldirectord | |
329 | %defattr(644,root,root,755) | |
80a56156 | 330 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/ldirectord.cf |
331 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ldirectord | |
288e7c20 | 332 | %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/ldirectord |
80a56156 | 333 | %attr(754,root,root) /etc/rc.d/init.d/ldirectord |
334 | %attr(755,root,root) %{_sbindir}/*ldirectord* | |
ae97f5d3 | 335 | %{_mandir}/man8/*ldirectord*.8* |
80a56156 | 336 | |
d709f63f JK |
337 | %files libs |
338 | %defattr(644,root,root,755) | |
339 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* | |
340 | %attr(755,root,root) %ghost %{_libdir}/lib*.so.[0-9] | |
341 | ||
80a56156 | 342 | %files devel |
343 | %defattr(644,root,root,755) | |
ae97f5d3 | 344 | %{_includedir}/* |
253e454e | 345 | %attr(755,root,root) %{_libdir}/lib*.so |
80a56156 | 346 | %{_libdir}/*.la |
931cb2c1 | 347 | |
38cf68bf JB |
348 | %files static |
349 | %defattr(644,root,root,755) | |
350 | %{_libdir}/*.a | |
351 | ||
9b9d4954 | 352 | %files cts |
353 | %defattr(644,root,root,755) | |
354 | %doc cts/README | |
4a602b4b | 355 | %{_libdir}/heartbeat/cts |
288e7c20 JK |
356 | %dir %{_datadir}/heartbeat/cts |
357 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*.py | |
358 | %{_datadir}/heartbeat/cts/*.py[co] | |
359 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*.sh | |
360 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*Dummy |