From 21c0782355f074a06366e569691f0448b61b75a0 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Wed, 4 Aug 2021 11:16:14 +0200 Subject: [PATCH 1/3] New upstream release --- .gitignore | 1 + corosync.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e882047..8e9ea1a 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ corosync-1.2.7.tar.gz /corosync-3.1.2.tar.gz /corosync-3.1.3.tar.gz /corosync-3.1.4.tar.gz +/corosync-3.1.5.tar.gz diff --git a/corosync.spec b/corosync.spec index 9eab928..73e4ed3 100644 --- a/corosync.spec +++ b/corosync.spec @@ -17,7 +17,7 @@ Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces -Version: 3.1.4 +Version: 3.1.5 Release: 1%{?gitver}%{?dist} License: BSD URL: http://corosync.github.io/corosync/ @@ -289,6 +289,9 @@ network splits) %endif %changelog +* Wed Aug 04 2021 Jan Friesse - 3.1.5-1 +- New upstream release + * Thu Jun 03 2021 Jan Friesse - 3.1.4-1 - New upstream release diff --git a/sources b/sources index 232fe18..2a816ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (corosync-3.1.4.tar.gz) = 3e8ed70653d2559449765dac91f3ad87b8a474b81529895a7b33dee044946e05b08dbf9f36da5be60d93527976ac0e390beb3ce2f77d088613fdb45e940558ec +SHA512 (corosync-3.1.5.tar.gz) = eb974a32f60c52564057ed41c1ebf31fe4332a5a082ebbd5fa2540af8fa9e8c0c42d4ef9066abcb9d7dd04c12b97cd13642289c65b5b6b65cfd30c12641ada1d From 612465ce33505324e5059884ac7406802571cc1b Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 15 Nov 2021 11:17:44 +0100 Subject: [PATCH 2/3] New upstream release --- .gitignore | 1 + corosync.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8e9ea1a..15b906f 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ corosync-1.2.7.tar.gz /corosync-3.1.3.tar.gz /corosync-3.1.4.tar.gz /corosync-3.1.5.tar.gz +/corosync-3.1.6.tar.gz diff --git a/corosync.spec b/corosync.spec index 73e4ed3..7356988 100644 --- a/corosync.spec +++ b/corosync.spec @@ -17,7 +17,7 @@ Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces -Version: 3.1.5 +Version: 3.1.6 Release: 1%{?gitver}%{?dist} License: BSD URL: http://corosync.github.io/corosync/ @@ -289,6 +289,9 @@ network splits) %endif %changelog +* 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 diff --git a/sources b/sources index 2a816ad..4a1cc64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (corosync-3.1.5.tar.gz) = eb974a32f60c52564057ed41c1ebf31fe4332a5a082ebbd5fa2540af8fa9e8c0c42d4ef9066abcb9d7dd04c12b97cd13642289c65b5b6b65cfd30c12641ada1d +SHA512 (corosync-3.1.6.tar.gz) = 8f5d12851f296e0ee9dd425d40252988f0b8485d2c2098028b25265506f846e3f34df86007a7c273d020921b2532bdbc01b52e1631f6abfae79981436230225e From 357e7da16bdb6d31918c6b3e023b58e8a876baf6 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Wed, 30 Mar 2022 16:54:41 +0200 Subject: [PATCH 3/3] Use copytruncate method for logrotate --- corosync.spec | 8 ++- ...e-Use-copytruncate-method-by-default.patch | 60 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 logrotate-Use-copytruncate-method-by-default.patch diff --git a/corosync.spec b/corosync.spec index 7356988..02e4782 100644 --- a/corosync.spec +++ b/corosync.spec @@ -18,11 +18,13 @@ Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces Version: 3.1.6 -Release: 1%{?gitver}%{?dist} +Release: 2%{?gitver}%{?dist} License: BSD URL: http://corosync.github.io/corosync/ 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 Requires: corosynclib%{?_isa} = %{version}-%{release} @@ -71,6 +73,7 @@ BuildRequires: make %prep %setup -q -n %{name}-%{version}%{?gittarver} +%patch0 -p1 %build %if %{with runautogen} @@ -289,6 +292,9 @@ network splits) %endif %changelog +* Wed Mar 30 2022 Jan Friesse - 3.1.6-2 +- Use copytruncate method for logrotate + * Mon Nov 15 2021 Jan Friesse - 3.1.6-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 +