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.
135 # force regeneration with proper BASHPATH
136 %{__rm} cts/agents/{cmap-dispatch-deadlock,shm_leak_audit}.sh
146 %{?with_augeas:--enable-augeas} \
147 %{?with_dbus:--enable-dbus} \
148 %{?with_libcgroup:--enable-libcgroup} \
149 %{?with_monitoring:--enable-monitoring} \
150 %{?with_qdevices:--enable-qdevices} \
151 %{?with_qnetd:--enable-qnetd} \
152 %{?with_rdma:--enable-rdma} \
153 --disable-silent-rules \
154 %{?with_snmp:--enable-snmp} \
156 %{?with_testagents:--enable-testagents} \
157 %{?with_watchdog:--enable-watchdog} \
158 %{?with_xmlconf:--enable-xmlconf} \
159 --with-initddir=/etc/rc.d/init.d \
160 --with-systemddir=%{systemdunitdir}
164 %{?with_apidocs:%{__make} doxygen}
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
169 install -d $RPM_BUILD_ROOT/var/log/cluster
172 mibdir=%{_datadir}/mibs \
173 DESTDIR=$RPM_BUILD_ROOT
175 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
177 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
178 >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
179 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
181 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
182 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
183 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
185 %if %{with qdevices} || %{with qnetd}
186 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
187 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/corosync.conf <<EOF
189 d /var/run/corosync-qdevice 0770 root root -
192 d /var/run/corosync-qnetd 0770 root root -
197 # obsoleted by pkg-config
198 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
201 rm -rf $RPM_BUILD_ROOT
204 /sbin/chkconfig --add %{name}
205 /sbin/chkconfig --add %{name}-notifyd
206 %service %{name}-notifyd restart
207 %systemd_post %{name}-notifyd.service
209 %systemd_post %{name}.service
212 if [ "$1" = "0" ]; then
213 %service -q %{name} stop
214 /sbin/chkconfig --del %{name}
215 %service -q %{name}-notifyd stop
216 /sbin/chkconfig --del %{name}-notifyd
218 %systemd_preun %{name}.service
219 %systemd_preun %{name}-notifyd.service
224 %post libs -p /sbin/ldconfig
225 %postun libs -p /sbin/ldconfig
228 %defattr(644,root,root,755)
229 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY conf/corosync.conf.example*
231 %doc conf/corosync.xml.example*
233 %attr(754,root,root) /etc/rc.d/init.d/corosync
234 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
235 %verify(not md5 mtime size) %config(noreplace) /etc/logrotate.d/%{name}
236 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
237 %dir %{_sysconfdir}/corosync
238 %dir %{_sysconfdir}/corosync/service.d
239 %dir %{_sysconfdir}/corosync/uidgid.d
240 %{systemdunitdir}/corosync.service
241 %{systemdunitdir}/corosync-notifyd.service
242 %if %{with qdevices} || %{with qnetd}
243 %{systemdtmpfilesdir}/corosync.conf
245 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
246 %attr(755,root,root) %{_bindir}/corosync-blackbox
247 %attr(755,root,root) %{_sbindir}/corosync
248 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
249 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
250 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
251 %attr(755,root,root) %{_sbindir}/corosync-keygen
252 %attr(755,root,root) %{_sbindir}/corosync-notifyd
253 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
254 %{_mandir}/man5/corosync.conf.5*
255 %{_mandir}/man5/votequorum.5*
256 %{_mandir}/man8/corosync.8*
257 %{_mandir}/man8/corosync-blackbox.8*
258 %{_mandir}/man8/corosync-cmapctl.8*
259 %{_mandir}/man8/corosync-cfgtool.8*
260 %{_mandir}/man8/corosync-cpgtool.8*
261 %{_mandir}/man8/corosync-keygen.8*
262 %{_mandir}/man8/corosync-notifyd.8*
263 %{_mandir}/man8/corosync-quorumtool.8*
265 %{_mandir}/man8/cmap_keys.8*
266 %{_mandir}/man8/cmap_overview.8*
267 %{_mandir}/man8/corosync_overview.8*
268 %{_mandir}/man8/cpg_overview.8*
269 %{_mandir}/man8/sam_overview.8*
270 %{_mandir}/man8/votequorum_overview.8*
271 %{_mandir}/man8/quorum_overview.8*
272 %dir %{_datadir}/corosync
273 %attr(755,root,root) %{_datadir}/%{name}/corosync
274 %attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
276 %attr(755,root,root) %{_bindir}/corosync-xmlproc
277 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
278 %{_datadir}/corosync/xml2conf.xsl
279 %{_mandir}/man8/corosync-xmlproc.8*
280 %{_mandir}/man5/corosync.xml.5*
283 %{_datadir}/augeas/lenses/corosync.aug
284 %{_datadir}/augeas/lenses/tests/test_corosync.aug
287 /etc/dbus-1/system.d/corosync-signals.conf
289 %dir /var/lib/corosync
290 %attr(700,root,root) %dir /var/log/cluster
292 %attr(755,root,root) %{_sbindir}/corosync-qdevice
293 %attr(755,root,root) %{_sbindir}/corosync-qdevice-net-certutil
294 %attr(755,root,root) %{_sbindir}/corosync-qdevice-tool
295 %{_datadir}/corosync/corosync-qdevice
296 %{systemdunitdir}/corosync-qdevice.service
297 %dir %{_sysconfdir}/corosync/qdevice
298 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qdevice/net
299 %attr(770,root,root) %dir /var/run/corosync-qdevice
300 %{_mandir}/man8/corosync-qdevice.8*
301 %{_mandir}/man8/corosync-qdevice-net-certutil.8*
302 %{_mandir}/man8/corosync-qdevice-tool.8*
305 %attr(755,root,root) %{_bindir}/corosync-qnetd
306 %attr(755,root,root) %{_bindir}/corosync-qnetd-certutil
307 %attr(755,root,root) %{_bindir}/corosync-qnetd-tool
308 %{_datadir}/corosync/corosync-qnetd
309 %{systemdunitdir}/corosync-qnetd.service
310 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qnetd
311 %attr(770,root,root) %dir /var/run/corosync-qnetd
312 %{_mandir}/man8/corosync-qnetd.8*
313 %{_mandir}/man8/corosync-qnetd-certutil.8*
314 %{_mandir}/man8/corosync-qnetd-tool.8*
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
320 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
321 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
322 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
323 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
324 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
325 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
326 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
327 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
328 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
329 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
330 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
331 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
332 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
333 %attr(755,root,root) %{_libdir}/libvotequorum.so.8.*.*
334 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.8
337 %defattr(644,root,root,755)
338 %{?with_apidocs:%doc doc/api/html/*}
339 %attr(755,root,root) %{_libdir}/libcfg.so
340 %attr(755,root,root) %{_libdir}/libcmap.so
341 %attr(755,root,root) %{_libdir}/libcorosync_common.so
342 %attr(755,root,root) %{_libdir}/libcpg.so
343 %attr(755,root,root) %{_libdir}/libsam.so
344 %attr(755,root,root) %{_libdir}/libquorum.so
345 %attr(755,root,root) %{_libdir}/libtotem_pg.so
346 %attr(755,root,root) %{_libdir}/libvotequorum.so
347 %{_includedir}/corosync
348 %{_pkgconfigdir}/corosync.pc
349 %{_pkgconfigdir}/libcfg.pc
350 %{_pkgconfigdir}/libcmap.pc
351 %{_pkgconfigdir}/libcorosync_common.pc
352 %{_pkgconfigdir}/libcpg.pc
353 %{_pkgconfigdir}/libquorum.pc
354 %{_pkgconfigdir}/libsam.pc
355 %{_pkgconfigdir}/libtotem_pg.pc
356 %{_pkgconfigdir}/libvotequorum.pc
357 %{_mandir}/man3/cmap_*.3*
358 %{_mandir}/man3/cpg_*.3*
359 %{_mandir}/man3/quorum_*.3*
360 %{_mandir}/man3/sam_*.3*
361 %{_mandir}/man3/votequorum_*.3*
364 %defattr(644,root,root,755)
367 %{_libdir}/libcorosync_common.a
370 %{_libdir}/libquorum.a
371 %{_libdir}/libtotem_pg.a
372 %{_libdir}/libvotequorum.a
374 %if %{with testagents}
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_bindir}/cpg_test_agent
378 %attr(755,root,root) %{_bindir}/sam_test_agent
379 %attr(755,root,root) %{_bindir}/votequorum_test_agent
380 %dir %{_datadir}/corosync/tests
381 %{_datadir}/corosync/tests/mem_leak_test.sh
382 %{_datadir}/corosync/tests/net_breaker.sh
383 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
384 %{_datadir}/corosync/tests/shm_leak_audit.sh
388 %files -n mibs-corosync
389 %defattr(644,root,root,755)
390 %{_datadir}/mibs/COROSYNC-MIB.txt