Blame SPECS/sbd.spec

1e6485
#
1e6485
# spec file for package sbd
1e6485
#
1e6485
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
1e6485
# Copyright (c) 2013 Lars Marowsky-Bree
1e6485
#
1e6485
# All modifications and additions to the file contributed by third parties
1e6485
# remain the property of their copyright owners, unless otherwise agreed
1e6485
# upon. The license for this file, and modifications and additions to the
1e6485
# file, is the same license as for the pristine package itself (unless the
1e6485
# license for the pristine package is not an Open Source License, in which
1e6485
# case the license is the MIT License). An "Open Source License" is a
1e6485
# license that conforms to the Open Source Definition (Version 1.9)
1e6485
# published by the Open Source Initiative.
1e6485
1e6485
# Please submit bugfixes or comments via http://bugs.opensuse.org/
1e6485
#
e18b07
%global commit 25fce8a7d5e8cd5abc2379077381b10bd6cec183
1e6485
%global shortcommit %(c=%{commit}; echo ${c:0:7})
1e6485
%global github_owner Clusterlabs
e18b07
%global buildnum 2
1e6485
1e6485
Name:           sbd
1e6485
Summary:        Storage-based death
1e6485
License:        GPLv2+
1e6485
Group:          System Environment/Daemons
e18b07
Version:        1.4.1
1e6485
Release:        %{buildnum}%{?dist}
1e6485
Url:            https://github.com/%{github_owner}/%{name}
1e6485
Source0:        https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
e18b07
Patch1:         0001-Fix-regressions.sh-make-parameter-passing-consistent.patch
1e6485
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
1e6485
BuildRequires:  autoconf
1e6485
BuildRequires:  automake
1e6485
BuildRequires:  libuuid-devel
1e6485
BuildRequires:  glib2-devel
1e6485
BuildRequires:  libaio-devel
e18b07
BuildRequires:  corosync-devel
1e6485
BuildRequires:  pacemaker-libs-devel > 1.1.12
1e6485
BuildRequires:  libtool
1e6485
BuildRequires:  libuuid-devel
1e6485
BuildRequires:  libxml2-devel
1e6485
BuildRequires:  pkgconfig
1e6485
BuildRequires:  systemd
e18b07
BuildRequires:  make
e18b07
Conflicts:      fence-agents-sbd < 4.2.1-38
1e6485
1e6485
%if 0%{?rhel} > 0
1e6485
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
1e6485
%endif
1e6485
1e6485
%if %{defined systemd_requires}
1e6485
%systemd_requires
1e6485
%endif
1e6485
1e6485
%description
1e6485
1e6485
This package contains the storage-based death functionality.
1e6485
e18b07
%package tests
e18b07
Summary:        Storage-based death environment for regression tests
e18b07
License:        GPLv2+
e18b07
Group:          System Environment/Daemons
e18b07
e18b07
%description tests
e18b07
This package provides an environment + testscripts for
e18b07
regression-testing sbd.
e18b07
1e6485
###########################################################
1e6485
1e6485
%prep
1e6485
%autosetup -n %{name}-%{commit} -p1
e18b07
%ifarch s390x s390
e18b07
sed -i src/sbd.sysconfig -e "s/Default: 5/Default: 15/"
e18b07
sed -i src/sbd.sysconfig -e "s/SBD_WATCHDOG_TIMEOUT=5/SBD_WATCHDOG_TIMEOUT=15/"
e18b07
%endif
1e6485
1e6485
###########################################################
1e6485
1e6485
%build
e18b07
./autogen.sh
1e6485
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror"
1e6485
%configure
1e6485
make %{?_smp_mflags}
1e6485
1e6485
###########################################################
1e6485
1e6485
%install
1e6485
1e6485
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
1e6485
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith
1e6485
e18b07
install -D -m 0755 tests/regressions.sh $RPM_BUILD_ROOT/usr/share/sbd/regressions.sh
1e6485
%if %{defined _unitdir}
1e6485
install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service
1e6485
install -D -m 0644 src/sbd_remote.service $RPM_BUILD_ROOT/%{_unitdir}/sbd_remote.service
1e6485
%endif
1e6485
1e6485
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
1e6485
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
1e6485
e18b07
# Don't package static libs
e18b07
find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f
e18b07
find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
e18b07
1e6485
###########################################################
1e6485
1e6485
%clean
1e6485
rm -rf %{buildroot}
1e6485
1e6485
%if %{defined _unitdir}
1e6485
%post
1e6485
%systemd_post sbd.service
1e6485
%systemd_post sbd_remote.service
1e6485
if [ $1 -ne 1 ] ; then
1e6485
	if systemctl --quiet is-enabled sbd.service 2>/dev/null
