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