786b16
#
786b16
# spec file for package sbd
786b16
#
786b16
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
786b16
# Copyright (c) 2013 Lars Marowsky-Bree
786b16
#
786b16
# All modifications and additions to the file contributed by third parties
786b16
# remain the property of their copyright owners, unless otherwise agreed
786b16
# upon. The license for this file, and modifications and additions to the
786b16
# file, is the same license as for the pristine package itself (unless the
786b16
# license for the pristine package is not an Open Source License, in which
786b16
# case the license is the MIT License). An "Open Source License" is a
786b16
# license that conforms to the Open Source Definition (Version 1.9)
786b16
# published by the Open Source Initiative.
786b16
786b16
# Please submit bugfixes or comments via http://bugs.opensuse.org/
786b16
#
52408e
%global commit 7f33d1a409d0a4e2cd69946688c48eaa8f3c5d26
786b16
%global shortcommit %(c=%{commit}; echo ${c:0:7})
0b5381
%global github_owner Clusterlabs
789c7f
%global buildnum 15
786b16
786b16
Name:           sbd
786b16
Summary:        Storage-based death
786b16
License:        GPLv2+
786b16
Group:          System Environment/Daemons
52408e
Version:        1.4.0
789c7f
Release:        %{buildnum}%{?dist}
786b16
Url:            https://github.com/%{github_owner}/%{name}
786b16
Source0:        https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
52408e
Patch0:         0001-Fix-sbd-cluster-finalize-cmap-connection-if-disconne.patch
52408e
Patch1:         0002-Fix-sbd-pacemaker-make-handling-of-cib-connection-lo.patch
52408e
Patch2:         0003-Fix-sbd-pacemaker-bail-out-of-status-earlier.patch
789c7f
Patch3:         0004-Doc-sbd.8.pod-use-the-generic-term-cluster-services-.patch
789c7f
Patch4:         0005-Doc-sbd.sysconfig-watchdog-timeout-set-in-the-on-dis.patch
789c7f
Patch5:         0006-Refactor-fail-earlier-on-invalid-servants.patch
789c7f
Patch6:         0007-Fix-sbd-inquisitor-overhaul-device-list-parser.patch
789c7f
Patch7:         0008-Refactor-sbd-common-no-reason-for-stack-hogger-havin.patch
789c7f
Patch8:         0009-Sanity-sbd-inquisitor-free-timeout-action-on-bail-ou.patch
789c7f
Patch9:         0010-Sanity-sbd-md-prevent-unrealistic-overflow-on-sector.patch
789c7f
Patch10:        0011-Sanity-sbd-md-remove-some-left-over-code.patch
789c7f
Patch11:        0012-Fix-sbd-common-query-rt-budget-0-otherwise-try-movin.patch
75728b
Patch12:        0013-Fix-sbd-pacemaker-assume-graceful-exit-if-leftovers-.patch
789c7f
Patch13:        0014-Fix-sbd-cluster-periodically-check-corosync-daemon-l.patch
789c7f
Patch14:        0015-build-say-library-when-missing-cmap-not-package-to-a.patch
75728b
Patch15:        0016-Fix-sbd-pacemaker-check-for-shutdown-attribute-on-ev.patch
786b16
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
786b16
BuildRequires:  autoconf
786b16
BuildRequires:  automake
786b16
BuildRequires:  libuuid-devel
786b16
BuildRequires:  glib2-devel
786b16
BuildRequires:  libaio-devel
786b16
BuildRequires:  corosync-devel
6d9134
BuildRequires:  pacemaker-libs-devel > 1.1.12
786b16
BuildRequires:  libtool
786b16
BuildRequires:  libuuid-devel
786b16
BuildRequires:  libxml2-devel
786b16
BuildRequires:  pkgconfig
786b16
BuildRequires:  python-devel
786b16
786b16
%if 0%{?rhel} > 0
dbaca1
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
786b16
%endif
786b16
786b16
%if %{defined systemd_requires}
786b16
%systemd_requires
786b16
%endif
786b16
786b16
%description
786b16
786b16
This package contains the storage-based death functionality.
786b16
786b16
###########################################################
786b16
786b16
%prep
786b16
%autosetup -n %{name}-%{commit} -p1
786b16
786b16
###########################################################
786b16
786b16
%build
786b16
autoreconf -i
786b16
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror"
f46b0e
%configure
786b16
make %{?_smp_mflags}
786b16
786b16
###########################################################
786b16
786b16
%install
786b16
786b16
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
786b16
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith
786b16
786b16
%if %{defined _unitdir}
786b16
install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service
0b5381
install -D -m 0644 src/sbd_remote.service $RPM_BUILD_ROOT/%{_unitdir}/sbd_remote.service
786b16
%endif
786b16
786b16
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
786b16
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
786b16
786b16
###########################################################
786b16
786b16
%clean
786b16
rm -rf %{buildroot}
786b16
786b16
%if %{defined _unitdir}
786b16
%post
786b16
%systemd_post sbd.service
0b5381
%systemd_post sbd_remote.service
50e840
if [ $1 -ne 1 ] ; then
50e840
	if systemctl --quiet is-enabled sbd.service 2>/dev/null
