Init sbd project
This commit is contained in:
parent
ba85125693
commit
e9f787ce62
BIN
sbd-7f33d1a409d0a4e2cd69946688c48eaa8f3c5d26_all.tar.gz
Normal file
BIN
sbd-7f33d1a409d0a4e2cd69946688c48eaa8f3c5d26_all.tar.gz
Normal file
Binary file not shown.
129
sbd.spec
Normal file
129
sbd.spec
Normal file
@ -0,0 +1,129 @@
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
%global commit 7f33d1a409d0a4e2cd69946688c48eaa8f3c5d26
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global github_owner Clusterlabs
|
||||
%global buildnum 15
|
||||
|
||||
Name: sbd
|
||||
Summary: Storage-based death
|
||||
License: GPLv2 and MIT
|
||||
Group: System Environment/Daemons
|
||||
Version: 1.4.0
|
||||
Release: %{buildnum}%{?dist}
|
||||
Url: https://github.com/%{github_owner}/%{name}
|
||||
Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}_all.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: libaio-devel
|
||||
BuildRequires: corosynclib-devel
|
||||
BuildRequires: pacemaker-libs-devel > 1.1.12
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: systemd
|
||||
|
||||
%if 0%{?rhel} > 0
|
||||
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
|
||||
%endif
|
||||
|
||||
%if %{defined systemd_requires}
|
||||
%systemd_requires
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
||||
This package contains the storage-based death functionality.
|
||||
|
||||
###########################################################
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{commit}
|
||||
|
||||
###########################################################
|
||||
|
||||
%build
|
||||
autoreconf -i
|
||||
export CFLAGS="$RPM_OPT_FLAGS -Wall "
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
###########################################################
|
||||
|
||||
%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
|
||||
install -D -m 0644 src/sbd_remote.service $RPM_BUILD_ROOT/%{_unitdir}/sbd_remote.service
|
||||
%endif
|
||||
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
||||
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
|
||||
|
||||
###########################################################
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%if %{defined _unitdir}
|
||||
%post
|
||||
%systemd_post sbd.service
|
||||
%systemd_post sbd_remote.service
|
||||
if [ $1 -ne 1 ] ; then
|
||||
if systemctl --quiet is-enabled sbd.service 2>/dev/null
|
||||
then
|
||||
systemctl --quiet reenable sbd.service 2>/dev/null || :
|
||||
fi
|
||||
if systemctl --quiet is-enabled sbd_remote.service 2>/dev/null
|
||||
then
|
||||
systemctl --quiet reenable sbd_remote.service 2>/dev/null || :
|
||||
fi
|
||||
fi
|
||||
|
||||
%preun
|
||||
%systemd_preun sbd.service
|
||||
%systemd_preun sbd_remote.service
|
||||
|
||||
%postun
|
||||
%systemd_postun sbd.service
|
||||
%systemd_postun sbd_remote.service
|
||||
%endif
|
||||
|
||||
%files
|
||||
###########################################################
|
||||
%defattr(-,root,root)
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/sbd
|
||||
%{_sbindir}/sbd
|
||||
#%{_datadir}/sbd
|
||||
%doc %{_mandir}/man8/sbd*
|
||||
%if %{defined _unitdir}
|
||||
%{_unitdir}/sbd.service
|
||||
%{_unitdir}/sbd_remote.service
|
||||
%endif
|
||||
%doc COPYING
|
||||
|
||||
%changelog
|
||||
* Fri Oct 30 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 1.4.0-15
|
||||
- Init sbd project
|
||||
Loading…
x
Reference in New Issue
Block a user