2020-04-13 17:13:15 +08:00
|
|
|
# Conditionals
|
|
|
|
|
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
|
|
|
|
|
# to disable or enable specific features
|
|
|
|
|
%bcond_with watchdog
|
|
|
|
|
%bcond_with monitoring
|
|
|
|
|
%bcond_without snmp
|
|
|
|
|
%bcond_without dbus
|
|
|
|
|
%bcond_without systemd
|
|
|
|
|
%bcond_without xmlconf
|
|
|
|
|
%bcond_without nozzle
|
|
|
|
|
%bcond_without vqsim
|
|
|
|
|
%bcond_without runautogen
|
|
|
|
|
%bcond_without userflags
|
|
|
|
|
|
|
|
|
|
%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
|
|
|
|
|
%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
|
|
|
|
|
|
2022-02-17 16:39:58 +08:00
|
|
|
Name: corosync
|
|
|
|
|
Summary: The Corosync Cluster Engine and Application Programming Interfaces
|
2023-11-24 11:42:17 +08:00
|
|
|
Version: 3.1.8
|
2025-03-27 11:30:25 +08:00
|
|
|
Release: 6
|
2023-08-22 11:24:06 +08:00
|
|
|
License: BSD-3-Clause
|
2022-02-17 16:39:58 +08:00
|
|
|
URL: http://corosync.github.io/corosync/
|
|
|
|
|
Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz
|
2023-12-05 19:31:05 +08:00
|
|
|
Patch0: Fix-up-the-library-versions-files.patch
|
2023-12-05 20:19:35 +08:00
|
|
|
Patch1: Report-crypto-errors-back-to-cfg-reload.patch
|
2024-02-29 22:02:42 +08:00
|
|
|
Patch2: Fix-building-of-rust-for-release.patch
|
2024-03-02 12:36:04 +08:00
|
|
|
Patch3: totem-Fix-reference-links.patch
|
2025-03-27 11:30:25 +08:00
|
|
|
Patch4: backport-CVE-2025-30472.patch
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
# Runtime bits
|
|
|
|
|
# The automatic dependency overridden in favor of explicit version lock
|
2022-02-17 16:39:58 +08:00
|
|
|
Requires: corosynclib = %{version}-%{release}
|
2020-04-13 17:13:15 +08:00
|
|
|
|
2023-02-03 11:03:59 +08:00
|
|
|
# Support crypto reload
|
|
|
|
|
Requires: libknet1 >= 1.18
|
2020-04-13 17:13:15 +08:00
|
|
|
# NSS crypto plugin should be always installed
|
2023-02-03 11:03:59 +08:00
|
|
|
Requires: libknet1-crypto-nss-plugin >= 1.18
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
# Build bits
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: groff
|
|
|
|
|
BuildRequires: libqb-devel
|
2023-02-03 11:03:59 +08:00
|
|
|
BuildRequires: libknet1-devel >= 1.18
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: zlib-devel
|
2020-04-13 17:13:15 +08:00
|
|
|
%if %{with runautogen}
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: autoconf automake libtool
|
2020-04-13 17:13:15 +08:00
|
|
|
%endif
|
|
|
|
|
%if %{with monitoring}
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: libstatgrab-devel
|
2020-04-13 17:13:15 +08:00
|
|
|
%endif
|
|
|
|
|
%if %{with snmp}
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: net-snmp-devel
|
2020-04-13 17:13:15 +08:00
|
|
|
%endif
|
|
|
|
|
%if %{with dbus}
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: dbus-devel
|
2020-04-13 17:13:15 +08:00
|
|
|
%endif
|
|
|
|
|
%if %{with nozzle}
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: libnozzle1-devel
|
2020-04-13 17:13:15 +08:00
|
|
|
%endif
|
|
|
|
|
%if %{with systemd}
|
|
|
|
|
%{?systemd_requires}
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: systemd
|
|
|
|
|
BuildRequires: systemd-devel
|
2020-04-13 17:13:15 +08:00
|
|
|
%else
|
|
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
|
Requires(preun): /sbin/chkconfig
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with xmlconf}
|
2022-02-17 16:39:58 +08:00
|
|
|
Requires: libxslt
|
2020-04-13 17:13:15 +08:00
|
|
|
%endif
|
|
|
|
|
%if %{with vqsim}
|
2022-02-17 16:39:58 +08:00
|
|
|
BuildRequires: readline-devel
|
2020-04-13 17:13:15 +08:00
|
|
|
%endif
|
2023-11-24 11:42:17 +08:00
|
|
|
BuildRequires: make
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
%prep
|
2023-12-05 19:31:05 +08:00
|
|
|
%autosetup -n %{name}-%{version}%{?gittarver} -p1
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if %{with runautogen}
|
|
|
|
|
./autogen.sh
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{configure} \
|
|
|
|
|
%if %{with watchdog}
|
|
|
|
|
--enable-watchdog \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with monitoring}
|
|
|
|
|
--enable-monitoring \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with snmp}
|
|
|
|
|
--enable-snmp \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with dbus}
|
|
|
|
|
--enable-dbus \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with systemd}
|
|
|
|
|
--enable-systemd \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with xmlconf}
|
|
|
|
|
--enable-xmlconf \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with nozzle}
|
|
|
|
|
--enable-nozzle \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with vqsim}
|
|
|
|
|
--enable-vqsim \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with userflags}
|
|
|
|
|
--enable-user-flags \
|
|
|
|
|
%endif
|
|
|
|
|
--with-initddir=%{_initrddir} \
|
|
|
|
|
--with-systemddir=%{_unitdir} \
|
|
|
|
|
--docdir=%{_docdir}
|
|
|
|
|
|
2022-02-17 16:39:58 +08:00
|
|
|
%make_build
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
%install
|
2022-02-17 16:39:58 +08:00
|
|
|
%make_install
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
%if %{with dbus}
|
|
|
|
|
mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
|
|
|
|
|
install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
## tree fixup
|
|
|
|
|
# drop static libs
|
|
|
|
|
rm -f %{buildroot}%{_libdir}/*.a
|
|
|
|
|
rm -f %{buildroot}%{_libdir}/*.la
|
|
|
|
|
# drop docs and html docs for now
|
|
|
|
|
rm -rf %{buildroot}%{_docdir}/*
|
|
|
|
|
# /etc/sysconfig/corosync-notifyd
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
|
|
|
install -m 644 tools/corosync-notifyd.sysconfig.example \
|
|
|
|
|
%{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd
|
|
|
|
|
# /etc/sysconfig/corosync
|
|
|
|
|
install -m 644 init/corosync.sysconfig.example \
|
|
|
|
|
%{buildroot}%{_sysconfdir}/sysconfig/corosync
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This package contains the Corosync Cluster Engine Executive, several default
|
|
|
|
|
APIs and libraries, default configuration files, and an init script.
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%if %{with systemd} && 0%{?systemd_post:1}
|
|
|
|
|
%systemd_post corosync.service
|
|
|
|
|
%else
|
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
|
/sbin/chkconfig --add corosync || :
|
|
|
|
|
fi
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
%if %{with systemd} && 0%{?systemd_preun:1}
|
|
|
|
|
%systemd_preun corosync.service
|
|
|
|
|
%else
|
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
|
/sbin/service corosync stop &>/dev/null || :
|
|
|
|
|
/sbin/chkconfig --del corosync || :
|
|
|
|
|
fi
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%if %{with systemd} && 0%{?systemd_postun:1}
|
|
|
|
|
%systemd_postun corosync.service
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc LICENSE
|
|
|
|
|
%{_sbindir}/corosync
|
|
|
|
|
%{_sbindir}/corosync-keygen
|
|
|
|
|
%{_sbindir}/corosync-cmapctl
|
|
|
|
|
%{_sbindir}/corosync-cfgtool
|
|
|
|
|
%{_sbindir}/corosync-cpgtool
|
|
|
|
|
%{_sbindir}/corosync-quorumtool
|
|
|
|
|
%{_sbindir}/corosync-notifyd
|
|
|
|
|
%{_bindir}/corosync-blackbox
|
|
|
|
|
%if %{with xmlconf}
|
|
|
|
|
%{_bindir}/corosync-xmlproc
|
|
|
|
|
%dir %{_datadir}/corosync
|
|
|
|
|
%{_datadir}/corosync/xml2conf.xsl
|
|
|
|
|
%{_mandir}/man8/corosync-xmlproc.8*
|
|
|
|
|
%{_mandir}/man5/corosync.xml.5*
|
|
|
|
|
%endif
|
|
|
|
|
%dir %{_sysconfdir}/corosync
|
|
|
|
|
%dir %{_sysconfdir}/corosync/uidgid.d
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/corosync
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/corosync
|
|
|
|
|
%if %{with dbus}
|
|
|
|
|
%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with snmp}
|
|
|
|
|
%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with systemd}
|
|
|
|
|
%{_unitdir}/corosync.service
|
|
|
|
|
%{_unitdir}/corosync-notifyd.service
|
|
|
|
|
%else
|
|
|
|
|
%{_initrddir}/corosync
|
|
|
|
|
%{_initrddir}/corosync-notifyd
|
|
|
|
|
%endif
|
|
|
|
|
%dir %{_localstatedir}/lib/corosync
|
|
|
|
|
%dir %{_localstatedir}/log/cluster
|
|
|
|
|
%{_mandir}/man7/corosync_overview.7*
|
|
|
|
|
%{_mandir}/man8/corosync.8*
|
|
|
|
|
%{_mandir}/man8/corosync-blackbox.8*
|
|
|
|
|
%{_mandir}/man8/corosync-cmapctl.8*
|
|
|
|
|
%{_mandir}/man8/corosync-keygen.8*
|
|
|
|
|
%{_mandir}/man8/corosync-cfgtool.8*
|
|
|
|
|
%{_mandir}/man8/corosync-cpgtool.8*
|
|
|
|
|
%{_mandir}/man8/corosync-notifyd.8*
|
|
|
|
|
%{_mandir}/man8/corosync-quorumtool.8*
|
|
|
|
|
%{_mandir}/man5/corosync.conf.5*
|
|
|
|
|
%{_mandir}/man5/votequorum.5*
|
2022-02-17 16:39:58 +08:00
|
|
|
%{_mandir}/man7/cmap_keys.7*
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
# library
|
|
|
|
|
#
|
|
|
|
|
%package -n corosynclib
|
|
|
|
|
Summary: The Corosync Cluster Engine Libraries
|
|
|
|
|
|
|
|
|
|
%description -n corosynclib
|
|
|
|
|
This package contains corosync libraries.
|
|
|
|
|
|
|
|
|
|
%files -n corosynclib
|
|
|
|
|
%doc LICENSE
|
|
|
|
|
%{_libdir}/libcfg.so.*
|
|
|
|
|
%{_libdir}/libcpg.so.*
|
|
|
|
|
%{_libdir}/libcmap.so.*
|
|
|
|
|
%{_libdir}/libquorum.so.*
|
|
|
|
|
%{_libdir}/libvotequorum.so.*
|
|
|
|
|
%{_libdir}/libsam.so.*
|
|
|
|
|
%{_libdir}/libcorosync_common.so.*
|
|
|
|
|
|
2022-02-17 16:39:58 +08:00
|
|
|
%ldconfig_scriptlets -n corosynclib
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
%package -n corosynclib-devel
|
|
|
|
|
Summary: The Corosync Cluster Engine Development Kit
|
2022-02-17 16:39:58 +08:00
|
|
|
Requires: corosynclib = %{version}-%{release}
|
|
|
|
|
Requires: pkgconfig
|
|
|
|
|
Provides: corosync-devel = %{version}
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
%description -n corosynclib-devel
|
|
|
|
|
This package contains include files and man pages used to develop using
|
|
|
|
|
The Corosync Cluster Engine APIs.
|
|
|
|
|
|
|
|
|
|
%files -n corosynclib-devel
|
|
|
|
|
%doc LICENSE
|
|
|
|
|
%dir %{_includedir}/corosync/
|
|
|
|
|
%{_includedir}/corosync/corodefs.h
|
|
|
|
|
%{_includedir}/corosync/cfg.h
|
|
|
|
|
%{_includedir}/corosync/cmap.h
|
|
|
|
|
%{_includedir}/corosync/corotypes.h
|
|
|
|
|
%{_includedir}/corosync/cpg.h
|
|
|
|
|
%{_includedir}/corosync/hdb.h
|
|
|
|
|
%{_includedir}/corosync/sam.h
|
|
|
|
|
%{_includedir}/corosync/quorum.h
|
|
|
|
|
%{_includedir}/corosync/votequorum.h
|
|
|
|
|
%{_libdir}/libcfg.so
|
|
|
|
|
%{_libdir}/libcpg.so
|
|
|
|
|
%{_libdir}/libcmap.so
|
|
|
|
|
%{_libdir}/libquorum.so
|
|
|
|
|
%{_libdir}/libvotequorum.so
|
|
|
|
|
%{_libdir}/libsam.so
|
|
|
|
|
%{_libdir}/libcorosync_common.so
|
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
%{_mandir}/man3/cpg_*3*
|
|
|
|
|
%{_mandir}/man3/quorum_*3*
|
|
|
|
|
%{_mandir}/man3/votequorum_*3*
|
|
|
|
|
%{_mandir}/man3/sam_*3*
|
|
|
|
|
%{_mandir}/man3/cmap_*3*
|
|
|
|
|
|
|
|
|
|
%if %{with vqsim}
|
|
|
|
|
%package -n corosync-vqsim
|
|
|
|
|
Summary: The Corosync Cluster Engine - Votequorum Simulator
|
2022-02-17 16:39:58 +08:00
|
|
|
Requires: corosynclib = %{version}-%{release}
|
|
|
|
|
Requires: pkgconfig
|
2020-04-13 17:13:15 +08:00
|
|
|
|
|
|
|
|
%description -n corosync-vqsim
|
|
|
|
|
A command-line simulator for the corosync votequorum subsystem.
|
|
|
|
|
It uses the same code as the corosync quorum system but forks
|
|
|
|
|
them into subprocesses to simulate nodes.
|
|
|
|
|
Nodes can be added and removed as well as partitioned (to simulate
|
|
|
|
|
network splits)
|
|
|
|
|
|
|
|
|
|
%files -n corosync-vqsim
|
|
|
|
|
%doc LICENSE
|
|
|
|
|
%{_bindir}/corosync-vqsim
|
|
|
|
|
%{_mandir}/man8/corosync-vqsim.8*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
2025-03-27 11:30:25 +08:00
|
|
|
* Thu Mar 27 2025 Funda Wang <fundawang@yeah.net> - 3.1.8-6
|
|
|
|
|
- fix CVE-2025-30472
|
|
|
|
|
|
2024-03-02 12:36:04 +08:00
|
|
|
* Fri Mar 15 2024 zouzhimin <zouzhimin@kylinos.cn> - 3.1.8-5
|
|
|
|
|
- totem: Fix reference links
|
|
|
|
|
|
2024-02-29 22:02:42 +08:00
|
|
|
* Fri Mar 01 2024 zouzhimin <zouzhimin@kylinos.cn> - 3.1.8-4
|
|
|
|
|
- configure: Fix building of rust for release
|
|
|
|
|
|
2023-12-05 20:19:35 +08:00
|
|
|
* Tue Feb 27 2024 zouzhimin <zouzhimin@kylinos.cn> - 3.1.8-3
|
|
|
|
|
- Report crypto errors back to cfg reload
|
|
|
|
|
|
2023-12-05 19:31:05 +08:00
|
|
|
* Tue Feb 27 2024 zouzhimin <zouzhimin@kylinos.cn> - 3.1.8-2
|
|
|
|
|
- Fix up the library .versions files
|
|
|
|
|
|
2023-11-24 11:42:17 +08:00
|
|
|
* Fri Nov 24 2023 zouzhimin <zouzhimin@kylinos.cn> - 3.1.8-1
|
|
|
|
|
- update package to version 3.1.8
|
|
|
|
|
|
2023-11-07 16:14:31 +08:00
|
|
|
* Tue Nov 7 2023 bixiaoyan <bixiaoyan@kylinos.cn> - 3.1.7-5
|
|
|
|
|
- Fix integer overflow
|
|
|
|
|
|
2023-10-26 15:50:05 +08:00
|
|
|
* Thu Oct 26 2023 zouzhimin <zouzhimin@kylinos.cn> - 3.1.7-4
|
|
|
|
|
- Fail to start if knet ping timers are invalid
|
|
|
|
|
|
2023-08-22 11:24:06 +08:00
|
|
|
* Tue Aug 22 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 3.1.7-3
|
|
|
|
|
- Use knet TRACE logging level if available
|
|
|
|
|
|
2023-07-11 17:00:46 +08:00
|
|
|
* Tue Jul 11 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 3.1.7-2
|
|
|
|
|
- Fix build error
|
|
|
|
|
|
2023-05-31 21:06:18 +08:00
|
|
|
* Wed May 31 2023 liupei <liupei@kylinos.cn> - 3.1.7-1
|
|
|
|
|
- update package to version 3.1.7
|
|
|
|
|
|
2023-02-03 11:03:59 +08:00
|
|
|
* Fri Feb 03 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 3.1.5-1
|
|
|
|
|
- Update package to version 3.1.5
|
|
|
|
|
|
2022-02-17 16:39:58 +08:00
|
|
|
* Thu Feb 17 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 3.0.4-1
|
|
|
|
|
- upgrade to 3.0.4
|
|
|
|
|
|
2020-11-09 09:44:33 +08:00
|
|
|
* Fri Oct 30 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 3.0.2-5
|
|
|
|
|
- change the use_vmguestlib 1 to use_vmguestlib 0
|
|
|
|
|
|
2020-04-13 17:13:15 +08:00
|
|
|
* Mon Apr 13 2020 houjian<jian.hou@kylinos.cn> - 3.0.2-4.1
|
|
|
|
|
- Init corosync project
|
2023-05-31 21:06:18 +08:00
|
|
|
|