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