Blame SPECS/corosync-qdevice.spec

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