From dbbb1771045599f20e10c1b756f362eb5d789fee Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:48 +0200 Subject: [PATCH 01/17] Eliminate use of obsolete %patchN syntax (#2283636) --- mysql-mmm.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 256a4af..9650c98 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -90,9 +90,9 @@ Full documentation can be found at: EOF -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 find . -type f -name "*.orig" -print0 | xargs -0r rm %build From f3406d9a9feb375f4198a178c3b193f59d89d5b5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 19:00:58 +0000 Subject: [PATCH 02/17] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- mysql-mmm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 9650c98..4356af5 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -2,7 +2,7 @@ Name: mysql-mmm Version: 2.2.1 -Release: 33%{?dist} +Release: 34%{?dist} Summary: Multi-Master Replication Manager for MySQL License: GPLv2 URL: http://mysql-mmm.org @@ -173,6 +173,9 @@ make install DESTDIR=%{buildroot} %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 2.2.1-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jan 25 2024 Fedora Release Engineering - 2.2.1-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From dc3d348e17bb335f390435dfa80afe3dcad9ca64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 29 Jul 2024 11:26:25 +0200 Subject: [PATCH 03/17] convert GPLv2 license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- mysql-mmm.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 4356af5..db99707 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -2,9 +2,10 @@ Name: mysql-mmm Version: 2.2.1 -Release: 34%{?dist} +Release: 35%{?dist} Summary: Multi-Master Replication Manager for MySQL -License: GPLv2 +# Automatically converted from old format: GPLv2 - review is highly recommended. +License: GPL-2.0-only URL: http://mysql-mmm.org Source: http://mysql-mmm.org/_media/:mmm2:/%{name}-%{version}.tar.gz Source1: mysql-mmm.logrotate @@ -173,6 +174,9 @@ make install DESTDIR=%{buildroot} %changelog +* Mon Jul 29 2024 Miroslav Suchý - 2.2.1-35 +- convert license to SPDX + * Thu Jul 18 2024 Fedora Release Engineering - 2.2.1-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 8fc747b340f7f7f52f03b1059b46635ecbf8b7af Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 19:31:49 +0000 Subject: [PATCH 04/17] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- mysql-mmm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index db99707..38607f1 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -2,7 +2,7 @@ Name: mysql-mmm Version: 2.2.1 -Release: 35%{?dist} +Release: 36%{?dist} Summary: Multi-Master Replication Manager for MySQL # Automatically converted from old format: GPLv2 - review is highly recommended. License: GPL-2.0-only @@ -174,6 +174,9 @@ make install DESTDIR=%{buildroot} %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 2.2.1-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Jul 29 2024 Miroslav Suchý - 2.2.1-35 - convert license to SPDX From 68283407487c96aa85cd4972490e4f8db8a9f312 Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Sun, 2 Feb 2025 12:58:18 +1000 Subject: [PATCH 05/17] Fix for RPM changed patch syntax --- mysql-mmm.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 38607f1..8637375 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -2,7 +2,7 @@ Name: mysql-mmm Version: 2.2.1 -Release: 36%{?dist} +Release: 37%{?dist} Summary: Multi-Master Replication Manager for MySQL # Automatically converted from old format: GPLv2 - review is highly recommended. License: GPL-2.0-only @@ -91,9 +91,9 @@ Full documentation can be found at: EOF -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 +%patch -P 0 -p1 +%patch -P 1 -p1 +%patch -P 2 -p1 find . -type f -name "*.orig" -print0 | xargs -0r rm %build @@ -174,6 +174,9 @@ make install DESTDIR=%{buildroot} %changelog +* Sun Feb 02 2025 David Beveridge 2.2.1-37 +- fix patchN deprecated + * Fri Jan 17 2025 Fedora Release Engineering - 2.2.1-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 28ed288fe58a5d30241f0e7491612fe175cd352c Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Wed, 26 Mar 2025 18:04:50 +1000 Subject: [PATCH 06/17] Unify bin and sbin --- mysql-mmm.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 8637375..fb93221 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -2,7 +2,7 @@ Name: mysql-mmm Version: 2.2.1 -Release: 37%{?dist} +Release: 38%{?dist} Summary: Multi-Master Replication Manager for MySQL # Automatically converted from old format: GPLv2 - review is highly recommended. License: GPL-2.0-only @@ -150,16 +150,16 @@ make install DESTDIR=%{buildroot} %config(noreplace) %attr(644,root,root) %{_sysconfdir}/mysql-mmm/mmm_tools.conf %{perl_vendorlib}/MMM/Tools %{_libexecdir}/mysql-mmm/tools/ -%{_sbindir}/mmm_backup -%{_sbindir}/mmm_clone -%{_sbindir}/mmm_restore +%{_bindir}/mmm_backup +%{_bindir}/mmm_clone +%{_bindir}/mmm_restore %files agent %doc README %config(noreplace) %attr(640,root,root) %{_sysconfdir}/mysql-mmm/mmm_agent.conf %{perl_vendorlib}/MMM/Agent %{_libexecdir}/mysql-mmm/agent/ -%{_sbindir}/mmm_agentd +%{_bindir}/mmm_agentd %{_unitdir}/mysql-mmm-agent.service %files monitor @@ -168,12 +168,15 @@ make install DESTDIR=%{buildroot} %config(noreplace) %attr(640,root,root) %{_sysconfdir}/mysql-mmm/mmm_mon_log.conf %{perl_vendorlib}/MMM/Monitor %{_libexecdir}/mysql-mmm/monitor/ -%{_sbindir}/mmm_mond -%{_sbindir}/mmm_control +%{_bindir}/mmm_mond +%{_bindir}/mmm_control %{_unitdir}/mysql-mmm-monitor.service %changelog +* Wed Mar 26 2025 David Beveridge 2.2.1-38 +- Unify bin and sbin + * Sun Feb 02 2025 David Beveridge 2.2.1-37 - fix patchN deprecated From d34c8674ec53ef19435a31babf53e1329b51ccda Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Wed, 26 Mar 2025 19:20:02 +1000 Subject: [PATCH 07/17] move sbin to bin --- mysql-mmm-2.1.0-paths.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-mmm-2.1.0-paths.patch b/mysql-mmm-2.1.0-paths.patch index fb5be84..2a9d906 100644 --- a/mysql-mmm-2.1.0-paths.patch +++ b/mysql-mmm-2.1.0-paths.patch @@ -6,6 +6,6 @@ MODULEDIR = $(DESTDIR)$(shell eval "`perl -V:${INSTALLDIR}`"; echo "$$${INSTALLDIR}")/MMM -BINDIR = $(DESTDIR)/usr/lib/mysql-mmm +BINDIR = $(DESTDIR)/usr/libexec/mysql-mmm - SBINDIR = $(DESTDIR)/usr/sbin + SBINDIR = $(DESTDIR)/usr/bin LOGDIR = $(DESTDIR)/var/log/mysql-mmm ETCDIR = $(DESTDIR)/etc From 38606e46970bdef1937859dcf762250dc0d4c6cd Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Wed, 26 Mar 2025 19:22:43 +1000 Subject: [PATCH 08/17] move bin to sbin --- mysql-mmm-2.1.0-paths.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-mmm-2.1.0-paths.patch b/mysql-mmm-2.1.0-paths.patch index 2a9d906..57536f5 100644 --- a/mysql-mmm-2.1.0-paths.patch +++ b/mysql-mmm-2.1.0-paths.patch @@ -5,7 +5,8 @@ MODULEDIR = $(DESTDIR)$(shell eval "`perl -V:${INSTALLDIR}`"; echo "$$${INSTALLDIR}")/MMM -BINDIR = $(DESTDIR)/usr/lib/mysql-mmm +-SBINDIR = $(DESTDIR)/usr/sbin +BINDIR = $(DESTDIR)/usr/libexec/mysql-mmm - SBINDIR = $(DESTDIR)/usr/bin ++SBINDIR = $(DESTDIR)/usr/bin LOGDIR = $(DESTDIR)/var/log/mysql-mmm ETCDIR = $(DESTDIR)/etc From 9cc9477421d4c68ff627d673e2c1da5693e9a137 Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Wed, 26 Mar 2025 19:39:27 +1000 Subject: [PATCH 09/17] revert --- mysql-mmm-2.1.0-paths.patch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mysql-mmm-2.1.0-paths.patch b/mysql-mmm-2.1.0-paths.patch index 57536f5..fb5be84 100644 --- a/mysql-mmm-2.1.0-paths.patch +++ b/mysql-mmm-2.1.0-paths.patch @@ -5,8 +5,7 @@ MODULEDIR = $(DESTDIR)$(shell eval "`perl -V:${INSTALLDIR}`"; echo "$$${INSTALLDIR}")/MMM -BINDIR = $(DESTDIR)/usr/lib/mysql-mmm --SBINDIR = $(DESTDIR)/usr/sbin +BINDIR = $(DESTDIR)/usr/libexec/mysql-mmm -+SBINDIR = $(DESTDIR)/usr/bin + SBINDIR = $(DESTDIR)/usr/sbin LOGDIR = $(DESTDIR)/var/log/mysql-mmm ETCDIR = $(DESTDIR)/etc From 192d0da5a39c3bef63dc76bafe1e598bc057f693 Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Wed, 26 Mar 2025 19:53:24 +1000 Subject: [PATCH 10/17] install files --- mysql-mmm.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index fb93221..9d8773a 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -102,6 +102,8 @@ find . -type f -name "*.orig" -print0 | xargs -0r rm %install make install DESTDIR=%{buildroot} +%{__install} -p -m 755 mmm_agentd mmm_mond mmm_control mmm_backup mmm_clone mmm_restore %{buildroot}%{_bindir} + %{__install} -D -p -m 0644 %SOURCE1 %{buildroot}%{_sysconfdir}/logrotate.d/mysql-mmm %{__install} -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name} From a1ad1946b0fad447d9b48a04e4cdf9d2de96f487 Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Wed, 26 Mar 2025 20:02:19 +1000 Subject: [PATCH 11/17] mkdir --- mysql-mmm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 9d8773a..8477e59 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -102,6 +102,7 @@ find . -type f -name "*.orig" -print0 | xargs -0r rm %install make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}%{_bindir} %{__install} -p -m 755 mmm_agentd mmm_mond mmm_control mmm_backup mmm_clone mmm_restore %{buildroot}%{_bindir} %{__install} -D -p -m 0644 %SOURCE1 %{buildroot}%{_sysconfdir}/logrotate.d/mysql-mmm From 5934fe8d0bc6275816841a118f53a3869cb7623d Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Wed, 26 Mar 2025 20:11:24 +1000 Subject: [PATCH 12/17] folder --- mysql-mmm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 8477e59..cbb3f18 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -103,7 +103,7 @@ find . -type f -name "*.orig" -print0 | xargs -0r rm make install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_bindir} -%{__install} -p -m 755 mmm_agentd mmm_mond mmm_control mmm_backup mmm_clone mmm_restore %{buildroot}%{_bindir} +%{__install} -p -m 755 sbin/mmm_agentd sbin/mmm_mond sbin/mmm_control sbin/mmm_backup sbin/mmm_clone sbin/mmm_restore %{buildroot}%{_bindir} %{__install} -D -p -m 0644 %SOURCE1 %{buildroot}%{_sysconfdir}/logrotate.d/mysql-mmm %{__install} -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name} From 74fb19ac7028414e06e1738a1bacd08887a71b61 Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Wed, 26 Mar 2025 20:21:45 +1000 Subject: [PATCH 13/17] move --- mysql-mmm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index cbb3f18..6f10521 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -103,7 +103,7 @@ find . -type f -name "*.orig" -print0 | xargs -0r rm make install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_bindir} -%{__install} -p -m 755 sbin/mmm_agentd sbin/mmm_mond sbin/mmm_control sbin/mmm_backup sbin/mmm_clone sbin/mmm_restore %{buildroot}%{_bindir} +mv %{buildroot}/usr/sbin/mmm_* %{buildroot}%{_bindir} %{__install} -D -p -m 0644 %SOURCE1 %{buildroot}%{_sysconfdir}/logrotate.d/mysql-mmm %{__install} -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name} From 9d370f57a6b1b85de71a0be0172011fcd670c617 Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Fri, 4 Apr 2025 15:37:21 +1000 Subject: [PATCH 14/17] add notify-cmd feature and suppress-uninitialized-warning --- mysql-mmm-add-notify-cmd.patch | 50 ++ ...l-mmm-suppress-uninitialized-warning.patch | 564 ++++++++++++++++++ 2 files changed, 614 insertions(+) create mode 100644 mysql-mmm-add-notify-cmd.patch create mode 100644 mysql-mmm-suppress-uninitialized-warning.patch diff --git a/mysql-mmm-add-notify-cmd.patch b/mysql-mmm-add-notify-cmd.patch new file mode 100644 index 0000000..a3f8437 --- /dev/null +++ b/mysql-mmm-add-notify-cmd.patch @@ -0,0 +1,50 @@ +diff --git a/lib/Agent/Agent.pm b/lib/Agent/Agent.pm +index 2e2480b..c98f39a 100644 +--- a/lib/Agent/Agent.pm ++++ b/lib/Agent/Agent.pm +@@ -37,6 +37,7 @@ struct 'MMM::Agent::Agent' => { + mysql_password => '$', + writer_role => '$', + bin_path => '$', ++ notify_cmd => '$', + + active_master => '$', + state => '$', +@@ -50,6 +51,8 @@ sub main($) { + $self->roles([]); + $self->active_master(''); + ++ if ($self->notify_cmd) { system($self->notify_cmd); } ++ + while (!$main::shutdown) { + + DEBUG 'Listener: Waiting for connection...'; +@@ -236,6 +239,8 @@ sub cmd_set_status($$) { + foreach my $role (@added_roles) { $role->add(); } + + $self->roles(\@new_roles); ++ ++ if ($self->notify_cmd) { system($self->notify_cmd); } + } + + # Process state change +@@ -272,6 +277,7 @@ sub from_config($%) { + $self->mysql_password ($host->{agent_password}); + $self->writer_role ($config->{active_master_role}); + $self->bin_path ($host->{bin_path}); ++ $self->notify_cmd ($host->{notify_cmd}); + } + + 1; +diff --git a/lib/Common/Config.pm b/lib/Common/Config.pm +index 1870d5e..6c0af28 100644 +--- a/lib/Common/Config.pm ++++ b/lib/Common/Config.pm +@@ -99,6 +99,7 @@ our $RULESET = { + 'lvm_volume_group' => { 'required' => ['TOOLS'] }, + 'lvm_mount_dir' => { 'required' => ['TOOLS'] }, + 'lvm_mount_opts' => { 'required' => ['TOOLS'] }, ++ 'notify_cmd' => { 'default' => '' }, + } + }, + 'check' => { 'create_if_empty' => ['MONITOR'], 'multiple' => 1, 'template' => 'default', 'values' => ['ping', 'mysql', 'rep_backlog', 'rep_threads'], 'section' => { diff --git a/mysql-mmm-suppress-uninitialized-warning.patch b/mysql-mmm-suppress-uninitialized-warning.patch new file mode 100644 index 0000000..7906911 --- /dev/null +++ b/mysql-mmm-suppress-uninitialized-warning.patch @@ -0,0 +1,564 @@ +diff --git a/bin/agent/check_ip b/bin/agent/check_ip +index 8a91cf3..cbcdc32 100755 +--- a/bin/agent/check_ip ++++ b/bin/agent/check_ip +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Agent::Helpers::Actions; + + # Check arguments +diff --git a/bin/agent/clear_ip b/bin/agent/clear_ip +index e5cb697..c31d200 100755 +--- a/bin/agent/clear_ip ++++ b/bin/agent/clear_ip +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Agent::Helpers::Actions; + + # Check arguments +diff --git a/bin/agent/configure_ip b/bin/agent/configure_ip +index f8d2aab..9017020 100755 +--- a/bin/agent/configure_ip ++++ b/bin/agent/configure_ip +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Agent::Helpers::Actions; + + # Check arguments +diff --git a/bin/agent/mysql_allow_write b/bin/agent/mysql_allow_write +index 9383b69..d33bb7b 100755 +--- a/bin/agent/mysql_allow_write ++++ b/bin/agent/mysql_allow_write +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Config; + use MMM::Agent::Helpers::Actions; + +diff --git a/bin/agent/mysql_deny_write b/bin/agent/mysql_deny_write +index d9692d2..ad73cf0 100755 +--- a/bin/agent/mysql_deny_write ++++ b/bin/agent/mysql_deny_write +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Config; + use MMM::Agent::Helpers::Actions; + +diff --git a/bin/agent/mysql_may_write b/bin/agent/mysql_may_write +index 417742b..e3f9043 100755 +--- a/bin/agent/mysql_may_write ++++ b/bin/agent/mysql_may_write +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Config; + use MMM::Agent::Helpers::Actions; + +diff --git a/bin/agent/set_active_master b/bin/agent/set_active_master +index 9cd306e..df985d1 100755 +--- a/bin/agent/set_active_master ++++ b/bin/agent/set_active_master +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Config; + use MMM::Agent::Helpers::Actions; + +diff --git a/bin/agent/sync_with_master b/bin/agent/sync_with_master +index cc52712..06ebb5f 100755 +--- a/bin/agent/sync_with_master ++++ b/bin/agent/sync_with_master +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Config; + use MMM::Agent::Helpers::Actions; + +diff --git a/bin/agent/turn_off_slave b/bin/agent/turn_off_slave +index 0a468d3..b7b4214 100755 +--- a/bin/agent/turn_off_slave ++++ b/bin/agent/turn_off_slave +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Config; + use MMM::Agent::Helpers::Actions; + +diff --git a/bin/agent/turn_on_slave b/bin/agent/turn_on_slave +index d6ac262..3b2fb47 100755 +--- a/bin/agent/turn_on_slave ++++ b/bin/agent/turn_on_slave +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Config; + use MMM::Agent::Helpers::Actions; + +diff --git a/bin/monitor/checker b/bin/monitor/checker +index 345abf6..e7e30d7 100755 +--- a/bin/monitor/checker ++++ b/bin/monitor/checker +@@ -3,6 +3,7 @@ + # Use mandatory external modules + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( OUTPUT_AUTOFLUSH ); + use Log::Log4perl qw(:easy); + +diff --git a/bin/tools/create_snapshot b/bin/tools/create_snapshot +index 7538789..fe19ebd 100755 +--- a/bin/tools/create_snapshot ++++ b/bin/tools/create_snapshot +@@ -2,6 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use DBI; + use MMM::Common::Config; + use MMM::Tools::Snapshot::LVM; +diff --git a/bin/tools/remove_snapshot b/bin/tools/remove_snapshot +index 59f8d91..db24c3e 100755 +--- a/bin/tools/remove_snapshot ++++ b/bin/tools/remove_snapshot +@@ -2,6 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Config; + use MMM::Tools::Snapshot::LVM; + +diff --git a/lib/Agent/Agent.pm b/lib/Agent/Agent.pm +index c98f39a..31fa22c 100644 +--- a/lib/Agent/Agent.pm ++++ b/lib/Agent/Agent.pm +@@ -2,6 +2,7 @@ package MMM::Agent::Agent; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw(EVAL_ERROR); + use Algorithm::Diff; + use DBI; +diff --git a/lib/Agent/Helpers.pm b/lib/Agent/Helpers.pm +index c0155e4..33f3b91 100644 +--- a/lib/Agent/Helpers.pm ++++ b/lib/Agent/Helpers.pm +@@ -2,6 +2,7 @@ package MMM::Agent::Helpers; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + + our $VERSION = '0.01'; +diff --git a/lib/Agent/Helpers/Actions.pm b/lib/Agent/Helpers/Actions.pm +index c39b674..33e2102 100644 +--- a/lib/Agent/Helpers/Actions.pm ++++ b/lib/Agent/Helpers/Actions.pm +@@ -2,6 +2,7 @@ package MMM::Agent::Helpers::Actions; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Agent::Helpers::Network; + + our $VERSION = '0.01'; +diff --git a/lib/Agent/Helpers/Network.pm b/lib/Agent/Helpers/Network.pm +index b0d5a8b..38619bf 100644 +--- a/lib/Agent/Helpers/Network.pm ++++ b/lib/Agent/Helpers/Network.pm +@@ -2,6 +2,7 @@ package MMM::Agent::Helpers::Network; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( OSNAME ); + + our $VERSION = '0.01'; +diff --git a/lib/Agent/Role.pm b/lib/Agent/Role.pm +index b9723c2..a4e69cd 100644 +--- a/lib/Agent/Role.pm ++++ b/lib/Agent/Role.pm +@@ -3,6 +3,7 @@ use base 'MMM::Common::Role'; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use MMM::Agent::Helpers; + +diff --git a/lib/Common/Angel.pm b/lib/Common/Angel.pm +index 7ad7e88..ac49309 100644 +--- a/lib/Common/Angel.pm ++++ b/lib/Common/Angel.pm +@@ -2,6 +2,7 @@ package MMM::Common::Angel; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( CHILD_ERROR ERRNO ); + use Log::Log4perl qw(:easy); + use Errno qw( EINTR ); +diff --git a/lib/Common/Config.pm b/lib/Common/Config.pm +index 6c0af28..948a728 100644 +--- a/lib/Common/Config.pm ++++ b/lib/Common/Config.pm +@@ -2,6 +2,7 @@ package MMM::Common::Config; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( NR ); + use Log::Log4perl qw(:easy); + +diff --git a/lib/Common/Log.pm b/lib/Common/Log.pm +index ae3910b..3b527e5 100644 +--- a/lib/Common/Log.pm ++++ b/lib/Common/Log.pm +@@ -2,6 +2,7 @@ package MMM::Common::Log; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use English qw( PROGRAM_NAME ); + +diff --git a/lib/Common/PidFile.pm b/lib/Common/PidFile.pm +index 2de55eb..70b39b6 100644 +--- a/lib/Common/PidFile.pm ++++ b/lib/Common/PidFile.pm +@@ -2,6 +2,7 @@ package MMM::Common::PidFile; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( PROCESS_ID ); + use Log::Log4perl qw(:easy); + +diff --git a/lib/Common/Role.pm b/lib/Common/Role.pm +index 211ab5f..4f48172 100644 +--- a/lib/Common/Role.pm ++++ b/lib/Common/Role.pm +@@ -2,6 +2,7 @@ package MMM::Common::Role; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + + our $VERSION = '0.01'; + +diff --git a/lib/Common/Socket.pm b/lib/Common/Socket.pm +index 38e1f7b..a072ca9 100644 +--- a/lib/Common/Socket.pm ++++ b/lib/Common/Socket.pm +@@ -2,6 +2,7 @@ package MMM::Common::Socket; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use IO::Socket::INET; + +diff --git a/lib/Common/Uptime.pm b/lib/Common/Uptime.pm +index 4b7c71c..c8e0c55 100644 +--- a/lib/Common/Uptime.pm ++++ b/lib/Common/Uptime.pm +@@ -2,6 +2,7 @@ package MMM::Common::Uptime; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( OSNAME ); + use Log::Log4perl qw(:easy); + +diff --git a/lib/Monitor/Agent.pm b/lib/Monitor/Agent.pm +index a72c98c..f12a93a 100644 +--- a/lib/Monitor/Agent.pm ++++ b/lib/Monitor/Agent.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::Agent; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use MMM::Common::Socket; + use MMM::Monitor::ChecksStatus; +diff --git a/lib/Monitor/Agents.pm b/lib/Monitor/Agents.pm +index d1ba80a..12f3f99 100644 +--- a/lib/Monitor/Agents.pm ++++ b/lib/Monitor/Agents.pm +@@ -3,6 +3,7 @@ use base 'Class::Singleton'; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use IO::Handle; + use File::Temp; +diff --git a/lib/Monitor/CheckResult.pm b/lib/Monitor/CheckResult.pm +index cde4184..ec42a02 100644 +--- a/lib/Monitor/CheckResult.pm ++++ b/lib/Monitor/CheckResult.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::CheckResult; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use threads; + use threads::shared; +diff --git a/lib/Monitor/Checker.pm b/lib/Monitor/Checker.pm +index a4f2ea7..1a5fe52 100644 +--- a/lib/Monitor/Checker.pm ++++ b/lib/Monitor/Checker.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::Checker; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use IPC::Open2; + use MMM::Monitor::CheckResult; +diff --git a/lib/Monitor/Checker/Checks.pm b/lib/Monitor/Checker/Checks.pm +index 6e200b6..2eeeae3 100644 +--- a/lib/Monitor/Checker/Checks.pm ++++ b/lib/Monitor/Checker/Checks.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::Checker::Checks; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw(OSNAME EFFECTIVE_USER_ID); + use DBI; + use Net::Ping; +diff --git a/lib/Monitor/ChecksStatus.pm b/lib/Monitor/ChecksStatus.pm +index a68e159..6b1a9ca 100644 +--- a/lib/Monitor/ChecksStatus.pm ++++ b/lib/Monitor/ChecksStatus.pm +@@ -3,6 +3,7 @@ use base 'Class::Singleton'; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use MMM::Monitor::Checker + +diff --git a/lib/Monitor/Commands.pm b/lib/Monitor/Commands.pm +index 9503c8d..972fdac 100644 +--- a/lib/Monitor/Commands.pm ++++ b/lib/Monitor/Commands.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::Commands; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use List::Util qw(max); + use threads; +diff --git a/lib/Monitor/Monitor.pm b/lib/Monitor/Monitor.pm +index 7cf7dbf..f96503b 100644 +--- a/lib/Monitor/Monitor.pm ++++ b/lib/Monitor/Monitor.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::Monitor; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use threads; + use threads::shared; + use Algorithm::Diff; +diff --git a/lib/Monitor/NetworkChecker.pm b/lib/Monitor/NetworkChecker.pm +index 8529d11..1a6d2e2 100644 +--- a/lib/Monitor/NetworkChecker.pm ++++ b/lib/Monitor/NetworkChecker.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::NetworkChecker; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use MMM::Monitor::Checker; + +diff --git a/lib/Monitor/Role.pm b/lib/Monitor/Role.pm +index ec1ce46..725cce3 100644 +--- a/lib/Monitor/Role.pm ++++ b/lib/Monitor/Role.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::Role; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use MMM::Common::Role; + + our $VERSION = '0.01'; +diff --git a/lib/Monitor/Roles.pm b/lib/Monitor/Roles.pm +index c5fcda8..68b3d44 100644 +--- a/lib/Monitor/Roles.pm ++++ b/lib/Monitor/Roles.pm +@@ -3,6 +3,7 @@ use base 'Class::Singleton'; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + use MMM::Monitor::Agents; + use MMM::Monitor::Role; +diff --git a/lib/Monitor/StartupStatus.pm b/lib/Monitor/StartupStatus.pm +index b4ab43e..0051a03 100644 +--- a/lib/Monitor/StartupStatus.pm ++++ b/lib/Monitor/StartupStatus.pm +@@ -2,6 +2,7 @@ package MMM::Monitor::StartupStatus; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use List::Util qw(max); + use Log::Log4perl qw(:easy); + use MMM::Common::Role; +diff --git a/lib/Tools/MySQL.pm b/lib/Tools/MySQL.pm +index 505c162..4c2e81a 100644 +--- a/lib/Tools/MySQL.pm ++++ b/lib/Tools/MySQL.pm +@@ -2,6 +2,7 @@ package MMM::Tools::MySQL; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use DBI; + use Log::Log4perl qw(:easy); + +diff --git a/lib/Tools/Snapshot/LVM.pm b/lib/Tools/Snapshot/LVM.pm +index 8cad596..e9408e2 100644 +--- a/lib/Tools/Snapshot/LVM.pm ++++ b/lib/Tools/Snapshot/LVM.pm +@@ -2,6 +2,7 @@ package MMM::Tools::Snapshot::LVM; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Log::Log4perl qw(:easy); + + +diff --git a/lib/Tools/Snapshot/MySQL.pm b/lib/Tools/Snapshot/MySQL.pm +index 85300c0..510b916 100644 +--- a/lib/Tools/Snapshot/MySQL.pm ++++ b/lib/Tools/Snapshot/MySQL.pm +@@ -2,6 +2,7 @@ package MMM::Tools::Snapshot::MySQL; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use Data::Dumper; + use DBI; + use Log::Log4perl qw(:easy); +diff --git a/lib/Tools/Tools.pm b/lib/Tools/Tools.pm +index 5820cb9..b7f350c 100644 +--- a/lib/Tools/Tools.pm ++++ b/lib/Tools/Tools.pm +@@ -2,6 +2,7 @@ package MMM::Tools::Tools; + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw(FORMAT_NAME); + use Path::Class qw(dir); + use Log::Log4perl qw(:easy); +diff --git a/sbin/mmm_agentd b/sbin/mmm_agentd +index 343f5c1..af6a6b9 100755 +--- a/sbin/mmm_agentd ++++ b/sbin/mmm_agentd +@@ -2,6 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( PROGRAM_NAME ); + use File::Basename; + use Proc::Daemon; +diff --git a/sbin/mmm_backup b/sbin/mmm_backup +index fc7ae50..a105648 100755 +--- a/sbin/mmm_backup ++++ b/sbin/mmm_backup +@@ -2,6 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( PROGRAM_NAME ); + use File::Basename; + use Log::Log4perl qw(:easy); +diff --git a/sbin/mmm_clone b/sbin/mmm_clone +index 5217314..73c1ea8 100755 +--- a/sbin/mmm_clone ++++ b/sbin/mmm_clone +@@ -2,6 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( PROGRAM_NAME ); + use File::Basename; + use Log::Log4perl qw(:easy); +diff --git a/sbin/mmm_control b/sbin/mmm_control +index 597b9a1..95a2264 100755 +--- a/sbin/mmm_control ++++ b/sbin/mmm_control +@@ -2,6 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( PROGRAM_NAME ); + use File::Basename; + use Log::Log4perl qw(:easy); +diff --git a/sbin/mmm_mond b/sbin/mmm_mond +index 6f9643b..9ed50c2 100755 +--- a/sbin/mmm_mond ++++ b/sbin/mmm_mond +@@ -2,6 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use threads; + use threads::shared; + use Config; +diff --git a/sbin/mmm_restore b/sbin/mmm_restore +index 6dc9248..d80adaf 100755 +--- a/sbin/mmm_restore ++++ b/sbin/mmm_restore +@@ -2,6 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; ++no warnings 'uninitialized'; + use English qw( PROGRAM_NAME FORMAT_NAME ); + use File::Basename; + use Log::Log4perl qw(:easy); From 087cd3ab8dbb371d3073db3b5b1f680a2b70852f Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Fri, 4 Apr 2025 15:38:44 +1000 Subject: [PATCH 15/17] add notify-cmd feature and suppress-uninitialized-warning --- mysql-mmm.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 6f10521..de9913b 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -29,6 +29,8 @@ Provides: mysql-master-master = %{version}-%{release} Patch0: mysql-mmm-2.1.0-paths.patch Patch1: mysql-mmm-fix-bug-with-newer-net-arp.patch Patch2: mysql-mmm-fix-cve-remote-command-injection.patch +Patch3: mysql-mmm-add-notify-cmd.patch +Patch4: mysql-mmm-suppress-uninitialized-warning.patch %description MMM (MySQL Master-Master Replication Manager) is a set of flexible scripts @@ -94,6 +96,8 @@ EOF %patch -P 0 -p1 %patch -P 1 -p1 %patch -P 2 -p1 +%patch -P 3 -p1 +%patch -P 4 -p1 find . -type f -name "*.orig" -print0 | xargs -0r rm %build From 756c5ddc834999c6bca43c3652eb5b8df03d2410 Mon Sep 17 00:00:00 2001 From: David Beveridge Date: Sat, 5 Apr 2025 19:56:59 +1000 Subject: [PATCH 16/17] update changelog and release ver --- mysql-mmm-agent.service | 2 +- mysql-mmm-monitor.service | 2 +- mysql-mmm.spec | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mysql-mmm-agent.service b/mysql-mmm-agent.service index a4a0a97..3447f29 100644 --- a/mysql-mmm-agent.service +++ b/mysql-mmm-agent.service @@ -5,7 +5,7 @@ After=network.target mysqld.service [Service] Type=forking PIDFile=/run/mysql-mmm-agent.pid -ExecStart=/usr/sbin/mmm_agentd +ExecStart=/usr/bin/mmm_agentd PrivateTmp=true [Install] diff --git a/mysql-mmm-monitor.service b/mysql-mmm-monitor.service index 5086fc4..748a621 100644 --- a/mysql-mmm-monitor.service +++ b/mysql-mmm-monitor.service @@ -5,7 +5,7 @@ After=network.target mysqld.service [Service] Type=forking PIDFile=/run/mysql-mmm-monitor.pid -ExecStart=/usr/sbin/mmm_mond +ExecStart=/usr/bin/mmm_mond PrivateTmp=true [Install] diff --git a/mysql-mmm.spec b/mysql-mmm.spec index de9913b..13b1535 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -2,7 +2,7 @@ Name: mysql-mmm Version: 2.2.1 -Release: 38%{?dist} +Release: 39%{?dist} Summary: Multi-Master Replication Manager for MySQL # Automatically converted from old format: GPLv2 - review is highly recommended. License: GPL-2.0-only @@ -181,6 +181,11 @@ mv %{buildroot}/usr/sbin/mmm_* %{buildroot}%{_bindir} %changelog +* Sat Apr 05 2025 avid Beveridge 2.2.1-39 +- add feature notify_cmd +- suppress fatal escalation of uninitialized variables warning +- modify systemd unit files to refer to /usr/bin instead of /usr/sbin + * Wed Mar 26 2025 David Beveridge 2.2.1-38 - Unify bin and sbin From 0921d9a18298acccd8e93b3e1ff94c8270da797e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 22:33:13 +0000 Subject: [PATCH 17/17] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- mysql-mmm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-mmm.spec b/mysql-mmm.spec index 13b1535..46230de 100644 --- a/mysql-mmm.spec +++ b/mysql-mmm.spec @@ -2,7 +2,7 @@ Name: mysql-mmm Version: 2.2.1 -Release: 39%{?dist} +Release: 40%{?dist} Summary: Multi-Master Replication Manager for MySQL # Automatically converted from old format: GPLv2 - review is highly recommended. License: GPL-2.0-only @@ -181,6 +181,9 @@ mv %{buildroot}/usr/sbin/mmm_* %{buildroot}%{_bindir} %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 2.2.1-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sat Apr 05 2025 avid Beveridge 2.2.1-39 - add feature notify_cmd - suppress fatal escalation of uninitialized variables warning