diff --git a/mysql-flush-logrotate.patch b/mysql-flush-logrotate.patch new file mode 100644 index 0000000..1e30f6a --- /dev/null +++ b/mysql-flush-logrotate.patch @@ -0,0 +1,17 @@ +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.35/support-files/mysql-log-rotate.in.origf 2024-01-29 23:00:32.043257515 +0100 ++++ mysql-8.0.35/support-files/mysql-log-rotate.in 2024-01-29 23:02:26.520440388 +0100 +@@ -49,11 +49,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 ++ @bindir@/kill -USR1 $(systemctl show --property MainPID --value mysqld) + endscript + } diff --git a/mysql.spec b/mysql.spec index 5037b4d..32383b6 100644 --- a/mysql.spec +++ b/mysql.spec @@ -78,7 +78,7 @@ ExcludeArch: %{ix86} Name: mysql Version: 8.0.37 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Summary: MySQL client programs and shared libraries URL: http://www.mysql.com @@ -121,6 +121,7 @@ Patch52: %{pkgnamepatch}-rpath.patch Patch53: %{pkgnamepatch}-mtr.patch Patch54: %{pkgnamepatch}-arm32-timer.patch Patch55: %{pkgnamepatch}-c99.patch +Patch56: %{pkgnamepatch}-flush-logrotate.patch # Patches taken from boost 1.59 Patch111: boost-1.58.0-pool.patch @@ -394,6 +395,7 @@ the MySQL sources. %patch -P53 -p1 %patch -P54 -p1 %patch -P55 -p1 +%patch -P56 -p1 # Patch Boost pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) @@ -984,6 +986,9 @@ fi %endif %changelog +* Fri Apr 19 2024 Honza Horak - 8.0.37-2 +- Use signal to flush logs when rotating + * Thu Apr 18 2024 Lars Tangvald - 8.0.37-1 - Update to MySQL 8.0.37 - Remove some legacy cmake options