]>
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 |
18d8987f | 13 | Release: 7 |
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 | ||
18d8987f ŁK |
174 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
175 | ||
6badcd29 ER |
176 | %clean |
177 | rm -rf $RPM_BUILD_ROOT | |
178 | ||
1c6f7a24 ER |
179 | %pre |
180 | %groupadd -g 60 haclient | |
181 | %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster | |
182 | ||
183 | %post | |
184 | /sbin/chkconfig --add logd | |
185 | %service logd restart | |
c65ec4ed | 186 | %systemd_post logd.service |
1c6f7a24 ER |
187 | |
188 | %preun | |
189 | if [ "$1" = "0" ]; then | |
190 | %service -q logd stop | |
191 | /sbin/chkconfig --del logd | |
192 | fi | |
c65ec4ed | 193 | %systemd_preun logd.service |
1c6f7a24 ER |
194 | |
195 | %postun | |
196 | if [ "$1" = "0" ]; then | |
197 | %userremove hacluster | |
198 | %groupremove haclient | |
199 | fi | |
c65ec4ed | 200 | %systemd_reload |
1c6f7a24 | 201 | |
6badcd29 ER |
202 | %post libs -p /sbin/ldconfig |
203 | %postun libs -p /sbin/ldconfig | |
204 | ||
205 | %files | |
206 | %defattr(644,root,root,755) | |
18d8987f | 207 | %doc AUTHORS ChangeLog logd/logd.cf doc/stonith/README* |
ad5b8def | 208 | %attr(754,root,root) /etc/rc.d/init.d/logd |
c65ec4ed | 209 | %{systemdunitdir}/logd.service |
ad5b8def ER |
210 | |
211 | %attr(755,root,root) %{_sbindir}/ha_logger | |
212 | %attr(755,root,root) %{_sbindir}/hb_report | |
213 | %attr(755,root,root) %{_sbindir}/lrmadmin | |
214 | %attr(755,root,root) %{_sbindir}/meatclient | |
ad5b8def | 215 | %attr(755,root,root) %{_sbindir}/sbd |
a0cd9982 | 216 | %attr(755,root,root) %{_sbindir}/cibsecret |
4d9c7dfe ER |
217 | %{_mandir}/man1/ha_logger.1* |
218 | %{_mandir}/man8/ha_logd.8* | |
219 | %{_mandir}/man8/hb_report.8* | |
7afd4195 | 220 | %{_mandir}/man8/lrmadmin.8* |
4d9c7dfe | 221 | %{_mandir}/man8/meatclient.8* |
ad5b8def ER |
222 | |
223 | %dir %{_datadir}/%{name} | |
4d9c7dfe ER |
224 | %attr(755,root,root) %{_datadir}/%{name}/ha_cf_support.sh |
225 | %attr(755,root,root) %{_datadir}/%{name}/openais_conf_support.sh | |
226 | %attr(755,root,root) %{_datadir}/%{name}/utillib.sh | |
227 | %attr(755,root,root) %{_datadir}/%{name}/combine-logs.pl | |
228 | %attr(755,root,root) %{_datadir}/%{name}/ha_log.sh | |
ad5b8def | 229 | |
ad5b8def ER |
230 | %dir %{_libdir}/heartbeat/plugins/RAExec |
231 | %dir %{_libdir}/heartbeat/plugins/InterfaceMgr | |
fe303807 | 232 | %dir %{_libdir}/heartbeat/plugins/compress |
4d9c7dfe ER |
233 | %attr(755,root,root) %{_libdir}/heartbeat/lrmd |
234 | %attr(755,root,root) %{_libdir}/heartbeat/ha_logd | |
235 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/InterfaceMgr/generic.so | |
236 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/RAExec/heartbeat.so | |
237 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/RAExec/lsb.so | |
238 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/RAExec/ocf.so | |
fe303807 JK |
239 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/compress/bz2.so |
240 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/compress/zlib.so | |
ad5b8def | 241 | |
e49277ef ER |
242 | %dir /var/lib/heartbeat |
243 | %attr(711,root,root) %dir /var/lib/heartbeat/cores | |
244 | %attr(700,root,root) %dir /var/lib/heartbeat/cores/root | |
245 | %attr(700,hacluster,root) %dir /var/lib/heartbeat/cores/hacluster | |
246 | # we don't want any files owned by nobody | |
247 | %attr(700,root,root) %dir /var/lib/heartbeat/cores/nobody | |
ad5b8def ER |
248 | |
249 | %files libs | |
250 | %defattr(644,root,root,755) | |
4d9c7dfe ER |
251 | %attr(755,root,root) %{_libdir}/liblrm.so.*.*.* |
252 | %attr(755,root,root) %ghost %{_libdir}/liblrm.so.2 | |
253 | %attr(755,root,root) %{_libdir}/libpils.so.*.*.* | |
254 | %attr(755,root,root) %ghost %{_libdir}/libpils.so.2 | |
255 | %attr(755,root,root) %{_libdir}/libplumb.so.*.*.* | |
256 | %attr(755,root,root) %ghost %{_libdir}/libplumb.so.2 | |
257 | %attr(755,root,root) %{_libdir}/libplumbgpl.so.*.*.* | |
258 | %attr(755,root,root) %ghost %{_libdir}/libplumbgpl.so.2 | |
259 | %attr(755,root,root) %{_libdir}/libstonith.so.*.*.* | |
260 | %attr(755,root,root) %ghost %{_libdir}/libstonith.so.1 | |
12e28aec JK |
261 | %dir %{_libdir}/heartbeat |
262 | %dir %{_libdir}/heartbeat/plugins | |
1be99b68 | 263 | # also used by resource-agents runtime package (shouldn't agent_config.h be in resource-agents-devel?) |
12e28aec | 264 | %dir %{_includedir}/heartbeat |
ad5b8def ER |
265 | |
266 | %files libs-devel | |
267 | %defattr(644,root,root,755) | |
4d9c7dfe ER |
268 | %attr(755,root,root) %{_libdir}/liblrm.so |
269 | %attr(755,root,root) %{_libdir}/libpils.so | |
270 | %attr(755,root,root) %{_libdir}/libplumb.so | |
271 | %attr(755,root,root) %{_libdir}/libplumbgpl.so | |
272 | %attr(755,root,root) %{_libdir}/libstonith.so | |
ad5b8def | 273 | %{_includedir}/clplumbing |
1be99b68 JB |
274 | %{_includedir}/heartbeat/compress.h |
275 | %{_includedir}/heartbeat/glue_config.h | |
276 | %{_includedir}/heartbeat/ha_msg.h | |
277 | %{_includedir}/heartbeat/lrm | |
ad5b8def ER |
278 | %{_includedir}/stonith |
279 | %{_includedir}/pils | |
280 | ||
1be99b68 JB |
281 | %files tests |
282 | %defattr(644,root,root,755) | |
4d9c7dfe ER |
283 | %attr(755,root,root) %{_libdir}/heartbeat/ipctest |
284 | %attr(755,root,root) %{_libdir}/heartbeat/ipctransientclient | |
285 | %attr(755,root,root) %{_libdir}/heartbeat/ipctransientserver | |
286 | %attr(755,root,root) %{_libdir}/heartbeat/transient-test.sh | |
287 | %attr(755,root,root) %{_libdir}/heartbeat/base64_md5_test | |
288 | %attr(755,root,root) %{_libdir}/heartbeat/logtest | |
289 | ||
ad5b8def | 290 | %dir %{_libdir}/heartbeat/plugins/test |
4d9c7dfe | 291 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/test/test.so |
ad5b8def ER |
292 | |
293 | %dir %{_datadir}/%{name} | |
4d9c7dfe ER |
294 | %dir %{_datadir}/%{name}/lrmtest |
295 | %{_datadir}/%{name}/lrmtest/README.regression | |
296 | %{_datadir}/%{name}/lrmtest/defaults | |
297 | %{_datadir}/%{name}/lrmtest/descriptions | |
298 | %{_datadir}/%{name}/lrmtest/language | |
299 | %{_datadir}/%{name}/lrmtest/lrmadmin-interface | |
300 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/LRMBasicSanityCheck | |
301 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/lrmregtest* | |
302 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/*.sh | |
303 | ||
304 | %dir %{_datadir}/%{name}/lrmtest/testcases | |
305 | %{_datadir}/%{name}/lrmtest/testcases/BSC | |
306 | %{_datadir}/%{name}/lrmtest/testcases/basicset | |
307 | %{_datadir}/%{name}/lrmtest/testcases/metadata | |
308 | %{_datadir}/%{name}/lrmtest/testcases/metadata.exp | |
309 | %{_datadir}/%{name}/lrmtest/testcases/rscexec | |
310 | %{_datadir}/%{name}/lrmtest/testcases/rscexec.exp | |
311 | %{_datadir}/%{name}/lrmtest/testcases/rscmgmt | |
312 | %{_datadir}/%{name}/lrmtest/testcases/rscmgmt.exp | |
59ce45c9 JK |
313 | %{_datadir}/%{name}/lrmtest/testcases/stonith |
314 | %{_datadir}/%{name}/lrmtest/testcases/stonith.exp | |
4d9c7dfe ER |
315 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/testcases/*filter |
316 | %attr(755,root,root) %{_datadir}/%{name}/lrmtest/testcases/*.sh | |
e49277ef ER |
317 | |
318 | %files stonith | |
fcfe851d | 319 | %defattr(644,root,root,755) |
e49277ef ER |
320 | %doc doc/stonith/README* |
321 | %attr(755,root,root) %{_sbindir}/stonith | |
322 | %{_mandir}/man8/stonith.8* | |
323 | %dir %{_libdir}/stonith | |
324 | %dir %{_libdir}/stonith/plugins | |
ba2cbcb1 | 325 | %dir %{_libdir}/stonith/plugins/external |
dd8c1a5f | 326 | %attr(755,root,root) %{_libdir}/stonith/plugins/external/* |
e49277ef | 327 | %dir %{_libdir}/stonith/plugins/stonith2 |
1be99b68 JB |
328 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/apcmaster.so |
329 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/apcmastersnmp.so | |
330 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/apcsmart.so | |
331 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/baytech.so | |
332 | # R: openhpi | |
333 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/bladehpi.so | |
334 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/cyclades.so | |
335 | # R: curl libxml2 | |
336 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/drac3.so | |
337 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/external.so | |
338 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/ibmhmc.so | |
339 | # R: OpenIPMI | |
340 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/ipmilan.so | |
341 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/meatware.so | |
342 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/null.so | |
343 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/nw_rpc100s.so | |
344 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/rcd_serial.so | |
345 | # R: libxml2 | |
346 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/rhcs.so | |
347 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/rps10.so | |
348 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/ssh.so | |
349 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/suicide.so | |
350 | %if %{with vacm} | |
351 | # R: vacm-libs | |
352 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/vacm.so | |
353 | %endif | |
354 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/wti_mpc.so | |
355 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/wti_nps.so | |
e49277ef ER |
356 | %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/ribcl.py |
357 | %attr(755,root,root) %{_libdir}/stonith/plugins/xen0-ha-dom0-stonith-helper |