diff --git a/0034-Fix-zlib-reboot-requirement-RhBug-2092033.patch b/0034-Fix-zlib-reboot-requirement-RhBug-2092033.patch new file mode 100644 index 0000000..5012638 --- /dev/null +++ b/0034-Fix-zlib-reboot-requirement-RhBug-2092033.patch @@ -0,0 +1,51 @@ +From b5e6219b12773b76f634641752fa6f194608e1ff Mon Sep 17 00:00:00 2001 +From: Nicola Sella +Date: Wed, 21 Jun 2023 15:21:57 +0200 +Subject: [PATCH] Fix zlib reboot requirement (RhBug:2092033) + +--- + plugins/needs_restarting.py | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/plugins/needs_restarting.py b/plugins/needs_restarting.py +index 8dbc965..3197fe1 100644 +--- a/plugins/needs_restarting.py ++++ b/plugins/needs_restarting.py +@@ -42,6 +42,8 @@ import time + NEED_REBOOT = ['kernel', 'kernel-rt', 'glibc', 'linux-firmware', + 'systemd', 'dbus', 'dbus-broker', 'dbus-daemon'] + ++NEED_REBOOT_DEPENDS_ON_DBUS = ['zlib'] ++ + def get_options_from_dir(filepath, base): + """ + Provide filepath as string if single dir or list of strings +@@ -277,15 +279,24 @@ class NeedsRestartingCommand(dnf.cli.Command): + NEED_REBOOT.extend(opt) + if self.opts.reboothint: + need_reboot = set() ++ need_reboot_depends_on_dbus = set() + installed = self.base.sack.query().installed() + for pkg in installed.filter(name=NEED_REBOOT): + if pkg.installtime > process_start.boot_time: + need_reboot.add(pkg.name) +- if need_reboot: ++ ++ dbus_installed = installed.filter(name=['dbus', 'dbus-daemon', 'dbus-broker']) ++ if len(dbus_installed) != 0: ++ for pkg in installed.filter(name=NEED_REBOOT_DEPENDS_ON_DBUS): ++ if pkg.installtime > process_start.boot_time: ++ need_reboot_depends_on_dbus.add(pkg.name) ++ if need_reboot or need_reboot_depends_on_dbus: + print(_('Core libraries or services have been updated ' + 'since boot-up:')) + for name in sorted(need_reboot): + print(' * %s' % name) ++ for name in sorted(need_reboot_depends_on_dbus): ++ print(' * %s (dependency of dbus. Recommending reboot of dbus)' % name) + print() + print(_('Reboot is required to fully utilize these updates.')) + print(_('More information:'), +-- +2.40.1 + diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec index 193e7d4..19a3dd1 100644 --- a/dnf-plugins-core.spec +++ b/dnf-plugins-core.spec @@ -34,7 +34,7 @@ Name: dnf-plugins-core Version: 4.0.21 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Core Plugins for DNF License: GPLv2+ URL: https://github.com/rpm-software-management/dnf-plugins-core @@ -72,6 +72,7 @@ Patch30: 0030-versionlock-Use-only-most-specif-NEVRA-RhBug-1961217.patch Patch31: 0031-Fix-boot-time-derivation-for-systems-with-no-rtc.patch Patch32: 0032-Doc-update-for-reposync-RhBug-2132383-2182004.patch Patch33: 0033-Add-fix-and-test-assertion-for-no-systemd-unit-exist.patch +Patch34: 0034-Fix-zlib-reboot-requirement-RhBug-2092033.patch BuildArch: noarch @@ -848,6 +849,9 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %endif %changelog +* Tue Jun 27 2023 Jaroslav Rohel - 4.0.21-23 +- Add patch: Fix zlib reboot requirement (RhBug:2092033) + * Wed May 31 2023 Nicola Sella - 4.0.21-22 - Add fix and test assertion for "no systemd unit exists for pid"