Blame SPECS/corosync-qdevice.spec

7727c6
# Conditionals
7727c6
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7727c6
# to disable or enable specific features
7727c6
%bcond_without userflags
7727c6
%bcond_with runautogen
7727c6
%bcond_without systemd
7727c6
7727c6
%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
7727c6
%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
7727c6
7727c6
Name: corosync-qdevice
7727c6
Summary: The Corosync Cluster Engine Qdevice
7727c6
Version: 3.0.1
943740
Release: 4%{?gitver}%{?dist}.1
7727c6
License: BSD
7727c6
URL: https://github.com/corosync/corosync-qdevice
7727c6
Source0: https://github.com/corosync/corosync-qdevice/releases/download/v%{version}%{?gittarver}/%{name}-%{version}%{?gittarver}.tar.gz
7727c6
943740
Patch0: bz2180244-1-qdevice-Destroy-non-blocking-client-on-failure.patch
943740
7727c6
# Runtime bits
7727c6
Requires: corosync >= 2.4.0
7727c6
Requires: corosynclib >= 2.4.0
7727c6
Requires: nss-tools
7727c6
7727c6
%if %{with systemd}
7727c6
%{?systemd_requires}
7727c6
BuildRequires: systemd
7727c6
BuildRequires: systemd-devel
7727c6
%else
7727c6
Requires(post): /sbin/chkconfig
7727c6
Requires(preun): /sbin/chkconfig
7727c6
%endif
7727c6
7727c6
# Build bits
7727c6
BuildRequires: gcc
7727c6
BuildRequires: corosynclib-devel
7727c6
BuildRequires: libqb-devel
7727c6
BuildRequires: sed
7727c6
BuildRequires: groff
7727c6
BuildRequires: nss-devel
7727c6
7727c6
%if %{with runautogen}
7727c6
BuildRequires: autoconf automake libtool
7727c6
%endif
7727c6
BuildRequires: make
7727c6
7727c6
%prep
7727c6
%setup -q -n %{name}-%{version}%{?gittarver}
7727c6
943740
%patch0 -p1 -b .bz2180244-1
943740
7727c6
%build
7727c6
%if %{with runautogen}
7727c6
./autogen.sh
7727c6
%endif
7727c6
7727c6
%{configure} \
7727c6
%if %{with userflags}
7727c6
	--enable-user-flags \
7727c6
%endif
7727c6
%if %{with systemd}
7727c6
	--enable-systemd \
7727c6
%endif
7727c6
	--enable-qdevices \
7727c6
	--enable-qnetd \
7727c6
	--with-initddir=%{_initrddir} \
7727c6
	--with-systemddir=%{_unitdir} \
7727c6
	--docdir=%{_docdir}
