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
#
bcce97
%global longcommit d7f447d689da52897e190114c448d1129f3c5f72
bcce97
%global shortcommit %(echo %{longcommit}|cut -c1-8)
bcce97
%global modified %(echo %{longcommit}-|cut -f2 -d-)
27dcac
%global github_owner Clusterlabs
799293
%global buildnum 2
648232
648232
%ifarch s390x s390
648232
# minimum timeout on LPAR diag288 watchdog is 15s
648232
%global watchdog_timeout_default 15
648232
%else
648232
%global watchdog_timeout_default 5
648232
%endif
648232
bcce97
# Be careful with sync_resource_startup_default
bcce97
# being enabled. This configuration has
bcce97
# to be in sync with configuration in pacemaker
bcce97
# where it is called sbd_sync - assure by e.g.
bcce97
# mutual rpm dependencies.
bcce97
%bcond_without sync_resource_startup_default
bcce97
# Syncing enabled per default will lead to
bcce97
# syncing enabled on upgrade without adaption
bcce97
# of the config.
bcce97
# Setting can still be overruled via sysconfig.
bcce97
# The setting in the config-template packaged
bcce97
# will follow the default if below is is left
bcce97
# empty. But it is possible to have the setting
bcce97
# in the config-template deviate from the default
bcce97
# by setting below to an explicit 'yes' or 'no'.
bcce97
%global sync_resource_startup_sysconfig ""
27dcac
27dcac
Name:           sbd
27dcac
Summary:        Storage-based death
27dcac
License:        GPLv2+
27dcac
Group:          System Environment/Daemons
bcce97
Version:        1.5.0
27dcac
Release:        %{buildnum}%{?dist}
27dcac
Url:            https://github.com/%{github_owner}/%{name}
bcce97
Source0:        https://github.com/%{github_owner}/%{name}/archive/%{longcommit}/%{name}-%{longcommit}.tar.gz
bcce97
Patch0:         0001-Build-Fix-correctly-derive-package-version-from-git.patch
bcce97
Patch1:         0002-Refactor-sbd-inquisitor-functionize-striping-leading.patch
bcce97
Patch2:         0003-Log-sbd-inquisitor-tell-the-actual-watchdog-device-s.patch
bcce97
Patch3:         0004-Fix-sbd-inquisitor-tolerate-and-strip-any-leading-sp.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
648232
Conflicts:      pacemaker-libs < 2.0.5-4
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
bcce97
Available rpmbuild rebuild options:
bcce97
  --with(out) : sync_resource_startup_default
bcce97
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
bcce97
%autosetup -n %{name}-%{longcommit} -p1
27dcac
27dcac
###########################################################
27dcac
27dcac
%build
27dcac
./autogen.sh
27dcac
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror"
648232
%configure --with-watchdog-timeout-default=%{watchdog_timeout_default} \
bcce97
           --with-sync-resource-startup-default=%{?with_sync_resource_startup_default:yes}%{!?with_sync_resource_startup_default:no} \
648232
           --with-sync-resource-startup-sysconfig=%{sync_resource_startup_sysconfig}
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
648232
%{_datadir}/sbd
648232
%{_datadir}/pkgconfig/sbd.pc
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
bcce97
* Wed Aug 18 2021 Klaus Wenninger <kwenning@redhat.com> - 1.5.0-2
bcce97
- reverted watchdog_timeout_default to 5s
bcce97
  (slipped in via an unreleased change on 8.4.0 branch)
bcce97
bcce97
  Resolves: rhbz#1980797
bcce97
bcce97
* Mon Jul 19 2021 Klaus Wenninger <kwenning@redhat.com> - 1.5.0-1
bcce97
- rebase to upstream v1.5.0
bcce97
- sync with c9s & fedora
bcce97
bcce97
  Resolves: rhbz#1980797
bcce97
bcce97
* Mon Feb 1 2021 Klaus Wenninger <kwenning@redhat.com> - 1.4.2-3
bcce97
- change the default for SBD_WATCHDOG_TIMEOUT to 10s
bcce97
  s390(x) stays at 15s as before
bcce97
bcce97
  Resolves: rhbz#1922143
bcce97
799293
* Thu Jan 28 2021 Klaus Wenninger <kwenning@redhat.com> - 1.4.2-2
799293
- update SBD_SYNC_RESOURCE_STARTUP description for
799293
  configurable default
799293
799293
  Resolves: rhbz#1915874
799293
648232
* Thu Dec 3 2020 Klaus Wenninger <kwenning@redhat.com> - 1.4.2-1
648232
- rebase to upstream v1.4.2
648232
- make sbd default to do pacemakerd-api handshake
648232
- conflict with pacemaker-libs < 2.0.5-4 to assure pacemaker
648232
  is defaulting to pacemakerd-api handshake
648232
648232
  Resolves: rhbz#1903730
648232
  Resolves: rhbz#1873135
648232
a06f18
* Thu Jul 30 2020 Klaus Wenninger <kwenning@redhat.com> - 1.4.1-7
a06f18
- conflict with pacemaker-libs < 2.0.4-5 instead of requiring
a06f18
  a minimum pacemaker version
a06f18
a06f18
  Resolves: rhbz#1861713
a06f18
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