mariadb/mariadb-logrotate.patch
Michal Schorm 789b0094ed Rebase to 10.1.24
Build dependecies Bison and Libarchive added, others corrected
Disabling Mroonga engine for i686 architecture, as it is not supported by MariaDB
Removed patches: (fixed by upstream)
   Patch5:  %{pkgnamepatch}-file-contents.patch
   Patch14: %{pkgnamepatch}-example-config-files.patch
   Patch31: %{pkgnamepatch}-string-overflow.patch
   Patch32: %{pkgnamepatch}-basedir.patch
   Patch41: %{pkgnamepatch}-galera-new-cluster-help.patch

Skipped tests list updated
Bigger READMEs update (made by upstream)

Resolves: rhbz#1414387
  CVE-2017-3313
Resolves partly: rhbz#1443408
  CVE-2017-3308 CVE-2017-3309 CVE-2017-3453 CVE-2017-3456 CVE-2017-3464
2017-06-03 02:17:41 +02:00

80 lines
2.7 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Adjust the mysql-log-rotate script in several ways:
* Use the correct log file pathname for Red Hat installations.
* Enable creation of the log file by logrotate (needed since
/var/log/ isn't writable by mysql user); and set the same 640
permissions we normally use.
* Comment out the actual rotation commands, so that user must edit
the file to enable rotation. This is unfortunate, but the fact
that the script will probably fail without manual configuration
(to set a root password) means that we can't really have it turned
on by default. Fortunately, in most configurations the log file
is low-volume and so rotation is not critical functionality.
See discussions at RH bugs 799735, 547007
* Note they are from Fedora 15 / 16
Update 3/2017
* it would be big unexpected change for anyone upgrading, if we start shipping it now.
Maybe it is good candidate for shipping with MariaDB 10.2 ?
* the 'mysqladmin flush logs' doesn´t guarantee, no entries are lost
during flushing, the operation is not atomic.
We should not ship it in that state
--- mariadb-10.1.23/support-files/mysql-log-rotate.sh 2017-05-18 08:33:01.000000000 +0200
+++ mariadb-10.1.23/support-files/mysql-log-rotate.sh.patched 2017-05-24 11:54:33.686860390 +0200
@@ -1,9 +1,9 @@
# This logname can be set in /etc/my.cnf
-# by setting the variable "err-log"
-# in the [safe_mysqld] section as follows:
+# by setting the variable "log-error"
+# in the [mysqld_safe] section as follows:
#
-# [safe_mysqld]
-# err-log=@localstatedir@/mysqld.log
+# [mysqld_safe]
+# log-error=@LOG_LOCATION@
#
# If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following
@@ -18,20 +18,22 @@
# ATTENTION: This /root/.my.cnf should be readable ONLY
# for root !
-@localstatedir@/mysqld.log {
- # create 600 mysql mysql
- notifempty
- daily
- rotate 3
- missingok
- compress
- postrotate
- # just if mysqld is really running
- if test -x @bindir@/mysqladmin && \
- @bindir@/mysqladmin ping &>/dev/null
- then
- @bindir@/mysqladmin --local flush-error-log \
- flush-engine-log flush-general-log flush-slow-log
- fi
- endscript
-}
+# Then, un-comment the following lines to enable rotation of mysql's log file:
+#@LOG_LOCATION@/mysqld.log {
+# create 600 mysql mysql
+# notifempty
+# daily
+# rotate 3
+# missingok
+# compress
+# postrotate
+# # just if mysqld is really running
+# if test -x @bindir@/mysqladmin && \
+# @bindir@/mysqladmin ping &>/dev/null
+# then
+# @bindir@/mysqladmin --local flush-error-log \
+# flush-engine-log flush-general-log flush-slow-log
+# fi
+# endscript
+#}
+