Go to file
Pavol Sloboda 670b865cb2 [bugfix] Fix packaging of the default MySQL server log
We've received a bug report, that the 'rpm -qc' incorrectly returns the MySQL
server default log file '/var/log/mysql/mysqld.log' as a configuration file.
  https://issues.redhat.com/browse/RHEL-57601

This was caused by us packing it in the SPECfile '%files' section with the
'%config %ghost' directives. The reason was historical. We tried to mark
the file as owned by the package, but at the same time to not pack it,
and also prevent its deleteion on package removal.

The correct way is to not list the file at all.
The parent directory is properly packed and owned instead (already), so it should be
clear that the files inside are associated with that package. This is how we already
do it with the DB datadir '/var/lib/mysql'.

Resolves: RHEL-112386

While investigating this issue, we also reviewed the log file creation.
The log file is created automatically by the MySQL server when needed.
This can even happen in the middle of the server runtime, when the file
is (re)moved, and the DB server is tasked to flush the logs.

I checked the MySQL server documentation, and tested it, and I found, that the logfile
is indeed created by the server. The only possible reason why the file might be needed
to be created beforehand, is when the file lies on a location to which the MySQL server
won't have permissions to write to.

This is likely the case of MySQL upstream RPMs, which place it by default to the '/var/log':
  96d58aa2b9/packaging/rpm-fedora/mysql.spec.in (L703)

However Fedora and RHEL uses a designated directory '/var/log/mysql', which is owened by 'mysql:mysql',
so the issue does not exists here.
2025-09-02 14:27:26 +02:00
.fmf Setup gating for c10s 2024-07-31 13:23:59 +02:00
plans Setup gating for c10s 2024-07-31 13:23:59 +02:00
.gitignore Update to MySQL 5.7.14 - sources 2024-02-05 16:59:12 +01:00
boost-1.57.0-mpl-print.patch Rebase to 8.4.0 2024-07-16 10:09:52 +02:00
boost-1.58.0-pool.patch Update to 5.7.10 2024-02-05 16:59:12 +01:00
gating.yaml Setup gating for c10s 2024-07-31 13:23:59 +02:00
my.cnf.in Update cnf and service files with MySQL 8.0 features and clean up patches. 2024-02-05 16:59:12 +01:00
mysql8.4.rpmlintrc Fixes for issues found by linters 2025-01-09 17:57:32 +01:00
mysql8.4.spec [bugfix] Fix packaging of the default MySQL server log 2025-09-02 14:27:26 +02:00
mysql_config_multilib.sh Spec rewrite to be more similar to oterh MySQL implementations 2024-02-05 16:59:12 +01:00
mysql-check-socket.sh Spec rewrite to be more similar to oterh MySQL implementations 2024-02-05 16:59:12 +01:00
mysql-file-contents.patch Rename all patch files and specfile 2024-02-06 09:52:41 +00:00
mysql-flush-logrotate.patch Fix patching of logrotate 2025-02-14 13:41:17 +01:00
mysql-install-test.patch Rename all patch files and specfile 2024-02-06 09:52:41 +00:00
mysql-paths.patch Rebase to 8.4.6 2025-09-02 14:27:10 +02:00
mysql-prepare-db-dir.sh Fix scripts after moving mysqld back to /usr/libexec 2024-02-05 16:59:12 +01:00
mysql-rpath.patch Rename all patch files and specfile 2024-02-06 09:52:41 +00:00
mysql-scripts-common.sh Support --defaults-group-suffix option in systemd unit file 2024-02-05 16:59:12 +01:00
mysql-scripts.patch Rename all patch files and specfile 2024-02-06 09:52:41 +00:00
mysql-sharedir.patch Rename all patch files and specfile 2024-02-06 09:52:41 +00:00
mysql-wait-stop.sh Wait for daemon ends 2024-02-05 16:59:12 +01:00
mysql.service.in Remove SysVInit stuff 2024-02-05 16:59:13 +01:00
mysql.tmpfiles.d.in Hardcoded paths removed to work fine in chroot 2024-02-05 16:59:12 +01:00
mysql@.service.in Remove SysVInit stuff 2024-02-05 16:59:13 +01:00
README.mysql-docs Update to mysql 5.1.44; remove non-free documentation file. 2024-02-05 16:59:12 +01:00
README.mysql-license Update the license clarification text to reflect the current state 2025-09-02 13:49:22 +02:00
rh-skipped-tests-list-arm.list Testsuite verification for release 8.4.4 2025-01-23 03:13:19 +01:00
rh-skipped-tests-list-base.list Enable the base test suite ('main') 2025-01-09 17:57:46 +01:00
rh-skipped-tests-list-ppc.list Enable the base test suite ('main') 2025-01-09 17:57:46 +01:00
rh-skipped-tests-list-s390.list Testsuite verification for release 8.4.4 2025-01-23 03:13:19 +01:00
rpminspect.yaml rpminspect - introduce a global ignore list 2024-02-05 16:59:56 +01:00
server.cnf.in Fix the logrotate file [2] 2024-02-05 16:59:56 +01:00
sources Rebase to 8.4.6 2025-09-02 14:27:10 +02:00

MySQL is distributed under GPL v2, but there are some licensing exceptions
that allow the client libraries to be linked with a non-GPL application,
so long as the application is under a license approved by Oracle.
For details see

'The Universal FOSS Exception, Version 1.0':
  https://oss.oracle.com/licenses/universal-foss-exception/
A predecessor of that license exception is now deprecated 'FOSS License Exception':
  http://www.mysql.com/about/legal/licensing/foss-exception/

Some innobase code from Percona and Google is under BSD license.
Some code related to test-suite is under LGPLv2.