Blame SPECS/corosync-qdevice.spec

aeb9af
# Conditionals
aeb9af
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
aeb9af
# to disable or enable specific features
9608fc
%bcond_without userflags
aeb9af
%bcond_with runautogen
aeb9af
%bcond_without systemd
aeb9af
aeb9af
%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
aeb9af
%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
aeb9af
aeb9af
Name: corosync-qdevice
aeb9af
Summary: The Corosync Cluster Engine Qdevice
2aeabb
Version: 3.0.2
71f5b5
Release: 1%{?gitver}%{?dist}.1
aeb9af
License: BSD
aeb9af
URL: https://github.com/corosync/corosync-qdevice
aeb9af
Source0: https://github.com/corosync/corosync-qdevice/releases/download/v%{version}%{?gittarver}/%{name}-%{version}%{?gittarver}.tar.gz
aeb9af
2aeabb
Patch0: bz2178715-1-qdevice-Destroy-non-blocking-client-on-failure.patch
71f5b5
aeb9af
# Runtime bits
aeb9af
Requires: corosync >= 2.4.0
aeb9af
Requires: corosynclib >= 2.4.0
aeb9af
Requires: nss-tools
aeb9af
aeb9af
%if %{with systemd}
aeb9af
%{?systemd_requires}
aeb9af
BuildRequires: systemd
aeb9af
BuildRequires: systemd-devel
aeb9af
%else
aeb9af
Requires(post): /sbin/chkconfig
aeb9af
Requires(preun): /sbin/chkconfig
aeb9af
%endif
aeb9af
aeb9af
# Build bits
aeb9af
BuildRequires: gcc
aeb9af
BuildRequires: corosynclib-devel
aeb9af
BuildRequires: libqb-devel
aeb9af
BuildRequires: sed
aeb9af
BuildRequires: groff
aeb9af
BuildRequires: nss-devel
aeb9af
aeb9af
%if %{with runautogen}
aeb9af
BuildRequires: autoconf automake libtool
aeb9af
%endif
aeb9af
aeb9af
%prep
aeb9af
%setup -q -n %{name}-%{version}%{?gittarver}
aeb9af
2aeabb
%patch0 -p1 -b .bz2178715-1
71f5b5
aeb9af
%build
aeb9af
%if %{with runautogen}
aeb9af
./autogen.sh
aeb9af
%endif
aeb9af
aeb9af
%{configure} \
9608fc
%if %{with userflags}
9608fc
	--enable-user-flags \
9608fc
%endif
aeb9af
%if %{with systemd}
aeb9af
	--enable-systemd \
aeb9af
%endif
aeb9af
	--enable-qdevices \
aeb9af
	--enable-qnetd \
aeb9af
	--with-initddir=%{_initrddir} \
aeb9af
	--with-systemddir=%{_unitdir} \
aeb9af
	--docdir=%{_docdir}
