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