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.
143 %{?with_augeas:--enable-augeas} \
144 %{?with_dbus:--enable-dbus} \
145 %{?with_libcgroup:--enable-libcgroup} \
146 %{?with_monitoring:--enable-monitoring} \
147 %{?with_qdevices:--enable-qdevices} \
148 %{?with_qnetd:--enable-qnetd} \
149 %{?with_rdma:--enable-rdma} \
150 --disable-silent-rules \
151 %{?with_snmp:--enable-snmp} \
153 %{?with_testagents:--enable-testagents} \
154 %{?with_watchdog:--enable-watchdog} \
155 %{?with_xmlconf:--enable-xmlconf} \
156 --with-initddir=/etc/rc.d/init.d \
157 --with-systemddir=%{systemdunitdir}
161 %{?with_apidocs:%{__make} doxygen}
164 rm -rf $RPM_BUILD_ROOT
165 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
166 install -d $RPM_BUILD_ROOT/var/log/cluster
169 mibdir=%{_datadir}/mibs \
170 DESTDIR=$RPM_BUILD_ROOT
172 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
174 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
175 >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
176 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
178 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
179 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
180 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
182 %if %{with qdevices} || %{with qnetd}
183 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
184 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/corosync.conf <<EOF
186 d /var/run/corosync-qdevice 0770 root root -
189 d /var/run/corosync-qnetd 0770 root root -
194 # obsoleted by pkg-config
195 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
198 rm -rf $RPM_BUILD_ROOT
201 /sbin/chkconfig --add %{name}
202 /sbin/chkconfig --add %{name}-notifyd
203 %service %{name}-notifyd restart
204 %systemd_post %{name}-notifyd.service
206 %systemd_post %{name}.service
209 if [ "$1" = "0" ]; then
210 %service -q %{name} stop
211 /sbin/chkconfig --del %{name}
212 %service -q %{name}-notifyd stop
213 /sbin/chkconfig --del %{name}-notifyd
215 %systemd_preun %{name}.service
216 %systemd_preun %{name}-notifyd.service
221 %post libs -p /sbin/ldconfig
222 %postun libs -p /sbin/ldconfig
225 %defattr(644,root,root,755)
226 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY conf/corosync.conf.example*
228 %doc conf/corosync.xml.example*
230 %attr(754,root,root) /etc/rc.d/init.d/corosync
231 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
232 %verify(not md5 mtime size) %config(noreplace) /etc/logrotate.d/%{name}
233 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
234 %dir %{_sysconfdir}/corosync
235 %dir %{_sysconfdir}/corosync/service.d
236 %dir %{_sysconfdir}/corosync/uidgid.d
237 %{systemdunitdir}/corosync.service
238 %{systemdunitdir}/corosync-notifyd.service
239 %if %{with qdevices} || %{with qnetd}
240 %{systemdtmpfilesdir}/corosync.conf
242 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
243 %attr(755,root,root) %{_bindir}/corosync-blackbox
244 %attr(755,root,root) %{_sbindir}/corosync
245 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
246 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
247 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
248 %attr(755,root,root) %{_sbindir}/corosync-keygen
249 %attr(755,root,root) %{_sbindir}/corosync-notifyd
250 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
251 %{_mandir}/man5/corosync.conf.5*
252 %{_mandir}/man5/votequorum.5*
253 %{_mandir}/man8/corosync.8*
254 %{_mandir}/man8/corosync-blackbox.8*
255 %{_mandir}/man8/corosync-cmapctl.8*
256 %{_mandir}/man8/corosync-cfgtool.8*
257 %{_mandir}/man8/corosync-cpgtool.8*
258 %{_mandir}/man8/corosync-keygen.8*
259 %{_mandir}/man8/corosync-notifyd.8*
260 %{_mandir}/man8/corosync-quorumtool.8*
262 %{_mandir}/man8/cmap_keys.8*
263 %{_mandir}/man8/cmap_overview.8*
264 %{_mandir}/man8/corosync_overview.8*
265 %{_mandir}/man8/cpg_overview.8*
266 %{_mandir}/man8/sam_overview.8*
267 %{_mandir}/man8/votequorum_overview.8*
268 %{_mandir}/man8/quorum_overview.8*
269 %dir %{_datadir}/corosync
270 %attr(755,root,root) %{_datadir}/%{name}/corosync
271 %attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
273 %attr(755,root,root) %{_bindir}/corosync-xmlproc
274 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
275 %dir %{_datadir}/corosync/xml2conf.xsl
276 %{_mandir}/man8/corosync-xmlproc.8*
277 %{_mandir}/man5/corosync.xml.5*
280 %{_datadir}/augeas/lenses/corosync.aug
281 %{_datadir}/augeas/lenses/tests/test_corosync.aug
284 /etc/dbus-1/system.d/corosync-signals.conf
286 %dir /var/lib/corosync
287 %attr(700,root,root) %dir /var/log/cluster
289 %attr(755,root,root) %{_sbindir}/corosync-qdevice
290 %attr(755,root,root) %{_sbindir}/corosync-qdevice-net-certutil
291 %attr(755,root,root) %{_sbindir}/corosync-qdevice-tool
292 %{_datadir}/corosync/corosync-qdevice
293 %{systemdunitdir}/corosync-qdevice.service
294 %dir %{_sysconfdir}/corosync/qdevice
295 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qdevice/net
296 %attr(770,root,root) %dir /var/run/corosync-qdevice
297 %{_mandir}/man8/corosync-qdevice.8*
298 %{_mandir}/man8/corosync-qdevice-net-certutil.8*
299 %{_mandir}/man8/corosync-qdevice-tool.8*
302 %attr(755,root,root) %{_bindir}/corosync-qnetd
303 %attr(755,root,root) %{_bindir}/corosync-qnetd-certutil
304 %attr(755,root,root) %{_bindir}/corosync-qnetd-tool
305 %{_datadir}/corosync/corosync-qnetd
306 %{systemdunitdir}/corosync-qnetd.service
307 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qnetd
308 %attr(770,root,root) %dir /var/run/corosync-qnetd
309 %{_mandir}/man8/corosync-qnetd.8*
310 %{_mandir}/man8/corosync-qnetd-certutil.8*
311 %{_mandir}/man8/corosync-qnetd-tool.8*
315 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
317 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
318 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
319 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
320 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
321 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
322 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
323 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
324 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
325 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
326 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
327 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
328 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
329 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
330 %attr(755,root,root) %{_libdir}/libvotequorum.so.8.*.*
331 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.8
334 %defattr(644,root,root,755)
335 %{?with_apidocs:%doc doc/api/html/*}
336 %attr(755,root,root) %{_libdir}/libcfg.so
337 %attr(755,root,root) %{_libdir}/libcmap.so
338 %attr(755,root,root) %{_libdir}/libcorosync_common.so
339 %attr(755,root,root) %{_libdir}/libcpg.so
340 %attr(755,root,root) %{_libdir}/libsam.so
341 %attr(755,root,root) %{_libdir}/libquorum.so
342 %attr(755,root,root) %{_libdir}/libtotem_pg.so
343 %attr(755,root,root) %{_libdir}/libvotequorum.so
344 %{_includedir}/corosync
345 %{_pkgconfigdir}/corosync.pc
346 %{_pkgconfigdir}/libcfg.pc
347 %{_pkgconfigdir}/libcmap.pc
348 %{_pkgconfigdir}/libcorosync_common.pc
349 %{_pkgconfigdir}/libcpg.pc
350 %{_pkgconfigdir}/libquorum.pc
351 %{_pkgconfigdir}/libsam.pc
352 %{_pkgconfigdir}/libtotem_pg.pc
353 %{_pkgconfigdir}/libvotequorum.pc
354 %{_mandir}/man3/cmap_*.3*
355 %{_mandir}/man3/cpg_*.3*
356 %{_mandir}/man3/quorum_*.3*
357 %{_mandir}/man3/sam_*.3*
358 %{_mandir}/man3/votequorum_*.3*
361 %defattr(644,root,root,755)
364 %{_libdir}/libcorosync_common.a
367 %{_libdir}/libquorum.a
368 %{_libdir}/libtotem_pg.a
369 %{_libdir}/libvotequorum.a
371 %if %{with testagents}
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_bindir}/cpg_test_agent
375 %attr(755,root,root) %{_bindir}/sam_test_agent
376 %attr(755,root,root) %{_bindir}/votequorum_test_agent
377 %dir %{_datadir}/corosync/tests
378 %{_datadir}/corosync/tests/mem_leak_test.sh
379 %{_datadir}/corosync/tests/net_breaker.sh
380 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
381 %{_datadir}/corosync/tests/shm_leak_audit.sh
385 %files -n mibs-corosync
386 %defattr(644,root,root,755)
387 %{_datadir}/mibs/COROSYNC-MIB.txt