Blame SPECS/sbd.spec

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