From 5692c7a1f4cd28de4717a53cec24282f36decb25 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 11 Aug 2022 15:31:49 +0200 Subject: [PATCH] Fix the logrotate file The sources contains two versions of the logrotate file: * mysql-8.0.30/support-files/mysql-log-rotate.in * mysql-8.0.30/packaging/rpm-common/mysql.logrotate.in Until now, the first one was used. However logfile location specified in that logrotate configuration file was wrong. ( /var/lib/mysql/mysqld.log ) From now on, we will use the second one, which is meant to be used in RPM packages, and which respects their FSH layout. ( /var/log/mysql/mysqld.log ) -- As a side-effect, the whole configuration is now commented out. So users now need to touch the file before they can start using it. However once the configuration is un-commented, it will work out-of-the-box (unlike until now). -- Resolves: #2073434 --- community-mysql.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/community-mysql.spec b/community-mysql.spec index f95c949..9e0964b 100644 --- a/community-mysql.spec +++ b/community-mysql.spec @@ -543,10 +543,12 @@ install -D -p -m 0644 %{_vpath_builddir}/scripts/server.cnf %{buildroot}%{_sysco rm %{buildroot}%{_libdir}/mysql/*.a rm %{buildroot}%{_mandir}/man1/comp_err.1* -# put logrotate script where it needs to be +# Put logrotate script where it needs to be mkdir -p %{buildroot}%{logrotateddir} -mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} -chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} +# Remove the wrong file +rm %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate +# Install the correct one (meant for FSH layout in RPM packages) +install -D -m 0644 %{_vpath_builddir}/packaging/rpm-common/mysql.logrotate %{buildroot}%{logrotateddir}/%{daemon_name} mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf