From 745e0f92099640719235fe5ffe70852200f61e93 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Mon, 22 Dec 2014 14:28:01 +0100 Subject: [PATCH] Fix macros paths in my.cnf Create old location for pid file if it remained in my.cnf --- mariadb.spec | 10 +++++++++- my.cnf.in | 4 ++-- mysql.tmpfiles.d.in | 1 - 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 48e64a7..0cf79c4 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -62,6 +62,7 @@ %bcond_without init_systemd %bcond_with init_sysv %global daemon_name %{name} +%global mysqld_pid_dir mysqld %else %bcond_with init_systemd %bcond_without init_sysv @@ -103,7 +104,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 2%{?with_debug:.debug}%{?dist} +Release: 3%{?with_debug:.debug}%{?dist} Epoch: 1 Summary: A community developed branch of MySQL @@ -677,6 +678,9 @@ rm -f %{buildroot}%{_sysconfdir}/my.cnf %if %{with init_systemd} install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf +%if 0%{?mysqld_pid_dir:1} +echo "d %{_localstatedir}/run/%{mysqld_pid_dir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf +%endif %endif # install SysV init script @@ -1133,6 +1137,10 @@ fi %endif %changelog +* Mon Dec 22 2014 Honza Horak - 1:10.0.15-3 +- Fix macros paths in my.cnf +- Create old location for pid file if it remained in my.cnf + * Fri Dec 05 2014 Honza Horak - 1:10.0.15-2 - Rework usage of macros and remove some compatibility artefacts diff --git a/my.cnf.in b/my.cnf.in index 660c40e..eff1259 100644 --- a/my.cnf.in +++ b/my.cnf.in @@ -17,8 +17,8 @@ symbolic-links=0 # @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_COMPAT@ -pid-file=@PID_FILE_DIR_COMPAT@/@DAEMON_NAME_COMPAT@.pid +log-error=@LOG_LOCATION@ +pid-file=@PID_FILE_DIR@/@DAEMON_NAME@.pid [mysqld_safe] diff --git a/mysql.tmpfiles.d.in b/mysql.tmpfiles.d.in index 937087a..d2c4b31 100644 --- a/mysql.tmpfiles.d.in +++ b/mysql.tmpfiles.d.in @@ -1,2 +1 @@ d @PID_FILE_DIR@ 0755 mysql mysql - -d @PID_FILE_DIR_COMPAT@ 0755 mysql mysql -