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