Blame SPECS/sbd.spec

6d972b
#
6d972b
# spec file for package sbd
6d972b
#
6d972b
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
6d972b
# Copyright (c) 2013 Lars Marowsky-Bree
6d972b
#
6d972b
# All modifications and additions to the file contributed by third parties
6d972b
# remain the property of their copyright owners, unless otherwise agreed
6d972b
# upon. The license for this file, and modifications and additions to the
6d972b
# file, is the same license as for the pristine package itself (unless the
6d972b
# license for the pristine package is not an Open Source License, in which
6d972b
# case the license is the MIT License). An "Open Source License" is a
6d972b
# license that conforms to the Open Source Definition (Version 1.9)
6d972b
# published by the Open Source Initiative.
6d972b
6d972b
# Please submit bugfixes or comments via http://bugs.opensuse.org/
6d972b
#
2c7300
%global longcommit 6bb085f5704dd4c3841c79504f2aed2228e6d76a
6d972b
%global shortcommit %(echo %{longcommit}|cut -c1-8)
6d972b
%global modified %(echo %{longcommit}-|cut -f2 -d-)
6d972b
%global github_owner Clusterlabs
6d972b
%global buildnum 2
6d972b
6d972b
%ifarch s390x s390
6d972b
# minimum timeout on LPAR diag288 watchdog is 15s
6d972b
%global watchdog_timeout_default 15
6d972b
%else
6d972b
%global watchdog_timeout_default 5
6d972b
%endif
6d972b
6d972b
# Be careful with sync_resource_startup_default
6d972b
# being enabled. This configuration has
6d972b
# to be in sync with configuration in pacemaker
6d972b
# where it is called sbd_sync - assure by e.g.
6d972b
# mutual rpm dependencies.
6d972b
%bcond_without sync_resource_startup_default
6d972b
# Syncing enabled per default will lead to
6d972b
# syncing enabled on upgrade without adaption
6d972b
# of the config.
6d972b
# Setting can still be overruled via sysconfig.
6d972b
# The setting in the config-template packaged
6d972b
# will follow the default if below is is left
6d972b
# empty. But it is possible to have the setting
6d972b
# in the config-template deviate from the default
6d972b
# by setting below to an explicit 'yes' or 'no'.
6d972b
%global sync_resource_startup_sysconfig ""
6d972b
6d972b
Name:           sbd
6d972b
Summary:        Storage-based death
6d972b
License:        GPLv2+
2c7300
Version:        1.5.1
2c7300
Release:        %{buildnum}%{?dist}
6d972b
Url:            https://github.com/%{github_owner}/%{name}
6d972b
Source0:        https://github.com/%{github_owner}/%{name}/archive/%{longcommit}/%{name}-%{longcommit}.tar.gz
6d972b
BuildRequires:  autoconf
6d972b
BuildRequires:  automake
6d972b
BuildRequires:  libuuid-devel
6d972b
BuildRequires:  glib2-devel
6d972b
BuildRequires:  libaio-devel
6d972b
BuildRequires:  corosync-devel
6d972b
BuildRequires:  pacemaker-libs-devel
6d972b
BuildRequires:  libtool
6d972b
BuildRequires:  libuuid-devel
6d972b
BuildRequires:  libxml2-devel
6d972b
BuildRequires:  pkgconfig
6d972b
BuildRequires:  make
6d972b
BuildRequires:  systemd
6d972b
Conflicts:      fence-agents-sbd < 4.5.0
6d972b
Conflicts:      pacemaker-libs < 2.1.0-5
6d972b
6d972b
%if 0%{?rhel}
6d972b
ExclusiveArch: i686 x86_64 s390x aarch64 ppc64le
6d972b
%endif
6d972b
6d972b
%if %{defined systemd_requires}
6d972b
%systemd_requires
6d972b
%endif
6d972b
6d972b
%description
6d972b
6d972b
This package contains the storage-based death functionality.
6d972b
6d972b
Available rpmbuild rebuild options:
6d972b
  --with(out) : sync_resource_startup_default
6d972b
6d972b
%package tests
6d972b
Summary:        Storage-based death environment for regression tests
6d972b
License:        GPLv2+
6d972b
6d972b
%description tests
6d972b
This package provides an environment + testscripts for
6d972b
regression-testing sbd.
6d972b
6d972b
###########################################################
6d972b
6d972b
%prep
6d972b
%autosetup -n %{name}-%{longcommit} -p1
6d972b
6d972b
###########################################################
6d972b
6d972b
%build
6d972b
./autogen.sh
6d972b
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror"
6d972b
%configure --with-watchdog-timeout-default=%{watchdog_timeout_default} \
6d972b
           --with-sync-resource-startup-default=%{?with_sync_resource_startup_default:yes}%{!?with_sync_resource_startup_default:no} \
