diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index be468d1..15b906f 100644 --- a/.gitignore +++ b/.gitignore @@ -48,7 +48,3 @@ corosync-1.2.7.tar.gz /corosync-3.1.4.tar.gz /corosync-3.1.5.tar.gz /corosync-3.1.6.tar.gz -/corosync-3.1.7.tar.gz -/corosync-3.1.8.tar.gz -/corosync-3.1.9.tar.gz -/corosync-3.1.10.tar.gz diff --git a/corosync.spec b/corosync.spec index 6e04bf1..02e4782 100644 --- a/corosync.spec +++ b/corosync.spec @@ -12,13 +12,18 @@ %bcond_without runautogen %bcond_without userflags +%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}} +%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} + Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces -Version: 3.1.10 -Release: 1%{?dist} -License: BSD-3-Clause +Version: 3.1.6 +Release: 2%{?gitver}%{?dist} +License: BSD URL: http://corosync.github.io/corosync/ -Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz +Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz + +Patch0: logrotate-Use-copytruncate-method-by-default.patch # Runtime bits # The automatic dependency overridden in favor of explicit version lock @@ -65,10 +70,10 @@ Requires: libxslt BuildRequires: readline-devel %endif BuildRequires: make -BuildRequires: git %prep -%autosetup -S git_am +%setup -q -n %{name}-%{version}%{?gittarver} +%patch0 -p1 %build %if %{with runautogen} @@ -114,7 +119,7 @@ BuildRequires: git %if %{with dbus} mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d -install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_datadir}/dbus-1/system.d/corosync-signals.conf +install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf %endif ## tree fixup @@ -183,7 +188,7 @@ fi %config(noreplace) %{_sysconfdir}/sysconfig/corosync %config(noreplace) %{_sysconfdir}/logrotate.d/corosync %if %{with dbus} -%{_datadir}/dbus-1/system.d/corosync-signals.conf +%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf %endif %if %{with snmp} %{_datadir}/snmp/mibs/COROSYNC-MIB.txt @@ -195,10 +200,8 @@ fi %{_initrddir}/corosync %{_initrddir}/corosync-notifyd %endif -%if %{without systemd} %dir %{_localstatedir}/lib/corosync %dir %{_localstatedir}/log/cluster -%endif %{_mandir}/man7/corosync_overview.7* %{_mandir}/man8/corosync.8* %{_mandir}/man8/corosync-blackbox.8* @@ -289,68 +292,15 @@ network splits) %endif %changelog -* Sat Nov 15 2025 Jan Friesse - 3.1.10-1 -- New upstream release - -* Wed Jul 23 2025 Fedora Release Engineering - 3.1.9-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Jun 16 2025 Jan Friesse - 3.1.9-4 -- exec: Add support for env STATE_DIRECTORY -- init: Use LogsDirectory in systemd unit file - -* Wed Mar 26 2025 Jan Friesse - 3.1.9-3 -- totemsrp: Check size of orf_token msg - (fixes CVE-2025-30472) - -* Thu Jan 16 2025 Fedora Release Engineering - 3.1.9-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Nov 15 2024 Jan Friesse - 3.1.9-1 -- New upstream release - -* Wed Jul 17 2024 Fedora Release Engineering - 3.1.8-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Wed Jan 24 2024 Fedora Release Engineering - 3.1.8-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 3.1.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Nov 15 2023 Jan Friesse - 3.1.8-1 -- New upstream release - -* Wed Jul 19 2023 Fedora Release Engineering - 3.1.7-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 06 2023 Jan Friesse - 3.1.7-3 -- migrated to SPDX license - -* Thu Jan 19 2023 Fedora Release Engineering - 3.1.7-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Nov 15 2022 Jan Friesse - 3.1.7-1 -- New upstream release - -* Wed Jul 20 2022 Fedora Release Engineering - 3.1.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Mar 30 2022 Jan Friesse - 3.1.6-3 +* Wed Mar 30 2022 Jan Friesse - 3.1.6-2 - Use copytruncate method for logrotate -* Wed Jan 19 2022 Fedora Release Engineering - 3.1.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - * Mon Nov 15 2021 Jan Friesse - 3.1.6-1 - New upstream release * Wed Aug 04 2021 Jan Friesse - 3.1.5-1 - New upstream release -* Wed Jul 21 2021 Fedora Release Engineering - 3.1.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - * Thu Jun 03 2021 Jan Friesse - 3.1.4-1 - New upstream release diff --git a/logrotate-Use-copytruncate-method-by-default.patch b/logrotate-Use-copytruncate-method-by-default.patch new file mode 100644 index 0000000..11d2cf3 --- /dev/null +++ b/logrotate-Use-copytruncate-method-by-default.patch @@ -0,0 +1,60 @@ +From 04362046c4a9d7307feb5b68341d567b7d0b94d6 Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Tue, 29 Mar 2022 17:09:22 +0200 +Subject: [PATCH] logrotate: Use copytruncate method by default + +The reopen lograte method has two main problems: +1. It does fail when corosync is not running (solvable by + adding "|| true") +2. If (for some reason, like SELinux) cfgtool -L fails, logrotate + fails and corosync keeps logging into old file. Added "|| true" + makes situation even worse because logrotate removes file but + corosync keeps logging into it. + +Solution is to install copytruncate logrotate snip by default (and +keep reopen config file only for reference). + +Signed-off-by: Jan Friesse +Reviewed-by: Christine Caulfield +--- + conf/logrotate/Makefile.am | 7 ------- + conf/logrotate/corosync-reopen.in | 5 +++++ + 2 files changed, 5 insertions(+), 7 deletions(-) + +diff --git a/conf/logrotate/Makefile.am b/conf/logrotate/Makefile.am +index 4f7b7536..35efa2de 100644 +--- a/conf/logrotate/Makefile.am ++++ b/conf/logrotate/Makefile.am +@@ -34,16 +34,9 @@ MAINTAINERCLEANFILES = Makefile.in + + EXTRA_DIST = corosync-reopen.in corosync-copytruncate.in + +-if HAVE_QB_LOG_FILE_REOPEN +-corosync: corosync-reopen.in +- $(SED) -e 's#@''LOGDIR@#${LOGDIR}#g' \ +- -e 's#@''SBINDIR@#$(sbindir)#g' \ +- $< > $@ +-else + corosync: corosync-copytruncate.in + $(SED) -e 's#@''LOGDIR@#${LOGDIR}#g' \ + $< > $@ +-endif + + logrotatecorosyncdir = ${LOGROTATEDIR} + logrotatecorosync_DATA = corosync +diff --git a/conf/logrotate/corosync-reopen.in b/conf/logrotate/corosync-reopen.in +index 839c5dae..730fb741 100644 +--- a/conf/logrotate/corosync-reopen.in ++++ b/conf/logrotate/corosync-reopen.in +@@ -1,3 +1,8 @@ ++# This logrotate method has two main problems and it's kept only for reference: ++# 1. It does fail when corosync is not running (solvable by adding "|| true") ++# 2. If (for some reason) cfgtool -L fails, logrotate fails and corosync keeps ++# logging into old file. Added "|| true" makes situation even worse ++# because logrotate removes file but corosync keeps logging into it. + @LOGDIR@/corosync.log { + missingok + compress +-- +2.33.1 + diff --git a/sources b/sources index 9c626fd..4a1cc64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (corosync-3.1.10.tar.gz) = cf2014d15fdbd3495cfe64629255f7855a79651a595938dac7bc7ec67338d843079ae40cf1c15de23b50d85cb39b2c2e3e3448a9cc33759ad8988b8c85ce59d3 +SHA512 (corosync-3.1.6.tar.gz) = 8f5d12851f296e0ee9dd425d40252988f0b8485d2c2098028b25265506f846e3f34df86007a7c273d020921b2532bdbc01b52e1631f6abfae79981436230225e diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..e6c79fd --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,3 @@ +# Ignore tests runs/artefacts. +artifacts/** +**/*.retry diff --git a/tests/plan.fmf b/tests/plan.fmf deleted file mode 100644 index 1c97683..0000000 --- a/tests/plan.fmf +++ /dev/null @@ -1,12 +0,0 @@ -summary: Run all smoke tests -discover: - how: fmf -execute: - how: tmt -prepare: - how: install - package: - - gcc - - iproute - - corosync - - corosync-devel diff --git a/tests/smoke/main.fmf b/tests/smoke/main.fmf deleted file mode 100644 index c431594..0000000 --- a/tests/smoke/main.fmf +++ /dev/null @@ -1,2 +0,0 @@ -summary: Basic smoke test -test: ./runtest.sh diff --git a/tests/smoke/runtest.sh b/tests/smoke/runtest.sh old mode 100755 new mode 100644 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..39b6209 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - smoke + required_packages: + - gcc + - iproute + - corosync + - corosync-devel