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