diff --git a/.gitignore b/.gitignore index 4fff9c4..371cd36 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ corosync-1.2.7.tar.gz /corosync-2.3.4.tar.gz /corosync-2.3.5.tar.gz /corosync-2.3.6.tar.gz +/corosync-2.4.0.tar.gz diff --git a/corosync.spec b/corosync.spec index 8cadae2..5925634 100644 --- a/corosync.spec +++ b/corosync.spec @@ -14,13 +14,15 @@ %bcond_with upstart %bcond_without xmlconf %bcond_without runautogen +%bcond_without qdevices +%bcond_without qnetd %global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}} %global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces -Version: 2.3.6 +Version: 2.4.0 Release: 1%{?gitver}%{?dist} License: BSD Group: System Environment/Base @@ -69,6 +71,12 @@ Requires(postun): systemd %if %{with xmlconf} Requires: libxslt %endif +%if %{with qdevices} || %{with qnetd} +Requires: nss-tools +%endif +%if %{with qnetd} +BuildRequires: sed +%endif BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -113,10 +121,17 @@ export rdmacm_LIBS=-lrdmacm \ %endif %if %{with xmlconf} --enable-xmlconf \ +%endif +%if %{with qdevices} + --enable-qdevices \ +%endif +%if %{with qnetd} + --enable-qnetd \ %endif --with-initddir=%{_initrddir} \ --with-systemddir=%{_unitdir} \ - --with-upstartdir=%{_sysconfdir}/init + --with-upstartdir=%{_sysconfdir}/init \ + --with-tmpfilesdir=%{_tmpfilesdir} make %{_smp_mflags} @@ -144,6 +159,27 @@ install -m 644 tools/corosync-notifyd.sysconfig.example \ install -m 644 init/corosync.sysconfig.example \ %{buildroot}%{_sysconfdir}/sysconfig/corosync +%if %{with qdevices} +# /etc/sysconfig/corosync-qdevice +install -m 644 init/corosync-qdevice.sysconfig.example \ + %{buildroot}%{_sysconfdir}/sysconfig/corosync-qdevice +%endif + +%if %{with qnetd} +# /etc/sysconfig/corosync-qnetd +install -m 644 init/corosync-qnetd.sysconfig.example \ + %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd +%if %{with systemd} +sed -i -e 's/^#User=/User=/' \ + %{buildroot}%{_unitdir}/corosync-qnetd.service +sed -i -e 's/root/coroqnetd/g' \ + %{buildroot}%{_tmpfilesdir}/corosync-qnetd.conf +%else +sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \ + %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd +%endif +%endif + %clean rm -rf %{buildroot} @@ -336,7 +372,146 @@ The Corosync Cluster Engine APIs. %{_mandir}/man8/cmap_overview.8* %{_mandir}/man8/quorum_overview.8* +# optional qdevices +# +%if %{with qdevices} + +%package -n corosync-qdevice +Summary: The Corosync Cluster Engine Qdevice +Group: System Environment/Base +Requires: corosync +Requires: nss-tools + +%if %{with systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%endif + +%description -n corosync-qdevice +This package contains the Corosync Cluster Engine Qdevice, script for creating +NSS certificates and an init script. + +%post -n corosync-qdevice +%if %{with systemd} && 0%{?systemd_post:1} +%systemd_post corosync-qdevice.service +%else +if [ $1 -eq 1 ]; then + /sbin/chkconfig --add corosync-qdevice || : +fi +%endif + +%preun -n corosync-qdevice +%if %{with systemd} && 0%{?systemd_preun:1} +%systemd_preun corosync-qdevice.service +%else +if [ $1 -eq 0 ]; then + /sbin/service corosync-qdevice stop &>/dev/null || : + /sbin/chkconfig --del corosync-qdevice || : +fi +%endif + +%postun -n corosync-qdevice +%if %{with systemd} && 0%{?systemd_postun:1} +%systemd_postun +%endif + +%files -n corosync-qdevice +%defattr(-,root,root,-) +%dir %{_sysconfdir}/corosync/qdevice +%dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net +%dir %{_localstatedir}/run/corosync-qdevice +%{_sbindir}/corosync-qdevice +%{_sbindir}/corosync-qdevice-net-certutil +%{_sbindir}/corosync-qdevice-tool +%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice +%if %{with systemd} +%{_unitdir}/corosync-qdevice.service +%dir %{_datadir}/corosync +%{_datadir}/corosync/corosync-qdevice +%else +%{_initrddir}/corosync-qdevice +%endif +%{_mandir}/man8/corosync-qdevice-tool.8* +%{_mandir}/man8/corosync-qdevice-net-certutil.8* +%{_mandir}/man8/corosync-qdevice.8* +%endif + +# optional qnetd +# +%if %{with qnetd} + +%package -n corosync-qnetd +Summary: The Corosync Cluster Engine Qdevice Network Daemon +Group: System Environment/Base +Requires: nss-tools +Requires(pre): shadow-utils + +%if %{with systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%endif + +%description -n corosync-qnetd +This package contains the Corosync Cluster Engine Qdevice Network Daemon, script for creating +NSS certificates and an init script. + +%pre -n corosync-qnetd +getent group coroqnetd >/dev/null || groupadd -r coroqnetd +getent passwd coroqnetd >/dev/null || \ + useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd +exit 0 + +%post -n corosync-qnetd +%if %{with systemd} && 0%{?systemd_post:1} +%systemd_post corosync-qnetd.service +%else +if [ $1 -eq 1 ]; then + /sbin/chkconfig --add corosync-qnetd || : +fi +%endif + +%preun -n corosync-qnetd +%if %{with systemd} && 0%{?systemd_preun:1} +%systemd_preun corosync-qnetd.service +%else +if [ $1 -eq 0 ]; then + /sbin/service corosync-qnetd stop &>/dev/null || : + /sbin/chkconfig --del corosync-qnetd || : +fi +%endif + +%postun -n corosync-qnetd +%if %{with systemd} && 0%{?systemd_postun:1} +%systemd_postun +%endif + +%files -n corosync-qnetd +%defattr(-,root,root,-) +%dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd +%dir %attr(770, coroqnetd, coroqnetd) %{_localstatedir}/run/corosync-qnetd +%{_bindir}/corosync-qnetd +%{_bindir}/corosync-qnetd-certutil +%{_bindir}/corosync-qnetd-tool +%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qnetd +%if %{with systemd} +%{_unitdir}/corosync-qnetd.service +%dir %{_datadir}/corosync +%{_datadir}/corosync/corosync-qnetd +%{_tmpfilesdir}/corosync-qnetd.conf +%else +%{_initrddir}/corosync-qnetd +%endif +%{_mandir}/man8/corosync-qnetd-tool.8* +%{_mandir}/man8/corosync-qnetd-certutil.8* +%{_mandir}/man8/corosync-qnetd.8* +%endif + %changelog +* Thu Jun 30 2016 Jan Friesse - 2.4.0-1 +- New upstream release + * Thu Jun 16 2016 Jan Friesse - 2.3.6-1 - New upstream release diff --git a/sources b/sources index e64b846..c9a166f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ea1e0421d474017d9ef3d6b741b7aaad corosync-2.3.6.tar.gz +11bdd5ee2aed5eb2443dd6d6acd6a1ab corosync-2.4.0.tar.gz