Move server settings to config file under my.cnf.d dir

This commit is contained in:
Honza Horak 2015-01-25 00:00:50 +01:00
parent aa64b0065d
commit b2ee179e9b
3 changed files with 35 additions and 21 deletions

20
mariadb-ownsetup.patch Normal file
View File

@ -0,0 +1,20 @@
diff -up mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup mariadb-10.0.15/support-files/rpm/server.cnf
--- mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup 2015-01-24 23:55:55.110063592 +0100
+++ mariadb-10.0.15/support-files/rpm/server.cnf 2015-01-24 23:57:42.308114387 +0100
@@ -9,7 +9,16 @@
[server]
# this is only for the mysqld standalone daemon
+# Settings user and group are ignored when systemd is used.
+# If you need to run mysqld under a different user or group,
+# customize your systemd unit file for mysqld/mariadb according to the
+# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld]
+datadir=@MYSQL_DATADIR@
+socket=@DMYSQL_UNIX_ADDR@
+log-error=@LOG_LOCATION@
+pid-file=@PID_FILE_DIR@/@DAEMON_NAME@.pid
+
# this is only for embedded server
[embedded]

View File

@ -104,7 +104,7 @@
Name: mariadb
Version: %{compatver}.%{bugfixver}
Release: 5%{?with_debug:.debug}%{?dist}
Release: 6%{?with_debug:.debug}%{?dist}
Epoch: 1
Summary: A community developed branch of MySQL
@ -147,6 +147,7 @@ Patch5: %{pkgnamepatch}-file-contents.patch
Patch6: %{pkgnamepatch}-dh1024.patch
Patch7: %{pkgnamepatch}-scripts.patch
Patch8: %{pkgnamepatch}-install-db-sharedir.patch
Patch9: %{pkgnamepatch}-ownsetup.patch
# Patches specific for this mysql package
Patch30: %{pkgnamepatch}-errno.patch
@ -484,6 +485,7 @@ MariaDB is a community developed branch of MySQL.
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
@ -1137,6 +1139,9 @@ fi
%endif
%changelog
* Sat Jan 24 2015 Honza Horak <hhorak@redhat.com> - 1:10.0.15-6
- Move server settings to config file under my.cnf.d dir
* Sat Jan 24 2015 Honza Horak <hhorak@redhat.com> - 1:10.0.15-5
- Fix path for sysconfig file
Filter provides in el6 properly

View File

@ -1,26 +1,15 @@
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# This group is read by the server
#
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld/mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
# Currently, there are mariadb and community-mysql packages in Fedora.
# This particular config file is included in respective RPMs of both of them,
# so the following settings are general and will be also used by both of them.
# Otherwise the RPMs would be in conflict.
# Settings for particular implementations like MariaDB are then
# defined in appropriate sections; for MariaDB server in [mariadb] section in
# @INSTALL_SYSCONF2DIR@/server.cnf (part of mariadb-server).
# It doesn't matter that we set these settings only for [mysqld] here,
# because they will be read and used in mysqld_safe as well.
log-error=@LOG_LOCATION@
pid-file=@PID_FILE_DIR@/@DAEMON_NAME@.pid
[mysqld_safe]
#
# include all files from the config directory