]>
Commit | Line | Data |
---|---|---|
1be99b68 | 1 | # TODO: |
1c6f7a24 | 2 | # - pldize ha_logd initscript (look heartbeat.init?) |
1be99b68 JB |
3 | # - stonith-libs? pils? (any sense? libs are small and have little external dependencies) |
4 | # - separate some stonith plugins which have external dependencies? | |
5 | # | |
6 | # Conditional build: | |
7 | %bcond_without vacm # VACM stonith plugin | |
8 | # | |
6badcd29 | 9 | Summary: Reusable cluster components |
efb3674e | 10 | Summary(pl.UTF-8): Komponenty klastrowe wielokrotnego użytku |
6badcd29 | 11 | Name: cluster-glue |
aed83822 | 12 | Version: 1.0.12 |
17955e91 | 13 | Release: 3 |
ad5b8def | 14 | License: GPL v2+ and LGPL v2+ |
1be99b68 | 15 | Group: Aplications/System |
d184d873 | 16 | #Source0Download: http://www.linux-ha.org/wiki/Downloads |
2c07a667 | 17 | Source0: http://hg.linux-ha.org/glue/archive/glue-%{version}.tar.bz2 |
aed83822 | 18 | # Source0-md5: ec620466d6f23affa3b074b72bca7870 |
1be99b68 JB |
19 | Patch0: %{name}-link.patch |
20 | Patch1: %{name}-opt.patch | |
aed83822 | 21 | Patch2: %{name}-rc.patch |
d6a380fa JB |
22 | Patch3: %{name}-heartbeat-libexecdir.patch |
23 | Patch4: x32-long-long-time-types.patch | |
d184d873 | 24 | URL: http://www.linux-ha.org/wiki/Cluster_Glue |
1be99b68 JB |
25 | BuildRequires: OpenIPMI-devel >= 1.4 |
26 | BuildRequires: autoconf >= 2.53 | |
6badcd29 ER |
27 | BuildRequires: automake |
28 | BuildRequires: bzip2-devel | |
29 | BuildRequires: curl-devel | |
0f3873cf | 30 | BuildRequires: docbook-dtd42-xml |
89b15d29 | 31 | BuildRequires: docbook-dtd44-xml |
6badcd29 | 32 | BuildRequires: docbook-style-xsl |
1be99b68 JB |
33 | BuildRequires: glib2-devel >= 2.0 |
34 | BuildRequires: help2man | |
fe303807 | 35 | BuildRequires: libaio-devel |
6badcd29 | 36 | BuildRequires: libltdl-devel |
1be99b68 | 37 | BuildRequires: libnet-devel >= 1.0 |
6badcd29 ER |
38 | BuildRequires: libstdc++-devel |
39 | BuildRequires: libtool | |
40 | BuildRequires: libuuid-devel | |
1be99b68 | 41 | BuildRequires: libxml2-devel >= 2.0 |
89b15d29 | 42 | BuildRequires: libxslt-progs |
43 | BuildRequires: ncurses-devel | |
6badcd29 ER |
44 | BuildRequires: net-snmp-devel >= 5.4 |
45 | BuildRequires: openhpi-devel | |
46 | BuildRequires: openssl-devel | |
1be99b68 | 47 | BuildRequires: perl-tools-pod |
6badcd29 ER |
48 | BuildRequires: pkgconfig |
49 | BuildRequires: python-devel | |
89b15d29 | 50 | BuildRequires: rpm-pythonprov |
1be99b68 | 51 | %{?with_vacm:BuildRequires: vacm-devel} |
fe303807 | 52 | BuildRequires: zlib-devel |
1c6f7a24 ER |
53 | Requires(post,preun): /sbin/chkconfig |
54 | Requires(postun): /usr/sbin/groupdel | |
55 | Requires(postun): /usr/sbin/userdel | |
56 | Requires(pre): /bin/id | |
57 | Requires(pre): /usr/bin/getgid | |
58 | Requires(pre): /usr/sbin/groupadd | |
59 | Requires(pre): /usr/sbin/useradd | |
c65ec4ed JK |
60 | Requires(post,preun,postun): systemd-units |
61 | Requires: systemd-units | |
fcfe851d | 62 | Requires: %{name}-libs = %{version}-%{release} |
6badcd29 | 63 | Requires: perl-TimeDate |
1c6f7a24 ER |
64 | Requires: rc-scripts |
65 | Provides: group(haclient) | |
66 | Provides: user(hacluster) | |
6badcd29 ER |
67 | # Directives to allow upgrade from combined heartbeat packages |
68 | Provides: heartbeat-pils = 3.0.0-1 | |
6badcd29 ER |
69 | Obsoletes: heartbeat-common |
70 | Obsoletes: heartbeat-pils < 3.0.0-1 | |
6badcd29 ER |
71 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
72 | ||
73 | %description | |
74 | A collection of common tools that are useful for writing cluster | |
75 | managers such as Pacemaker. Provides a local resource manager that | |
76 | understands the OCF and LSB standards, and an interface to common | |
77 | STONITH devices. | |
78 | ||
efb3674e JB |
79 | %description -l pl.UTF-8 |
80 | Zbiór wspólnych narzędzi przydatnych przy pisaniu zarządców klastrów, | |
81 | takich jak Pacemaker. Pakiet zawiera zarządcę zasobów lokalnych | |
82 | zgodnego ze standardami OCF i LSB oraz interfejs do wspólnych urządzeń | |
83 | STONITH. | |
84 | ||
6badcd29 ER |
85 | %package libs |
86 | Summary: Reusable cluster libraries | |
efb3674e | 87 | Summary(pl.UTF-8): Biblioteki klastrowe wielokrotnego użytku |
1be99b68 | 88 | Group: Libraries |
6badcd29 ER |
89 | Obsoletes: libheartbeat2 |
90 | ||
91 | %description libs | |
92 | A collection of libraries that are useful for writing cluster managers | |
93 | such as Pacemaker. | |
94 | ||
efb3674e JB |
95 | %description libs -l pl.UTF-8 |
96 | Zbiór bibliotek przydatnych przy pisaniu zarządców klastrów, takich | |
97 | jak Pacemaker. | |
98 | ||
6badcd29 | 99 | %package libs-devel |
efb3674e JB |
100 | Summary: Header files for writing cluster managers |
101 | Summary(pl.UTF-8): Pliki nagłówkowe do pisania zarządców klastrów | |
6badcd29 | 102 | Group: Development/Libraries |
6badcd29 | 103 | Requires: %{name}-libs = %{version}-%{release} |
1be99b68 JB |
104 | Requires: glib2-devel >= 2.0 |
105 | Requires: libltdl-devel | |
6badcd29 ER |
106 | Obsoletes: libheartbeat-devel |
107 | ||
108 | %description libs-devel | |
efb3674e JB |
109 | Header files useful for writing cluster managers such as Pacemaker. |
110 | ||
111 | %description libs-devel -l pl.UTF-8 | |
112 | Pliki nagłówkowe przydatne przy pisaniu zarządców klastrów, takich jak | |
113 | Pacemaker. | |
6badcd29 | 114 | |
1be99b68 JB |
115 | %package tests |
116 | Summary: Tests for cluster-glue framework | |
117 | Summary(pl.UTF-8): Testy dla szkieletu cluster-glue | |
118 | Group: Development | |
119 | Requires: %{name}-libs = %{version}-%{release} | |
120 | ||
121 | %description tests | |
122 | Tests for cluster-glue framework. | |
123 | ||
124 | %description tests -l pl.UTF-8 | |
125 | Testy dla szkieletu cluster-glue. | |
126 | ||
e49277ef ER |
127 | %package stonith |
128 | Summary: Provides an interface to Shoot The Other Node In The Head | |
129 | Summary(pl.UTF-8): Interfejs do "odstrzelenia" drugiego węzła w klastrze | |
130 | Group: Applications/System | |
131 | Requires: OpenIPMI >= 2.0.3 | |
132 | Provides: heartbeat-stonith = 3.0.0-1 | |
133 | Obsoletes: heartbeat-stonith < 3.0.0-1 | |
134 | ||
135 | %description stonith | |
136 | Provides an interface to Shoot The Other Node In The Head. | |
137 | ||
138 | %description stonith -l pl.UTF-8 | |
139 | STONITH (Shoot The Other Node In The Head) to interfejs służący do | |
140 | "odstrzelenia" drugiego węzła w klastrze. | |
141 | ||
6badcd29 | 142 | %prep |
766e6f1d | 143 | %setup -q -n Reusable-Cluster-Components-glue--glue-%{version} |
1be99b68 JB |
144 | %patch0 -p1 |
145 | %patch1 -p1 | |
25b43839 | 146 | %patch2 -p1 |
aed83822 | 147 | %patch3 -p1 |
d6a380fa JB |
148 | %ifarch x32 |
149 | %patch4 -p1 | |
25b43839 | 150 | %endif |
1be99b68 | 151 | |
bda2199b JK |
152 | sed -i -e's;#!/usr/bin/env \(python\|perl\);#!/usr/bin/\1;' \ |
153 | lib/plugins/stonith/external/* | |
6badcd29 ER |
154 | |
155 | %build | |
156 | %{__libtoolize} | |
157 | %{__aclocal} | |
158 | %{__autoheader} | |
159 | %{__automake} | |
160 | %{__autoconf} | |
d6a380fa | 161 | CPPFLAGS="%{rpmcppflags} -DOPENIPMI_DEFINE_SELECTOR_T" |
6badcd29 | 162 | %configure \ |
1be99b68 | 163 | --docdir=%{_docdir}/%{name}-%{version} \ |
2c07a667 | 164 | --disable-fatal-warnings \ |
1be99b68 | 165 | --disable-static \ |
aed83822 | 166 | --enable-ipmilan \ |
6badcd29 | 167 | --with-daemon-group=haclient \ |
1be99b68 | 168 | --with-daemon-user=hacluster \ |
aed83822 JB |
169 | --with-initdir=/etc/rc.d/init.d \ |
170 | --with-rundir=/var/run | |
be8e662f | 171 | %{__make} |
6badcd29 ER |
172 | |
173 | %install | |
174 | rm -rf $RPM_BUILD_ROOT | |
c65ec4ed | 175 | install -d $RPM_BUILD_ROOT%{systemdunitdir} |
fe303807 | 176 | |
6badcd29 ER |
177 | %{__make} install \ |
178 | DESTDIR=$RPM_BUILD_ROOT | |
179 | ||
be8e662f | 180 | find $RPM_BUILD_ROOT -name '*.la' -delete |
6badcd29 | 181 | |
18d8987f ŁK |
182 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
183 | ||
6badcd29 ER |
184 | %clean |
185 | rm -rf $RPM_BUILD_ROOT | |
186 | ||
1c6f7a24 ER |
187 | %pre |
188 | %groupadd -g 60 haclient | |
189 | %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster | |
190 | ||
191 | %post | |
192 | /sbin/chkconfig --add logd | |
193 | %service logd restart | |
c65ec4ed | 194 | %systemd_post logd.service |
1c6f7a24 ER |
195 | |
196 | %preun | |
197 | if [ "$1" = "0" ]; then | |
198 | %service -q logd stop | |
199 | /sbin/chkconfig --del logd | |
200 | fi | |
c65ec4ed | 201 | %systemd_preun logd.service |
1c6f7a24 ER |
202 | |
203 | %postun | |
204 | if [ "$1" = "0" ]; then | |
205 | %userremove hacluster | |
206 | %groupremove haclient | |
207 | fi | |
c65ec4ed | 208 | %systemd_reload |
1c6f7a24 | 209 | |
6badcd29 ER |
210 | %post libs -p /sbin/ldconfig |
211 | %postun libs -p /sbin/ldconfig | |
212 | ||
213 | %files | |
214 | %defattr(644,root,root,755) | |
18d8987f | 215 | %doc AUTHORS ChangeLog logd/logd.cf doc/stonith/README* |
ad5b8def | 216 | %attr(754,root,root) /etc/rc.d/init.d/logd |
c65ec4ed | 217 | %{systemdunitdir}/logd.service |
ad5b8def ER |
218 | |
219 | %attr(755,root,root) %{_sbindir}/ha_logger | |
220 | %attr(755,root,root) %{_sbindir}/hb_report | |
221 | %attr(755,root,root) %{_sbindir}/lrmadmin | |
222 | %attr(755,root,root) %{_sbindir}/meatclient | |
a0cd9982 | 223 | %attr(755,root,root) %{_sbindir}/cibsecret |
4d9c7dfe ER |
224 | %{_mandir}/man1/ha_logger.1* |
225 | %{_mandir}/man8/ha_logd.8* | |
226 | %{_mandir}/man8/hb_report.8* | |
7afd4195 | 227 | %{_mandir}/man8/lrmadmin.8* |
4d9c7dfe | 228 | %{_mandir}/man8/meatclient.8* |
ad5b8def ER |
229 | |
230 | %dir %{_datadir}/%{name} | |
4d9c7dfe ER |
231 | %attr(755,root,root) %{_datadir}/%{name}/ha_cf_support.sh |
232 | %attr(755,root,root) %{_datadir}/%{name}/openais_conf_support.sh | |
233 | %attr(755,root,root) %{_datadir}/%{name}/utillib.sh | |
4d9c7dfe | 234 | %attr(755,root,root) %{_datadir}/%{name}/ha_log.sh |
ad5b8def | 235 | |
d6a380fa JB |
236 | %attr(755,root,root) %{_libexecdir}/heartbeat/ha_logd |
237 | %attr(755,root,root) %{_libexecdir}/heartbeat/lrmd | |
238 | ||
ad5b8def | 239 | %dir %{_libdir}/heartbeat/plugins/InterfaceMgr |
4d9c7dfe | 240 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/InterfaceMgr/generic.so |
d6a380fa | 241 | %dir %{_libdir}/heartbeat/plugins/RAExec |
4d9c7dfe ER |
242 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/RAExec/heartbeat.so |
243 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/RAExec/lsb.so | |
244 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/RAExec/ocf.so | |
d6a380fa | 245 | %dir %{_libdir}/heartbeat/plugins/compress |
fe303807 JK |
246 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/compress/bz2.so |
247 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/compress/zlib.so | |
ad5b8def | 248 | |
e49277ef ER |
249 | %dir /var/lib/heartbeat |
250 | %attr(711,root,root) %dir /var/lib/heartbeat/cores | |
251 | %attr(700,root,root) %dir /var/lib/heartbeat/cores/root | |
252 | %attr(700,hacluster,root) %dir /var/lib/heartbeat/cores/hacluster | |
253 | # we don't want any files owned by nobody | |
254 | %attr(700,root,root) %dir /var/lib/heartbeat/cores/nobody | |
ad5b8def ER |
255 | |
256 | %files libs | |
257 | %defattr(644,root,root,755) | |
4d9c7dfe ER |
258 | %attr(755,root,root) %{_libdir}/liblrm.so.*.*.* |
259 | %attr(755,root,root) %ghost %{_libdir}/liblrm.so.2 | |
260 | %attr(755,root,root) %{_libdir}/libpils.so.*.*.* | |
261 | %attr(755,root,root) %ghost %{_libdir}/libpils.so.2 | |
262 | %attr(755,root,root) %{_libdir}/libplumb.so.*.*.* | |
263 | %attr(755,root,root) %ghost %{_libdir}/libplumb.so.2 | |
264 | %attr(755,root,root) %{_libdir}/libplumbgpl.so.*.*.* | |
265 | %attr(755,root,root) %ghost %{_libdir}/libplumbgpl.so.2 | |
266 | %attr(755,root,root) %{_libdir}/libstonith.so.*.*.* | |
267 | %attr(755,root,root) %ghost %{_libdir}/libstonith.so.1 | |
12e28aec JK |
268 | %dir %{_libdir}/heartbeat |
269 | %dir %{_libdir}/heartbeat/plugins | |
1be99b68 | 270 | # also used by resource-agents runtime package (shouldn't agent_config.h be in resource-agents-devel?) |
12e28aec | 271 | %dir %{_includedir}/heartbeat |
ad5b8def ER |
272 | |
273 | %files libs-devel | |
274 | %defattr(644,root,root,755) | |
4d9c7dfe ER |
275 | %attr(755,root,root) %{_libdir}/liblrm.so |
276 | %attr(755,root,root) %{_libdir}/libpils.so | |
277 | %attr(755,root,root) %{_libdir}/libplumb.so | |
278 | %attr(755,root,root) %{_libdir}/libplumbgpl.so | |
279 | %attr(755,root,root) %{_libdir}/libstonith.so | |
ad5b8def | 280 | %{_includedir}/clplumbing |
1be99b68 JB |
281 | %{_includedir}/heartbeat/compress.h |
282 | %{_includedir}/heartbeat/glue_config.h | |
283 | %{_includedir}/heartbeat/ha_msg.h | |
284 | %{_includedir}/heartbeat/lrm | |
ad5b8def ER |
285 | %{_includedir}/stonith |
286 | %{_includedir}/pils | |
287 | ||
1be99b68 JB |
288 | %files tests |
289 | %defattr(644,root,root,755) | |
d6a380fa JB |
290 | %attr(755,root,root) %{_libexecdir}/heartbeat/ipctest |
291 | %attr(755,root,root) %{_libexecdir}/heartbeat/ipctransientclient | |
292 | %attr(755,root,root) %{_libexecdir}/heartbeat/ipctransientserver | |
293 | %attr(755,root,root) %{_libexecdir}/heartbeat/transient-test.sh | |
294 | %attr(755,root,root) %{_libexecdir}/heartbeat/base64_md5_test | |
295 | %attr(755,root,root) %{_libexecdir}/heartbeat/logtest | |
4d9c7dfe | 296 | |
ad5b8def | 297 | %dir %{_libdir}/heartbeat/plugins/test |
4d9c7dfe | 298 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/test/test.so |
ad5b8def ER |
299 | |
300 | %dir %{_datadir}/%{name} | |
4d9c7dfe ER |
301 | %dir %{_datadir}/%{name}/lrmtest |
302 | %{_datadir}/%{name}/lrmtest/README.regression | |
303 | %{_datadir}/%{name}/lrmtest/defaults | |
304 | %{_datadir}/%{name}/lrmtest/descriptions | |
305 | %{_datadir}/%{name}/lrmtest/language | |
306 | %{_datadir}/%{name}/lrmtest/lrmadmin-interface | |
307 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/LRMBasicSanityCheck | |
308 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/lrmregtest* | |
309 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/*.sh | |
310 | ||
311 | %dir %{_datadir}/%{name}/lrmtest/testcases | |
312 | %{_datadir}/%{name}/lrmtest/testcases/BSC | |
313 | %{_datadir}/%{name}/lrmtest/testcases/basicset | |
314 | %{_datadir}/%{name}/lrmtest/testcases/metadata | |
315 | %{_datadir}/%{name}/lrmtest/testcases/metadata.exp | |
316 | %{_datadir}/%{name}/lrmtest/testcases/rscexec | |
317 | %{_datadir}/%{name}/lrmtest/testcases/rscexec.exp | |
318 | %{_datadir}/%{name}/lrmtest/testcases/rscmgmt | |
319 | %{_datadir}/%{name}/lrmtest/testcases/rscmgmt.exp | |
59ce45c9 JK |
320 | %{_datadir}/%{name}/lrmtest/testcases/stonith |
321 | %{_datadir}/%{name}/lrmtest/testcases/stonith.exp | |
4d9c7dfe ER |
322 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/testcases/*filter |
323 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/testcases/*.sh | |
e49277ef ER |
324 | |
325 | %files stonith | |
fcfe851d | 326 | %defattr(644,root,root,755) |
e49277ef ER |
327 | %doc doc/stonith/README* |
328 | %attr(755,root,root) %{_sbindir}/stonith | |
329 | %{_mandir}/man8/stonith.8* | |
330 | %dir %{_libdir}/stonith | |
331 | %dir %{_libdir}/stonith/plugins | |
ba2cbcb1 | 332 | %dir %{_libdir}/stonith/plugins/external |
dd8c1a5f | 333 | %attr(755,root,root) %{_libdir}/stonith/plugins/external/* |
e49277ef | 334 | %dir %{_libdir}/stonith/plugins/stonith2 |
1be99b68 JB |
335 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/apcmaster.so |
336 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/apcmastersnmp.so | |
337 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/apcsmart.so | |
338 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/baytech.so | |
339 | # R: openhpi | |
340 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/bladehpi.so | |
341 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/cyclades.so | |
342 | # R: curl libxml2 | |
343 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/drac3.so | |
344 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/external.so | |
345 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/ibmhmc.so | |
346 | # R: OpenIPMI | |
347 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/ipmilan.so | |
348 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/meatware.so | |
349 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/null.so | |
350 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/nw_rpc100s.so | |
351 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/rcd_serial.so | |
352 | # R: libxml2 | |
353 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/rhcs.so | |
354 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/rps10.so | |
355 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/ssh.so | |
356 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/suicide.so | |
357 | %if %{with vacm} | |
358 | # R: vacm-libs | |
359 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/vacm.so | |
360 | %endif | |
361 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/wti_mpc.so | |
362 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/wti_nps.so | |
e49277ef ER |
363 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/ribcl.py |
364 | %attr(755,root,root) %{_libdir}/stonith/plugins/xen0-ha-dom0-stonith-helper |