50e840
	then
50e840
		systemctl --quiet reenable sbd.service 2>/dev/null || :
50e840
	fi
50e840
	if systemctl --quiet is-enabled sbd_remote.service 2>/dev/null
50e840
	then
50e840
		systemctl --quiet reenable sbd_remote.service 2>/dev/null || :
50e840
	fi
50e840
fi
786b16
786b16
%preun
786b16
%systemd_preun sbd.service
0b5381
%systemd_preun sbd_remote.service
786b16
786b16
%postun
786b16
%systemd_postun sbd.service
0b5381
%systemd_postun sbd_remote.service
786b16
%endif
786b16
786b16
%files
786b16
###########################################################
786b16
%defattr(-,root,root)
786b16
%config(noreplace) %{_sysconfdir}/sysconfig/sbd
786b16
%{_sbindir}/sbd
0b5381
#%{_datadir}/sbd
f46b0e
%doc %{_mandir}/man8/sbd*
786b16
%if %{defined _unitdir}
786b16
%{_unitdir}/sbd.service
0b5381
%{_unitdir}/sbd_remote.service
786b16
%endif
786b16
%doc COPYING
786b16
786b16
%changelog
789c7f
* Fri Aug 16 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-15
75728b
- check for shutdown attribute on every cib-diff
75728b
789c7f
  Resolves: rhbz#1713023
75728b
789c7f
* Tue Aug 13 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-14
789c7f
- rebuild with updated brew-root
75728b
789c7f
  Resolves: rhbz#1718297
789c7f
  Resolves: rhbz#1713023
789c7f
  Resolves: rhbz#1732368
75728b
789c7f
* Fri Aug 9 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-13
789c7f
- properly increment release
75728b
789c7f
  Resolves: rhbz#1718297
789c7f
  Resolves: rhbz#1713023
789c7f
  Resolves: rhbz#1732368
789c7f
789c7f
* Fri Aug 9 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-12
789c7f
- rebuild with updated brew-root
789c7f
789c7f
  Resolves: rhbz#1718297
789c7f
  Resolves: rhbz#1713023
789c7f
  Resolves: rhbz#1732368
789c7f
789c7f
* Tue Jul 23 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-11
789c7f
- synchronize with rhel-8.1.0
789c7f
789c7f
  Resolves: rhbz#1718297
789c7f
  Resolves: rhbz#1713023
789c7f
  Resolves: rhbz#1732368
75728b
52408e
* Tue Mar 26 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-4
52408e
- fix possible null-pointer-access just introduced
57099c
52408e
  Resolves: rhbz#1691484
52408e
52408e
* Tue Mar 26 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-3
52408e
- finalize cmap connection if disconnected from cluster
52408e
- make handling of cib-connection loss more robust
52408e
52408e
  Resolves: rhbz#1691484
52408e
52408e
* Thu Feb 7 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-2
52408e
- rebuild against pacemaker 1.20 to make sbd actually use
52408e
  the new libpengine API
52408e
52408e
  Resolves: rhbz#1661233
52408e
52408e
* Mon Jan 14 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-1
52408e
- rebase to upstream v1.4.0
52408e
52408e
  Resolves: rhbz#1660158
57099c
dbaca1
* Wed Sep 19 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-8.2
dbaca1
- avoid statting potential symlink-targets in /dev
dbaca1
dbaca1
  Resolves: rhbz#1628988
dbaca1
dbaca1
* Fri Sep 14 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-8.1
dbaca1
- skip symlinks pointing to dev-nodes outside of /dev
dbaca1
dbaca1
  Resolves: rhbz#1628988
dbaca1
dbaca1
* Mon Apr 16 2018 <kwenning@redhat.com> - 1.3.1-8
dbaca1
- Added aarch64 target
dbaca1
dbaca1
  Resolves: rhbz#1568029
dbaca1
50e840
* Mon Jan 15 2018 <kwenning@redhat.com> - 1.3.1-7
50e840
- reenable sbd on upgrade so that additional
50e840
  links to make pacemaker properly depend on
50e840
  sbd are created