aeb9af
aeb9af
make %{_smp_mflags}
aeb9af
aeb9af
%install
aeb9af
make install DESTDIR=%{buildroot}
aeb9af
aeb9af
## tree fixup
aeb9af
# drop docs and html docs for now
aeb9af
rm -rf %{buildroot}%{_docdir}/*
aeb9af
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
aeb9af
# /etc/sysconfig/corosync-qdevice
9608fc
install -p -m 644 init/corosync-qdevice.sysconfig.example \
aeb9af
   %{buildroot}%{_sysconfdir}/sysconfig/corosync-qdevice
aeb9af
# /etc/sysconfig/corosync-qnetd
9608fc
install -p -m 644 init/corosync-qnetd.sysconfig.example \
aeb9af
   %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
aeb9af
aeb9af
%if %{with systemd}
aeb9af
sed -i -e 's/^#User=/User=/' \
aeb9af
   %{buildroot}%{_unitdir}/corosync-qnetd.service
aeb9af
%else
aeb9af
sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \
aeb9af
   %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
aeb9af
%endif
aeb9af
aeb9af
%description
aeb9af
This package contains the Corosync Cluster Engine Qdevice, script for creating
aeb9af
NSS certificates and an init script.
aeb9af
aeb9af
%post
aeb9af
%if %{with systemd} && 0%{?systemd_post:1}
aeb9af
%systemd_post corosync-qdevice.service
aeb9af
%else
aeb9af
if [ $1 -eq 1 ]; then
aeb9af
	/sbin/chkconfig --add corosync-qdevice || :
aeb9af
fi
aeb9af
%endif
aeb9af
aeb9af
%preun
aeb9af
%if %{with systemd} && 0%{?systemd_preun:1}
aeb9af
%systemd_preun corosync-qdevice.service
aeb9af
%else
aeb9af
if [ $1 -eq 0 ]; then
aeb9af
	/sbin/service corosync-qdevice stop &>/dev/null || :
aeb9af
	/sbin/chkconfig --del corosync-qdevice || :
aeb9af
fi
aeb9af
%endif
aeb9af
aeb9af
%postun
aeb9af
%if %{with systemd} && 0%{?systemd_postun:1}
aeb9af
%systemd_postun corosync-qdevice.service
aeb9af
%endif
aeb9af
aeb9af
%files
9608fc
%license LICENSE
aeb9af
%dir %{_sysconfdir}/corosync/qdevice
aeb9af
%dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net
aeb9af
%dir %{_localstatedir}/run/corosync-qdevice
aeb9af
%{_sbindir}/corosync-qdevice
aeb9af
%{_sbindir}/corosync-qdevice-net-certutil
aeb9af
%{_sbindir}/corosync-qdevice-tool
aeb9af
%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice
aeb9af
%if %{with systemd}
aeb9af
%{_unitdir}/corosync-qdevice.service
aeb9af
%else
aeb9af
%{_initrddir}/corosync-qdevice
aeb9af
%endif
aeb9af
%{_mandir}/man8/corosync-qdevice-tool.8*
aeb9af
%{_mandir}/man8/corosync-qdevice-net-certutil.8*
aeb9af
%{_mandir}/man8/corosync-qdevice.8*
aeb9af
9608fc
%package -n corosync-qdevice-devel
9608fc
Summary: The Corosync Cluster Engine Qdevice Network Development Kit
9608fc
Requires: pkgconfig
9608fc
9608fc
%description -n corosync-qdevice-devel
9608fc
This package contains files used to develop using
9608fc
The Corosync Cluster Engine Qdevice
9608fc
9608fc
%files -n corosync-qdevice-devel
9608fc
%license LICENSE
9608fc
%{_datadir}/pkgconfig/corosync-qdevice.pc
9608fc
aeb9af
%package -n corosync-qnetd
aeb9af
Summary: The Corosync Cluster Engine Qdevice Network Daemon
aeb9af
Requires: nss-tools
aeb9af
Requires(pre): shadow-utils
aeb9af
aeb9af
%if %{with systemd}
aeb9af
%{?systemd_requires}
aeb9af
%endif
aeb9af
aeb9af
%description -n corosync-qnetd
aeb9af
This package contains the Corosync Cluster Engine Qdevice Network Daemon,
aeb9af
script for creating NSS certificates and an init script.
aeb9af
aeb9af
%pre -n corosync-qnetd
aeb9af
getent group coroqnetd >/dev/null || groupadd -r coroqnetd
aeb9af
getent passwd coroqnetd >/dev/null || \
aeb9af
    useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd
aeb9af
exit 0
aeb9af
aeb9af
%post -n corosync-qnetd
aeb9af
%if %{with systemd} && 0%{?systemd_post:1}
aeb9af
%systemd_post corosync-qnetd.service
aeb9af
%else
aeb9af
if [ $1 -eq 1 ]; then
aeb9af
	/sbin/chkconfig --add corosync-qnetd || :
aeb9af
fi
aeb9af
%endif
aeb9af
aeb9af
%preun -n corosync-qnetd
aeb9af
%if %{with systemd} && 0%{?systemd_preun:1}
aeb9af
%systemd_preun corosync-qnetd.service
aeb9af
%else
aeb9af
if [ $1 -eq 0 ]; then
aeb9af
	/sbin/service corosync-qnetd stop &>/dev/null || :
aeb9af
	/sbin/chkconfig --del corosync-qnetd || :
aeb9af
fi
aeb9af
%endif
aeb9af
aeb9af
%postun -n corosync-qnetd
aeb9af
%if %{with systemd} && 0%{?systemd_postun:1}
aeb9af
%systemd_postun corosync-qnetd.service
aeb9af
%endif
aeb9af
aeb9af
%files -n corosync-qnetd
9608fc
%license LICENSE
aeb9af
%dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd
aeb9af
%dir %attr(770, coroqnetd, coroqnetd) %{_localstatedir}/run/corosync-qnetd
aeb9af
%{_bindir}/corosync-qnetd
aeb9af
%{_bindir}/corosync-qnetd-certutil
aeb9af
%{_bindir}/corosync-qnetd-tool
aeb9af
%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qnetd
aeb9af
%if %{with systemd}
aeb9af
%{_unitdir}/corosync-qnetd.service
aeb9af
%else
aeb9af
%{_initrddir}/corosync-qnetd
aeb9af
%endif
aeb9af
%{_mandir}/man8/corosync-qnetd-tool.8*
aeb9af
%{_mandir}/man8/corosync-qnetd-certutil.8*
aeb9af
%{_mandir}/man8/corosync-qnetd.8*
aeb9af
aeb9af
%changelog
2aeabb
* Thu Mar 23 2023 Jan Friesse <jfriesse@redhat.com> - 3.0.2-1.1
2aeabb
- Resolves: rhbz#2178715
71f5b5
2aeabb
- qdevice: Destroy non blocking client on failure (rhbz#2178715)
2aeabb
- merge upstream commit 4331c7d5650a8bf44c16512419f1954d0ef96df5 (rhbz#2178715)
2aeabb
2aeabb
* Thu Nov 03 2022 Jan Friesse <jfriesse@redhat.com> - 3.0.2-1
2aeabb
- Resolves: rhbz#2135862
2aeabb
2aeabb
- New upstream release
71f5b5
9608fc
* Mon Nov 23 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.1-1
9608fc
- Resolves: rhbz#1752386
9608fc
- Resolves: rhbz#1879351
9608fc
9608fc
- New upstream release
9608fc
ff1f46
* Fri Apr 24 2020 Jan Friesse <jfriesse@redhat.com> 3.0.0-4
ff1f46
- Resolves: rhbz#1827256
ff1f46
ff1f46
- Add explicit corosync-qdevice and corosync-qnetd dependency for revdeps CI test
ff1f46
ff1f46
* Mon May 13 2019 Jan Friesse <jfriesse@redhat.com> 3.0.0-3
ff1f46
- Related: rhbz#1682124
ff1f46
ff1f46
- Add gating tests
ff1f46
aeb9af
* Wed Dec 12 2018 Jan Friesse <jfriesse@redhat.com> - 3.0.0-2
aeb9af
- Resolves: rhbz#1600919
aeb9af
aeb9af
- Fix spec file 2.93.0-1 entry removal
aeb9af
aeb9af
* Wed Dec 12 2018 Jan Friesse <jfriesse@redhat.com> - 3.0.0-1
aeb9af
- Resolves: rhbz#1600919
aeb9af
aeb9af
- New upstream release
aeb9af
aeb9af
* Fri Nov 23 2018 Jan Friesse <jfriesse@redhat.com> - 2.93.0-1
aeb9af
- Related: rhbz#1600919
aeb9af
aeb9af
- New upstream release
aeb9af
aeb9af
* Tue Sep 18 2018 Jan Friesse <jfriesse@redhat.com> 2.92.0-2
aeb9af
- Related: rhbz#1615945
aeb9af
aeb9af
- Rebuild for new LibQB
aeb9af
aeb9af
* Thu Aug 09 2018 Jan Friesse <jfriesse@redhat.com> - 2.92.0-1
aeb9af
- New upstream release
aeb9af
aeb9af
* Mon Jul 30 2018 Florian Weimer <fweimer@redhat.com> - 2.91.0-2
aeb9af
- Rebuild with fixed binutils
aeb9af
aeb9af
* Fri Apr 27 2018 Jan Friesse <jfriesse@redhat.com> - 2.91.0-1
aeb9af
- New upstream release
aeb9af
aeb9af
* Fri Apr 06 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-5
aeb9af
- Import from Fedora
aeb9af
aeb9af
* Thu Mar 22 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-4
aeb9af
- Rebuild for new Corosync
aeb9af
aeb9af
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.90.0-3
aeb9af
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
aeb9af
aeb9af
* Wed Jan 24 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-2
aeb9af
- Fix spec file according to advices given in review by
aeb9af
  Robert-André Mauchin <zebob.m@gmail.com>
aeb9af
aeb9af
* Tue Jan 23 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-1
aeb9af
- First upstream packaged version of corosync for rawhide review.