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