50e840
50e840
  Resolves: rhbz#1525981
50e840
50e840
* Wed Jan 10 2018 <kwenning@redhat.com> - 1.3.1-5
50e840
- add man sections for query- & test-watchdog
50e840
50e840
  Resolves: rhbz#1462002
50e840
50e840
* Wed Dec 20 2017 <kwenning@redhat.com> - 1.3.1-3
50e840
- mention timeout caveat with SBD_DELAY_START
50e840
  in configuration template
50e840
- make systemd wait for sbd-start to finish
50e840
  before starting pacemaker or dlm
50e840
50e840
  Resolves: rhbz#1525981
50e840
50e840
* Fri Nov 3 2017 <kwenning@redhat.com> - 1.3.1-2
50e840
- rebase to upstream v1.3.1
50e840
50e840
  Resolves: rhbz#1499864
50e840
            rhbz#1468580
50e840
            rhbz#1462002
50e840
f46b0e
* Wed Jun 7 2017 <kwenning@redhat.com> - 1.3.0-3
f46b0e
- prevent creation of duplicate servants
f46b0e
- check 2Node flag in corosync to support
f46b0e
  2-node-clusters with shared disk fencing
f46b0e
- move disk-triggered reboot/off/crashdump
f46b0e
  to inquisitor to have sysrq observed by watchdog
f46b0e
f46b0e
  Resolves: rhbz#1413951
f46b0e
f46b0e
* Sun Mar 26 2017 <kwenning@redhat.com> - 1.3.0-1
f46b0e
- rebase to upstream v1.3.0
f46b0e
- remove watchdog-limitation from description
f46b0e
  Resolves: rhbz#1413951
f46b0e
f46b0e
* Mon Feb 27 2017 <kwenning@redhat.com> - 1.2.1-23
f46b0e
- if shared-storage enabled check for node-name <= 63 chars
f46b0e
  Resolves: rhbz#1413951
f46b0e
f46b0e
* Tue Jan 31 2017 <kwenning@redhat.com> - 1.2.1-22
f46b0e
- Rebuild with shared-storage enabled
f46b0e
- Package original manpage
f46b0e
- Added ppc64le target
f46b0e
  Resolves: rhbz#1413951
f46b0e
0b5381
* Fri Apr 15 2016 <kwenning@redhat.com> - 1.2.1-21
0b5381
- Rebuild for new pacemaker
0b5381
  Resolves: rhbz#1320400
0b5381
0b5381
* Fri Apr 15 2016 <kwenning@redhat.com> - 1.2.1-20
0b5381
- tarball updated to c511b0692784a7085df4b1ae35748fb318fa79ee
0b5381
  from https://github.com/Clusterlabs/sbd
0b5381
  Resolves: rhbz#1324240
0b5381
6d9134
* Thu Jul 23 2015 <abeekhof@redhat.com> - 1.2.1-5
6d9134
- Rebuild for pacemaker
6d9134
f46b0e
* Tue Jun 02 2015 <abeekhof@redhat.com> - 1.2.1-4
6d9134
- Include the dist tag in the release string
6d9134
- Rebuild for new pacemaker
6d9134
786b16
* Mon Jan 12 2015 <abeekhof@redhat.com> - 1.2.1-3
786b16
- Correctly parse SBD_WATCHDOG_TIMEOUT into seconds (not milliseconds)
786b16
786b16
* Mon Oct 27 2014 <abeekhof@redhat.com> - 1.2.1-2
786b16
- Correctly enable /proc/pid validation for sbd_lock_running()
786b16
786b16
* Fri Oct 24 2014 <abeekhof@redhat.com> - 1.2.1-1
786b16
- Further improve integration with the el7 environment
786b16
786b16
* Thu Oct 16 2014 <abeekhof@redhat.com> - 1.2.1-0.5.872e82f3.git
786b16
- Disable unsupported functionality (for now)
786b16
786b16
* Wed Oct 15 2014 <abeekhof@redhat.com> - 1.2.1-0.4.872e82f3.git
786b16
- Improved integration with the el7 environment
786b16
786b16
* Tue Sep 30 2014 <abeekhof@redhat.com> - 1.2.1-0.3.8f912945.git
786b16
- Only build on archs supported by the HA Add-on
786b16
786b16
* Fri Aug 29 2014 <abeekhof@redhat.com> - 1.2.1-0.2.8f912945.git
786b16
- Remove some additional SUSE-isms
786b16
786b16
* Fri Aug 29 2014 <abeekhof@redhat.com> - 1.2.1-0.1.8f912945.git
786b16
- Prepare for package review
786b16
  Resolves: rhbz#1134245