Add corosync-qdevice.service

(cherry picked from commit 64c78adcab7faac9b0bcf06930d8bc8a4de3528f)
This commit is contained in:
jxy_git 2023-12-13 11:30:03 +08:00 committed by openeuler-sync-bot
parent e8d7e6552b
commit cffaf8e07a

View File

@ -5,15 +5,13 @@
%bcond_with runautogen %bcond_with runautogen
%bcond_without systemd %bcond_without systemd
%define _unpackaged_files_terminate_build 0
%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}} %global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} %global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
Name: corosync-qdevice Name: corosync-qdevice
Summary: The Corosync Cluster Engine Qdevice Summary: The Corosync Cluster Engine Qdevice
Version: 3.0.1 Version: 3.0.1
Release: 2 Release: 3
License: BSD License: BSD
URL: https://github.com/corosync/corosync-qdevice URL: https://github.com/corosync/corosync-qdevice
Source0: https://github.com/corosync/corosync-qdevice/releases/download/v%{version}%{?gittarver}/%{name}-%{version}%{?gittarver}.tar.gz Source0: https://github.com/corosync/corosync-qdevice/releases/download/v%{version}%{?gittarver}/%{name}-%{version}%{?gittarver}.tar.gz
@ -39,6 +37,7 @@ BuildRequires: libqb-devel
BuildRequires: sed BuildRequires: sed
BuildRequires: groff BuildRequires: groff
BuildRequires: nss-devel BuildRequires: nss-devel
BuildRequires: make
%if %{with runautogen} %if %{with runautogen}
BuildRequires: autoconf automake libtool BuildRequires: autoconf automake libtool
@ -93,6 +92,30 @@ sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \
This package contains the Corosync Cluster Engine Qdevice, script for creating This package contains the Corosync Cluster Engine Qdevice, script for creating
NSS certificates and an init script. NSS certificates and an init script.
%post
%if %{with systemd} && 0%{?systemd_post:1}
%systemd_post corosync-qdevice.service
%else
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add corosync-qdevice || :
fi
%endif
%preun
%if %{with systemd} && 0%{?systemd_preun:1}
%systemd_preun corosync-qdevice.service
%else
if [ $1 -eq 0 ]; then
/sbin/service corosync-qdevice stop &>/dev/null || :
/sbin/chkconfig --del corosync-qdevice || :
fi
%endif
%postun
%if %{with systemd} && 0%{?systemd_postun:1}
%systemd_postun corosync-qdevice.service
%endif
%files %files
%license LICENSE %license LICENSE
%dir %{_sysconfdir}/corosync/qdevice %dir %{_sysconfdir}/corosync/qdevice
@ -102,6 +125,11 @@ NSS certificates and an init script.
%{_sbindir}/corosync-qdevice-net-certutil %{_sbindir}/corosync-qdevice-net-certutil
%{_sbindir}/corosync-qdevice-tool %{_sbindir}/corosync-qdevice-tool
%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice %config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice
%if %{with systemd}
%{_unitdir}/corosync-qdevice.service
%else
%{_initrddir}/corosync-qdevice
%endif
%{_mandir}/man8/corosync-qdevice-tool.8* %{_mandir}/man8/corosync-qdevice-tool.8*
%{_mandir}/man8/corosync-qdevice-net-certutil.8* %{_mandir}/man8/corosync-qdevice-net-certutil.8*
%{_mandir}/man8/corosync-qdevice.8* %{_mandir}/man8/corosync-qdevice.8*
@ -179,6 +207,9 @@ fi
%{_mandir}/man8/corosync-qnetd.8* %{_mandir}/man8/corosync-qnetd.8*
%changelog %changelog
* Wed Dec 13 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 3.0.1-3
- Add corosync-qdevice.service
* Tue Sep 13 2022 liqiuyu <liqiuyu@kylinos.cn> - 3.0.1-2 * Tue Sep 13 2022 liqiuyu <liqiuyu@kylinos.cn> - 3.0.1-2
- Remove corosync-qdevice.service - Remove corosync-qdevice.service