Fix patching of logrotate

Apply the patch to the correct file, because we use a different one

Resolves: RHEL-5470
This commit is contained in:
Michal Schorm 2025-02-13 16:19:05 +00:00 committed by Lukas Javorsky
parent e4872978cc
commit 98a3b55b14
2 changed files with 39 additions and 18 deletions

View File

@ -1,17 +1,35 @@
diff -up mysql-8.0.35/support-files/mysql-log-rotate.in.origf mysql-8.0.35/support-files/mysql-log-rotate.in --- mysql-8.0.40/packaging/rpm-common/mysql.logrotate.in 2024-09-18 12:08:24.000000000 +0200
--- mysql-8.0.35/support-files/mysql-log-rotate.in.origf 2024-01-29 23:00:32.043257515 +0100 +++ mysql-8.0.40/packaging/rpm-common/mysql.logrotate.in_patched 2025-02-13 16:00:32.325677977 +0100
+++ mysql-8.0.35/support-files/mysql-log-rotate.in 2024-01-29 23:02:26.520440388 +0100 @@ -5,18 +5,6 @@
@@ -49,11 +49,7 @@ # [mysqld]
missingok # log-error=@LOGFILE_RPM@
compress #
postrotate -# For the mysqladmin commands below to work, root account
- # just if mysqld is really running -# password is required. Use mysql_config_editor(1) to store
- if test -x @bindir@/mysqladmin && \ -# authentication credentials in the encrypted login path file
- @bindir@/mysqladmin ping &>/dev/null -# ~/.mylogin.cnf
- then -#
- @bindir@/mysqladmin flush-logs -# Example usage:
- fi -#
+ # SIGUSR1 makes the daemon to flush the logs, no need to connect -# mysql_config_editor set --login-path=client --user=root --host=localhost --password
+ @bindir@/kill -USR1 $(systemctl show --property MainPID --value mysqld) -#
endscript -# When these actions has been done, un-comment the following to
} -# enable rotation of mysqld's log error.
-#
#@LOGFILE_RPM@ {
# create 640 mysql mysql
@@ -26,11 +14,7 @@
# missingok
# compress
# postrotate
-# # just if mysqld is really running
-# if test -x @bindir@/mysqladmin && \
-# @bindir@/mysqladmin ping &>/dev/null
-# then
-# @bindir@/mysqladmin flush-logs
-# fi
+# # SIGUSR1 makes the daemon to flush the logs, no need to connect through mysqladmin
+# @bindir@/kill -USR1 $(systemctl show --property MainPID --value mysqld)
# endscript
#}

View File

@ -78,7 +78,7 @@ ExcludeArch: %{ix86}
Name: mysql Name: mysql
Version: 8.0.41 Version: 8.0.41
Release: 1%{?with_debug:.debug}%{?dist} Release: 2%{?with_debug:.debug}%{?dist}
Summary: MySQL client programs and shared libraries Summary: MySQL client programs and shared libraries
URL: http://www.mysql.com URL: http://www.mysql.com
@ -986,6 +986,9 @@ fi
%endif %endif
%changelog %changelog
* Thu Feb 13 2025 Lukas Javorsky <ljavorsk@redhat.com> - 8.0.41-2
- Fix patching of logrotate
* Fri Feb 07 2025 Lukas Javorsky <ljavorsk@redhat.com> - 8.0.41-1 * Fri Feb 07 2025 Lukas Javorsky <ljavorsk@redhat.com> - 8.0.41-1
- Update to MySQL 8.0.41 - Update to MySQL 8.0.41