]>
Commit | Line | Data |
---|---|---|
fe259927 | 1 | # TODO |
fe259927 ER |
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 | |
288e7c20 | 5 | # |
cef9e143 JB |
6 | # Conditional build: |
7 | %bcond_with openais # OpenAIS (pre-corosync) support | |
8 | # | |
dba30e8d | 9 | Summary: Heartbeat - subsystem for High-Availability Linux |
38bf5a19 ER |
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 | |
49245a93 | 13 | Name: heartbeat |
d3d857b8 | 14 | Version: 3.0.5 |
07b4fb57 | 15 | Release: 7 |
0149c089 | 16 | License: GPL v2+ |
8c1cc2a6 | 17 | Group: Networking/Daemons |
a8633069 JK |
18 | Source0: http://hg.linux-ha.org/heartbeat-STABLE_3_0/archive/STABLE-%{version}.tar.bz2 |
19 | # Source0-md5: f8686abde8722c42265c6d84fbe3d3bf | |
80a56156 | 20 | Source1: %{name}.init |
264020c9 | 21 | Source2: %{name}.tmpfiles |
a8633069 JK |
22 | Patch0: %{name}-type_mismatch.patch |
23 | Patch1: %{name}-ac.patch | |
24 | Patch2: %{name}-libs.patch | |
25 | Patch3: %{name}-tls.patch | |
9b6436f8 | 26 | Patch4: %{name}-ucast.patch |
253e454e | 27 | URL: http://www.linux-ha.org/Heartbeat |
cef9e143 | 28 | BuildRequires: autoconf >= 2.53 |
be5c114d | 29 | BuildRequires: automake |
fe259927 | 30 | BuildRequires: cluster-glue-libs-devel |
7013fb11 | 31 | BuildRequires: docbook-dtd44-xml |
32 | BuildRequires: docbook-style-xsl | |
cef9e143 | 33 | BuildRequires: glib2-devel >= 2.0 |
7013fb11 | 34 | BuildRequires: glibc-misc |
e4375587 | 35 | BuildRequires: gnutls-devel |
be5c114d JB |
36 | BuildRequires: libltdl-devel |
37 | BuildRequires: libtool | |
80a56156 | 38 | BuildRequires: libuuid-devel |
7013fb11 | 39 | BuildRequires: libxslt-progs |
ecdd12e5 | 40 | BuildRequires: ncurses-devel >= 5.4 |
cef9e143 | 41 | %{?with_openais:BuildRequires: openais-devel} |
80a56156 | 42 | BuildRequires: pkgconfig |
cef9e143 | 43 | BuildRequires: python |
e4375587 | 44 | BuildRequires: python-devel |
43707702 | 45 | BuildRequires: rpm-pythonprov |
89b00739 | 46 | BuildRequires: rpmbuild(macros) >= 1.268 |
86e3ff4a | 47 | Requires: %{name}-libs = %{version}-%{release} |
e7ce3187 | 48 | Requires: cluster-glue |
d503e966 | 49 | Requires: psmisc >= 22.5-2 |
89b00739 | 50 | Requires: rc-scripts |
0e6a9a5c | 51 | Requires: resource-agents >= 3.9.2-2 |
4eef1bae | 52 | Requires: syslogdaemon |
b52d72b7 | 53 | Requires: which |
cb667f50 JB |
54 | # disappeared |
55 | Obsoletes: perl-heartbeat | |
c8d761f0 | 56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7f88c8 | 57 | |
cef9e143 | 58 | %define specflags -fgnu89-inline |
814ecbcd | 59 | |
8060f5e4 | 60 | %description |
49245a93 MP |
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. | |
8060f5e4 | 66 | |
6585451e | 67 | It implements the following kinds of heartbeats: |
49245a93 MP |
68 | - Bidirectional Serial Rings ("raw" serial ports) |
69 | ||
48caa1d6 JR |
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 | |
49245a93 | 81 | bardziej skomplikowanych konfiguracji. |
814ecbcd | 82 | |
d709f63f JK |
83 | %package libs |
84 | Summary: Heartbeat libraries | |
85 | Summary(pl.UTF-8): Biblioteki heartbeat | |
86 | Group: Libraries | |
86e3ff4a | 87 | Conflicts: heartbeat < 2.99.2-0.1 |
d709f63f JK |
88 | |
89 | %description libs | |
90 | Heartbeat libraries. | |
91 | ||
92 | %description libs -l pl.UTF-8 | |
93 | Biblioteki heartbeat. | |
94 | ||
80a56156 | 95 | %package devel |
cef9e143 JB |
96 | Summary: Heartbeat development header files |
97 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek heartbeat | |
ae97f5d3 | 98 | Group: Development/Libraries |
d709f63f | 99 | Requires: %{name}-libs = %{version}-%{release} |
cef9e143 JB |
100 | Requires: cluster-glue-libs-devel |
101 | Requires: glib2-devel >= 2.0 | |
102 | Requires: libltdl-devel | |
80a56156 | 103 | |
104 | %description devel | |
cef9e143 | 105 | Heartbeat development header files. |
ae97f5d3 | 106 | |
48caa1d6 | 107 | %description devel -l pl.UTF-8 |
cef9e143 | 108 | Pliki nagłówkowe bibliotek heartbeat. |
80a56156 | 109 | |
110 | %package static | |
2dbb1cca | 111 | Summary: Heartbeat static libraries |
38bf5a19 | 112 | Summary(pl.UTF-8): Biblioteki statyczne heartbeat |
ae97f5d3 JB |
113 | Group: Development/Libraries |
114 | Requires: %{name}-devel = %{version}-%{release} | |
115 | ||
80a56156 | 116 | %description static |
2dbb1cca | 117 | Heartbeat static libraries. |
80a56156 | 118 | |
48caa1d6 | 119 | %description static -l pl.UTF-8 |
2dbb1cca | 120 | Biblioteki statyczne heartbeat. |
dba30e8d | 121 | |
9b9d4954 | 122 | %package cts |
123 | Summary: Cluster Test Suite | |
38bf5a19 | 124 | Summary(pl.UTF-8): Zestaw testów klastra |
9b9d4954 | 125 | Group: Applications/System |
126 | Requires: %{name} = %{version}-%{release} | |
127 | ||
128 | %description cts | |
129 | Cluster Test Suite for heartbeat. | |
130 | ||
48caa1d6 JR |
131 | %description cts -l pl.UTF-8 |
132 | Zestaw testów klastra opartego o heartbeat. | |
9b9d4954 | 133 | |
6585451e | 134 | %prep |
a8633069 | 135 | %setup -qn Heartbeat-3-0-STABLE-%{version} |
38cf68bf | 136 | %patch0 -p1 |
ebbe20a7 | 137 | %patch1 -p1 |
5fb83e04 | 138 | %patch2 -p1 |
a8633069 | 139 | %patch3 -p1 |
9b6436f8 | 140 | %patch4 -p1 |
be5c114d | 141 | |
6585451e | 142 | %build |
be5c114d JB |
143 | %{__libtoolize} --ltdl |
144 | %{__aclocal} | |
145 | %{__autoconf} | |
4a602b4b | 146 | %{__autoheader} |
be5c114d JB |
147 | %{__automake} |
148 | %configure \ | |
cef9e143 | 149 | %{!?with_openais:ac_cv_header_evs_h=no} \ |
80a56156 | 150 | --with-initdir=/etc/rc.d/init.d \ |
fe259927 | 151 | --docdir=%{_docdir}/%{name}-%{version} \ |
253e454e | 152 | --enable-fatal-warnings=no \ |
e4375587 | 153 | --enable-mgmt \ |
335d776e | 154 | --enable-quorumd \ |
43707702 | 155 | --enable-snmp-subagent |
be5c114d | 156 | |
49245a93 | 157 | %{__make} |
dba30e8d | 158 | |
814ecbcd | 159 | %install |
49245a93 | 160 | rm -rf $RPM_BUILD_ROOT |
b38331b3 | 161 | %{__make} -j1 install \ |
be5c114d | 162 | DESTDIR=$RPM_BUILD_ROOT |
78882913 | 163 | |
264020c9 | 164 | install -d $RPM_BUILD_ROOT{/var/run/heartbeat,/usr/lib/tmpfiles.d} |
814ecbcd | 165 | |
84d8fd23 | 166 | # plugins are lt_dlopened, but using *.so names, so *.la are not used |
cef9e143 | 167 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/heartbeat/plugins/*/*.{la,a} |
814ecbcd | 168 | |
cef9e143 | 169 | %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat |
fe259927 | 170 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat |
80a56156 | 171 | |
172 | > $RPM_BUILD_ROOT/etc/ha.d/haresources | |
173 | echo -e "auth 2\n2 crc" > $RPM_BUILD_ROOT/etc/ha.d/authkeys | |
fe259927 | 174 | cp -a doc/ha.cf $RPM_BUILD_ROOT/etc/ha.d |
80a56156 | 175 | |
fe259927 ER |
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} | |
288e7c20 JK |
180 | done |
181 | ||
cef9e143 | 182 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/heartbeat/cts/README |
288e7c20 | 183 | |
264020c9 JK |
184 | install %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf |
185 | ||
6585451e | 186 | %clean |
6585451e | 187 | rm -rf $RPM_BUILD_ROOT |
6585451e | 188 | |
dba30e8d JB |
189 | %post |
190 | /sbin/chkconfig --add heartbeat | |
fe259927 | 191 | %service heartbeat restart |
6585451e | 192 | |
6585451e | 193 | %preun |
dba30e8d | 194 | if [ "$1" = "0" ]; then |
fe259927 | 195 | %service -q heartbeat stop |
dba30e8d | 196 | /sbin/chkconfig --del heartbeat |
6585451e | 197 | fi |
dba30e8d | 198 | |
fe259927 ER |
199 | %post libs -p /sbin/ldconfig |
200 | %postun libs -p /sbin/ldconfig | |
ae97f5d3 | 201 | |
335d776e | 202 | %files |
78882913 | 203 | %defattr(644,root,root,755) |
fe259927 | 204 | %doc doc/{*.html,AUTHORS,apphbd.cf,authkeys,ha.cf,haresources,startstop} |
cef9e143 JB |
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 | |
84d8fd23 | 211 | %dir %{_libdir}/heartbeat |
84d8fd23 | 212 | %dir %{_libdir}/heartbeat/plugins |
cef9e143 JB |
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 | |
288e7c20 JK |
238 | %dir %{_datadir}/heartbeat |
239 | %attr(755,root,root) %{_datadir}/heartbeat/BasicSanityCheck | |
240 | %attr(755,root,root) %{_datadir}/heartbeat/ResourceManager | |
288e7c20 JK |
241 | %attr(755,root,root) %{_datadir}/heartbeat/TestHeartbeatComm |
242 | %attr(755,root,root) %{_datadir}/heartbeat/ha_* | |
243 | %attr(755,root,root) %{_datadir}/heartbeat/hb_* | |
288e7c20 JK |
244 | %attr(755,root,root) %{_datadir}/heartbeat/mach_down |
245 | %attr(755,root,root) %{_datadir}/heartbeat/req_resource | |
84d8fd23 | 246 | %{_sysconfdir}/ha.d/README.config |
cef9e143 JB |
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 | |
84d8fd23 | 250 | %attr(755,root,root) %{_sysconfdir}/ha.d/harc |
cef9e143 JB |
251 | %dir %{_sysconfdir}/ha.d/rc.d |
252 | %attr(755,root,root) %{_sysconfdir}/ha.d/rc.d/* | |
e2852c60 | 253 | %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/* |
80a56156 | 254 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/heartbeat |
84d8fd23 | 255 | %attr(754,root,root) /etc/rc.d/init.d/heartbeat |
9b9d4954 | 256 | %dir /var/run/heartbeat |
288e7c20 | 257 | %attr(750,hacluster,haclient) %dir /var/run/heartbeat/ccm |
288e7c20 | 258 | %dir /var/lib/heartbeat |
cef9e143 JB |
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* | |
fe259927 ER |
265 | %{_mandir}/man5/authkeys.5* |
266 | %{_mandir}/man5/ha.cf.5* | |
cef9e143 JB |
267 | %{_mandir}/man8/apphbd.8* |
268 | %{_mandir}/man8/heartbeat.8* | |
80a56156 | 269 | |
d709f63f JK |
270 | %files libs |
271 | %defattr(644,root,root,755) | |
fe259927 ER |
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 | |
d709f63f | 280 | |
80a56156 | 281 | %files devel |
282 | %defattr(644,root,root,755) | |
fe259927 ER |
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 | |
cef9e143 JB |
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 | |
931cb2c1 | 297 | |
38cf68bf JB |
298 | %files static |
299 | %defattr(644,root,root,755) | |
fe259927 ER |
300 | %{_libdir}/libapphb.a |
301 | %{_libdir}/libccmclient.a | |
302 | %{_libdir}/libclm.a | |
303 | %{_libdir}/libhbclient.a | |
38cf68bf | 304 | |
9b9d4954 | 305 | %files cts |
306 | %defattr(644,root,root,755) | |
307 | %doc cts/README | |
288e7c20 JK |
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 |