From 0cf9d8adb12b40f4cdcd423e6c55c11e0fbacff5 Mon Sep 17 00:00:00 2001 From: denli Date: Tue, 7 Oct 2025 08:09:58 -0400 Subject: [PATCH 23/55] move kpatch actor to common repo --- .../actors/kernel/checkkpatch/actor.py | 0 .../actors/kernel/checkkpatch/actor.py | 29 ------------------- 2 files changed, 29 deletions(-) rename repos/system_upgrade/{el8toel9 => common}/actors/kernel/checkkpatch/actor.py (100%) delete mode 100644 repos/system_upgrade/el9toel10/actors/kernel/checkkpatch/actor.py diff --git a/repos/system_upgrade/el8toel9/actors/kernel/checkkpatch/actor.py b/repos/system_upgrade/common/actors/kernel/checkkpatch/actor.py similarity index 100% rename from repos/system_upgrade/el8toel9/actors/kernel/checkkpatch/actor.py rename to repos/system_upgrade/common/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 deleted file mode 100644 index e7f6179c..00000000 --- a/repos/system_upgrade/el9toel10/actors/kernel/checkkpatch/actor.py +++ /dev/null @@ -1,29 +0,0 @@ -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