Backport patch: "system-upgrade: Wait until the upgrade is done before"

This commit is contained in:
Jaroslav Rohel 2023-06-26 16:16:02 +02:00 committed by root
parent 607acc86a0
commit 5e9c87fe78
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1 @@
d9a1561a5c4d238340b3db6d081c70b86841c291 dnf-plugins-core-4.3.0.tar.gz

View File

@ -0,0 +1,32 @@
From 7475f8df6d903764eaf8baaa87ec7a3a1a4d888c Mon Sep 17 00:00:00 2001
From: Jan Kolarik <jkolarik@redhat.com>
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

View File

@ -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 <jrohel@redhat.com> - 4.3.0-9
- system-upgrade: Wait until the upgrade is done before poweroff (RhBug:2214510)
* Wed May 31 2023 Nicola Sella <nsella@redhat.com> - 4.3.0-8
- Add fix and test assertion for "no systemd unit exists for pid"