2c7300
           --with-sync-resource-startup-sysconfig=%{sync_resource_startup_sysconfig} \
2c7300
           --runstatedir=%{_rundir}
6d972b
make %{?_smp_mflags}
6d972b
6d972b
###########################################################
6d972b
6d972b
%install
6d972b
6d972b
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
6d972b
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith
6d972b
6d972b
install -D -m 0755 tests/regressions.sh $RPM_BUILD_ROOT/usr/share/sbd/regressions.sh
6d972b
%if %{defined _unitdir}
6d972b
install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service
6d972b
install -D -m 0644 src/sbd_remote.service $RPM_BUILD_ROOT/%{_unitdir}/sbd_remote.service
6d972b
%endif
6d972b
6d972b
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
6d972b
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
6d972b
6d972b
# Don't package static libs
6d972b
find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f
6d972b
find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
6d972b
6d972b
###########################################################
6d972b
6d972b
%if %{defined _unitdir}
6d972b
%post
6d972b
%systemd_post sbd.service
6d972b
%systemd_post sbd_remote.service
6d972b
if [ $1 -ne 1 ] ; then
6d972b
	if systemctl --quiet is-enabled sbd.service 2>/dev/null
6d972b
	then
6d972b
		systemctl --quiet reenable sbd.service 2>/dev/null || :
6d972b
	fi
6d972b
	if systemctl --quiet is-enabled sbd_remote.service 2>/dev/null
6d972b
	then
6d972b
		systemctl --quiet reenable sbd_remote.service 2>/dev/null || :
6d972b
	fi
6d972b
fi
6d972b
6d972b
%preun
6d972b
%systemd_preun sbd.service
6d972b
%systemd_preun sbd_remote.service
6d972b
6d972b
%postun
6d972b
%systemd_postun sbd.service
6d972b
%systemd_postun sbd_remote.service
6d972b
%endif
6d972b
6d972b
%files
6d972b
###########################################################
6d972b
%defattr(-,root,root)
6d972b
%config(noreplace) %{_sysconfdir}/sysconfig/sbd
6d972b
%{_sbindir}/sbd
6d972b
%{_datadir}/sbd
6d972b
%{_datadir}/pkgconfig/sbd.pc
6d972b
%exclude %{_datadir}/sbd/regressions.sh
6d972b
%doc %{_mandir}/man8/sbd*
6d972b
%if %{defined _unitdir}
6d972b
%{_unitdir}/sbd.service
6d972b
%{_unitdir}/sbd_remote.service
6d972b
%endif
6d972b
%doc COPYING
6d972b
6d972b
%files tests
6d972b
###########################################################
6d972b
%defattr(-,root,root)
6d972b
%dir %{_datadir}/sbd
6d972b
%{_datadir}/sbd/regressions.sh
6d972b
%{_libdir}/libsbdtestbed*
6d972b
6d972b
%changelog
2c7300
* Mon Dec 6 2021 Klaus Wenninger <kwenning@redhat.com> - 1.5.1-2
2c7300
- obviously autoconf is defining runstatedir - but with a
2c7300
  wrong default - directly hand it over to configure
2c7300
  and skip --with-runstatedir implemented in configure.ac
2c7300
  for older versions of autoconf
2c7300
2c7300
  Resolves: rhbz#2011707
2c7300
2c7300
* Wed Dec 1 2021 Klaus Wenninger <kwenning@redhat.com> - 1.5.1-1
2c7300
- rebase to upstream v1.5.1
2c7300
2c7300
  Resolves: rhbz#2013261
2c7300
6d972b
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.0-2.1
6d972b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
6d972b
  Related: rhbz#1991688
6d972b
6d972b
* Fri Jul 9 2021 Klaus Wenninger <kwenning@redhat.com> - 1.5.0-2
6d972b
- properly conflict with pacemaker not providing sync-default we need
6d972b
  Resolves: rhbz#1979961
6d972b
  Resolves: rhbz#1979573
6d972b
6d972b
* Tue Jul 6 2021 Klaus Wenninger <kwenning@redhat.com> - 1.5.0-1
6d972b
- sync with fedora sbd-1.5.0-1
6d972b
  Resolves: rhbz#1979961