1e6485
	then
1e6485
		systemctl --quiet reenable sbd.service 2>/dev/null || :
1e6485
	fi
1e6485
	if systemctl --quiet is-enabled sbd_remote.service 2>/dev/null
1e6485
	then
1e6485
		systemctl --quiet reenable sbd_remote.service 2>/dev/null || :
1e6485
	fi
1e6485
fi
1e6485
1e6485
%preun
1e6485
%systemd_preun sbd.service
1e6485
%systemd_preun sbd_remote.service
1e6485
1e6485
%postun
1e6485
%systemd_postun sbd.service
1e6485
%systemd_postun sbd_remote.service
1e6485
%endif
1e6485
1e6485
%files
1e6485
###########################################################
1e6485
%defattr(-,root,root)
1e6485
%config(noreplace) %{_sysconfdir}/sysconfig/sbd
1e6485
%{_sbindir}/sbd
1e6485
#%{_datadir}/sbd
e18b07
%exclude %{_datadir}/sbd/regressions.sh
1e6485
%doc %{_mandir}/man8/sbd*
1e6485
%if %{defined _unitdir}
1e6485
%{_unitdir}/sbd.service
1e6485
%{_unitdir}/sbd_remote.service
1e6485
%endif
1e6485
%doc COPYING
1e6485
e18b07
%files tests
e18b07
###########################################################
e18b07
%defattr(-,root,root)
e18b07
%dir %{_datadir}/sbd
e18b07
%{_datadir}/sbd/regressions.sh
e18b07
%{_libdir}/libsbdtestbed*
e18b07
1e6485
%changelog
e18b07
* Wed Nov 20 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.1-2
e18b07
- silence coverity regarding inconsistent parameter passing
e18b07
- adapt fence-agents-dependency from upstream to distribution
e18b07
e18b07
  Resolves: rhbz#1769305
e18b07
e18b07
* Tue Nov 19 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.1-1
e18b07
- rebase to upstream v1.4.0
e18b07
e18b07
  Resolves: rhbz#1769305
e18b07
  Resolves: rhbz#1768906
e18b07
e18b07
* Fri Aug 16 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-15
e18b07
- check for shutdown attribute on every cib-diff
e18b07
e18b07
  Resolves: rhbz#1718296
e18b07
1e6485
* Wed Jun 12 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-10
1e6485
- added missing patches to git
1e6485
1e6485
  Resolves: rhbz#1702727
1e6485
  Resolves: rhbz#1718296
1e6485
1e6485
* Tue Jun 11 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-9
1e6485
- assume graceful pacemaker exit if leftovers are unmanaged
1e6485
- query corosync liveness via votequorum-api
1e6485
1e6485
  Resolves: rhbz#1702727
1e6485
  Resolves: rhbz#1718296
1e6485
1e6485
* Mon Jun 3 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-8
1e6485
- check for rt-budget > 0 and move to root-slice otherwise
1e6485
1e6485
  Resolves: rhbz#1713021
1e6485
1e6485
* Wed Apr 10 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-7
1e6485
- add some minor fixes from upstream found by coverity
1e6485
1e6485
  Resolves: rhbz#1698056
1e6485
1e6485
* Wed Apr 10 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-6
1e6485
- add decision-context to gating.yaml
1e6485
1e6485
  Resolves: rhbz#1682137
