mirror of
https://abf.rosa.ru/djam/mariadb.git
synced 2025-02-23 22:52:48 +00:00

This package in ROSA was maintained quite poorly, had only a few users and lacked such important features as running multiple instances of MySQL server (mysqld@.service) and scripts for automatic upgrade to newer versions. Also upstream has renamed libraries, now there is mysql-connector-c with devel parts. /srv/mysql is also rather strange, /var/lib/mysql is more common. Let's rebase to a well-maintained package from openSUSE. It is being done in a not released platform without any compatibility for smooth upgrades fromt he old package. The new one has a lower epoch, automatic upgrades won't be done. High epoch is not needed anymore: mysql-community has not been merged from abf.io/rosaserver to abf.io/import, and now the library in mariadb is called libmariadbclient, not libmysqlclient (but compatibility symlinks do exist), so there are no duplicated provides and so there is no need in a high epoch. This commits just imports from openSUSE's SRPM without any changes, the following one will adapt it for ROSA. It will allow to easily see the diff against the openSUSE's package to easify further syncs and contibuting back to SUSE (https://bugzilla.opensuse.org/show_bug.cgi?id=1182218)
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
PATCH-P0-FIX-SUSE: Fix log file path for logrotate
|
|
|
|
In SUSE we've got MySQL log in different directory. It's located in
|
|
/var/log/mysql by default. It also adds some extra error message.
|
|
|
|
Maintainer: Michal Hrusecky <Michal.Hrusecky@opensuse.org>
|
|
|
|
Index: support-files/mysql-log-rotate.sh
|
|
===================================================================
|
|
--- support-files/mysql-log-rotate.sh.orig
|
|
+++ support-files/mysql-log-rotate.sh
|
|
@@ -18,7 +18,7 @@
|
|
# ATTENTION: This /root/.my.cnf should be readable ONLY
|
|
# for root !
|
|
|
|
-@localstatedir@/mysqld.log {
|
|
+/var/log/mysql/*.log {
|
|
# create 600 mysql mysql
|
|
notifempty
|
|
daily
|
|
@@ -32,6 +32,14 @@
|
|
then
|
|
@bindir@/mysqladmin --local flush-error-log \
|
|
flush-engine-log flush-general-log flush-slow-log
|
|
+ ret=$?
|
|
+ if test $ret -ne 0
|
|
+ then
|
|
+ echo "/etc/logrotate.d/mariadb failed, probably because" >&2
|
|
+ echo "the root acount is protected by password." >&2
|
|
+ echo "See comments in /etc/logrotate.d/mariadb on how to fix this" >&2
|
|
+ exit $ret
|
|
+ fi
|
|
fi
|
|
endscript
|
|
}
|