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