1e6485
1e6485
* Mon Jan 14 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-5
1e6485
- rebase to upstream v1.4.0
1e6485
- finalize cmap connection if disconnected from cluster
1e6485
- make handling of cib-connection loss more robust
1e6485
- add ci test files
1e6485
- use generic term cluster-services in doc
1e6485
- stress in doc that on-disk metadata watchdog-timeout
1e6485
  takes precedence
1e6485
- fail earlier on invalid servants to make gcc 9 happy
1e6485
1e6485
  Resolves: rhbz#1698056
1e6485
  Resolves: rhbz#1682137
1e6485
1e6485
* Mon Dec 17 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-18
1e6485
- make timeout-action executed by sbd configurable
1e6485
1e6485
  Resolves: rhbz#1660147
1e6485
1e6485
* Mon Dec 3 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-17
1e6485
- use pacemaker's new pe api with constructors/destructors
1e6485
1e6485
  Resolves: rhbz#1650663
1e6485
1e6485
* Wed Sep 19 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-16
1e6485
- avoid statting potential symlink-targets in /dev
1e6485
1e6485
  Resolves: rhbz#1629020
1e6485
1e6485
* Wed Sep 19 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-15
1e6485
- rebuild against new versions of libqb (1.0.3-7.el8),
1e6485
  corosync (2.99.3-4.el8) and pacemaker (2.0.0-9.el8)
1e6485
1e6485
  Related: rhbz#1615945
1e6485
1e6485
* Fri Sep 14 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-14
1e6485
- skip symlinks pointing to dev-nodes outside of /dev
1e6485
1e6485
  Resolves: rhbz#1629020
1e6485
1e6485
* Wed Sep 5 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-13
1e6485
- Require systemd-package during build to have the macros
1e6485
1e6485
  Resolves: rhbz#1625553
1e6485
1e6485
* Mon Jul 30 2018 Florian Weimer <fweimer@redhat.com> - 1.3.1-12
1e6485
- Rebuild with fixed binutils
1e6485
1e6485
* Tue Jul 3 2018 <kwenning@redhat.com> - 1.3.1-11
1e6485
- replaced tarball by version downloaded from github
1e6485
1e6485
* Mon Jul 2 2018 <kwenning@redhat.com> - 1.3.1-10
1e6485
- removed unneeded python build-dependency
1e6485
- updated legacy corosync-devel to corosynclib-devel
1e6485
1e6485
  Resolves: rhbz#1595856
1e6485
1e6485
* Fri May 4 2018 <kwenning@redhat.com> - 1.3.1-9
1e6485
- use cib-api directly as get_cib_copy gone with
1e6485
  pacemaker 2.0.0
1e6485
- add sys/sysmacros.h to build with glibc-2.25
1e6485
- enlarge string buffer to satisfy newer gcc
1e6485
- no corosync 1 support with pacemaker 2.0.0
1e6485
- set default to LOG_NOTICE + overhaul levels
1e6485
- refactor proc-parsing
1e6485
- adaptions for daemon-names changed with
1e6485
  pacemaker 2.0.0 rc3
1e6485
- added .do-not-sync-with-fedora
1e6485
  Resolves: rhbz#1571797
1e6485
1e6485
* Mon Apr 16 2018 <kwenning@redhat.com> - 1.3.1-8
1e6485
- Added aarch64 target
1e6485
1e6485
  Resolves: rhbz#1568029
1e6485
1e6485
* Mon Jan 15 2018 <kwenning@redhat.com> - 1.3.1-7
1e6485
- reenable sbd on upgrade so that additional
1e6485
  links to make pacemaker properly depend on
1e6485
  sbd are created
1e6485
1e6485
  Resolves: rhbz#1525981
1e6485
1e6485
* Wed Jan 10 2018 <kwenning@redhat.com> - 1.3.1-5
1e6485
- add man sections for query- & test-watchdog
1e6485
1e6485
  Resolves: rhbz#1462002
1e6485
1e6485
* Wed Dec 20 2017 <kwenning@redhat.com> - 1.3.1-3
1e6485
- mention timeout caveat with SBD_DELAY_START
1e6485
  in configuration template
1e6485
- make systemd wait for sbd-start to finish
1e6485
  before starting pacemaker or dlm
