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
15 %bcond_without static_libs # static libraries
17 Summary: Corosync - OSI Certified implementation of a complete cluster engine
18 Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
24 #Source0Download: http://corosync.org/download/
25 Source0: https://build.clusterlabs.org/corosync/releases/%{name}-%{version}.tar.gz
26 # Source0-md5: 7f9d111c53b760cedd5e3bbcdf93f133
28 Source2: %{name}-notifyd.init
29 Source3: %{name}-notifyd.sysconfig
30 URL: https://www.corosync.org/
31 BuildRequires: autoconf >= 2.61
32 BuildRequires: automake >= 1:1.11
33 %{?with_dbus:BuildRequires: dbus-devel}
34 %{?with_apidocs:BuildRequires: doxygen}
35 %{?with_apidocs:BuildRequires: graphviz}
37 %{?with_libcgroup:BuildRequires: libcgroup-devel}
38 BuildRequires: libqb-devel
40 BuildRequires: libibverbs-devel >= 20
41 BuildRequires: librdmacm-devel >= 20
43 %{?with_monitoring:BuildRequires: libstatgrab-devel >= 0.90}
44 BuildRequires: libtool >= 2:2.2.6
45 %{?with_snmp:BuildRequires: net-snmp-devel}
46 BuildRequires: nss-devel
47 BuildRequires: pkgconfig
48 BuildRequires: rpmbuild(macros) >= 1.644
49 # only for cpghum test program
50 #BuildRequires: zlib-devel
51 %{?with_xmlconf:Requires: libxslt-progs}
53 Requires: systemd-units >= 38
54 Requires(post,preun): /sbin/chkconfig
55 Requires: %{name}-libs = %{version}-%{release}
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 # short_service_name_get() is defined in executable
59 %define skip_post_check_so libcoroipcs\.so.*
62 The Corosync Cluster Engine is an OSI Certified implementation of a
63 complete cluster engine.
65 %description -l pl.UTF-8
66 Corosync Cluster Engine to implementacja pełnego silnika klastrowego
67 certyfikowana przez OSI.
70 Summary: Corosync Cluster Engine libraries
71 Summary(pl.UTF-8): Biblioteki silnika klastrowego Corosync
75 This package contains the libraries of Corosync Cluster Engine, an OSI
76 Certified implementation of a complete cluster engine.
78 %description libs -l pl.UTF-8
79 Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
80 silnika klastrowego certyfikowanego przez OSI.
83 Summary: Header files for Corosync libraries
84 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Corosync
85 Group: Development/Libraries
86 Requires: %{name}-libs = %{version}-%{release}
87 Conflicts: openais-devel < 1.0
90 This package contains the include files used to develop using Corosync
93 %description devel -l pl.UTF-8
94 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
98 Summary: Corosync static libraries
99 Summary(pl.UTF-8): Statyczne biblioteki Corosync
100 Group: Development/Libraries
101 Requires: %{name}-devel = %{version}-%{release}
104 This package contains the Corosync static libraries.
106 %description static -l pl.UTF-8
107 Ten pakiet zawiera statyczne biblioteki Corosync.
110 Summary: The Corosync Cluster Engine test agents
111 Summary(pl.UTF-8): Testowi agenci silnika klastrowego Corosync
112 Group: Development/Libraries
113 Requires: %{name} = %{version}-%{release}
115 %description testagents
116 This package contains Corosync test agents.
118 %description testagents -l pl.UTF-8
119 Ten pakiet zawiera testowych agentów silnika Corosync.
121 %package -n mibs-corosync
122 Summary: Corosync SNMP MIB data
123 Summary(pl.UTF-8): Dane SNMP MIB dla Corosync
124 Group: Applications/System
127 %description -n mibs-corosync
128 Corosync SNMP MIB data.
130 %description -n mibs-corosync -l pl.UTF-8
131 Dane SNMP MIB dla Corosync.
136 # force regeneration with proper BASHPATH
137 %{__rm} cts/agents/{cmap-dispatch-deadlock,shm_leak_audit}.sh
147 %{__enable_disable static_libs static} \
148 %{?with_augeas:--enable-augeas} \
149 %{?with_dbus:--enable-dbus} \
150 %{?with_libcgroup:--enable-libcgroup} \
151 %{?with_monitoring:--enable-monitoring} \
152 %{?with_qdevices:--enable-qdevices} \
153 %{?with_qnetd:--enable-qnetd} \
154 %{?with_rdma:--enable-rdma} \
155 --disable-silent-rules \
156 %{?with_snmp:--enable-snmp} \
158 %{?with_testagents:--enable-testagents} \
159 %{?with_watchdog:--enable-watchdog} \
160 %{?with_xmlconf:--enable-xmlconf} \
161 --with-initddir=/etc/rc.d/init.d \
162 --with-systemddir=%{systemdunitdir}
166 %{?with_apidocs:%{__make} doxygen}
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
171 install -d $RPM_BUILD_ROOT/var/log/cluster
174 mibdir=%{_datadir}/mibs \
175 DESTDIR=$RPM_BUILD_ROOT
177 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
179 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
180 >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
181 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
183 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
184 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
185 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
187 %if %{with qdevices} || %{with qnetd}
188 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
189 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/corosync.conf <<EOF
191 d /var/run/corosync-qdevice 0770 root root -
194 d /var/run/corosync-qnetd 0770 root root -
199 # obsoleted by pkg-config
200 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
203 rm -rf $RPM_BUILD_ROOT
206 /sbin/chkconfig --add %{name}
207 /sbin/chkconfig --add %{name}-notifyd
208 %service %{name}-notifyd restart
209 %systemd_post %{name}-notifyd.service
211 %systemd_post %{name}.service
214 if [ "$1" = "0" ]; then
215 %service -q %{name} stop
216 /sbin/chkconfig --del %{name}
217 %service -q %{name}-notifyd stop
218 /sbin/chkconfig --del %{name}-notifyd
220 %systemd_preun %{name}.service
221 %systemd_preun %{name}-notifyd.service
226 %post libs -p /sbin/ldconfig
227 %postun libs -p /sbin/ldconfig
230 %defattr(644,root,root,755)
231 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY conf/corosync.conf.example*
233 %doc conf/corosync.xml.example*
235 %attr(754,root,root) /etc/rc.d/init.d/corosync
236 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
237 %verify(not md5 mtime size) %config(noreplace) /etc/logrotate.d/%{name}
238 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
239 %dir %{_sysconfdir}/corosync
240 %dir %{_sysconfdir}/corosync/service.d
241 %dir %{_sysconfdir}/corosync/uidgid.d
242 %{systemdunitdir}/corosync.service
243 %{systemdunitdir}/corosync-notifyd.service
244 %if %{with qdevices} || %{with qnetd}
245 %{systemdtmpfilesdir}/corosync.conf
247 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
248 %attr(755,root,root) %{_bindir}/corosync-blackbox
249 %attr(755,root,root) %{_sbindir}/corosync
250 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
251 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
252 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
253 %attr(755,root,root) %{_sbindir}/corosync-keygen
254 %attr(755,root,root) %{_sbindir}/corosync-notifyd
255 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
256 %{_mandir}/man5/corosync.conf.5*
257 %{_mandir}/man5/votequorum.5*
258 %{_mandir}/man8/corosync.8*
259 %{_mandir}/man8/corosync-blackbox.8*
260 %{_mandir}/man8/corosync-cmapctl.8*
261 %{_mandir}/man8/corosync-cfgtool.8*
262 %{_mandir}/man8/corosync-cpgtool.8*
263 %{_mandir}/man8/corosync-keygen.8*
264 %{_mandir}/man8/corosync-notifyd.8*
265 %{_mandir}/man8/corosync-quorumtool.8*
267 %{_mandir}/man8/cmap_keys.8*
268 %{_mandir}/man8/cmap_overview.8*
269 %{_mandir}/man8/corosync_overview.8*
270 %{_mandir}/man8/cpg_overview.8*
271 %{_mandir}/man8/sam_overview.8*
272 %{_mandir}/man8/votequorum_overview.8*
273 %{_mandir}/man8/quorum_overview.8*
274 %dir %{_datadir}/corosync
275 %attr(755,root,root) %{_datadir}/%{name}/corosync
276 %attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
278 %attr(755,root,root) %{_bindir}/corosync-xmlproc
279 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
280 %{_datadir}/corosync/xml2conf.xsl
281 %{_mandir}/man8/corosync-xmlproc.8*
282 %{_mandir}/man5/corosync.xml.5*
285 %{_datadir}/augeas/lenses/corosync.aug
286 %{_datadir}/augeas/lenses/tests/test_corosync.aug
289 /etc/dbus-1/system.d/corosync-signals.conf
291 %dir /var/lib/corosync
292 %attr(700,root,root) %dir /var/log/cluster
294 %attr(755,root,root) %{_sbindir}/corosync-qdevice
295 %attr(755,root,root) %{_sbindir}/corosync-qdevice-net-certutil
296 %attr(755,root,root) %{_sbindir}/corosync-qdevice-tool
297 %{_datadir}/corosync/corosync-qdevice
298 %{systemdunitdir}/corosync-qdevice.service
299 %dir %{_sysconfdir}/corosync/qdevice
300 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qdevice/net
301 %attr(770,root,root) %dir /var/run/corosync-qdevice
302 %{_mandir}/man8/corosync-qdevice.8*
303 %{_mandir}/man8/corosync-qdevice-net-certutil.8*
304 %{_mandir}/man8/corosync-qdevice-tool.8*
307 %attr(755,root,root) %{_bindir}/corosync-qnetd
308 %attr(755,root,root) %{_bindir}/corosync-qnetd-certutil
309 %attr(755,root,root) %{_bindir}/corosync-qnetd-tool
310 %{_datadir}/corosync/corosync-qnetd
311 %{systemdunitdir}/corosync-qnetd.service
312 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qnetd
313 %attr(770,root,root) %dir /var/run/corosync-qnetd
314 %{_mandir}/man8/corosync-qnetd.8*
315 %{_mandir}/man8/corosync-qnetd-certutil.8*
316 %{_mandir}/man8/corosync-qnetd-tool.8*
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
322 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
323 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
324 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
325 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
326 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
327 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
328 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
329 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
330 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
331 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
332 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
333 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
334 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
335 %attr(755,root,root) %{_libdir}/libvotequorum.so.8.*.*
336 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.8
339 %defattr(644,root,root,755)
340 %{?with_apidocs:%doc doc/api/html/*}
341 %attr(755,root,root) %{_libdir}/libcfg.so
342 %attr(755,root,root) %{_libdir}/libcmap.so
343 %attr(755,root,root) %{_libdir}/libcorosync_common.so
344 %attr(755,root,root) %{_libdir}/libcpg.so
345 %attr(755,root,root) %{_libdir}/libsam.so
346 %attr(755,root,root) %{_libdir}/libquorum.so
347 %attr(755,root,root) %{_libdir}/libtotem_pg.so
348 %attr(755,root,root) %{_libdir}/libvotequorum.so
349 %{_includedir}/corosync
350 %{_pkgconfigdir}/corosync.pc
351 %{_pkgconfigdir}/libcfg.pc
352 %{_pkgconfigdir}/libcmap.pc
353 %{_pkgconfigdir}/libcorosync_common.pc
354 %{_pkgconfigdir}/libcpg.pc
355 %{_pkgconfigdir}/libquorum.pc
356 %{_pkgconfigdir}/libsam.pc
357 %{_pkgconfigdir}/libtotem_pg.pc
358 %{_pkgconfigdir}/libvotequorum.pc
359 %{_mandir}/man3/cmap_*.3*
360 %{_mandir}/man3/cpg_*.3*
361 %{_mandir}/man3/quorum_*.3*
362 %{_mandir}/man3/sam_*.3*
363 %{_mandir}/man3/votequorum_*.3*
365 %if %{with static_libs}
367 %defattr(644,root,root,755)
370 %{_libdir}/libcorosync_common.a
373 %{_libdir}/libquorum.a
374 %{_libdir}/libtotem_pg.a
375 %{_libdir}/libvotequorum.a
378 %if %{with testagents}
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_bindir}/cpg_test_agent
382 %attr(755,root,root) %{_bindir}/sam_test_agent
383 %attr(755,root,root) %{_bindir}/votequorum_test_agent
384 %dir %{_datadir}/corosync/tests
385 %{_datadir}/corosync/tests/mem_leak_test.sh
386 %{_datadir}/corosync/tests/net_breaker.sh
387 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
388 %{_datadir}/corosync/tests/shm_leak_audit.sh
392 %files -n mibs-corosync
393 %defattr(644,root,root,755)
394 %{_datadir}/mibs/COROSYNC-MIB.txt