2014-09-16 01:14:51 +00:00
|
|
|
#
|
|
|
|
# spec file for package sbd
|
|
|
|
#
|
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
# Copyright (c) 2013 Lars Marowsky-Bree
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2014-10-29 22:50:15 +00:00
|
|
|
%global commit 1ee3503cbc52b73876b6aae5471d3b6f7c092bf5
|
2014-09-16 01:14:51 +00:00
|
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
|
%global github_owner beekhof
|
2014-10-29 22:50:15 +00:00
|
|
|
%global buildnum 1
|
2014-09-16 01:14:51 +00:00
|
|
|
|
|
|
|
Name: sbd
|
|
|
|
Summary: Storage-based death
|
|
|
|
License: GPLv2+
|
|
|
|
Group: System Environment/Daemons
|
|
|
|
Version: 1.2.1
|
2014-10-29 22:50:15 +00:00
|
|
|
#Release: 0.%{buildnum}.%{shortcommit}.git%{?dist}
|
|
|
|
Release: %{buildnum}
|
|
|
|
Url: https://github.com/%{github_owner}/%{name}
|
2014-09-16 01:14:51 +00:00
|
|
|
Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libuuid-devel
|
|
|
|
BuildRequires: glib2-devel
|
|
|
|
BuildRequires: libaio-devel
|
|
|
|
BuildRequires: corosync-devel
|
|
|
|
BuildRequires: pacemaker-libs-devel
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: libuuid-devel
|
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: python-devel
|
2014-10-29 22:50:15 +00:00
|
|
|
Patch1: sbd-no-storage-option.patch
|
|
|
|
Patch2: sbd-local-debug.patch
|
|
|
|
Patch3: sbd-pcmk-health.patch
|
|
|
|
Patch4: sbd-proc-pid.patch
|
|
|
|
|
|
|
|
%if 0%{?rhel} > 0
|
|
|
|
ExclusiveArch: i686 x86_64 s390x
|
|
|
|
%endif
|
2014-09-16 01:14:51 +00:00
|
|
|
|
|
|
|
%if %{defined systemd_requires}
|
|
|
|
%systemd_requires
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
|
|
This package contains the storage-based death functionality.
|
2014-10-29 22:50:15 +00:00
|
|
|
Currently it is limited to watchdog integration.
|
2014-09-16 01:14:51 +00:00
|
|
|
|
|
|
|
###########################################################
|
2014-10-29 22:50:15 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{name}-%{commit} -p1
|
|
|
|
|
2014-09-16 01:14:51 +00:00
|
|
|
###########################################################
|
|
|
|
|
|
|
|
%build
|
|
|
|
autoreconf -i
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror"
|
|
|
|
%configure
|
|
|
|
make %{?_smp_mflags}
|
2014-10-29 22:50:15 +00:00
|
|
|
|
2014-09-16 01:14:51 +00:00
|
|
|
###########################################################
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
|
|
|
|
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith
|
|
|
|
|
|
|
|
%if %{defined _unitdir}
|
|
|
|
install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
|
|
|
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
|
|
|
|
|
2014-10-29 22:50:15 +00:00
|
|
|
###########################################################
|
|
|
|
|
2014-09-16 01:14:51 +00:00
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%if %{defined _unitdir}
|
|
|
|
%post
|
|
|
|
%systemd_post sbd.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun sbd.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun sbd.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
###########################################################
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/sbd
|
|
|
|
%{_sbindir}/sbd
|
|
|
|
%doc %{_mandir}/man8/sbd*
|
|
|
|
%if %{defined _unitdir}
|
|
|
|
%{_unitdir}/sbd.service
|
|
|
|
%endif
|
|
|
|
%doc COPYING
|
|
|
|
|
|
|
|
%changelog
|
2014-10-29 22:50:15 +00:00
|
|
|
* Thu Oct 30 2014 <andrew@beekhof.net> - 1.2.1-1
|
|
|
|
- Correctly enable /proc/pid validation for sbd_lock_running()
|
|
|
|
- Improved integration with the el7 environment
|
|
|
|
|
2014-09-16 01:14:51 +00:00
|
|
|
* Fri Aug 29 2014 <andrew@beekhof.net> - 1.2.1-0.2.8f912945.git
|
|
|
|
- Remove some additional SUSE-isms
|
|
|
|
|
|
|
|
* Fri Aug 29 2014 <andrew@beekhof.net> - 1.2.1-0.1.8f912945.git
|
|
|
|
- Prepare for package review
|
2014-10-29 22:50:15 +00:00
|
|
|
Resolves: rhbz#1134245
|