]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - merge mibs supackage from 2.1 branch | |
3 | # - cleanup deps, users for 3.x | |
4 | # - fixup deps, inner deps, think of subpackages, ugprade path from 2.1 | |
5 | # | |
6 | # Conditional build: | |
7 | %bcond_with openais # OpenAIS (pre-corosync) support | |
8 | # | |
9 | Summary: Heartbeat - subsystem for High-Availability Linux | |
10 | Summary(es.UTF-8): Subsistema heartbeat para Linux "High-Availability" | |
11 | Summary(pl.UTF-8): Podsystem heartbeat dla systemów o podwyższonej niezawodności | |
12 | Summary(pt_BR.UTF-8): Implementa sistema de monitoração (heartbeats) visando Alta Disponibilidade | |
13 | Name: heartbeat | |
14 | Version: 3.0.5 | |
15 | Release: 7 | |
16 | License: GPL v2+ | |
17 | Group: Networking/Daemons | |
18 | Source0: http://hg.linux-ha.org/heartbeat-STABLE_3_0/archive/STABLE-%{version}.tar.bz2 | |
19 | # Source0-md5: f8686abde8722c42265c6d84fbe3d3bf | |
20 | Source1: %{name}.init | |
21 | Source2: %{name}.tmpfiles | |
22 | Patch0: %{name}-type_mismatch.patch | |
23 | Patch1: %{name}-ac.patch | |
24 | Patch2: %{name}-libs.patch | |
25 | Patch3: %{name}-tls.patch | |
26 | Patch4: %{name}-ucast.patch | |
27 | URL: http://www.linux-ha.org/Heartbeat | |
28 | BuildRequires: autoconf >= 2.53 | |
29 | BuildRequires: automake | |
30 | BuildRequires: cluster-glue-libs-devel | |
31 | BuildRequires: docbook-dtd44-xml | |
32 | BuildRequires: docbook-style-xsl | |
33 | BuildRequires: glib2-devel >= 2.0 | |
34 | BuildRequires: glibc-misc | |
35 | BuildRequires: gnutls-devel | |
36 | BuildRequires: libltdl-devel | |
37 | BuildRequires: libtool | |
38 | BuildRequires: libuuid-devel | |
39 | BuildRequires: libxslt-progs | |
40 | BuildRequires: ncurses-devel >= 5.4 | |
41 | %{?with_openais:BuildRequires: openais-devel} | |
42 | BuildRequires: pkgconfig | |
43 | BuildRequires: python | |
44 | BuildRequires: python-devel | |
45 | BuildRequires: rpm-pythonprov | |
46 | BuildRequires: rpmbuild(macros) >= 1.268 | |
47 | Requires: %{name}-libs = %{version}-%{release} | |
48 | Requires: cluster-glue | |
49 | Requires: psmisc >= 22.5-2 | |
50 | Requires: rc-scripts | |
51 | Requires: resource-agents >= 3.9.2-2 | |
52 | Requires: syslogdaemon | |
53 | Requires: which | |
54 | # disappeared | |
55 | Obsoletes: perl-heartbeat | |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
57 | ||
58 | %define specflags -fgnu89-inline | |
59 | ||
60 | %description | |
61 | heartbeat is a basic heartbeat subsystem for Linux-HA. It will run | |
62 | scripts at initialization, and when machines go up or down. This | |
63 | version will also perform IP address takeover using gratuitous ARPs. | |
64 | It works correctly for a 2-node configuration, and is extensible to | |
65 | larger configurations. | |
66 | ||
67 | It implements the following kinds of heartbeats: | |
68 | - Bidirectional Serial Rings ("raw" serial ports) | |
69 | ||
70 | %description -l es.UTF-8 | |
71 | heartbeat es un sistema básico para Linux-HA. La función de este | |
72 | software es ejecutar scripts en la inicialización y al apagar las | |
73 | máquinas que lo utilizan. | |
74 | ||
75 | %description -l pl.UTF-8 | |
76 | heartbeat jest podstawowym podsystemem dla systemów o podwyższonej | |
77 | dostępności budowanych w oparciu o Linuksa. Zajmuje się uruchamianiem | |
78 | skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala | |
79 | na przejmowanie adresów IP. Oprogramowanie działa poprawnie dla | |
80 | konfiguracji składającej się z 2 hostów, można je również stosować do | |
81 | bardziej skomplikowanych konfiguracji. | |
82 | ||
83 | %package libs | |
84 | Summary: Heartbeat libraries | |
85 | Summary(pl.UTF-8): Biblioteki heartbeat | |
86 | Group: Libraries | |
87 | Conflicts: heartbeat < 2.99.2-0.1 | |
88 | ||
89 | %description libs | |
90 | Heartbeat libraries. | |
91 | ||
92 | %description libs -l pl.UTF-8 | |
93 | Biblioteki heartbeat. | |
94 | ||
95 | %package devel | |
96 | Summary: Heartbeat development header files | |
97 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek heartbeat | |
98 | Group: Development/Libraries | |
99 | Requires: %{name}-libs = %{version}-%{release} | |
100 | Requires: cluster-glue-libs-devel | |
101 | Requires: glib2-devel >= 2.0 | |
102 | Requires: libltdl-devel | |
103 | ||
104 | %description devel | |
105 | Heartbeat development header files. | |
106 | ||
107 | %description devel -l pl.UTF-8 | |
108 | Pliki nagłówkowe bibliotek heartbeat. | |
109 | ||
110 | %package static | |
111 | Summary: Heartbeat static libraries | |
112 | Summary(pl.UTF-8): Biblioteki statyczne heartbeat | |
113 | Group: Development/Libraries | |
114 | Requires: %{name}-devel = %{version}-%{release} | |
115 | ||
116 | %description static | |
117 | Heartbeat static libraries. | |
118 | ||
119 | %description static -l pl.UTF-8 | |
120 | Biblioteki statyczne heartbeat. | |
121 | ||
122 | %package cts | |
123 | Summary: Cluster Test Suite | |
124 | Summary(pl.UTF-8): Zestaw testów klastra | |
125 | Group: Applications/System | |
126 | Requires: %{name} = %{version}-%{release} | |
127 | ||
128 | %description cts | |
129 | Cluster Test Suite for heartbeat. | |
130 | ||
131 | %description cts -l pl.UTF-8 | |
132 | Zestaw testów klastra opartego o heartbeat. | |
133 | ||
134 | %prep | |
135 | %setup -qn Heartbeat-3-0-STABLE-%{version} | |
136 | %patch0 -p1 | |
137 | %patch1 -p1 | |
138 | %patch2 -p1 | |
139 | %patch3 -p1 | |
140 | %patch4 -p1 | |
141 | ||
142 | %build | |
143 | %{__libtoolize} --ltdl | |
144 | %{__aclocal} | |
145 | %{__autoconf} | |
146 | %{__autoheader} | |
147 | %{__automake} | |
148 | %configure \ | |
149 | %{!?with_openais:ac_cv_header_evs_h=no} \ | |
150 | --with-initdir=/etc/rc.d/init.d \ | |
151 | --docdir=%{_docdir}/%{name}-%{version} \ | |
152 | --enable-fatal-warnings=no \ | |
153 | --enable-mgmt \ | |
154 | --enable-quorumd \ | |
155 | --enable-snmp-subagent | |
156 | ||
157 | %{__make} | |
158 | ||
159 | %install | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | %{__make} -j1 install \ | |
162 | DESTDIR=$RPM_BUILD_ROOT | |
163 | ||
164 | install -d $RPM_BUILD_ROOT{/var/run/heartbeat,/usr/lib/tmpfiles.d} | |
165 | ||
166 | # plugins are lt_dlopened, but using *.so names, so *.la are not used | |
167 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/heartbeat/plugins/*/*.{la,a} | |
168 | ||
169 | %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat | |
170 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat | |
171 | ||
172 | > $RPM_BUILD_ROOT/etc/ha.d/haresources | |
173 | echo -e "auth 2\n2 crc" > $RPM_BUILD_ROOT/etc/ha.d/authkeys | |
174 | cp -a doc/ha.cf $RPM_BUILD_ROOT/etc/ha.d | |
175 | ||
176 | for tool in hb_addnode hb_delnode hb_standby hb_takeover; do | |
177 | tool=%{_datadir}/%{name}/$tool | |
178 | [ -x $RPM_BUILD_ROOT$tool ] || exit 1 | |
179 | ln -s $tool $RPM_BUILD_ROOT%{_bindir} | |
180 | done | |
181 | ||
182 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/heartbeat/cts/README | |
183 | ||
184 | install %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf | |
185 | ||
186 | %clean | |
187 | rm -rf $RPM_BUILD_ROOT | |
188 | ||
189 | %post | |
190 | /sbin/chkconfig --add heartbeat | |
191 | %service heartbeat restart | |
192 | ||
193 | %preun | |
194 | if [ "$1" = "0" ]; then | |
195 | %service -q heartbeat stop | |
196 | /sbin/chkconfig --del heartbeat | |
197 | fi | |
198 | ||
199 | %post libs -p /sbin/ldconfig | |
200 | %postun libs -p /sbin/ldconfig | |
201 | ||
202 | %files | |
203 | %defattr(644,root,root,755) | |
204 | %doc doc/{*.html,AUTHORS,apphbd.cf,authkeys,ha.cf,haresources,startstop} | |
205 | %attr(755,root,root) %{_bindir}/cl_respawn | |
206 | %attr(2755,root,haclient) %{_bindir}/cl_status | |
207 | %attr(755,root,root) %{_bindir}/hb_addnode | |
208 | %attr(755,root,root) %{_bindir}/hb_delnode | |
209 | %attr(755,root,root) %{_bindir}/hb_standby | |
210 | %attr(755,root,root) %{_bindir}/hb_takeover | |
211 | %dir %{_libdir}/heartbeat | |
212 | %dir %{_libdir}/heartbeat/plugins | |
213 | %dir %{_libdir}/heartbeat/plugins/HBauth | |
214 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/HBauth/*.so | |
215 | %dir %{_libdir}/heartbeat/plugins/HBcomm | |
216 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/HBcomm/*.so | |
217 | %dir %{_libdir}/heartbeat/plugins/HBcompress | |
218 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/HBcompress/*.so | |
219 | %dir %{_libdir}/heartbeat/plugins/quorum | |
220 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/quorum/*.so | |
221 | %dir %{_libdir}/heartbeat/plugins/quorumd | |
222 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/quorumd/*.so | |
223 | %dir %{_libdir}/heartbeat/plugins/tiebreaker | |
224 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/tiebreaker/*.so | |
225 | %attr(755,root,root) %{_libdir}/heartbeat/api_test | |
226 | %attr(755,root,root) %{_libdir}/heartbeat/apphbd | |
227 | %attr(755,root,root) %{_libdir}/heartbeat/apphbtest | |
228 | %attr(755,root,root) %{_libdir}/heartbeat/ccm | |
229 | %attr(755,root,root) %{_libdir}/heartbeat/ccm_testclient | |
230 | %attr(755,root,root) %{_libdir}/heartbeat/clmtest | |
231 | %attr(755,root,root) %{_libdir}/heartbeat/dopd | |
232 | %attr(755,root,root) %{_libdir}/heartbeat/drbd-peer-outdater | |
233 | %attr(755,root,root) %{_libdir}/heartbeat/heartbeat | |
234 | %attr(755,root,root) %{_libdir}/heartbeat/ipfail | |
235 | %attr(755,root,root) %{_libdir}/heartbeat/mlock | |
236 | %attr(755,root,root) %{_libdir}/heartbeat/quorumd | |
237 | %attr(755,root,root) %{_libdir}/heartbeat/quorumdtest | |
238 | %dir %{_datadir}/heartbeat | |
239 | %attr(755,root,root) %{_datadir}/heartbeat/BasicSanityCheck | |
240 | %attr(755,root,root) %{_datadir}/heartbeat/ResourceManager | |
241 | %attr(755,root,root) %{_datadir}/heartbeat/TestHeartbeatComm | |
242 | %attr(755,root,root) %{_datadir}/heartbeat/ha_* | |
243 | %attr(755,root,root) %{_datadir}/heartbeat/hb_* | |
244 | %attr(755,root,root) %{_datadir}/heartbeat/mach_down | |
245 | %attr(755,root,root) %{_datadir}/heartbeat/req_resource | |
246 | %{_sysconfdir}/ha.d/README.config | |
247 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ha.d/authkeys | |
248 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ha.d/ha.cf | |
249 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ha.d/haresources | |
250 | %attr(755,root,root) %{_sysconfdir}/ha.d/harc | |
251 | %dir %{_sysconfdir}/ha.d/rc.d | |
252 | %attr(755,root,root) %{_sysconfdir}/ha.d/rc.d/* | |
253 | %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/* | |
254 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/heartbeat | |
255 | %attr(754,root,root) /etc/rc.d/init.d/heartbeat | |
256 | %dir /var/run/heartbeat | |
257 | %attr(750,hacluster,haclient) %dir /var/run/heartbeat/ccm | |
258 | %dir /var/lib/heartbeat | |
259 | /usr/lib/tmpfiles.d/%{name}.conf | |
260 | %{_mandir}/man1/cl_status.1* | |
261 | %{_mandir}/man1/hb_addnode.1* | |
262 | %{_mandir}/man1/hb_delnode.1* | |
263 | %{_mandir}/man1/hb_standby.1* | |
264 | %{_mandir}/man1/hb_takeover.1* | |
265 | %{_mandir}/man5/authkeys.5* | |
266 | %{_mandir}/man5/ha.cf.5* | |
267 | %{_mandir}/man8/apphbd.8* | |
268 | %{_mandir}/man8/heartbeat.8* | |
269 | ||
270 | %files libs | |
271 | %defattr(644,root,root,755) | |
272 | %attr(755,root,root) %{_libdir}/libapphb.so.*.*.* | |
273 | %attr(755,root,root) %ghost %{_libdir}/libapphb.so.2 | |
274 | %attr(755,root,root) %{_libdir}/libccmclient.so.*.*.* | |
275 | %attr(755,root,root) %ghost %{_libdir}/libccmclient.so.1 | |
276 | %attr(755,root,root) %{_libdir}/libclm.so.*.*.* | |
277 | %attr(755,root,root) %ghost %{_libdir}/libclm.so.1 | |
278 | %attr(755,root,root) %{_libdir}/libhbclient.so.*.*.* | |
279 | %attr(755,root,root) %ghost %{_libdir}/libhbclient.so.1 | |
280 | ||
281 | %files devel | |
282 | %defattr(644,root,root,755) | |
283 | %attr(755,root,root) %{_libdir}/libapphb.so | |
284 | %attr(755,root,root) %{_libdir}/libccmclient.so | |
285 | %attr(755,root,root) %{_libdir}/libclm.so | |
286 | %attr(755,root,root) %{_libdir}/libhbclient.so | |
287 | %{_libdir}/libapphb.la | |
288 | %{_libdir}/libccmclient.la | |
289 | %{_libdir}/libclm.la | |
290 | %{_libdir}/libhbclient.la | |
291 | %{_includedir}/heartbeat/HB*.h | |
292 | %{_includedir}/heartbeat/apphb*.h | |
293 | %{_includedir}/heartbeat/hb_*.h | |
294 | %{_includedir}/heartbeat/heartbeat.h | |
295 | %{_includedir}/ocf | |
296 | %{_includedir}/saf | |
297 | ||
298 | %files static | |
299 | %defattr(644,root,root,755) | |
300 | %{_libdir}/libapphb.a | |
301 | %{_libdir}/libccmclient.a | |
302 | %{_libdir}/libclm.a | |
303 | %{_libdir}/libhbclient.a | |
304 | ||
305 | %files cts | |
306 | %defattr(644,root,root,755) | |
307 | %doc cts/README | |
308 | %dir %{_datadir}/heartbeat/cts | |
309 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*.py | |
310 | %{_datadir}/heartbeat/cts/*.py[co] | |
311 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*.sh | |
312 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*Dummy |