!9 [sync] PR-7: upgrade to 3.0.4

From: @openeuler-sync-bot 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2022-03-15 01:49:47 +00:00 committed by Gitee
commit a1a082404d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 35 additions and 129 deletions

Binary file not shown.

BIN
corosync-3.0.4.tar.gz Normal file

Binary file not shown.

View File

@ -11,83 +11,63 @@
%bcond_without vqsim
%bcond_without runautogen
%bcond_without userflags
%bcond_without spausedd
%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
%if %{with spausedd}
%global spausedd_version 20190320
%endif
Name: corosync
Summary: The Corosync Cluster Engine and Application Programming Interfaces
Version: 3.0.2
Release: 5
License: BSD
URL: http://corosync.github.io/corosync/
Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz
%if %{with spausedd}
Source1: https://github.com/jfriesse/spausedd/releases/download/%{spausedd_version}/spausedd-%{spausedd_version}.tar.gz
# VMGuestLib exists only for x86_64 architecture
#%%ifarch x86_64
#%%global use_vmguestlib 0
#%%endif
%endif
Name: corosync
Summary: The Corosync Cluster Engine and Application Programming Interfaces
Version: 3.0.4
Release: 1
License: BSD
URL: http://corosync.github.io/corosync/
Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz
# Runtime bits
# The automatic dependency overridden in favor of explicit version lock
Requires: corosynclib%{?_isa} = %{version}-%{release}
Requires: corosynclib = %{version}-%{release}
# NSS crypto plugin should be always installed
Requires: libknet1-crypto-nss-plugin
Requires: libknet1-crypto-nss-plugin
# Build bits
BuildRequires: gcc
BuildRequires: groff
BuildRequires: libqb-devel
BuildRequires: libknet1-devel
BuildRequires: zlib-devel
BuildRequires: gcc
BuildRequires: groff
BuildRequires: libqb-devel
BuildRequires: libknet1-devel
BuildRequires: zlib-devel
%if %{with runautogen}
BuildRequires: autoconf automake libtool
BuildRequires: autoconf automake libtool
%endif
%if %{with monitoring}
BuildRequires: libstatgrab-devel
BuildRequires: libstatgrab-devel
%endif
%if %{with snmp}
BuildRequires: net-snmp-devel
BuildRequires: net-snmp-devel
%endif
%if %{with dbus}
BuildRequires: dbus-devel
BuildRequires: dbus-devel
%endif
%if %{with nozzle}
BuildRequires: libnozzle1-devel
BuildRequires: libnozzle1-devel
%endif
%if %{with systemd}
%{?systemd_requires}
BuildRequires: systemd
BuildRequires: systemd-devel
BuildRequires: systemd
BuildRequires: systemd-devel
%else
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
%endif
%if %{with xmlconf}
Requires: libxslt
Requires: libxslt
%endif
%if %{with vqsim}
BuildRequires: readline-devel
BuildRequires: readline-devel
%endif
# %%if %{defined use_vmguestlib}
# BuildRequires: pkgconfig(vmguestlib)
# %%endif
%prep
%if %{with spausedd}
%setup -q -a 1 -n %{name}-%{version}%{?gittarver}
%else
%setup -q -n %{name}-%{version}%{?gittarver}
%endif
%build
%if %{with runautogen}
@ -126,17 +106,10 @@ BuildRequires: readline-devel
--with-systemddir=%{_unitdir} \
--docdir=%{_docdir}
make %{_smp_mflags}
%if %{with spausedd}
cd spausedd-%{spausedd_version}
CFLAGS="${CFLAGS:-%{optflags}}" ; export CFLAGS
make \
%{?_smp_mflags}
%endif
%make_build
%install
make install DESTDIR=%{buildroot}
%make_install
%if %{with dbus}
mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
@ -157,21 +130,6 @@ install -m 644 tools/corosync-notifyd.sysconfig.example \
install -m 644 init/corosync.sysconfig.example \
%{buildroot}%{_sysconfdir}/sysconfig/corosync
%if %{with spausedd}
cd spausedd-%{spausedd_version}
make DESTDIR="%{buildroot}" PREFIX="%{_prefix}" install
%if %{with systemd}
mkdir -p %{buildroot}/%{_unitdir}
install -m 644 -p init/spausedd.service %{buildroot}/%{_unitdir}
%else
mkdir -p %{buildroot}/%{_initrddir}
install -m 755 -p init/spausedd %{buildroot}/%{_initrddir}
%endif
cd ..
%endif
%description
This package contains the Corosync Cluster Engine Executive, several default
APIs and libraries, default configuration files, and an init script.
@ -249,7 +207,7 @@ fi
%{_mandir}/man8/corosync-quorumtool.8*
%{_mandir}/man5/corosync.conf.5*
%{_mandir}/man5/votequorum.5*
%{_mandir}/man8/cmap_keys.8*
%{_mandir}/man7/cmap_keys.7*
# library
#
@ -269,15 +227,13 @@ This package contains corosync libraries.
%{_libdir}/libsam.so.*
%{_libdir}/libcorosync_common.so.*
%post -n corosynclib -p /sbin/ldconfig
%postun -n corosynclib -p /sbin/ldconfig
%ldconfig_scriptlets -n corosynclib
%package -n corosynclib-devel
Summary: The Corosync Cluster Engine Development Kit
Requires: corosynclib%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Provides: corosync-devel = %{version}
Requires: corosynclib = %{version}-%{release}
Requires: pkgconfig
Provides: corosync-devel = %{version}
%description -n corosynclib-devel
This package contains include files and man pages used to develop using
@ -312,8 +268,8 @@ The Corosync Cluster Engine APIs.
%if %{with vqsim}
%package -n corosync-vqsim
Summary: The Corosync Cluster Engine - Votequorum Simulator
Requires: corosynclib%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Requires: corosynclib = %{version}-%{release}
Requires: pkgconfig
%description -n corosync-vqsim
A command-line simulator for the corosync votequorum subsystem.
@ -328,60 +284,10 @@ network splits)
%{_mandir}/man8/corosync-vqsim.8*
%endif
# optional spausedd
%if %{with spausedd}
%package -n spausedd
Summary: Utility to detect and log scheduler pause
URL: https://github.com/jfriesse/spausedd
%if %{with systemd}
%{?systemd_requires}
%else
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
%endif
%description -n spausedd
Utility to detect and log scheduler pause
%files -n spausedd
%doc spausedd-%{spausedd_version}/AUTHORS spausedd-%{spausedd_version}/COPYING
%{_bindir}/spausedd
%{_mandir}/man8/spausedd*
%if %{with systemd}
%{_unitdir}/spausedd.service
%else
%{_initrddir}/spausedd
%endif
%post -n spausedd
%if %{with systemd} && 0%{?systemd_post:1}
%systemd_post spausedd.service
%else
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add spausedd || :
fi
%endif
%preun -n spausedd
%if %{with systemd} && 0%{?systemd_preun:1}
%systemd_preun spausedd.service
%else
if [ $1 -eq 0 ]; then
/sbin/service spausedd stop &>/dev/null || :
/sbin/chkconfig --del spausedd || :
fi
%endif
%postun -n spausedd
%if %{with systemd} && 0%{?systemd_postun:1}
%systemd_postun spausedd.service
%endif
%endif
%changelog
* Thu Feb 17 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 3.0.4-1
- upgrade to 3.0.4
* Fri Oct 30 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 3.0.2-5
- change the use_vmguestlib 1 to use_vmguestlib 0

Binary file not shown.