#
# Conditional build:
-%bcond_with apidocs # build apidocs (man3 pages are provided anyway)
+%bcond_without apidocs # build apidocs (some man3 pages are provided anyway)
%bcond_without dbus # DBus events
%bcond_without rdma # RDMA support
%bcond_without snmp # SNMP protocol support
-%bcond_with testagents
-%bcond_with watchdog
-%bcond_with monitoring
-%bcond_with xmlconf
+%bcond_without testagents
+%bcond_without watchdog
+%bcond_without monitoring
+%bcond_without xmlconf
#
Summary: Corosync - OSI Certified implementation of a complete cluster engine
Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
Name: corosync
-Version: 2.0.1
-Release: 0.1
+Version: 2.1.0
+Release: 3
License: BSD
Group: Base
-Source0: ftp://ftp:downloads@corosync.org/downloads/%{name}-%{version}/corosync-%{version}.tar.gz
-# Source0-md5: 9e23f3f5594676455ff39ff363658155
-Patch0: %{name}-makefile.patch
-Patch1: %{name}-lib_deps.patch
-Patch2: %{name}-install.patch
+Source0: https://github.com/downloads/corosync/corosync/corosync-2.1.0.tar.gz
+# Source0-md5: dc5152e6dfdb4638ab544e587884483a
+Source1: %{name}.init
+Source2: %{name}-notifyd.init
+Source3: %{name}-notifyd.sysconfig
+Patch0: %{name}-lib_deps.patch
+Patch1: %{name}-install.patch
+Patch2: %{name}-notifyd_service.patch
URL: http://www.corosync.org/
BuildRequires: autoconf >= 2.61
BuildRequires: automake
%{?with_dbus:BuildRequires: dbus-devel}
%{?with_apidocs:BuildRequires: doxygen}
BuildRequires: libqb-devel
+%{?with_monitoring:BuildRequires: libstatgrab-devel}
%if %{with rdma}
BuildRequires: libibverbs-devel
+BuildRequires: libtool
BuildRequires: librdmacm-devel
%endif
%{?with_xmlconf:BuildRequires: libxslt}
%patch2 -p1
%build
+%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__autoheader}
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
>$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
-%{?with_apidocs:install doc/api/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
%clean
rm -rf $RPM_BUILD_ROOT
%post
-/sbin/chkconfig --add corosync
-%service corosync restart "Corosync Cluster Engine"
-
-%systemd_post corosync.service
+/sbin/chkconfig --add %{name}
+/sbin/chkconfig --add %{name}-notifyd
+%service %{name} restart
+%service %{name}-notifyd restart
+%systemd_post %{name}.service
+%systemd_post %{name}-notifyd.service
%preun
if [ "$1" = "0" ]; then
- %service corosync stop
- /sbin/chkconfig --del corosync
+ %service -q %{name} stop
+ /sbin/chkconfig --del %{name}
+ %service -q %{name}-notifyd stop
+ /sbin/chkconfig --del %{name}-notifyd
fi
-%systemd_preun corosync.service
+%systemd_preun %{name}.service
+%systemd_preun %{name}-notifyd.service
%postun
%systemd_reload
%endif
%attr(754,root,root) /etc/rc.d/init.d/corosync
%attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
+%verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
%dir %{_sysconfdir}/corosync
%{systemdunitdir}/corosync.service
%{systemdunitdir}/corosync-notifyd.service
%attr(755,root,root) %{_sbindir}/corosync-cfgtool
%attr(755,root,root) %{_sbindir}/corosync-cmapctl
%attr(755,root,root) %{_sbindir}/corosync-cpgtool
-%attr(755,root,root) %{_sbindir}/corosync-fplay
%attr(755,root,root) %{_sbindir}/corosync-keygen
%attr(755,root,root) %{_sbindir}/corosync-notifyd
%attr(755,root,root) %{_sbindir}/corosync-quorumtool
%{_mandir}/man8/corosync-cmapctl.8*
%{_mandir}/man8/corosync-cfgtool.8*
%{_mandir}/man8/corosync-cpgtool.8*
-%{_mandir}/man8/corosync-fplay.8*
%{_mandir}/man8/corosync-keygen.8*
%{_mandir}/man8/corosync-notifyd.8*
%{_mandir}/man8/corosync-quorumtool.8*
+%dir %{_datadir}/corosync
+%attr(755,root,root) %{_datadir}/%{name}/corosync
+%attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
%if %{with xmlconf}
%attr(755,root,root) %{_bindir}/corosync-xmlproc
%config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
-%dir %{_datadir}/corosync
%dir %{_datadir}/corosync/xml2conf.xsl
%{_mandir}/man8/corosync-xmlproc.8*
%{_mandir}/man5/corosync.xml.5*
%if %{with dbus}
/etc/dbus-1/system.d/corosync-signals.conf
%endif
+/var/lib/corosync
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
%attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
%attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
-%attr(755,root,root) %{_libdir}/libvotequorum.so.5.*.*
-%attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.5
+%attr(755,root,root) %{_libdir}/libvotequorum.so.6.*.*
+%attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.6
%files devel
%defattr(644,root,root,755)
+%{?with_apidocs:%doc doc/api/html/*}
%attr(755,root,root) %{_libdir}/libcfg.so
%attr(755,root,root) %{_libdir}/libcmap.so
%attr(755,root,root) %{_libdir}/libcorosync_common.so