6d972b
  Resolves: rhbz#1979573
6d972b
6d972b
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.4.2-3.2
6d972b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
6d972b
6d972b
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-3.1
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
6d972b
6d972b
* Mon Dec 7 2020 Klaus Wenninger <kwenning@redhat.com> - 1.4.2-3
6d972b
- this time really remove dist.depcheck from gating
6d972b
6d972b
* Mon Dec 7 2020 Klaus Wenninger <kwenning@redhat.com> - 1.4.2-2
6d972b
- remove deprecated dist.depcheck from gating
6d972b
- add tier0 to push_stable to have rawhide gated as well
6d972b
6d972b
* Mon Dec 7 2020 Klaus Wenninger <kwenning@redhat.com> - 1.4.2-1
6d972b
- Rebase to upstream v1.4.2
6d972b
- Conflict with pacemaker that doesn't have pacemakerd-api
6d972b
- Set default to not do startup/shutdown-syncing via pacemakerd-api
6d972b
  but enable in template-config
6d972b
6d972b
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-7.1
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
6d972b
6d972b
* Thu May 14 2020 Klaus Wenninger <kwenning@redhat.com> - 1.4.1-7
6d972b
- Rebuild against libqb2.0 (f33-build-side-23348)
6d972b
6d972b
* Wed Mar 11 2020 Klaus Wenninger <kwenning@redhat.com> - 1.4.1-6
6d972b
- Rebuild because tagging the build failed
6d972b
6d972b
* Thu Mar 5 2020 Klaus Wenninger <kwenning@redhat.com> - 1.4.1-5
6d972b
- Rebase to upstream v1.4.1
6d972b
- Make coverity happy with parameter passing in regressions.sh
6d972b
- Add auto generated environment section to man-page
6d972b
- Overhaul setting scheduler policy/priority
6d972b
- Enable Fedora CI Gating
6d972b
6d972b
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-3
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
6d972b
6d972b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
6d972b
6d972b
* Fri Feb 1 2019 Klaus Wenninger <kwenning@redhat.com> - 1.4.0-1
6d972b
- Rebase to upstream v1.4.0
6d972b
- Fail earlier on invalid servants (solves GCC9 build issue as well)
6d972b
6d972b
* Wed Nov 21 2018 Klaus Wenninger <kwenning@redhat.com> - 1.3.1-1.git4927571
6d972b
- Rebased to commit 4927571f8e9b00db8242654b1329dfbd71dcfe99
6d972b
- Removed disabling of shared-disk-support
6d972b
  Resolves rhbz#1606301
6d972b
6d972b
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-4.3
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
6d972b
6d972b
* Sun Mar 18 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.2.1-4.2
6d972b
- Update Python 2 dependency declarations to new packaging standards
6d972b
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
6d972b
6d972b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-4.1
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
6d972b
6d972b
* Tue Jan 30 2018 Merlin Mathesius <mmathesi@redhat.com> - 1.2.1-4
6d972b
- Patch to use correct C inline function semantics to fix FTBFS (BZ#1424417)
6d972b
  Cleanup spec file conditionals
6d972b
6d972b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3.4
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
6d972b
6d972b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3.3
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6d972b
6d972b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3.2
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6d972b
6d972b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3.1
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6d972b
6d972b
* Tue Jan 19 2016 Jan Pokorný <jpokorny+rpm-sbd@redhat.com> - 1.2.1-3
6d972b
- Rebuilt for libpe_status soname bump arising from Pacemaker 1.1.14
6d972b
6d972b
* Thu Jul 02 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.2.1-2
6d972b
- Add dist-tag (RHBZ #1237187).
6d972b
6d972b
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-1.1
6d972b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6d972b
6d972b
* Thu Oct 30 2014 <andrew@beekhof.net> - 1.2.1-1
6d972b
- Correctly enable /proc/pid validation for sbd_lock_running()
6d972b
- Improved integration with the el7 environment
6d972b
6d972b
* Fri Aug 29 2014 <andrew@beekhof.net> - 1.2.1-0.2.8f912945.git
6d972b
- Remove some additional SUSE-isms
6d972b
6d972b
* Fri Aug 29 2014 <andrew@beekhof.net> - 1.2.1-0.1.8f912945.git
6d972b
- Prepare for package review
6d972b
  Resolves: rhbz#1134245