Enhance the logrotate script as proposed in:

https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/

Resolves: #1683981
This commit is contained in:
Michal Schorm 2021-02-12 08:45:05 +01:00
parent e5b5fcdcf7
commit f20aec3d3d
2 changed files with 18 additions and 6 deletions

View File

@ -26,9 +26,15 @@ Update 6/2018
beeing able to send the SIGHUP to the process and read the mysqld pid file, which root can. beeing able to send the SIGHUP to the process and read the mysqld pid file, which root can.
* Submited as PR: https://github.com/MariaDB/server/pull/807 * Submited as PR: https://github.com/MariaDB/server/pull/807
--- mariadb-10.5.4/support-files/mysql-log-rotate.sh.old 2020-09-16 13:36:57.247955135 +0200 Update 02/2021
+++ mariadb-10.5.4/support-files/mysql-log-rotate.sh 2020-09-16 13:40:59.744220908 +0200 * Enhance the script as proposed in:
@@ -3,23 +3,10 @@ https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/
* Discussion continues in:
https://jira.mariadb.org/browse/MDEV-16621
--- mariadb-10.5.8/support-files/mysql-log-rotate.sh 2021-02-12 08:37:47.857289694 +0100
+++ mariadb-10.5.8/support-files/mysql-log-rotate.sh_pacthed 2021-02-12 08:40:26.420372325 +0100
@@ -3,35 +3,22 @@
# in the [mysqld] section as follows: # in the [mysqld] section as follows:
# #
# [mysqld] # [mysqld]
@ -55,10 +61,12 @@ Update 6/2018
notifempty notifempty
daily daily
rotate 3 rotate 3
@@ -27,11 +14,9 @@ missingok
compress compress
+ delaycompress
+ sharedscripts
postrotate postrotate
# just if mariadbd is really running # just if mariadbd is really running
- if test -x @bindir@/mysqladmin && \ - if test -x @bindir@/mysqladmin && \
- @bindir@/mysqladmin ping &>/dev/null - @bindir@/mysqladmin ping &>/dev/null
- then - then

View File

@ -158,7 +158,7 @@
Name: mariadb Name: mariadb
Version: 10.5.8 Version: 10.5.8
Release: 6%{?with_debug:.debug}%{?dist} Release: 7%{?with_debug:.debug}%{?dist}
Epoch: 3 Epoch: 3
Summary: A very fast and robust SQL database server Summary: A very fast and robust SQL database server
@ -1662,6 +1662,10 @@ fi
%endif %endif
%changelog %changelog
* Fri Feb 12 2021 Michal Schorm <mschorm@redhat.com> - 3:10.5.8-7
- Enhance the logrotate script
- Resolves: #1683981
* Fri Feb 12 2021 Michal Schorm <mschorm@redhat.com> - 3:10.5.8-6 * Fri Feb 12 2021 Michal Schorm <mschorm@redhat.com> - 3:10.5.8-6
- Fix Perl database driver dependency - Fix Perl database driver dependency