Blame SPECS/corosync-qdevice.spec

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