From 8080903e5cec5c5bb88547e8b26e5e1d8fe49748 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Wed, 18 Jul 2018 00:02:40 +0200 Subject: [PATCH] Use /var/log/mysql rather than /var/log/community-mysql Also use a temporary fix for the SELinux context --- community-mysql.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/community-mysql.spec b/community-mysql.spec index 67c22da..dd6a655 100644 --- a/community-mysql.spec +++ b/community-mysql.spec @@ -62,7 +62,7 @@ # We define some system's well known locations here so we can use them easily # later when building to another location (like SCL) %global logrotateddir %{_sysconfdir}/logrotate.d -%global logfiledir %{_localstatedir}/log/%{pkg_name} +%global logfiledir %{_localstatedir}/log/mysql %global logfile %{logfiledir}/%{daemon_no_prefix}.log # Defining where database data live @@ -708,6 +708,9 @@ fi if [ ! -e "%{logfile}" -a ! -h "%{logfile}" ] ; then install /dev/null -m0640 -omysql -gmysql "%{logfile}" fi +# TODO: remove after selinux-policy is fixed (BZ#1602153) +semanage fcontext -a -t mysqld_log_t %{logfiledir} +restorecon -r %{logfiledir} %preun server