From 740a4a01ca727b7fceab9e9bbee9e24d04e1f1a1 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Sun, 25 Jan 2015 00:04:17 +0100 Subject: [PATCH] Fix path for sysconfig file Filter provides in el6 properly Fix initscript file location --- community-mysql.spec | 9 ++++++--- my.cnf.in | 31 ++++++++++--------------------- server.cnf.in | 10 ++++++++++ 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/community-mysql.spec b/community-mysql.spec index 641dac9..a7bd572 100644 --- a/community-mysql.spec +++ b/community-mysql.spec @@ -65,7 +65,7 @@ Name: %{pkgname} Version: 5.6.22 -Release: 3%{?with_debug:.debug}%{?dist} +Release: 4%{?with_debug:.debug}%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases URL: http://www.mysql.com @@ -550,7 +550,7 @@ install -p -m 755 scripts/mysql-wait-ready %{buildroot}%{_libexecdir}/mysql-wait install -p -m 755 scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket install -p -m 755 scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common -install -D -p -m 0644 scripts/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf +install -D -p -m 0644 scripts/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkgname}-server.cnf # mysql-test includes one executable that doesn't belong under /usr/share, # so move it and provide a symlink @@ -838,7 +838,7 @@ fi %{_bindir}/resolve_stack_dump %{_bindir}/resolveip -%config(noreplace) %{_sysconfdir}/my.cnf.d/server.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/%{pkgname}-server.cnf %{_libexecdir}/mysqld @@ -938,6 +938,9 @@ fi %endif %changelog +* Sat Jan 24 2015 Honza Horak - 5.6.22-4 +- Move server settings to renamed config file under my.cnf.d dir + * Sat Jan 24 2015 Honza Horak - 5.6.22-3 - Fix path for sysconfig file Filter provides in el6 properly diff --git a/my.cnf.in b/my.cnf.in index edad8f7..247e12d 100644 --- a/my.cnf.in +++ b/my.cnf.in @@ -1,29 +1,18 @@ +# +# 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 -# /etc/my.cnf.d/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 # -!includedir /etc/my.cnf.d +!includedir @INSTALL_SYSCONF2DIR@ diff --git a/server.cnf.in b/server.cnf.in index 35e57a4..18d920c 100644 --- a/server.cnf.in +++ b/server.cnf.in @@ -9,7 +9,17 @@ [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] +