3 %bcond_without apidocs # build apidocs (some man3 pages are provided anyway)
4 %bcond_without augeas # augeas lens support
5 %bcond_without dbus # DBus events
6 %bcond_without rdma # RDMA support
7 %bcond_without snmp # SNMP protocol support
8 %bcond_without testagents # test agents build
9 %bcond_without watchdog # watchdog support
10 %bcond_without monitoring # resource monitoring
11 %bcond_without qdevices # Quorum devices support
12 %bcond_without qnetd # Quorum Net Daemon support
13 %bcond_without xmlconf # XML configuration support
14 %bcond_without libcgroup # libcgroup support
16 Summary: Corosync - OSI Certified implementation of a complete cluster engine
17 Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
23 #Source0Download: http://corosync.org/download/
24 Source0: https://build.clusterlabs.org/corosync/releases/%{name}-%{version}.tar.gz
25 # Source0-md5: e36a056b893c313c4ec1fe0d7e6cdebd
27 Source2: %{name}-notifyd.init
28 Source3: %{name}-notifyd.sysconfig
29 URL: https://www.corosync.org/
30 BuildRequires: autoconf >= 2.61
31 BuildRequires: automake >= 1:1.11
32 %{?with_dbus:BuildRequires: dbus-devel}
33 %{?with_apidocs:BuildRequires: doxygen}
34 %{?with_apidocs:BuildRequires: graphviz}
36 %{?with_libcgroup:BuildRequires: libcgroup-devel}
37 BuildRequires: libqb-devel
39 BuildRequires: libibverbs-devel
40 BuildRequires: librdmacm-devel
42 %{?with_monitoring:BuildRequires: libstatgrab-devel >= 0.90}
43 BuildRequires: libtool >= 2:2.2.6
44 %{?with_snmp:BuildRequires: net-snmp-devel}
45 BuildRequires: nss-devel
46 BuildRequires: pkgconfig
47 BuildRequires: rpmbuild(macros) >= 1.644
48 # only for cpghum test program
49 #BuildRequires: zlib-devel
50 %{?with_xmlconf:Requires: libxslt-progs}
52 Requires: systemd-units >= 38
53 Requires(post,preun): /sbin/chkconfig
54 Requires: %{name}-libs = %{version}-%{release}
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 # short_service_name_get() is defined in executable
58 %define skip_post_check_so libcoroipcs\.so.*
61 The Corosync Cluster Engine is an OSI Certified implementation of a
62 complete cluster engine.
64 %description -l pl.UTF-8
65 Corosync Cluster Engine to implementacja pełnego silnika klastrowego
66 certyfikowana przez OSI.
69 Summary: Corosync Cluster Engine libraries
70 Summary(pl.UTF-8): Biblioteki silnika klastrowego Corosync
74 This package contains the libraries of Corosync Cluster Engine, an OSI
75 Certified implementation of a complete cluster engine.
77 %description libs -l pl.UTF-8
78 Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
79 silnika klastrowego certyfikowanego przez OSI.
82 Summary: Header files for Corosync libraries
83 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Corosync
84 Group: Development/Libraries
85 Requires: %{name}-libs = %{version}-%{release}
86 Conflicts: openais-devel < 1.0
89 This package contains the include files used to develop using Corosync
92 %description devel -l pl.UTF-8
93 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
97 Summary: Corosync static libraries
98 Summary(pl.UTF-8): Statyczne biblioteki Corosync
99 Group: Development/Libraries
100 Requires: %{name}-devel = %{version}-%{release}
103 This package contains the Corosync static libraries.
105 %description static -l pl.UTF-8
106 Ten pakiet zawiera statyczne biblioteki Corosync.
109 Summary: The Corosync Cluster Engine test agents
110 Summary(pl.UTF-8): Testowi agenci silnika klastrowego Corosync
111 Group: Development/Libraries
112 Requires: %{name} = %{version}-%{release}
114 %description testagents
115 This package contains Corosync test agents.
117 %description testagents -l pl.UTF-8
118 Ten pakiet zawiera testowych agentów silnika Corosync.
120 %package -n mibs-corosync
121 Summary: Corosync SNMP MIB data
122 Summary(pl.UTF-8): Dane SNMP MIB dla Corosync
123 Group: Applications/System
126 %description -n mibs-corosync
127 Corosync SNMP MIB data.
129 %description -n mibs-corosync -l pl.UTF-8
130 Dane SNMP MIB dla Corosync.
142 %{?with_augeas:--enable-augeas} \
143 %{?with_dbus:--enable-dbus} \
144 %{?with_libcgroup:--enable-libcgroup} \
145 %{?with_monitoring:--enable-monitoring} \
146 %{?with_qdevices:--enable-qdevices} \
147 %{?with_qnetd:--enable-qnetd} \
148 %{?with_rdma:--enable-rdma} \
149 --disable-silent-rules \
150 %{?with_snmp:--enable-snmp} \
152 %{?with_testagents:--enable-testagents} \
153 %{?with_watchdog:--enable-watchdog} \
154 %{?with_xmlconf:--enable-xmlconf} \
155 --with-initddir=/etc/rc.d/init.d \
156 --with-systemddir=%{systemdunitdir}
160 %{?with_apidocs:%{__make} doxygen}
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
165 install -d $RPM_BUILD_ROOT/var/log/cluster
168 mibdir=%{_datadir}/mibs \
169 DESTDIR=$RPM_BUILD_ROOT
171 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
173 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
174 >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
175 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
177 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
178 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
179 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
181 %if %{with qdevices} || %{with qnetd}
182 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
183 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/corosync.conf <<EOF
185 d /var/run/corosync-qdevice 0770 root root -
188 d /var/run/corosync-qnetd 0770 root root -
193 # obsoleted by pkg-config
194 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
197 rm -rf $RPM_BUILD_ROOT
200 /sbin/chkconfig --add %{name}
201 /sbin/chkconfig --add %{name}-notifyd
202 %service %{name}-notifyd restart
203 %systemd_post %{name}-notifyd.service
205 %systemd_post %{name}.service
208 if [ "$1" = "0" ]; then
209 %service -q %{name} stop
210 /sbin/chkconfig --del %{name}
211 %service -q %{name}-notifyd stop
212 /sbin/chkconfig --del %{name}-notifyd
214 %systemd_preun %{name}.service
215 %systemd_preun %{name}-notifyd.service
220 %post libs -p /sbin/ldconfig
221 %postun libs -p /sbin/ldconfig
224 %defattr(644,root,root,755)
225 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY conf/corosync.conf.example*
227 %doc conf/corosync.xml.example*
229 %attr(754,root,root) /etc/rc.d/init.d/corosync
230 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
231 %verify(not md5 mtime size) %config(noreplace) /etc/logrotate.d/%{name}
232 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
233 %dir %{_sysconfdir}/corosync
234 %dir %{_sysconfdir}/corosync/service.d
235 %dir %{_sysconfdir}/corosync/uidgid.d
236 %{systemdunitdir}/corosync.service
237 %{systemdunitdir}/corosync-notifyd.service
238 %if %{with qdevices} || %{with qnetd}
239 %{systemdtmpfilesdir}/corosync.conf
241 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
242 %attr(755,root,root) %{_bindir}/corosync-blackbox
243 %attr(755,root,root) %{_sbindir}/corosync
244 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
245 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
246 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
247 %attr(755,root,root) %{_sbindir}/corosync-keygen
248 %attr(755,root,root) %{_sbindir}/corosync-notifyd
249 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
250 %{_mandir}/man5/corosync.conf.5*
251 %{_mandir}/man5/votequorum.5*
252 %{_mandir}/man8/corosync.8*
253 %{_mandir}/man8/corosync-blackbox.8*
254 %{_mandir}/man8/corosync-cmapctl.8*
255 %{_mandir}/man8/corosync-cfgtool.8*
256 %{_mandir}/man8/corosync-cpgtool.8*
257 %{_mandir}/man8/corosync-keygen.8*
258 %{_mandir}/man8/corosync-notifyd.8*
259 %{_mandir}/man8/corosync-quorumtool.8*
261 %{_mandir}/man8/cmap_keys.8*
262 %{_mandir}/man8/cmap_overview.8*
263 %{_mandir}/man8/corosync_overview.8*
264 %{_mandir}/man8/cpg_overview.8*
265 %{_mandir}/man8/sam_overview.8*
266 %{_mandir}/man8/votequorum_overview.8*
267 %{_mandir}/man8/quorum_overview.8*
268 %dir %{_datadir}/corosync
269 %attr(755,root,root) %{_datadir}/%{name}/corosync
270 %attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
272 %attr(755,root,root) %{_bindir}/corosync-xmlproc
273 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
274 %dir %{_datadir}/corosync/xml2conf.xsl
275 %{_mandir}/man8/corosync-xmlproc.8*
276 %{_mandir}/man5/corosync.xml.5*
279 %{_datadir}/augeas/lenses/corosync.aug
280 %{_datadir}/augeas/lenses/tests/test_corosync.aug
283 /etc/dbus-1/system.d/corosync-signals.conf
285 %dir /var/lib/corosync
286 %attr(700,root,root) %dir /var/log/cluster
288 %attr(755,root,root) %{_sbindir}/corosync-qdevice
289 %attr(755,root,root) %{_sbindir}/corosync-qdevice-net-certutil
290 %attr(755,root,root) %{_sbindir}/corosync-qdevice-tool
291 %{_datadir}/corosync/corosync-qdevice
292 %{systemdunitdir}/corosync-qdevice.service
293 %dir %{_sysconfdir}/corosync/qdevice
294 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qdevice/net
295 %attr(770,root,root) %dir /var/run/corosync-qdevice
296 %{_mandir}/man8/corosync-qdevice.8*
297 %{_mandir}/man8/corosync-qdevice-net-certutil.8*
298 %{_mandir}/man8/corosync-qdevice-tool.8*
301 %attr(755,root,root) %{_bindir}/corosync-qnetd
302 %attr(755,root,root) %{_bindir}/corosync-qnetd-certutil
303 %attr(755,root,root) %{_bindir}/corosync-qnetd-tool
304 %{_datadir}/corosync/corosync-qnetd
305 %{systemdunitdir}/corosync-qnetd.service
306 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qnetd
307 %attr(770,root,root) %dir /var/run/corosync-qnetd
308 %{_mandir}/man8/corosync-qnetd.8*
309 %{_mandir}/man8/corosync-qnetd-certutil.8*
310 %{_mandir}/man8/corosync-qnetd-tool.8*
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
316 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
317 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
318 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
319 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
320 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
321 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
322 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
323 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
324 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
325 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
326 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
327 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
328 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
329 %attr(755,root,root) %{_libdir}/libvotequorum.so.8.*.*
330 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.8
333 %defattr(644,root,root,755)
334 %{?with_apidocs:%doc doc/api/html/*}
335 %attr(755,root,root) %{_libdir}/libcfg.so
336 %attr(755,root,root) %{_libdir}/libcmap.so
337 %attr(755,root,root) %{_libdir}/libcorosync_common.so
338 %attr(755,root,root) %{_libdir}/libcpg.so
339 %attr(755,root,root) %{_libdir}/libsam.so
340 %attr(755,root,root) %{_libdir}/libquorum.so
341 %attr(755,root,root) %{_libdir}/libtotem_pg.so
342 %attr(755,root,root) %{_libdir}/libvotequorum.so
343 %{_includedir}/corosync
344 %{_pkgconfigdir}/corosync.pc
345 %{_pkgconfigdir}/libcfg.pc
346 %{_pkgconfigdir}/libcmap.pc
347 %{_pkgconfigdir}/libcorosync_common.pc
348 %{_pkgconfigdir}/libcpg.pc
349 %{_pkgconfigdir}/libquorum.pc
350 %{_pkgconfigdir}/libsam.pc
351 %{_pkgconfigdir}/libtotem_pg.pc
352 %{_pkgconfigdir}/libvotequorum.pc
353 %{_mandir}/man3/cmap_*.3*
354 %{_mandir}/man3/cpg_*.3*
355 %{_mandir}/man3/quorum_*.3*
356 %{_mandir}/man3/sam_*.3*
357 %{_mandir}/man3/votequorum_*.3*
360 %defattr(644,root,root,755)
363 %{_libdir}/libcorosync_common.a
366 %{_libdir}/libquorum.a
367 %{_libdir}/libtotem_pg.a
368 %{_libdir}/libvotequorum.a
370 %if %{with testagents}
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_bindir}/cpg_test_agent
374 %attr(755,root,root) %{_bindir}/sam_test_agent
375 %attr(755,root,root) %{_bindir}/votequorum_test_agent
376 %dir %{_datadir}/corosync/tests
377 %{_datadir}/corosync/tests/mem_leak_test.sh
378 %{_datadir}/corosync/tests/net_breaker.sh
379 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
380 %{_datadir}/corosync/tests/shm_leak_audit.sh
384 %files -n mibs-corosync
385 %defattr(644,root,root,755)
386 %{_datadir}/mibs/COROSYNC-MIB.txt