From 5e9c87fe782a24beeeaa44bd3da26c9b263b35cb Mon Sep 17 00:00:00 2001 From: Jaroslav Rohel Date: Mon, 26 Jun 2023 16:16:02 +0200 Subject: [PATCH] Backport patch: "system-upgrade: Wait until the upgrade is done before" --- .dnf-plugins-core.metadata | 1 + ...it_until_upgrade_done_before_poweoff.patch | 32 +++++++++++++++++++ dnf-plugins-core.spec | 6 +++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .dnf-plugins-core.metadata create mode 100644 0010-sys-upgrade_Wait_until_upgrade_done_before_poweoff.patch diff --git a/.dnf-plugins-core.metadata b/.dnf-plugins-core.metadata new file mode 100644 index 0000000..6399e11 --- /dev/null +++ b/.dnf-plugins-core.metadata @@ -0,0 +1 @@ +d9a1561a5c4d238340b3db6d081c70b86841c291 dnf-plugins-core-4.3.0.tar.gz diff --git a/0010-sys-upgrade_Wait_until_upgrade_done_before_poweoff.patch b/0010-sys-upgrade_Wait_until_upgrade_done_before_poweoff.patch new file mode 100644 index 0000000..16eaf5f --- /dev/null +++ b/0010-sys-upgrade_Wait_until_upgrade_done_before_poweoff.patch @@ -0,0 +1,32 @@ +From 7475f8df6d903764eaf8baaa87ec7a3a1a4d888c Mon Sep 17 00:00:00 2001 +From: Jan Kolarik +Date: Fri, 9 Jun 2023 11:57:33 +0000 +Subject: [PATCH] system-upgrade: Wait until the upgrade is done before + poweroff (RhBug:2211844) + +Add a systemd dependency to wait until upgrade service is finished before executing the poweroff when passing the `--poweroff` option in `system-upgrade` plugin. + += changelog = +msg: Fix systemd dependencies when using --poweroff option in system-upgrade plugin +type: bugfix +resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2211844 +--- + etc/systemd/dnf-system-upgrade.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/etc/systemd/dnf-system-upgrade.service b/etc/systemd/dnf-system-upgrade.service +index 2d23cfe..3e15920 100644 +--- a/etc/systemd/dnf-system-upgrade.service ++++ b/etc/systemd/dnf-system-upgrade.service +@@ -6,7 +6,7 @@ Documentation=http://www.freedesktop.org/wiki/Software/systemd/SystemUpdates + DefaultDependencies=no + Requires=sysinit.target + After=sysinit.target systemd-journald.socket system-update-pre.target +-Before=shutdown.target system-update.target ++Before=poweroff.target reboot.target shutdown.target system-update.target + OnFailure=dnf-system-upgrade-cleanup.service + + [Service] +-- +2.40.1 + diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec index c345a34..36ef4d2 100644 --- a/dnf-plugins-core.spec +++ b/dnf-plugins-core.spec @@ -34,7 +34,7 @@ Name: dnf-plugins-core Version: 4.3.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Core Plugins for DNF License: GPLv2+ URL: https://github.com/rpm-software-management/dnf-plugins-core @@ -48,6 +48,7 @@ Patch6: 0006-Fix-boot-time-derivation-for-systems-with-no-rtc.patch Patch7: 0007-system-upgrade-Add-poweroff-option-to-reboot-subcomm.patch Patch8: 0008-Doc-update-for-reposync-RhBug-2132383-2182004.patch Patch9: 0009-Add-fix-and-test-assertion-for-no-systemd-unit-exist.patch +Patch10: 0010-sys-upgrade_Wait_until_upgrade_done_before_poweoff.patch BuildArch: noarch BuildRequires: cmake @@ -795,6 +796,9 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %endif %changelog +* Mon Jun 26 2023 Jaroslav Rohel - 4.3.0-9 +- system-upgrade: Wait until the upgrade is done before poweroff (RhBug:2214510) + * Wed May 31 2023 Nicola Sella - 4.3.0-8 - Add fix and test assertion for "no systemd unit exists for pid"