Use /var/log/mysql rather than /var/log/community-mysql

Also use a temporary fix for the SELinux context
This commit is contained in:
Honza Horak 2018-07-18 00:02:40 +02:00
parent b404ef3110
commit ba09688213
1 changed files with 4 additions and 1 deletions

View File

@ -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