forked from rpms/leapp-repository
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
From b41d5b386f3369cf714cff9f3277863f6f601bc1 Mon Sep 17 00:00:00 2001
|
|
From: denli <denli@redhat.com>
|
|
Date: Mon, 6 Oct 2025 12:25:07 -0400
|
|
Subject: [PATCH 22/55] Add kpatch actor to el9toel10
|
|
|
|
---
|
|
.../actors/kernel/checkkpatch/actor.py | 29 +++++++++++++++++++
|
|
1 file changed, 29 insertions(+)
|
|
create mode 100644 repos/system_upgrade/el9toel10/actors/kernel/checkkpatch/actor.py
|
|
|
|
diff --git a/repos/system_upgrade/el9toel10/actors/kernel/checkkpatch/actor.py b/repos/system_upgrade/el9toel10/actors/kernel/checkkpatch/actor.py
|
|
new file mode 100644
|
|
index 00000000..e7f6179c
|
|
--- /dev/null
|
|
+++ b/repos/system_upgrade/el9toel10/actors/kernel/checkkpatch/actor.py
|
|
@@ -0,0 +1,29 @@
|
|
+from leapp.actors import Actor
|
|
+from leapp.libraries.common.rpms import has_package
|
|
+from leapp.libraries.stdlib import api
|
|
+from leapp.models import CopyFile, DistributionSignedRPM, TargetUserSpacePreupgradeTasks
|
|
+from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
|
+
|
|
+PLUGIN_PKGNAME = "kpatch-dnf"
|
|
+CONFIG_PATH = "/etc/dnf/plugins/kpatch.conf"
|
|
+
|
|
+
|
|
+class CheckKpatch(Actor):
|
|
+ """
|
|
+ Carry over kpatch-dnf and it's config into the container
|
|
+
|
|
+ Check is kpatch-dnf plugin is installed and if it is, install it and copy
|
|
+ over the config file so that the plugin can make a decision on whether any
|
|
+ kpatch-patch packages need to be installed during in-place upgrade.
|
|
+ """
|
|
+
|
|
+ name = 'check_kpatch'
|
|
+ consumes = (DistributionSignedRPM,)
|
|
+ produces = (TargetUserSpacePreupgradeTasks,)
|
|
+ tags = (IPUWorkflowTag, ChecksPhaseTag)
|
|
+
|
|
+ def process(self):
|
|
+ if has_package(DistributionSignedRPM, PLUGIN_PKGNAME):
|
|
+ api.produce(TargetUserSpacePreupgradeTasks(
|
|
+ install_rpms=[PLUGIN_PKGNAME],
|
|
+ copy_files=[CopyFile(src=CONFIG_PATH)]))
|
|
--
|
|
2.51.1
|
|
|