diff --git a/0036-Update-need_reboot-for-dnf-automatic.patch b/0036-Update-need_reboot-for-dnf-automatic.patch new file mode 100644 index 0000000..3771b71 --- /dev/null +++ b/0036-Update-need_reboot-for-dnf-automatic.patch @@ -0,0 +1,29 @@ +From ed14b8c8425c6fb6dbade3028ac0118086052b1b Mon Sep 17 00:00:00 2001 +From: Klaas Demter +Date: Tue, 15 Oct 2024 11:58:15 +0200 +Subject: [PATCH] Update need_reboot for dnf-automatic + +The need_reboot from dnf-automatic did not match NEED_REBOOT from +needs-restarting. +--- + dnf/base.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dnf/base.py b/dnf/base.py +index 13222407..168207b5 100644 +--- a/dnf/base.py ++++ b/dnf/base.py +@@ -2832,8 +2832,8 @@ class Base(object): + + # List taken from DNF needs-restarting + need_reboot = frozenset(('kernel', 'kernel-rt', 'glibc', +- 'linux-firmware', 'systemd', 'dbus', +- 'dbus-broker', 'dbus-daemon')) ++ 'linux-firmware', 'systemd', 'dbus', ++ 'dbus-broker', 'dbus-daemon', 'microcode_ctl')) + changed_pkgs = self.transaction.install_set | self.transaction.remove_set + return any(pkg.name in need_reboot for pkg in changed_pkgs) + +-- +2.47.1 + diff --git a/0037-automatic-Fix-incorrect-Error-class-instantiation.patch b/0037-automatic-Fix-incorrect-Error-class-instantiation.patch new file mode 100644 index 0000000..9d18a14 --- /dev/null +++ b/0037-automatic-Fix-incorrect-Error-class-instantiation.patch @@ -0,0 +1,27 @@ +From c57c26e0cf8a3bba061f5ddf619c40f36a94aab9 Mon Sep 17 00:00:00 2001 +From: Marek Blaha +Date: Thu, 12 Dec 2024 08:09:48 +0100 +Subject: [PATCH] automatic: Fix incorrect Error class instantiation + +dnf.exceptions.Error class constructor accepts only one argument - error +message. +--- + dnf/automatic/main.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dnf/automatic/main.py b/dnf/automatic/main.py +index 5ca4ad39..51057dfb 100644 +--- a/dnf/automatic/main.py ++++ b/dnf/automatic/main.py +@@ -378,7 +378,7 @@ def main(args): + (conf.commands.reboot == 'when-needed' and base.reboot_needed())): + exit_code = os.waitstatus_to_exitcode(os.system(conf.commands.reboot_command)) + if exit_code != 0: +- raise dnf.exceptions.Error('reboot command returned nonzero exit code: %d', exit_code) ++ raise dnf.exceptions.Error('reboot command returned nonzero exit code: %d' % exit_code) + except Exception as exc: + logger.error(_('Error: %s'), ucd(exc)) + if conf is not None and conf.emitters.send_error_messages and emitters is not None: +-- +2.47.1 + diff --git a/dnf.spec b/dnf.spec index e4d0216..344cd84 100644 --- a/dnf.spec +++ b/dnf.spec @@ -69,7 +69,7 @@ It supports RPMs, modules and comps groups & environments. Name: dnf Version: 4.14.0 -Release: 22%{?dist} +Release: 23%{?dist} Summary: %{pkg_summary} # For a breakdown of the licensing, see PACKAGE-LICENSING License: GPLv2+ @@ -110,6 +110,8 @@ Patch32: 0032-Allow-downloadonly-on-read-only-bootc-system.patch Patch33: 0033-automatic-Check-availability-of-config-file.patch Patch34: 0034-automatic-emitters-send-error-messages.patch Patch35: 0035-automatic-Enhance-errors-reporting.patch +Patch36: 0036-Update-need_reboot-for-dnf-automatic.patch +Patch37: 0037-automatic-Fix-incorrect-Error-class-instantiation.patch BuildArch: noarch BuildRequires: cmake @@ -398,6 +400,9 @@ popd %{python3_sitelib}/%{name}/automatic/ %changelog +* Thu Dec 12 2024 Marek Blaha - 4.14.0-23 +- automatic: Update need_reboot to match needs-restarting (RHEL-62830) + * Wed Dec 11 2024 Marek Blaha - 4.14.0-22 - automatic: Added feature to allow emitters to invoke on dnf error (RHEL-45505, RHEL-61882)