7727c6
7727c6
%make_build
7727c6
7727c6
%install
7727c6
%make_install
7727c6
7727c6
## tree fixup
7727c6
# drop docs and html docs for now
7727c6
rm -rf %{buildroot}%{_docdir}/*
7727c6
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
7727c6
# /etc/sysconfig/corosync-qdevice
7727c6
install -p -m 644 init/corosync-qdevice.sysconfig.example \
7727c6
   %{buildroot}%{_sysconfdir}/sysconfig/corosync-qdevice
7727c6
# /etc/sysconfig/corosync-qnetd
7727c6
install -p -m 644 init/corosync-qnetd.sysconfig.example \
7727c6
   %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
7727c6
7727c6
%if %{with systemd}
7727c6
sed -i -e 's/^#User=/User=/' \
7727c6
   %{buildroot}%{_unitdir}/corosync-qnetd.service
7727c6
%else
7727c6
sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \
7727c6
   %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
7727c6
%endif
7727c6
7727c6
%description
7727c6
This package contains the Corosync Cluster Engine Qdevice, script for creating
7727c6
NSS certificates and an init script.
7727c6
7727c6
%post
7727c6
%if %{with systemd} && 0%{?systemd_post:1}
7727c6
%systemd_post corosync-qdevice.service
7727c6
%else
7727c6
if [ $1 -eq 1 ]; then
7727c6
	/sbin/chkconfig --add corosync-qdevice || :
7727c6
fi
7727c6
%endif
7727c6
7727c6
%preun
7727c6
%if %{with systemd} && 0%{?systemd_preun:1}
7727c6
%systemd_preun corosync-qdevice.service
7727c6
%else
7727c6
if [ $1 -eq 0 ]; then
7727c6
	/sbin/service corosync-qdevice stop &>/dev/null || :
7727c6
	/sbin/chkconfig --del corosync-qdevice || :
7727c6
fi
7727c6
%endif
7727c6
7727c6
%postun
7727c6
%if %{with systemd} && 0%{?systemd_postun:1}
7727c6
%systemd_postun corosync-qdevice.service
7727c6
%endif
7727c6
7727c6
%files
7727c6
%license LICENSE
7727c6
%dir %{_sysconfdir}/corosync/qdevice
7727c6
%dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net
7727c6
%dir %{_localstatedir}/run/corosync-qdevice
7727c6
%{_sbindir}/corosync-qdevice
7727c6
%{_sbindir}/corosync-qdevice-net-certutil
7727c6
%{_sbindir}/corosync-qdevice-tool
7727c6
%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice
7727c6
%if %{with systemd}
7727c6
%{_unitdir}/corosync-qdevice.service
7727c6
%else
7727c6
%{_initrddir}/corosync-qdevice
7727c6
%endif
7727c6
%{_mandir}/man8/corosync-qdevice-tool.8*
7727c6
%{_mandir}/man8/corosync-qdevice-net-certutil.8*
7727c6
%{_mandir}/man8/corosync-qdevice.8*
7727c6
7727c6
%package -n corosync-qdevice-devel
7727c6
Summary: The Corosync Cluster Engine Qdevice Network Development Kit
7727c6
Requires: pkgconfig
7727c6
7727c6
%description -n corosync-qdevice-devel
7727c6
This package contains files used to develop using
7727c6
The Corosync Cluster Engine Qdevice
7727c6
7727c6
%files -n corosync-qdevice-devel
7727c6
%license LICENSE
7727c6
%{_datadir}/pkgconfig/corosync-qdevice.pc
7727c6
7727c6
%package -n corosync-qnetd
7727c6
Summary: The Corosync Cluster Engine Qdevice Network Daemon
7727c6
Requires: nss-tools
7727c6
Requires(pre): shadow-utils
7727c6
7727c6
%if %{with systemd}
7727c6
%{?systemd_requires}
7727c6
%endif
7727c6
7727c6
%description -n corosync-qnetd
7727c6
This package contains the Corosync Cluster Engine Qdevice Network Daemon,
7727c6
script for creating NSS certificates and an init script.
7727c6
7727c6
%pre -n corosync-qnetd
7727c6
getent group coroqnetd >/dev/null || groupadd -r coroqnetd
7727c6
getent passwd coroqnetd >/dev/null || \
7727c6
    useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd
7727c6
exit 0
7727c6
7727c6
%post -n corosync-qnetd
7727c6
%if %{with systemd} && 0%{?systemd_post:1}
7727c6
%systemd_post corosync-qnetd.service
7727c6
%else
7727c6
if [ $1 -eq 1 ]; then
7727c6
	/sbin/chkconfig --add corosync-qnetd || :
7727c6
fi
7727c6
%endif
7727c6
7727c6
%preun -n corosync-qnetd
7727c6
%if %{with systemd} && 0%{?systemd_preun:1}
7727c6
%systemd_preun corosync-qnetd.service
7727c6
%else
7727c6
if [ $1 -eq 0 ]; then
7727c6
	/sbin/service corosync-qnetd stop &>/dev/null || :
7727c6
	/sbin/chkconfig --del corosync-qnetd || :
7727c6
fi
7727c6
%endif
7727c6
7727c6
%postun -n corosync-qnetd
7727c6
%if %{with systemd} && 0%{?systemd_postun:1}
7727c6
%systemd_postun corosync-qnetd.service
7727c6
%endif
7727c6
7727c6
%files -n corosync-qnetd
7727c6
%license LICENSE
7727c6
%dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd
7727c6
%dir %attr(770, coroqnetd, coroqnetd) %{_localstatedir}/run/corosync-qnetd
7727c6
%{_bindir}/corosync-qnetd
7727c6
%{_bindir}/corosync-qnetd-certutil
7727c6
%{_bindir}/corosync-qnetd-tool
7727c6
%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qnetd
7727c6
%if %{with systemd}
7727c6
%{_unitdir}/corosync-qnetd.service
7727c6
%else
7727c6
%{_initrddir}/corosync-qnetd
7727c6
%endif
7727c6
%{_mandir}/man8/corosync-qnetd-tool.8*
7727c6
%{_mandir}/man8/corosync-qnetd-certutil.8*
7727c6
%{_mandir}/man8/corosync-qnetd.8*
7727c6
7727c6
%changelog
943740
* Thu Mar 23 2023 Jan Friesse <jfriesse@redhat.com> - 3.0.1-4.1
943740
- Resolves: rhbz#2180244
943740
943740
- qdevice: Destroy non blocking client on failure (rhbz#2180244)
943740
- merge upstream commit 4331c7d5650a8bf44c16512419f1954d0ef96df5 (rhbz#2180244)
943740
7727c6
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.0.1-4
7727c6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
7727c6
  Related: rhbz#1991688
7727c6
7727c6
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.0.1-3
7727c6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
7727c6
7727c6
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-2
7727c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
7727c6
7727c6
* Mon Nov 23 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.1-1
7727c6
- New upstream release
7727c6
7727c6
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-10
7727c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
7727c6
7727c6
* Wed Jul 22 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.0-9
7727c6
- Use make macros
7727c6
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
7727c6
7727c6
* Wed May 13 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.0-8
7727c6
- Really rebuild for the new libqb
7727c6
7727c6
* Wed May 13 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.0-7
7727c6
- Rebuild for new libqb
7727c6
7727c6
* Thu Mar 26 2020 Jan Friesse <jfriesse@redhat.com> - 3.0.0-6
7727c6
- Add CI tests
7727c6
- Enable gating
7727c6
7727c6
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-5
7727c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
7727c6
7727c6
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-4
7727c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7727c6
7727c6
* Wed Mar 20 2019 Jan Friesse <jfriesse@redhat.com> - 3.0.0-3
7727c6
- Add license and use install -p
7727c6
7727c6
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-2
7727c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7727c6
7727c6
* Wed Dec 12 2018 Jan Friesse <jfriesse@redhat.com> - 3.0.0-1
7727c6
- New upstream release
7727c6
7727c6
* Fri Nov 23 2018 Jan Friesse <jfriesse@redhat.com> - 2.93.0-1
7727c6
- New upstream release
7727c6
7727c6
* Thu Aug 09 2018 Jan Friesse <jfriesse@redhat.com> - 2.92.0-1
7727c6
- New upstream release
7727c6
7727c6
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.91.0-2
7727c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
7727c6
7727c6
* Fri Apr 27 2018 Jan Friesse <jfriesse@redhat.com> - 2.91.0-1
7727c6
- New upstream release
7727c6
7727c6
* Thu Mar 22 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-4
7727c6
- Rebuild for new Corosync
7727c6
7727c6
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.90.0-3
7727c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7727c6
7727c6
* Wed Jan 24 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-2
7727c6
- Fix spec file according to advices given in review by
7727c6
  Robert-André Mauchin <zebob.m@gmail.com>
7727c6
7727c6
* Tue Jan 23 2018 Jan Friesse <jfriesse@redhat.com> - 2.90.0-1
7727c6
- First upstream packaged version of corosync for rawhide review.