1e6485
1e6485
  Resolves: rhbz#1525981
1e6485
1e6485
* Fri Nov 3 2017 <kwenning@redhat.com> - 1.3.1-2
1e6485
- rebase to upstream v1.3.1
1e6485
1e6485
  Resolves: rhbz#1499864
1e6485
            rhbz#1468580
1e6485
            rhbz#1462002
1e6485
1e6485
* Wed Jun 7 2017 <kwenning@redhat.com> - 1.3.0-3
1e6485
- prevent creation of duplicate servants
1e6485
- check 2Node flag in corosync to support
1e6485
  2-node-clusters with shared disk fencing
1e6485
- move disk-triggered reboot/off/crashdump
1e6485
  to inquisitor to have sysrq observed by watchdog
1e6485
1e6485
  Resolves: rhbz#1413951
1e6485
1e6485
* Sun Mar 26 2017 <kwenning@redhat.com> - 1.3.0-1
1e6485
- rebase to upstream v1.3.0
1e6485
- remove watchdog-limitation from description
1e6485
  Resolves: rhbz#1413951
1e6485
1e6485
* Mon Feb 27 2017 <kwenning@redhat.com> - 1.2.1-23
1e6485
- if shared-storage enabled check for node-name <= 63 chars
1e6485
  Resolves: rhbz#1413951
1e6485
1e6485
* Tue Jan 31 2017 <kwenning@redhat.com> - 1.2.1-22
1e6485
- Rebuild with shared-storage enabled
1e6485
- Package original manpage
1e6485
- Added ppc64le target
1e6485
  Resolves: rhbz#1413951
1e6485
1e6485
* Fri Apr 15 2016 <kwenning@redhat.com> - 1.2.1-21
1e6485
- Rebuild for new pacemaker
1e6485
  Resolves: rhbz#1320400
1e6485
1e6485
* Fri Apr 15 2016 <kwenning@redhat.com> - 1.2.1-20
1e6485
- tarball updated to c511b0692784a7085df4b1ae35748fb318fa79ee
1e6485
  from https://github.com/Clusterlabs/sbd
1e6485
  Resolves: rhbz#1324240
1e6485
1e6485
* Thu Jul 23 2015 <abeekhof@redhat.com> - 1.2.1-5
1e6485
- Rebuild for pacemaker
1e6485
1e6485
* Tue Jun 02 2015 <abeekhof@redhat.com> - 1.2.1-4
1e6485
- Include the dist tag in the release string
1e6485
- Rebuild for new pacemaker
1e6485
1e6485
* Mon Jan 12 2015 <abeekhof@redhat.com> - 1.2.1-3
1e6485
- Correctly parse SBD_WATCHDOG_TIMEOUT into seconds (not milliseconds)
1e6485
1e6485
* Mon Oct 27 2014 <abeekhof@redhat.com> - 1.2.1-2
1e6485
- Correctly enable /proc/pid validation for sbd_lock_running()
1e6485
1e6485
* Fri Oct 24 2014 <abeekhof@redhat.com> - 1.2.1-1
1e6485
- Further improve integration with the el7 environment
1e6485
1e6485
* Thu Oct 16 2014 <abeekhof@redhat.com> - 1.2.1-0.5.872e82f3.git
1e6485
- Disable unsupported functionality (for now)
1e6485
1e6485
* Wed Oct 15 2014 <abeekhof@redhat.com> - 1.2.1-0.4.872e82f3.git
1e6485
- Improved integration with the el7 environment
1e6485
1e6485
* Tue Sep 30 2014 <abeekhof@redhat.com> - 1.2.1-0.3.8f912945.git
1e6485
- Only build on archs supported by the HA Add-on
1e6485
1e6485
* Fri Aug 29 2014 <abeekhof@redhat.com> - 1.2.1-0.2.8f912945.git
1e6485
- Remove some additional SUSE-isms
1e6485
1e6485
* Fri Aug 29 2014 <abeekhof@redhat.com> - 1.2.1-0.1.8f912945.git
1e6485
- Prepare for package review