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