Compare commits

..

No commits in common. "5df6708474219808ceeda0ba5140b2f7be370b91" and "20cae7bf2100799e77eac479163bce191ecd9f4e" have entirely different histories.

4 changed files with 40 additions and 102 deletions

View File

@ -1,39 +0,0 @@
From 5925e37bb7aa3fe787478a2bf1f0b4bbbc2b93fb Mon Sep 17 00:00:00 2001
From: jiangxinyu <jiangxinyu@kylinos.cn>
Date: Mon, 28 Mar 2022 14:43:59 +0800
Subject: [PATCH] Fix the problem of service error when uninstalling
---
src/sbd.service.in | 2 +-
src/sbd_remote.service.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sbd.service.in b/src/sbd.service.in
index 94b0f99..b51f570 100644
--- a/src/sbd.service.in
+++ b/src/sbd.service.in
@@ -5,7 +5,7 @@ Before=pacemaker.service
Before=dlm.service
After=systemd-modules-load.service iscsi.service
PartOf=corosync.service
-RefuseManualStop=true
+RefuseManualStop=no
RefuseManualStart=true
[Service]
diff --git a/src/sbd_remote.service.in b/src/sbd_remote.service.in
index cfcafb5..7392446 100644
--- a/src/sbd_remote.service.in
+++ b/src/sbd_remote.service.in
@@ -3,7 +3,7 @@ Description=Shared-storage based fencing daemon on pacemaker remote node
Documentation=man:sbd(8)
After=systemd-modules-load.service iscsi.service
PartOf=pacemaker_remote.service
-RefuseManualStop=true
+RefuseManualStop=no
RefuseManualStart=true
[Service]
--
2.33.0

103
sbd.spec
View File

@ -1,22 +1,33 @@
%global longcommit 6bb085f5704dd4c3841c79504f2aed2228e6d76a #
%global shortcommit %(echo %{longcommit}|cut -c1-8) # spec file for package sbd
%global modified %(echo %{longcommit}-|cut -f2 -d-) #
%global github_owner Clusterlabs # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
%global buildnum 3 # Copyright (c) 2013 Lars Marowsky-Bree
%global watchdog_timeout_default 5 #
%global sync_resource_startup_sysconfig "" # 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.
%bcond_without sync_resource_startup_default # 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 Name: sbd
Summary: Storage-based death Summary: Storage-based death
License: GPLv2 and MIT License: GPLv2 and MIT
Group: System Environment/Daemons Group: System Environment/Daemons
Version: 1.5.1 Version: 1.4.0
Release: %{buildnum} Release: %{buildnum}%{?dist}
Url: https://github.com/%{github_owner}/%{name} Url: https://github.com/%{github_owner}/%{name}
Source0: https://github.com/%{github_owner}/%{name}/archive/%{longcommit}/%{name}-%{longcommit}.tar.gz Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}_all.tar.gz
Patch0: 0001-Fix-the-problem-of-service-error-when-uninstalling.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -30,47 +41,39 @@ BuildRequires: libuuid-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: systemd BuildRequires: systemd
BuildRequires: make
Conflicts: fence-agents-sbd < 4.2.1
Conflicts: pacemaker-libs < 2.0.5
ExclusiveArch: x86_64 aarch64 riscv64 ppc64le %if 0%{?rhel} > 0
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%endif
%if %{defined systemd_requires} %if %{defined systemd_requires}
%systemd_requires %systemd_requires
%endif %endif
%description %description
This package contains the storage-based death functionality. This package contains the storage-based death functionality.
Available rpmbuild rebuild options:
--with(out) : sync_resource_startup_default
%package tests ###########################################################
Summary: Storage-based death environment for regression tests
License: GPLv2 and MIT
Group: System Environment/Daemons
%description tests
This package provides an environment + testscripts for
regression-testing sbd.
%prep %prep
%autosetup -p1 -n %{name}-%{longcommit} %autosetup -n %{name}-%{commit}
###########################################################
%build %build
./autogen.sh autoreconf -i
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror" export CFLAGS="$RPM_OPT_FLAGS -Wall "
%configure --with-watchdog-timeout-default=%{watchdog_timeout_default} \ %configure
--with-sync-resource-startup-default=%{?with_sync_resource_startup_default:yes}%{!?with_sync_resource_startup_default:no} \
--with-sync-resource-startup-sysconfig=%{sync_resource_startup_sysconfig} \
--with-runstatedir=%{_rundir}
make %{?_smp_mflags} make %{?_smp_mflags}
###########################################################
%install %install
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith
install -D -m 0755 tests/regressions.sh $RPM_BUILD_ROOT/usr/share/sbd/regressions.sh
%if %{defined _unitdir} %if %{defined _unitdir}
install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service 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 install -D -m 0644 src/sbd_remote.service $RPM_BUILD_ROOT/%{_unitdir}/sbd_remote.service
@ -79,10 +82,7 @@ install -D -m 0644 src/sbd_remote.service $RPM_BUILD_ROOT/%{_unitdir}/sbd_remote
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
# Don't package static libs ###########################################################
find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f
find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -112,12 +112,11 @@ fi
%endif %endif
%files %files
###########################################################
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/sbd %config(noreplace) %{_sysconfdir}/sysconfig/sbd
%{_sbindir}/sbd %{_sbindir}/sbd
%{_datadir}/sbd #%{_datadir}/sbd
%{_datadir}/pkgconfig/sbd.pc
%exclude %{_datadir}/sbd/regressions.sh
%doc %{_mandir}/man8/sbd* %doc %{_mandir}/man8/sbd*
%if %{defined _unitdir} %if %{defined _unitdir}
%{_unitdir}/sbd.service %{_unitdir}/sbd.service
@ -125,28 +124,6 @@ fi
%endif %endif
%doc COPYING %doc COPYING
%files tests
%defattr(-,root,root)
%dir %{_datadir}/sbd
%{_datadir}/sbd/regressions.sh
%{_libdir}/libsbdtestbed*
%changelog %changelog
* Wed Mar 06 2024 xurui <rui.xu@shingroup.cn> - 1.5.1-3
- Add ppc64le to ExclusiveArch
* Mon Jun 05 2023 laokz <zhangkai@iscas.ac.cn> - 1.5.1-2
- Add riscv64 to ExclusiveArch
* Mon Jul 25 2022 liupei <liupei@kylinos.cn> - 1.5.1-1
- update to 1.5.1
* Mon Mar 28 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.4.0-17
- Fix the problem of service error when uninstalling
* Thu Mar 24 2022 baizhonggui <baizhonggui@huawei.com> - 1.4.0-16
* Delete %{dist}
* Fri Oct 30 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 1.4.0-15 * Fri Oct 30 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 1.4.0-15
- Init sbd project - Init sbd project