2018-01-29 15:21:33 +00:00
|
|
|
# Conditionals
|
|
|
|
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
|
|
|
|
# to disable or enable specific features
|
2020-11-23 08:10:29 +00:00
|
|
|
%bcond_without userflags
|
2018-01-29 15:21:33 +00:00
|
|
|
%bcond_with runautogen
|
|
|
|
%bcond_without systemd
|
|
|
|
|
|
|
|
%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
|
|
|
|
%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
|
|
|
|
|
|
|
|
Name: corosync-qdevice
|
|
|
|
Summary: The Corosync Cluster Engine Qdevice
|
2020-11-23 08:10:29 +00:00
|
|
|
Version: 3.0.1
|
2021-01-26 02:34:36 +00:00
|
|
|
Release: 2%{?gitver}%{?dist}
|
2018-01-29 15:21:33 +00:00
|
|
|
License: BSD
|
|
|
|
URL: https://github.com/corosync/corosync-qdevice
|
|
|
|
Source0: https://github.com/corosync/corosync-qdevice/releases/download/v%{version}%{?gittarver}/%{name}-%{version}%{?gittarver}.tar.gz
|
|
|
|
|
|
|
|
# Runtime bits
|
|
|
|
Requires: corosync >= 2.4.0
|
|
|
|
Requires: corosynclib >= 2.4.0
|
|
|
|
Requires: nss-tools
|
|
|
|
|
|
|
|
%if %{with systemd}
|
|
|
|
%{?systemd_requires}
|
|
|
|
BuildRequires: systemd
|
|
|
|
BuildRequires: systemd-devel
|
|
|
|
%else
|
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
Requires(preun): /sbin/chkconfig
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Build bits
|
2018-07-10 06:06:42 +00:00
|
|
|
BuildRequires: gcc
|
2018-01-29 15:21:33 +00:00
|
|
|
BuildRequires: corosynclib-devel
|
|
|
|
BuildRequires: libqb-devel
|
|
|
|
BuildRequires: sed
|
2018-11-23 16:27:28 +00:00
|
|
|
BuildRequires: groff
|
|
|
|
BuildRequires: nss-devel
|
2018-01-29 15:21:33 +00:00
|
|
|
|
|
|
|
%if %{with runautogen}
|
|
|
|
BuildRequires: autoconf automake libtool
|
|
|
|
%endif
|
2020-12-19 05:29:11 +00:00
|
|
|
BuildRequires: make
|
2018-01-29 15:21:33 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}%{?gittarver}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%if %{with runautogen}
|
|
|
|
./autogen.sh
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%{configure} \
|
2020-11-23 08:10:29 +00:00
|
|
|
%if %{with userflags}
|
|
|
|
--enable-user-flags \
|
|
|
|
%endif
|
2018-01-29 15:21:33 +00:00
|
|
|
%if %{with systemd}
|
|
|
|
--enable-systemd \
|
|
|
|
%endif
|
|
|
|
--enable-qdevices \
|
|
|
|
--enable-qnetd \
|
|
|
|
--with-initddir=%{_initrddir} \
|
2018-11-23 16:27:28 +00:00
|
|
|
--with-systemddir=%{_unitdir} \
|
|
|
|
--docdir=%{_docdir}
|
2018-01-29 15:21:33 +00:00
|
|
|
|
2020-07-22 08:38:13 +00:00
|
|
|
%make_build
|
2018-01-29 15:21:33 +00:00
|
|
|
|
|
|
|
%install
|
2020-07-22 08:38:13 +00:00
|
|
|
%make_install
|
2018-01-29 15:21:33 +00:00
|
|
|
|
|
|
|
## tree fixup
|
|
|
|
# drop docs and html docs for now
|
|
|
|
rm -rf %{buildroot}%{_docdir}/*
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
|
|
# /etc/sysconfig/corosync-qdevice
|
2019-03-20 17:17:33 +00:00
|
|
|
install -p -m 644 init/corosync-qdevice.sysconfig.example \
|
2018-01-29 15:21:33 +00:00
|
|
|
%{buildroot}%{_sysconfdir}/sysconfig/corosync-qdevice
|
|
|
|
# /etc/sysconfig/corosync-qnetd
|
2019-03-20 17:17:33 +00:00
|
|
|
install -p -m 644 init/corosync-qnetd.sysconfig.example \
|
2018-01-29 15:21:33 +00:00
|
|
|
%{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
|
|
|
|
|
|
|
|
%if %{with systemd}
|
|
|
|
sed -i -e 's/^#User=/User=/' \
|
|
|
|
%{buildroot}%{_unitdir}/corosync-qnetd.service
|
|
|
|
%else
|
|
|
|
sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \
|
|
|
|
%{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains the Corosync Cluster Engine Qdevice, script for creating
|
|
|
|
NSS certificates and an init script.
|
|
|
|
|
|
|
|
%post
|
|
|
|
%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
|
|
|
|
%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
|
|
|
|
%if %{with systemd} && 0%{?systemd_postun:1}
|
|
|
|
%systemd_postun corosync-qdevice.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
2019-03-20 17:17:33 +00:00
|
|
|
%license LICENSE
|
2018-01-29 15:21:33 +00:00
|
|
|
%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
|
|
|
|
%else
|
|
|
|
%{_initrddir}/corosync-qdevice
|
|
|
|
%endif
|
|
|
|
%{_mandir}/man8/corosync-qdevice-tool.8*
|
|
|
|
%{_mandir}/man8/corosync-qdevice-net-certutil.8*
|
|
|
|
%{_mandir}/man8/corosync-qdevice.8*
|
|
|
|
|
2020-11-23 08:10:29 +00:00
|
|
|
%package -n corosync-qdevice-devel
|
|
|
|
Summary: The Corosync Cluster Engine Qdevice Network Development Kit
|
|
|
|
Requires: pkgconfig
|
|
|
|
|
|
|
|
%description -n corosync-qdevice-devel
|
|
|
|
This package contains files used to develop using
|
|
|
|
The Corosync Cluster Engine Qdevice
|
|
|
|
|
|
|
|
%files -n corosync-qdevice-devel
|
|
|
|
%license LICENSE
|
|
|
|
%{_datadir}/pkgconfig/corosync-qdevice.pc
|
|
|
|
|
2018-01-29 15:21:33 +00:00
|
|
|
%package -n corosync-qnetd
|
|
|
|
Summary: The Corosync Cluster Engine Qdevice Network Daemon
|
|
|
|
Requires: nss-tools
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
|
|
|
|
%if %{with systemd}
|
|
|
|
%{?systemd_requires}
|
|
|
|
%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 corosync-qnetd.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n corosync-qnetd
|
2019-03-20 17:17:33 +00:00
|
|
|
%license LICENSE
|
2018-01-29 15:21:33 +00:00
|
|
|
%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
|
|
|
|
%else
|
|
|
|
%{_initrddir}/corosync-qnetd
|
|
|
|
%endif
|
|
|
|
%{_mandir}/man8/corosync-qnetd-tool.8*
|
|
|
|
%{_mandir}/man8/corosync-qnetd-certutil.8*
|
|
|
|
%{_mandir}/man8/corosync-qnetd.8*
|
|
|
|
|
|
|
|
%changelog
|
2021-01-26 02:34:36 +00:00
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
2020-11-23 08:10:29 +00:00
|
|
|
* Mon Nov 23 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.1-1
|
|
|
|
- New upstream release
|
|
|
|
|
2020-07-27 14:36:02 +00:00
|
|
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-10
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-07-22 08:38:13 +00:00
|
|
|
* Wed Jul 22 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.0-9
|
|
|
|
- Use make macros
|
|
|
|
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
|
|
|
|
2020-05-13 09:00:20 +00:00
|
|
|
* Wed May 13 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.0-8
|
|
|
|
- Really rebuild for the new libqb
|
|
|
|
|
2020-05-13 08:40:06 +00:00
|
|
|
* Wed May 13 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.0-7
|
|
|
|
- Rebuild for new libqb
|
|
|
|
|
2020-03-26 17:37:13 +00:00
|
|
|
* Thu Mar 26 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.0-6
|
|
|
|
- Add CI tests
|
|
|
|
- Enable gating
|
|
|
|
|
2020-01-28 14:50:52 +00:00
|
|
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2019-07-24 21:02:57 +00:00
|
|
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-03-20 17:17:33 +00:00
|
|
|
* Wed Mar 20 2019 Jan Friesse <jfriesse@redhat.com> - 3.0.0-3
|
|
|
|
- Add license and use install -p
|
|
|
|
|
2019-01-31 16:18:39 +00:00
|
|
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
2018-12-12 14:25:02 +00:00
|
|
|
* Wed Dec 12 2018 Jan Friesse <jfriesse@redhat.com> - 3.0.0-1
|
|
|
|
- New upstream release
|
|
|
|
|
2018-11-23 16:27:28 +00:00
|
|
|
* Fri Nov 23 2018 Jan Friesse <jfriesse@redhat.com> - 2.93.0-1
|
|
|
|
- New upstream release
|
|
|
|
|
2018-08-09 14:03:24 +00:00
|
|
|
* Thu Aug 09 2018 Jan Friesse <jfriesse@redhat.com> - 2.92.0-1
|
|
|
|
- New upstream release
|
|
|
|
|
2018-07-12 22:16:06 +00:00
|
|
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.91.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
2018-04-27 06:39:30 +00:00
|
|
|
* Fri Apr 27 2018 Jan Friesse <jfriesse@redhat.com> - 2.91.0-1
|
|
|
|
- New upstream release
|
|
|
|
|
2018-03-22 08:32:34 +00:00
|
|
|
* Thu Mar 22 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-4
|
|
|
|
- Rebuild for new Corosync
|
|
|
|
|
2018-02-07 05:46:37 +00:00
|
|
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.90.0-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
2018-01-29 15:21:33 +00:00
|
|
|
* Wed Jan 24 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-2
|
|
|
|
- Fix spec file according to advices given in review by
|
|
|
|
Robert-André Mauchin <zebob.m@gmail.com>
|
|
|
|
|
|
|
|
* Tue Jan 23 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-1
|
|
|
|
- First upstream packaged version of corosync for rawhide review.
|