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