Commit Graph

14 Commits

Author SHA1 Message Date
Michal Schorm
9ac0430b0f [2/2] Rebase to 10.11.6 - start using upstream logrotate file
Explanation for removed notes follow:

| * 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.

This is an ancient artefact.
It originates in this commit from 2012 in the 'mysql' package in Fedora:
  https://src.fedoraproject.org/rpms/mysql/c/d3bdaa4a?branch=rawhide
That was at the time, when the DB log resided directly in '/var/log/', rather than '/var/log/some-dir-specific-for-the-DB/'.
Since that is no longer the case, the 'create 600 mysql mysql' directive is no longer necessary.

| * 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.

This is no longer true.
Since MariaDB 10.4, which introduced authentication via the UNIX socket,
the 'root' and 'mysql' users can authenticate without login and password.

So we can go back to using 'mysqladmin', or 'mariadb-admin' in this case, to flush logs

| See discussions at RH bugs 799735, 547007
| * Note they are from Fedora 15 / 16

I found no more useful information there. Only information already mentioned in other notes here.

| 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 ?

Introduction of MariaDB 10.11 is the perfect time.

| * 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

True, however, no one likely cares about that, in reality, since those logs don't hold any journal-like entries.
Explained here:
  https://github.com/MariaDB/server/pull/1556#issuecomment-941886220

| Update 6/2018
| * the SIGHUP causes server to flush all logs. No password admin needed, the only constraint is
|   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

It has been dicussed on the upstream thoroughly and was found far from ideal.
Now, that we can use 'mysqladmin', or 'mariadb-admin' in this case, safely again,
there's no argument to keep using the PID file for flushing logs.

| Update 02/2021
| * Enhance the script as proposed in:
|   https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/

Enhanced again now. Significantly this time, however with a vision that the values will become an OS-independent defaults.

|  * Discussion continues in:
|   https://jira.mariadb.org/browse/MDEV-16621

Discussion finished.
Better start a new one, if needed.
2024-01-30 12:58:32 +01:00
Michal Schorm
62af7d57f2 Rebase to 10.5.15
Logrotate patch rebased onto upstream commit:
  008c02c987

Groonga patch upstreamed:
  045f5f7b10

OpenSSL 3 patch rebased onto upstream commit:
  be1d965384

OpenSSL 3 CMake condition reverted - it should be only applied to series without OpenSSL 3 patch:
  c9beef4315

Full testsuite success on a Fedora Rawhide scratch build,
setting "last_tested_version" to 10.5.15 so only the "main" test suite will be run on subsequent
builds of the same MariaDB release
2022-02-23 13:57:02 +01:00
Michal Schorm
f20aec3d3d Enhance the logrotate script as proposed in:
https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/

Resolves: #1683981
2021-02-12 08:47:54 +01:00
Lukas Javorsky
2b8b704762 Rebase to 10.5.4 2020-10-22 14:02:19 +02:00
Michal Schorm
8d089185e5 Rebase to 10.4.10
Upstream started to build the Galera libraries statically

Spider SE patch updated, tiny part of it was upstreamed

Commit also contains several tweaks for debug build
2019-12-06 14:57:50 +01:00
Michal Schorm
fb947d868c Fix logrotate comments
Add PR URL
2018-06-29 02:22:25 +02:00
Michal Schorm
5007ecd667 Fix log rotation
Add forgotten 10.3.7 changelog entry
Remove galera and mysql obsoletion
Tweak the testsuite runs
Fix files section when build with test subpackage but without embedded subpackage
2018-06-27 21:35:06 +02:00
Michal Schorm
259503a47e Update logrotate config to use correct logfile location. 2018-03-20 17:17:37 +01:00
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
Michal Schorm
7998c8ef3a Plugin oqgraph enabled
Plugin jemalloc enabled
'force' option for 'rm' removed
Enabled '--big-test' option for the testsuite
Disabled '--skip-rpl' option for the testsuite = replication tests enabled
Multilib manpage added RH unstable tests added to upstream file instead of our own
Server dependency changed from 'sh-utils' to 'coreutils'
2017-06-03 02:16:39 +02:00
Honza Horak
f6b02e3277 Hardcoded paths removed to work fine in chroot 2014-07-25 09:15:58 +02:00
Jakub Dorňák
6aba9be8ec mariadb-10.0.10 - sources and patches 2014-04-07 21:07:33 +02:00
Honza Horák
1adc7451a4 Move log file into /var/log/mariadb/mariadb.log
Rename logrotate script to mariadb
Resolves: #999589
2013-08-29 16:03:31 +02:00
Honza Horák
9c7c797056 Initial commit 2013-01-10 18:35:12 +01:00