Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
staging
rpms
corosync
Commits
3576fd58
Commit
3576fd58
authored
Nov 15, 2022
by
Rocky Automation
📺
Browse files
import corosync-3.1.5-4.el9
parent
100f632d
Changes
2
Hide whitespace changes
Inline
Side-by-side
SOURCES/bz2070623-1-logrotate-Use-copytruncate-method-by-default.patch
0 → 100644
View file @
3576fd58
From 04362046c4a9d7307feb5b68341d567b7d0b94d6 Mon Sep 17 00:00:00 2001
From: Jan Friesse <jfriesse@redhat.com>
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 <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
---
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.27.0
SPECS/corosync.spec
View file @
3576fd58
...
...
@@ -18,13 +18,14 @@
Name: corosync
Summary: The Corosync Cluster Engine and Application Programming Interfaces
Version: 3.1.5
Release:
3
%{?gitver}%{?dist}
Release:
4
%{?gitver}%{?dist}
License: BSD
URL: http://corosync.github.io/corosync/
Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz
Patch0: bz2024652-1-totem-Add-cancel_hold_on_retransmit-config-option.patch
Patch1: bz2024657-1-totemsrp-Switch-totempg-buffers-at-the-right-time.patch
Patch2: bz2070623-1-logrotate-Use-copytruncate-method-by-default.patch
# Runtime bits
# The automatic dependency overridden in favor of explicit version lock
...
...
@@ -77,6 +78,7 @@ BuildRequires: make
%patch0 -p1 -b .bz2024652-1
%patch1 -p1 -b .bz2024657-1
%patch2 -p1 -b .bz2070623-1
%build
%if %{with runautogen}
...
...
@@ -295,6 +297,12 @@ network splits)
%endif
%changelog
* Thu Mar 31 2022 Jan Friesse <jfriesse@redhat.com> - 3.1.5-4
- Resolves: rhbz#2070623
- logrotate: Use copytruncate method by default (rhbz#2070623)
- merge upstream commit 04362046c4a9d7307feb5b68341d567b7d0b94d6 (rhbz#2070623)
* Thu Nov 25 2021 Jan Friesse <jfriesse@redhat.com> - 3.1.5-3
- Resolves: rhbz#2024652
- Resolves: rhbz#2024657
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment