From 0981d9fec96e97f7e2e2d42b422357ec10540ccc Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 11 Dec 2023 11:23:12 +0100 Subject: [PATCH 48/60] Distribution agnostick check of signed packages [2/2] Update all present actors to consume DistributionSignedRPM msg instead of InstalledRedHatSignedRPM. git grep -l InstalledRedHatSignedRPM |grep -v repos/system_upgrade/common/models/installedrpm.py | xargs sed - i 's/InstalledRedHatSignedRPM/DistributionSignedRPM/g' --- .../system_upgrade/common/actors/baculacheck/actor.py | 4 ++-- .../actors/baculacheck/libraries/baculacheck.py | 4 ++-- .../actors/baculacheck/tests/test_baculacheck.py | 4 ++-- .../cloud/checkrhui/tests/component_test_checkrhui.py | 1 - .../common/actors/filterrpmtransactionevents/actor.py | 6 +++--- .../tests/test_filterrpmtransactionevents.py | 4 ++-- .../system_upgrade/common/actors/ipascanner/actor.py | 8 ++++---- .../common/actors/ipascanner/tests/test_ipascanner.py | 4 ++-- .../actors/kernel/checkinstalledkernels/actor.py | 4 ++-- .../libraries/checkinstalledkernels.py | 4 ++-- .../tests/unit_test_checkinstalledkernels.py | 4 ++-- .../common/actors/peseventsscanner/actor.py | 4 ++-- .../peseventsscanner/libraries/pes_events_scanner.py | 8 ++++---- .../peseventsscanner/tests/test_pes_event_scanner.py | 4 ++-- .../rpmtransactionconfigtaskscollector/actor.py | 4 ++-- .../libraries/rpmtransactionconfigtaskscollector.py | 4 ++-- ...t_load_tasks_rpmtransactionconfigtaskscollector.py | 4 ++-- .../actors/scandynamiclinkerconfiguration/actor.py | 4 ++-- .../libraries/scandynamiclinkerconfiguration.py | 4 ++-- .../tests/test_scandynamiclinkerconfiguration.py | 4 ++-- .../common/actors/scansourcekernel/actor.py | 4 ++-- .../scansourcekernel/libraries/scan_source_kernel.py | 4 ++-- .../common/actors/usedrepositoriesscanner/actor.py | 11 +++-------- .../tests/test_usedrepositoriesscanner.py | 4 ++-- repos/system_upgrade/common/libraries/rpms.py | 2 +- .../el7toel8/actors/bindupdate/actor.py | 6 +++--- .../el7toel8/actors/checkacpid/actor.py | 6 +++--- .../checkacpid/tests/component_test_checkacpid.py | 4 ++-- .../system_upgrade/el7toel8/actors/checkbind/actor.py | 6 +++--- .../el7toel8/actors/checkbrltty/actor.py | 6 +++--- .../checkbrltty/tests/component_test_checkbrltty.py | 4 ++-- .../el7toel8/actors/checkchrony/actor.py | 6 +++--- .../el7toel8/actors/checkdosfstools/actor.py | 6 +++--- .../tests/component_test_checkdosfstools.py | 4 ++-- .../system_upgrade/el7toel8/actors/checkgrep/actor.py | 6 +++--- .../checkgrep/tests/component_test_checkgrep.py | 4 ++-- .../el7toel8/actors/checkirssi/actor.py | 6 +++--- .../checkirssi/tests/component_test_checkirssi.py | 4 ++-- .../el7toel8/actors/checkmemcached/actor.py | 6 +++--- .../system_upgrade/el7toel8/actors/checkntp/actor.py | 6 +++--- .../el7toel8/actors/checkpostfix/actor.py | 6 +++--- .../checkpostfix/tests/component_test_checkpostfix.py | 4 ++-- .../el7toel8/actors/checksendmail/actor.py | 6 +++--- .../tests/component_test_checksendmail.py | 4 ++-- .../el7toel8/actors/checkwireshark/actor.py | 6 +++--- .../tests/component_test_checkwireshark.py | 6 +++--- .../el7toel8/actors/cupsfiltersmigrate/actor.py | 4 ++-- .../libraries/cupsfiltersmigrate.py | 4 ++-- .../el7toel8/actors/cupsscanner/actor.py | 4 ++-- .../actors/cupsscanner/libraries/cupsscanner.py | 4 ++-- .../checkinstalleddebugkernels/actor.py | 4 ++-- .../libraries/checkinstalleddebugkernels.py | 4 ++-- .../tests/unit_test_checkinstalleddebugkernels.py | 4 ++-- .../checkinstalleddevelkernels/actor.py | 4 ++-- .../libraries/checkinstalleddevelkernels.py | 4 ++-- .../tests/unit_test_checkinstalleddevelkernels.py | 4 ++-- .../el7toel8/actors/multipathconfread/actor.py | 4 ++-- .../multipathconfread/libraries/multipathconfread.py | 4 ++-- .../el7toel8/actors/postgresqlcheck/actor.py | 4 ++-- .../postgresqlcheck/libraries/postgresqlcheck.py | 6 +++--- .../postgresqlcheck/tests/test_postgresqlcheck.py | 4 ++-- .../system_upgrade/el7toel8/actors/powertop/actor.py | 6 +++--- .../actors/powertop/tests/component_test_powertop.py | 4 ++-- .../el7toel8/actors/quaggadaemons/actor.py | 6 +++--- .../el7toel8/actors/sanebackendsmigrate/actor.py | 4 ++-- .../libraries/sanebackendsmigrate.py | 4 ++-- .../el7toel8/actors/spamassassinconfigread/actor.py | 4 ++-- .../libraries/spamassassinconfigread.py | 4 ++-- .../el7toel8/actors/tcpwrapperscheck/actor.py | 6 +++--- .../tcpwrapperscheck/libraries/tcpwrapperscheck.py | 2 +- .../el7toel8/actors/vimmigrate/actor.py | 4 ++-- .../actors/vimmigrate/libraries/vimmigrate.py | 4 ++-- .../el7toel8/actors/vsftpdconfigread/actor.py | 6 +++--- .../tests/test_library_vsftpdconfigread.py | 6 +++--- repos/system_upgrade/el8toel9/actors/dotnet/actor.py | 6 +++--- .../el8toel9/actors/dotnet/tests/test_dotnet.py | 4 ++-- .../el8toel9/actors/kernel/checkkpatch/actor.py | 6 +++--- .../el8toel9/actors/mariadbcheck/actor.py | 4 ++-- .../actors/mariadbcheck/libraries/mariadbcheck.py | 4 ++-- .../actors/mariadbcheck/tests/test_mariadbcheck.py | 4 ++-- .../el8toel9/actors/multipathconfread/actor.py | 4 ++-- .../multipathconfread/libraries/multipathconfread.py | 4 ++-- .../system_upgrade/el8toel9/actors/nischeck/actor.py | 4 ++-- .../el8toel9/actors/nischeck/libraries/nischeck.py | 4 ++-- .../el8toel9/actors/nischeck/tests/test_nischeck.py | 4 ++-- .../el8toel9/actors/opensshdropindirectory/actor.py | 4 ++-- .../libraries/opensshdropindirectory.py | 4 ++-- .../actors/opensshdropindirectorycheck/actor.py | 6 +++--- .../el8toel9/actors/opensshsubsystemsftp/actor.py | 4 ++-- .../el8toel9/actors/postgresqlcheck/actor.py | 4 ++-- .../postgresqlcheck/libraries/postgresqlcheck.py | 4 ++-- .../postgresqlcheck/tests/test_postgresqlcheck.py | 4 ++-- .../el8toel9/actors/vdoconversionscanner/actor.py | 4 ++-- .../libraries/vdoconversionscanner.py | 4 ++-- 94 files changed, 213 insertions(+), 219 deletions(-) diff --git a/repos/system_upgrade/common/actors/baculacheck/actor.py b/repos/system_upgrade/common/actors/baculacheck/actor.py index d206e3c0..160f2d8d 100644 --- a/repos/system_upgrade/common/actors/baculacheck/actor.py +++ b/repos/system_upgrade/common/actors/baculacheck/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor.baculacheck import report_installed_packages -from leapp.models import InstalledRedHatSignedRPM, Report +from leapp.models import DistributionSignedRPM, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,7 +12,7 @@ class BaculaCheck(Actor): with Bacula installed. """ name = 'bacula_check' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/common/actors/baculacheck/libraries/baculacheck.py b/repos/system_upgrade/common/actors/baculacheck/libraries/baculacheck.py index f8ae155a..44fa343d 100644 --- a/repos/system_upgrade/common/actors/baculacheck/libraries/baculacheck.py +++ b/repos/system_upgrade/common/actors/baculacheck/libraries/baculacheck.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM # Summary for bacula-director report report_director_inst_summary = ( @@ -43,7 +43,7 @@ def report_installed_packages(_context=api): Create the report if the bacula-director rpm (RH signed) is installed. """ - has_director = has_package(InstalledRedHatSignedRPM, 'bacula-director', context=_context) + has_director = has_package(DistributionSignedRPM, 'bacula-director', context=_context) if has_director: # bacula-director diff --git a/repos/system_upgrade/common/actors/baculacheck/tests/test_baculacheck.py b/repos/system_upgrade/common/actors/baculacheck/tests/test_baculacheck.py index 6f81d5f7..3b61e892 100644 --- a/repos/system_upgrade/common/actors/baculacheck/tests/test_baculacheck.py +++ b/repos/system_upgrade/common/actors/baculacheck/tests/test_baculacheck.py @@ -4,7 +4,7 @@ from leapp import reporting from leapp.libraries.actor.baculacheck import report_installed_packages from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM def _generate_rpm_with_name(name): @@ -50,7 +50,7 @@ def test_actor_execution(monkeypatch, has_director): # Add bacula-director rpms += [_generate_rpm_with_name('bacula-director')] - curr_actor_mocked = CurrentActorMocked(msgs=[InstalledRedHatSignedRPM(items=rpms)]) + curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms)]) monkeypatch.setattr(api, 'current_actor', curr_actor_mocked) monkeypatch.setattr(reporting, "create_report", create_report_mocked()) diff --git a/repos/system_upgrade/common/actors/cloud/checkrhui/tests/component_test_checkrhui.py b/repos/system_upgrade/common/actors/cloud/checkrhui/tests/component_test_checkrhui.py index 93f13a00..aa0089b6 100644 --- a/repos/system_upgrade/common/actors/cloud/checkrhui/tests/component_test_checkrhui.py +++ b/repos/system_upgrade/common/actors/cloud/checkrhui/tests/component_test_checkrhui.py @@ -13,7 +13,6 @@ from leapp.libraries.common.testutils import create_report_mocked, CurrentActorM from leapp.libraries.stdlib import api from leapp.models import ( CopyFile, - InstalledRedHatSignedRPM, InstalledRPM, RequiredTargetUserspacePackages, RHUIInfo, diff --git a/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py b/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py index e0d89d9f..5ccdb35b 100644 --- a/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py +++ b/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py @@ -1,7 +1,7 @@ from leapp.actors import Actor from leapp.models import ( + DistributionSignedRPM, FilteredRpmTransactionTasks, - InstalledRedHatSignedRPM, PESRpmTransactionTasks, RpmTransactionTasks ) @@ -18,13 +18,13 @@ class FilterRpmTransactionTasks(Actor): """ name = 'check_rpm_transaction_events' - consumes = (PESRpmTransactionTasks, RpmTransactionTasks, InstalledRedHatSignedRPM,) + consumes = (PESRpmTransactionTasks, RpmTransactionTasks, DistributionSignedRPM,) produces = (FilteredRpmTransactionTasks,) tags = (IPUWorkflowTag, ChecksPhaseTag) def process(self): installed_pkgs = set() - for rpm_pkgs in self.consume(InstalledRedHatSignedRPM): + for rpm_pkgs in self.consume(DistributionSignedRPM): installed_pkgs.update([pkg.name for pkg in rpm_pkgs.items]) local_rpms = set() diff --git a/repos/system_upgrade/common/actors/filterrpmtransactionevents/tests/test_filterrpmtransactionevents.py b/repos/system_upgrade/common/actors/filterrpmtransactionevents/tests/test_filterrpmtransactionevents.py index 501cf142..7173805e 100644 --- a/repos/system_upgrade/common/actors/filterrpmtransactionevents/tests/test_filterrpmtransactionevents.py +++ b/repos/system_upgrade/common/actors/filterrpmtransactionevents/tests/test_filterrpmtransactionevents.py @@ -1,4 +1,4 @@ -from leapp.models import FilteredRpmTransactionTasks, InstalledRedHatSignedRPM, Module, RPM, RpmTransactionTasks +from leapp.models import DistributionSignedRPM, FilteredRpmTransactionTasks, Module, RPM, RpmTransactionTasks from leapp.snactor.fixture import current_actor_context RH_PACKAGER = 'Red Hat, Inc. ' @@ -17,7 +17,7 @@ def test_actor_execution_with_sample_data(current_actor_context): pgpsig='SOME_PGP_SIG')] modules_to_enable = [Module(name='enable', stream='1'), Module(name='enable', stream='2')] modules_to_reset = [Module(name='reset', stream='1'), Module(name='reset', stream='2')] - current_actor_context.feed(InstalledRedHatSignedRPM(items=installed_rpm)) + current_actor_context.feed(DistributionSignedRPM(items=installed_rpm)) current_actor_context.feed(RpmTransactionTasks( to_remove=[rpm.name for rpm in installed_rpm], to_keep=[installed_rpm[0].name], diff --git a/repos/system_upgrade/common/actors/ipascanner/actor.py b/repos/system_upgrade/common/actors/ipascanner/actor.py index 483b9f2e..5995d1e0 100644 --- a/repos/system_upgrade/common/actors/ipascanner/actor.py +++ b/repos/system_upgrade/common/actors/ipascanner/actor.py @@ -1,7 +1,7 @@ from leapp.actors import Actor from leapp.libraries.actor.ipascanner import is_ipa_client_configured, is_ipa_server_configured from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM, IpaInfo +from leapp.models import DistributionSignedRPM, IpaInfo from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -11,18 +11,18 @@ class IpaScanner(Actor): """ name = "ipa_scanner" - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (IpaInfo,) tags = (FactsPhaseTag, IPUWorkflowTag) def process(self): ipainfo = IpaInfo( has_client_package=has_package( - InstalledRedHatSignedRPM, "ipa-client" + DistributionSignedRPM, "ipa-client" ), is_client_configured=is_ipa_client_configured(), has_server_package=has_package( - InstalledRedHatSignedRPM, "ipa-server" + DistributionSignedRPM, "ipa-server" ), is_server_configured=is_ipa_server_configured(), ) diff --git a/repos/system_upgrade/common/actors/ipascanner/tests/test_ipascanner.py b/repos/system_upgrade/common/actors/ipascanner/tests/test_ipascanner.py index d9933a88..f7877d28 100644 --- a/repos/system_upgrade/common/actors/ipascanner/tests/test_ipascanner.py +++ b/repos/system_upgrade/common/actors/ipascanner/tests/test_ipascanner.py @@ -1,6 +1,6 @@ import os -from leapp.models import InstalledRedHatSignedRPM, IpaInfo, RPM +from leapp.models import DistributionSignedRPM, IpaInfo, RPM from leapp.snactor.fixture import current_actor_context DEFAULT_CONF = "/etc/ipa/default.conf" @@ -21,7 +21,7 @@ def mock_rpm(name): def mock_rpms(*names): - return InstalledRedHatSignedRPM(items=[mock_rpm(name) for name in names]) + return DistributionSignedRPM(items=[mock_rpm(name) for name in names]) def mock_os_path_isfile(overrides): diff --git a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/actor.py b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/actor.py index 03ce3d92..66ad8d4e 100644 --- a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/actor.py +++ b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import checkinstalledkernels -from leapp.models import InstalledRedHatSignedRPM, KernelInfo +from leapp.models import DistributionSignedRPM, KernelInfo from leapp.reporting import Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -30,7 +30,7 @@ class CheckInstalledKernels(Actor): """ name = 'check_installed_kernels' - consumes = (InstalledRedHatSignedRPM, KernelInfo) + consumes = (DistributionSignedRPM, KernelInfo) produces = (Report,) tags = (IPUWorkflowTag, ChecksPhaseTag) diff --git a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py index 8e92fa09..95882d29 100644 --- a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py +++ b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py @@ -15,14 +15,14 @@ from leapp import reporting from leapp.exceptions import StopActorExecutionError from leapp.libraries.common.config import architecture, utils from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, KernelInfo +from leapp.models import DistributionSignedRPM, KernelInfo def get_all_pkgs_with_name(pkg_name): """ Get all installed packages of the given name signed by Red Hat. """ - rpms = next(api.consume(InstalledRedHatSignedRPM), InstalledRedHatSignedRPM()).items + rpms = next(api.consume(DistributionSignedRPM), DistributionSignedRPM()).items return [pkg for pkg in rpms if pkg.name == pkg_name] diff --git a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/tests/unit_test_checkinstalledkernels.py b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/tests/unit_test_checkinstalledkernels.py index 816d3886..393ad3df 100644 --- a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/tests/unit_test_checkinstalledkernels.py +++ b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/tests/unit_test_checkinstalledkernels.py @@ -7,7 +7,7 @@ from leapp.libraries.actor import checkinstalledkernels from leapp.libraries.common.config import architecture from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked, logger_mocked from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, KernelInfo, RPM +from leapp.models import DistributionSignedRPM, KernelInfo, RPM RH_PACKAGER = 'Red Hat, Inc. ' @@ -26,7 +26,7 @@ def create_rpm(rpm_desc, packager=RH_PACKAGER, pgpsig='SOME_OTHER_SIG_X', epoch= def create_rpms(rpm_descriptions): rpms = [create_rpm(rpm_desc) for rpm_desc in rpm_descriptions] - installed_rpms = InstalledRedHatSignedRPM(items=rpms) + installed_rpms = DistributionSignedRPM(items=rpms) return installed_rpms diff --git a/repos/system_upgrade/common/actors/peseventsscanner/actor.py b/repos/system_upgrade/common/actors/peseventsscanner/actor.py index c00c1e0f..f801f1a1 100644 --- a/repos/system_upgrade/common/actors/peseventsscanner/actor.py +++ b/repos/system_upgrade/common/actors/peseventsscanner/actor.py @@ -2,8 +2,8 @@ from leapp.actors import Actor from leapp.libraries.actor.pes_events_scanner import process from leapp.models import ( ConsumedDataAsset, + DistributionSignedRPM, EnabledModules, - InstalledRedHatSignedRPM, PESRpmTransactionTasks, RepositoriesBlacklisted, RepositoriesFacts, @@ -27,7 +27,7 @@ class PesEventsScanner(Actor): name = 'pes_events_scanner' consumes = ( EnabledModules, - InstalledRedHatSignedRPM, + DistributionSignedRPM, RepositoriesBlacklisted, RepositoriesFacts, RepositoriesMapping, diff --git a/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py b/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py index f8d8dcfc..72dd34ec 100644 --- a/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py +++ b/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py @@ -9,8 +9,8 @@ from leapp.libraries.common.config import version from leapp.libraries.stdlib import api from leapp.libraries.stdlib.config import is_verbose from leapp.models import ( + DistributionSignedRPM, EnabledModules, - InstalledRedHatSignedRPM, Module, PESIDRepositoryEntry, PESRpmTransactionTasks, @@ -57,14 +57,14 @@ def get_best_pesid_candidate(candidate_a, candidate_b, cloud_provider): def get_installed_pkgs(): installed_pkgs = set() - installed_rh_signed_rpm_msgs = api.consume(InstalledRedHatSignedRPM) + installed_rh_signed_rpm_msgs = api.consume(DistributionSignedRPM) installed_rh_signed_rpm_msg = next(installed_rh_signed_rpm_msgs, None) if list(installed_rh_signed_rpm_msgs): - api.current_logger().warning('Unexpectedly received more than one InstalledRedHatSignedRPM message.') + api.current_logger().warning('Unexpectedly received more than one DistributionSignedRPM message.') if not installed_rh_signed_rpm_msg: raise StopActorExecutionError('Cannot parse PES data properly due to missing list of installed packages', details={'Problem': 'Did not receive a message with installed Red Hat-signed ' - 'packages (InstalledRedHatSignedRPM)'}) + 'packages (DistributionSignedRPM)'}) for pkg in installed_rh_signed_rpm_msg.items: modulestream = None diff --git a/repos/system_upgrade/common/actors/peseventsscanner/tests/test_pes_event_scanner.py b/repos/system_upgrade/common/actors/peseventsscanner/tests/test_pes_event_scanner.py index 8122e541..243f85c4 100644 --- a/repos/system_upgrade/common/actors/peseventsscanner/tests/test_pes_event_scanner.py +++ b/repos/system_upgrade/common/actors/peseventsscanner/tests/test_pes_event_scanner.py @@ -17,8 +17,8 @@ from leapp.libraries.actor.pes_events_scanner import ( ) from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked, produce_mocked from leapp.models import ( + DistributionSignedRPM, EnabledModules, - InstalledRedHatSignedRPM, PESIDRepositoryEntry, PESRpmTransactionTasks, RepoMapEntry, @@ -229,7 +229,7 @@ def test_actor_performs(monkeypatch): _RPM = partial(RPM, epoch='', packager='', version='', release='', arch='', pgpsig='') - installed_pkgs = InstalledRedHatSignedRPM(items=[ + installed_pkgs = DistributionSignedRPM(items=[ _RPM(name='split-in'), _RPM(name='moved-in'), _RPM(name='removed') ]) diff --git a/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/actor.py b/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/actor.py index 4ef726f5..a3531586 100644 --- a/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/actor.py +++ b/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor.rpmtransactionconfigtaskscollector import load_tasks -from leapp.models import InstalledRedHatSignedRPM, RpmTransactionTasks +from leapp.models import DistributionSignedRPM, RpmTransactionTasks from leapp.tags import FactsPhaseTag, IPUWorkflowTag CONFIGURATION_BASE_PATH = '/etc/leapp/transaction' @@ -15,7 +15,7 @@ class RpmTransactionConfigTasksCollector(Actor): """ name = 'rpm_transaction_config_tasks_collector' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (RpmTransactionTasks,) tags = (FactsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/libraries/rpmtransactionconfigtaskscollector.py b/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/libraries/rpmtransactionconfigtaskscollector.py index fb6ae8ff..43ac1fc4 100644 --- a/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/libraries/rpmtransactionconfigtaskscollector.py +++ b/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/libraries/rpmtransactionconfigtaskscollector.py @@ -1,7 +1,7 @@ import os.path from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, RpmTransactionTasks +from leapp.models import DistributionSignedRPM, RpmTransactionTasks def load_tasks_file(path, logger): @@ -20,7 +20,7 @@ def load_tasks_file(path, logger): def load_tasks(base_dir, logger): # Loads configuration files to_install, to_keep, and to_remove from the given base directory - rpms = next(api.consume(InstalledRedHatSignedRPM)) + rpms = next(api.consume(DistributionSignedRPM)) rpm_names = [rpm.name for rpm in rpms.items] to_install = load_tasks_file(os.path.join(base_dir, 'to_install'), logger) # we do not want to put into rpm transaction what is already installed (it will go to "to_upgrade" bucket) diff --git a/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py b/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py index 5c62d28e..842544bf 100644 --- a/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py +++ b/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py @@ -2,7 +2,7 @@ import logging from leapp.libraries.actor.rpmtransactionconfigtaskscollector import load_tasks, load_tasks_file from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM RH_PACKAGER = 'Red Hat, Inc. ' @@ -14,7 +14,7 @@ def test_load_tasks(tmpdir, monkeypatch): RPM(name='c', version='0.1', release='1.sm01', epoch='1', packager=RH_PACKAGER, arch='noarch', pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 199e2f91fd431d51') ] - yield InstalledRedHatSignedRPM(items=installed) + yield DistributionSignedRPM(items=installed) monkeypatch.setattr(api, "consume", consume_signed_rpms_mocked) diff --git a/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/actor.py b/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/actor.py index 11283cd0..7aaddef4 100644 --- a/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/actor.py +++ b/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor.scandynamiclinkerconfiguration import scan_dynamic_linker_configuration -from leapp.models import DynamicLinkerConfiguration, InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM, DynamicLinkerConfiguration from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -15,7 +15,7 @@ class ScanDynamicLinkerConfiguration(Actor): """ name = 'scan_dynamic_linker_configuration' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (DynamicLinkerConfiguration,) tags = (FactsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/libraries/scandynamiclinkerconfiguration.py b/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/libraries/scandynamiclinkerconfiguration.py index 1a6ab6a2..8d3b473e 100644 --- a/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/libraries/scandynamiclinkerconfiguration.py +++ b/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/libraries/scandynamiclinkerconfiguration.py @@ -3,7 +3,7 @@ import os from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api, CalledProcessError, run -from leapp.models import DynamicLinkerConfiguration, InstalledRedHatSignedRPM, LDConfigFile, MainLDConfigFile +from leapp.models import DistributionSignedRPM, DynamicLinkerConfiguration, LDConfigFile, MainLDConfigFile LD_SO_CONF_DIR = '/etc/ld.so.conf.d' LD_SO_CONF_MAIN = '/etc/ld.so.conf' @@ -46,7 +46,7 @@ def _is_included_config_custom(config_path): is_custom = False try: package_name = run(['rpm', '-qf', '--queryformat', '%{NAME}', config_path])['stdout'] - is_custom = not has_package(InstalledRedHatSignedRPM, package_name) or _is_modified(config_path) + is_custom = not has_package(DistributionSignedRPM, package_name) or _is_modified(config_path) except CalledProcessError: is_custom = True diff --git a/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/tests/test_scandynamiclinkerconfiguration.py b/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/tests/test_scandynamiclinkerconfiguration.py index 21144951..5221314e 100644 --- a/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/tests/test_scandynamiclinkerconfiguration.py +++ b/repos/system_upgrade/common/actors/scandynamiclinkerconfiguration/tests/test_scandynamiclinkerconfiguration.py @@ -7,7 +7,7 @@ from leapp import reporting from leapp.libraries.actor import scandynamiclinkerconfiguration from leapp.libraries.common.testutils import produce_mocked from leapp.libraries.stdlib import api, CalledProcessError -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM INCLUDED_CONFIGS_GLOB_DICT_1 = {'/etc/ld.so.conf.d/*.conf': ['/etc/ld.so.conf.d/dyninst-x86_64.conf', '/etc/ld.so.conf.d/mariadb-x86_64.conf', @@ -161,7 +161,7 @@ def test_is_included_config_custom(monkeypatch, config_path, config_contents, ru return {'stdout': run_result} def mocked_has_package(model, package_name): - assert model is InstalledRedHatSignedRPM + assert model is DistributionSignedRPM assert package_name == run_result return is_installed_rh_signed_package diff --git a/repos/system_upgrade/common/actors/scansourcekernel/actor.py b/repos/system_upgrade/common/actors/scansourcekernel/actor.py index 8e3fa271..4079000f 100644 --- a/repos/system_upgrade/common/actors/scansourcekernel/actor.py +++ b/repos/system_upgrade/common/actors/scansourcekernel/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import scan_source_kernel as scan_source_kernel_lib -from leapp.models import InstalledRedHatSignedRPM, KernelInfo +from leapp.models import DistributionSignedRPM, KernelInfo from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -10,7 +10,7 @@ class ScanSourceKernel(Actor): """ name = 'scan_source_kernel' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (KernelInfo,) tags = (IPUWorkflowTag, FactsPhaseTag) diff --git a/repos/system_upgrade/common/actors/scansourcekernel/libraries/scan_source_kernel.py b/repos/system_upgrade/common/actors/scansourcekernel/libraries/scan_source_kernel.py index b596ccc5..ec622234 100644 --- a/repos/system_upgrade/common/actors/scansourcekernel/libraries/scan_source_kernel.py +++ b/repos/system_upgrade/common/actors/scansourcekernel/libraries/scan_source_kernel.py @@ -4,12 +4,12 @@ from leapp.exceptions import StopActorExecutionError from leapp.libraries.common import kernel as kernel_lib from leapp.libraries.common.config.version import get_source_version from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, KernelInfo +from leapp.models import DistributionSignedRPM, KernelInfo def scan_source_kernel(): uname_r = api.current_actor().configuration.kernel - installed_rpms = [msg.items for msg in api.consume(InstalledRedHatSignedRPM)] + installed_rpms = [msg.items for msg in api.consume(DistributionSignedRPM)] installed_rpms = list(itertools.chain(*installed_rpms)) kernel_type = kernel_lib.determine_kernel_type_from_uname(get_source_version(), uname_r) diff --git a/repos/system_upgrade/common/actors/usedrepositoriesscanner/actor.py b/repos/system_upgrade/common/actors/usedrepositoriesscanner/actor.py index 0e8e6ef6..46ae9f51 100644 --- a/repos/system_upgrade/common/actors/usedrepositoriesscanner/actor.py +++ b/repos/system_upgrade/common/actors/usedrepositoriesscanner/actor.py @@ -1,10 +1,5 @@ from leapp.actors import Actor -from leapp.models import ( - InstalledRedHatSignedRPM, - RepositoriesFacts, - UsedRepositories, - UsedRepository -) +from leapp.models import DistributionSignedRPM, RepositoriesFacts, UsedRepositories, UsedRepository from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -17,7 +12,7 @@ class UsedRepositoriesScanner(Actor): """ name = 'used_repository_scanner' - consumes = (InstalledRedHatSignedRPM, RepositoriesFacts) + consumes = (DistributionSignedRPM, RepositoriesFacts) produces = (UsedRepositories,) tags = (IPUWorkflowTag, FactsPhaseTag) @@ -30,7 +25,7 @@ class UsedRepositoriesScanner(Actor): enabled_repos.append(repo.repoid) installed_pkgs = [] - for rpm_pkgs in self.consume(InstalledRedHatSignedRPM): + for rpm_pkgs in self.consume(DistributionSignedRPM): installed_pkgs.extend(rpm_pkgs.items) used_repos = {} diff --git a/repos/system_upgrade/common/actors/usedrepositoriesscanner/tests/test_usedrepositoriesscanner.py b/repos/system_upgrade/common/actors/usedrepositoriesscanner/tests/test_usedrepositoriesscanner.py index d3cecc88..ffcd07ae 100644 --- a/repos/system_upgrade/common/actors/usedrepositoriesscanner/tests/test_usedrepositoriesscanner.py +++ b/repos/system_upgrade/common/actors/usedrepositoriesscanner/tests/test_usedrepositoriesscanner.py @@ -1,5 +1,5 @@ from leapp.models import ( - InstalledRedHatSignedRPM, + DistributionSignedRPM, RepositoriesFacts, RepositoryData, RepositoryFile, @@ -22,7 +22,7 @@ def get_sample_rpm(name, repository): def get_sample_installed_pkgs(pkgs): - return InstalledRedHatSignedRPM(items=[get_sample_rpm(*p) for p in pkgs]) + return DistributionSignedRPM(items=[get_sample_rpm(*p) for p in pkgs]) def get_sample_repository(repoid, name): diff --git a/repos/system_upgrade/common/libraries/rpms.py b/repos/system_upgrade/common/libraries/rpms.py index a6cef13f..6a5e8637 100644 --- a/repos/system_upgrade/common/libraries/rpms.py +++ b/repos/system_upgrade/common/libraries/rpms.py @@ -41,7 +41,7 @@ def create_lookup(model, field, keys, context=stdlib.api): def has_package(model, package_name, arch=None, version=None, release=None, context=stdlib.api): """ - Expects a model InstalledRedHatSignedRPM or InstalledUnsignedRPM. + Expects a model DistributionSignedRPM or InstalledUnsignedRPM. Can be useful in cases like a quick item presence check, ex. check in actor that a certain package is installed. diff --git a/repos/system_upgrade/el7toel8/actors/bindupdate/actor.py b/repos/system_upgrade/el7toel8/actors/bindupdate/actor.py index d612ffb9..cc21afe9 100644 --- a/repos/system_upgrade/el7toel8/actors/bindupdate/actor.py +++ b/repos/system_upgrade/el7toel8/actors/bindupdate/actor.py @@ -1,7 +1,7 @@ from leapp.actors import Actor from leapp.libraries.actor import updates from leapp.libraries.common import rpms -from leapp.models import BindFacts, InstalledRedHatSignedRPM +from leapp.models import BindFacts, DistributionSignedRPM from leapp.tags import IPUWorkflowTag, PreparationPhaseTag @@ -11,7 +11,7 @@ class BindUpdate(Actor): """ name = 'bind_update' - consumes = (InstalledRedHatSignedRPM, BindFacts) + consumes = (DistributionSignedRPM, BindFacts) produces = () tags = (PreparationPhaseTag, IPUWorkflowTag) @@ -20,7 +20,7 @@ class BindUpdate(Actor): def has_bind_package(self): """Test any bind server package is installed.""" for pkg in self.pkg_names: - if rpms.has_package(InstalledRedHatSignedRPM, pkg): + if rpms.has_package(DistributionSignedRPM, pkg): return True return False diff --git a/repos/system_upgrade/el7toel8/actors/checkacpid/actor.py b/repos/system_upgrade/el7toel8/actors/checkacpid/actor.py index 3fb1fac0..8e761db4 100644 --- a/repos/system_upgrade/el7toel8/actors/checkacpid/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkacpid/actor.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,12 +12,12 @@ class CheckAcpid(Actor): """ name = 'checkacpid' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - if has_package(InstalledRedHatSignedRPM, 'acpid'): + if has_package(DistributionSignedRPM, 'acpid'): create_report([ reporting.Title('Acpid incompatible changes in the next major version'), reporting.Summary('The option -d (debug) no longer implies -f (foreground).'), diff --git a/repos/system_upgrade/el7toel8/actors/checkacpid/tests/component_test_checkacpid.py b/repos/system_upgrade/el7toel8/actors/checkacpid/tests/component_test_checkacpid.py index 62ad4bbc..a38728f7 100644 --- a/repos/system_upgrade/el7toel8/actors/checkacpid/tests/component_test_checkacpid.py +++ b/repos/system_upgrade/el7toel8/actors/checkacpid/tests/component_test_checkacpid.py @@ -1,4 +1,4 @@ -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM from leapp.reporting import Report from leapp.snactor.fixture import current_actor_context @@ -6,7 +6,7 @@ RH_PACKAGER = 'Red Hat, Inc. ' def create_modulesfacts(installed_rpm): - return InstalledRedHatSignedRPM(items=installed_rpm) + return DistributionSignedRPM(items=installed_rpm) def test_actor_with_acpid_package(current_actor_context): diff --git a/repos/system_upgrade/el7toel8/actors/checkbind/actor.py b/repos/system_upgrade/el7toel8/actors/checkbind/actor.py index e05ce974..0292b6c7 100644 --- a/repos/system_upgrade/el7toel8/actors/checkbind/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkbind/actor.py @@ -2,7 +2,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.actor import iscmodel from leapp.libraries.stdlib import api -from leapp.models import BindFacts, InstalledRedHatSignedRPM +from leapp.models import BindFacts, DistributionSignedRPM from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -10,7 +10,7 @@ class CheckBind(Actor): """Actor parsing BIND configuration and checking for known issues in it.""" name = 'check_bind' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (BindFacts, reporting.Report) tags = (ChecksPhaseTag, IPUWorkflowTag) @@ -25,7 +25,7 @@ class CheckBind(Actor): return False def process(self): - if not self.has_package(InstalledRedHatSignedRPM): + if not self.has_package(DistributionSignedRPM): self.log.debug('bind is not installed') return diff --git a/repos/system_upgrade/el7toel8/actors/checkbrltty/actor.py b/repos/system_upgrade/el7toel8/actors/checkbrltty/actor.py index 3ee6a3e8..c4e032c1 100644 --- a/repos/system_upgrade/el7toel8/actors/checkbrltty/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkbrltty/actor.py @@ -2,7 +2,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.actor import checkbrltty from leapp.libraries.common.rpms import has_package -from leapp.models import BrlttyMigrationDecision, InstalledRedHatSignedRPM +from leapp.models import BrlttyMigrationDecision, DistributionSignedRPM from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -15,12 +15,12 @@ class CheckBrltty(Actor): """ name = 'check_brltty' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report, BrlttyMigrationDecision,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - if has_package(InstalledRedHatSignedRPM, 'brltty'): + if has_package(DistributionSignedRPM, 'brltty'): create_report([ reporting.Title('Brltty has incompatible changes in the next major version'), reporting.Summary( diff --git a/repos/system_upgrade/el7toel8/actors/checkbrltty/tests/component_test_checkbrltty.py b/repos/system_upgrade/el7toel8/actors/checkbrltty/tests/component_test_checkbrltty.py index ec64ffba..1b843d9d 100644 --- a/repos/system_upgrade/el7toel8/actors/checkbrltty/tests/component_test_checkbrltty.py +++ b/repos/system_upgrade/el7toel8/actors/checkbrltty/tests/component_test_checkbrltty.py @@ -1,4 +1,4 @@ -from leapp.models import BrlttyMigrationDecision, InstalledRedHatSignedRPM, RPM +from leapp.models import BrlttyMigrationDecision, DistributionSignedRPM, RPM from leapp.reporting import Report RH_PACKAGER = 'Red Hat, Inc. ' @@ -17,7 +17,7 @@ without_brltty = [ def create_modulesfacts(installed_rpm): - return InstalledRedHatSignedRPM(items=installed_rpm) + return DistributionSignedRPM(items=installed_rpm) def test_actor_without_brltty_package(current_actor_context): diff --git a/repos/system_upgrade/el7toel8/actors/checkchrony/actor.py b/repos/system_upgrade/el7toel8/actors/checkchrony/actor.py index 13577ea3..ab11c9ae 100644 --- a/repos/system_upgrade/el7toel8/actors/checkchrony/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkchrony/actor.py @@ -1,7 +1,7 @@ from leapp.actors import Actor from leapp.libraries.actor.checkchrony import check_chrony from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -15,9 +15,9 @@ class CheckChrony(Actor): """ name = 'check_chrony' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - check_chrony(has_package(InstalledRedHatSignedRPM, 'chrony')) + check_chrony(has_package(DistributionSignedRPM, 'chrony')) diff --git a/repos/system_upgrade/el7toel8/actors/checkdosfstools/actor.py b/repos/system_upgrade/el7toel8/actors/checkdosfstools/actor.py index e2a5456f..578bc108 100644 --- a/repos/system_upgrade/el7toel8/actors/checkdosfstools/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkdosfstools/actor.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,12 +12,12 @@ class CheckDosfstools(Actor): """ name = 'checkdosfstools' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - if has_package(InstalledRedHatSignedRPM, 'dosfstools'): + if has_package(DistributionSignedRPM, 'dosfstools'): create_report([ reporting.Title('Dosfstools incompatible changes in the next major version'), reporting.Summary( diff --git a/repos/system_upgrade/el7toel8/actors/checkdosfstools/tests/component_test_checkdosfstools.py b/repos/system_upgrade/el7toel8/actors/checkdosfstools/tests/component_test_checkdosfstools.py index 6400d99c..5c65cf0e 100644 --- a/repos/system_upgrade/el7toel8/actors/checkdosfstools/tests/component_test_checkdosfstools.py +++ b/repos/system_upgrade/el7toel8/actors/checkdosfstools/tests/component_test_checkdosfstools.py @@ -1,4 +1,4 @@ -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM from leapp.reporting import Report from leapp.snactor.fixture import current_actor_context @@ -6,7 +6,7 @@ RH_PACKAGER = 'Red Hat, Inc. ' def create_modulesfacts(installed_rpm): - return InstalledRedHatSignedRPM(items=installed_rpm) + return DistributionSignedRPM(items=installed_rpm) def test_actor_with_dosfstools_package(current_actor_context): diff --git a/repos/system_upgrade/el7toel8/actors/checkgrep/actor.py b/repos/system_upgrade/el7toel8/actors/checkgrep/actor.py index 1d4b3c9c..594cf92e 100644 --- a/repos/system_upgrade/el7toel8/actors/checkgrep/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkgrep/actor.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,12 +12,12 @@ class CheckGrep(Actor): """ name = 'checkgrep' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - if has_package(InstalledRedHatSignedRPM, 'grep'): + if has_package(DistributionSignedRPM, 'grep'): create_report([ reporting.Title('Grep has incompatible changes in the next major version'), reporting.Summary( diff --git a/repos/system_upgrade/el7toel8/actors/checkgrep/tests/component_test_checkgrep.py b/repos/system_upgrade/el7toel8/actors/checkgrep/tests/component_test_checkgrep.py index 10c5a155..bb673a86 100644 --- a/repos/system_upgrade/el7toel8/actors/checkgrep/tests/component_test_checkgrep.py +++ b/repos/system_upgrade/el7toel8/actors/checkgrep/tests/component_test_checkgrep.py @@ -1,4 +1,4 @@ -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM from leapp.reporting import Report from leapp.snactor.fixture import current_actor_context @@ -6,7 +6,7 @@ RH_PACKAGER = 'Red Hat, Inc. ' def create_modulesfacts(installed_rpm): - return InstalledRedHatSignedRPM(items=installed_rpm) + return DistributionSignedRPM(items=installed_rpm) def test_actor_with_grep_package(current_actor_context): diff --git a/repos/system_upgrade/el7toel8/actors/checkirssi/actor.py b/repos/system_upgrade/el7toel8/actors/checkirssi/actor.py index d1c65d03..b7f8d071 100644 --- a/repos/system_upgrade/el7toel8/actors/checkirssi/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkirssi/actor.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,12 +12,12 @@ class CheckIrssi(Actor): """ name = 'checkirssi' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - if has_package(InstalledRedHatSignedRPM, 'irssi'): + if has_package(DistributionSignedRPM, 'irssi'): create_report([ reporting.Title('Irssi incompatible changes in the next major version'), reporting.Summary( diff --git a/repos/system_upgrade/el7toel8/actors/checkirssi/tests/component_test_checkirssi.py b/repos/system_upgrade/el7toel8/actors/checkirssi/tests/component_test_checkirssi.py index bcdac9f9..9356d180 100644 --- a/repos/system_upgrade/el7toel8/actors/checkirssi/tests/component_test_checkirssi.py +++ b/repos/system_upgrade/el7toel8/actors/checkirssi/tests/component_test_checkirssi.py @@ -1,4 +1,4 @@ -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM from leapp.reporting import Report from leapp.snactor.fixture import current_actor_context @@ -6,7 +6,7 @@ RH_PACKAGER = 'Red Hat, Inc. ' def create_modulesfacts(installed_rpm): - return InstalledRedHatSignedRPM(items=installed_rpm) + return DistributionSignedRPM(items=installed_rpm) def test_actor_with_irssi_package(current_actor_context): diff --git a/repos/system_upgrade/el7toel8/actors/checkmemcached/actor.py b/repos/system_upgrade/el7toel8/actors/checkmemcached/actor.py index 550e5374..a3e12a18 100644 --- a/repos/system_upgrade/el7toel8/actors/checkmemcached/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkmemcached/actor.py @@ -1,7 +1,7 @@ from leapp.actors import Actor from leapp.libraries.actor.checkmemcached import check_memcached from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -16,9 +16,9 @@ class CheckMemcached(Actor): """ name = 'check_memcached' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - check_memcached(has_package(InstalledRedHatSignedRPM, 'memcached')) + check_memcached(has_package(DistributionSignedRPM, 'memcached')) diff --git a/repos/system_upgrade/el7toel8/actors/checkntp/actor.py b/repos/system_upgrade/el7toel8/actors/checkntp/actor.py index 83c4e0a5..7bf4715e 100644 --- a/repos/system_upgrade/el7toel8/actors/checkntp/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkntp/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor.checkntp import check_ntp -from leapp.models import InstalledRedHatSignedRPM, NtpMigrationDecision, Report +from leapp.models import DistributionSignedRPM, NtpMigrationDecision, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -10,14 +10,14 @@ class CheckNtp(Actor): """ name = 'check_ntp' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report, NtpMigrationDecision) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): installed_packages = set() - signed_rpms = self.consume(InstalledRedHatSignedRPM) + signed_rpms = self.consume(DistributionSignedRPM) for rpm_pkgs in signed_rpms: for pkg in rpm_pkgs.items: installed_packages.add(pkg.name) diff --git a/repos/system_upgrade/el7toel8/actors/checkpostfix/actor.py b/repos/system_upgrade/el7toel8/actors/checkpostfix/actor.py index 3d54f62c..690e9de8 100644 --- a/repos/system_upgrade/el7toel8/actors/checkpostfix/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkpostfix/actor.py @@ -1,6 +1,6 @@ from leapp import reporting from leapp.actors import Actor -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -11,12 +11,12 @@ class CheckPostfix(Actor): """ name = 'check_postfix' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - for fact in self.consume(InstalledRedHatSignedRPM): + for fact in self.consume(DistributionSignedRPM): for rpm in fact.items: if rpm.name == 'postfix': create_report([ diff --git a/repos/system_upgrade/el7toel8/actors/checkpostfix/tests/component_test_checkpostfix.py b/repos/system_upgrade/el7toel8/actors/checkpostfix/tests/component_test_checkpostfix.py index 7edf9c67..bc2229bc 100644 --- a/repos/system_upgrade/el7toel8/actors/checkpostfix/tests/component_test_checkpostfix.py +++ b/repos/system_upgrade/el7toel8/actors/checkpostfix/tests/component_test_checkpostfix.py @@ -1,4 +1,4 @@ -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM from leapp.reporting import Report from leapp.snactor.fixture import current_actor_context @@ -18,7 +18,7 @@ without_postfix = [ def create_modulesfacts(installed_rpm): - return InstalledRedHatSignedRPM(items=installed_rpm) + return DistributionSignedRPM(items=installed_rpm) def test_actor_without_postfix_package(current_actor_context): diff --git a/repos/system_upgrade/el7toel8/actors/checksendmail/actor.py b/repos/system_upgrade/el7toel8/actors/checksendmail/actor.py index a831b1f4..ef59b103 100644 --- a/repos/system_upgrade/el7toel8/actors/checksendmail/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checksendmail/actor.py @@ -3,7 +3,7 @@ from leapp.actors import Actor from leapp.libraries.actor import checksendmail from leapp.libraries.common.rpms import has_package from leapp.libraries.common.tcpwrappersutils import config_applies_to_daemon -from leapp.models import InstalledRedHatSignedRPM, SendmailMigrationDecision, TcpWrappersFacts +from leapp.models import DistributionSignedRPM, SendmailMigrationDecision, TcpWrappersFacts from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -21,12 +21,12 @@ class CheckSendmail(Actor): """ name = 'check_sendmail' - consumes = (InstalledRedHatSignedRPM, TcpWrappersFacts,) + consumes = (DistributionSignedRPM, TcpWrappersFacts,) produces = (Report, SendmailMigrationDecision,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - if not has_package(InstalledRedHatSignedRPM, 'sendmail'): + if not has_package(DistributionSignedRPM, 'sendmail'): return if config_applies_to_daemon(next(self.consume(TcpWrappersFacts)), 'sendmail'): diff --git a/repos/system_upgrade/el7toel8/actors/checksendmail/tests/component_test_checksendmail.py b/repos/system_upgrade/el7toel8/actors/checksendmail/tests/component_test_checksendmail.py index bbee86a4..d76f0687 100644 --- a/repos/system_upgrade/el7toel8/actors/checksendmail/tests/component_test_checksendmail.py +++ b/repos/system_upgrade/el7toel8/actors/checksendmail/tests/component_test_checksendmail.py @@ -1,4 +1,4 @@ -from leapp.models import DaemonList, InstalledRedHatSignedRPM, RPM, SendmailMigrationDecision, TcpWrappersFacts +from leapp.models import DaemonList, DistributionSignedRPM, RPM, SendmailMigrationDecision, TcpWrappersFacts from leapp.reporting import Report from leapp.utils.report import is_inhibitor @@ -18,7 +18,7 @@ without_sendmail = [ def create_modulesfacts(installed_rpm): - return InstalledRedHatSignedRPM(items=installed_rpm) + return DistributionSignedRPM(items=installed_rpm) def test_actor_without_sendmail_package(current_actor_context): diff --git a/repos/system_upgrade/el7toel8/actors/checkwireshark/actor.py b/repos/system_upgrade/el7toel8/actors/checkwireshark/actor.py index 4e333c2f..ed7f8a37 100644 --- a/repos/system_upgrade/el7toel8/actors/checkwireshark/actor.py +++ b/repos/system_upgrade/el7toel8/actors/checkwireshark/actor.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM, Report +from leapp.models import DistributionSignedRPM, Report from leapp.reporting import create_report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,12 +12,12 @@ class CheckWireshark(Actor): """ name = 'check_wireshark' - consumes = (InstalledRedHatSignedRPM, ) + consumes = (DistributionSignedRPM, ) produces = (Report, ) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - if has_package(InstalledRedHatSignedRPM, 'wireshark'): + if has_package(DistributionSignedRPM, 'wireshark'): create_report([ reporting.Title('tshark: CLI options and output changes'), reporting.Summary( diff --git a/repos/system_upgrade/el7toel8/actors/checkwireshark/tests/component_test_checkwireshark.py b/repos/system_upgrade/el7toel8/actors/checkwireshark/tests/component_test_checkwireshark.py index 92b98e8b..648882e6 100644 --- a/repos/system_upgrade/el7toel8/actors/checkwireshark/tests/component_test_checkwireshark.py +++ b/repos/system_upgrade/el7toel8/actors/checkwireshark/tests/component_test_checkwireshark.py @@ -1,4 +1,4 @@ -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM from leapp.reporting import Report from leapp.snactor.fixture import current_actor_context @@ -12,7 +12,7 @@ def test_actor_with_grep_package(current_actor_context): RPM(name='powertop', version='0.1', release='1.sm01', epoch='1', packager=RH_PACKAGER, arch='noarch', pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 199e2f91fd431d51')] - current_actor_context.feed(InstalledRedHatSignedRPM(items=rpms)) + current_actor_context.feed(DistributionSignedRPM(items=rpms)) current_actor_context.run() assert current_actor_context.consume(Report) @@ -24,6 +24,6 @@ def test_actor_without_grep_package(current_actor_context): RPM(name='sed', version='0.1', release='1.sm01', epoch='1', packager=RH_PACKAGER, arch='noarch', pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 199e2f91fd431d51')] - current_actor_context.feed(InstalledRedHatSignedRPM(items=rpms)) + current_actor_context.feed(DistributionSignedRPM(items=rpms)) current_actor_context.run() assert not current_actor_context.consume(Report) diff --git a/repos/system_upgrade/el7toel8/actors/cupsfiltersmigrate/actor.py b/repos/system_upgrade/el7toel8/actors/cupsfiltersmigrate/actor.py index 53fb41c4..18653958 100644 --- a/repos/system_upgrade/el7toel8/actors/cupsfiltersmigrate/actor.py +++ b/repos/system_upgrade/el7toel8/actors/cupsfiltersmigrate/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import cupsfiltersmigrate -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag @@ -21,7 +21,7 @@ class CupsfiltersMigrate(Actor): """ name = 'cupsfilters_migrate' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = () tags = (ApplicationsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el7toel8/actors/cupsfiltersmigrate/libraries/cupsfiltersmigrate.py b/repos/system_upgrade/el7toel8/actors/cupsfiltersmigrate/libraries/cupsfiltersmigrate.py index b63ae517..e88be9d7 100644 --- a/repos/system_upgrade/el7toel8/actors/cupsfiltersmigrate/libraries/cupsfiltersmigrate.py +++ b/repos/system_upgrade/el7toel8/actors/cupsfiltersmigrate/libraries/cupsfiltersmigrate.py @@ -1,6 +1,6 @@ from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM # rpm : the default config file BROWSED_CONFIG = '/etc/cups/cups-browsed.conf' @@ -76,7 +76,7 @@ def _check_package(pkg): :param str pkg: name of package """ - return has_package(InstalledRedHatSignedRPM, pkg) + return has_package(DistributionSignedRPM, pkg) def update_cups_browsed(debug_log=api.current_logger().debug, diff --git a/repos/system_upgrade/el7toel8/actors/cupsscanner/actor.py b/repos/system_upgrade/el7toel8/actors/cupsscanner/actor.py index 6928646a..f586cf64 100644 --- a/repos/system_upgrade/el7toel8/actors/cupsscanner/actor.py +++ b/repos/system_upgrade/el7toel8/actors/cupsscanner/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import cupsscanner -from leapp.models import CupsChangedFeatures, InstalledRedHatSignedRPM, Report +from leapp.models import CupsChangedFeatures, DistributionSignedRPM, Report from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -21,7 +21,7 @@ class CupsScanner(Actor): """ name = 'cups_scanner' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report, CupsChangedFeatures) tags = (FactsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el7toel8/actors/cupsscanner/libraries/cupsscanner.py b/repos/system_upgrade/el7toel8/actors/cupsscanner/libraries/cupsscanner.py index bc65c458..82b312ec 100644 --- a/repos/system_upgrade/el7toel8/actors/cupsscanner/libraries/cupsscanner.py +++ b/repos/system_upgrade/el7toel8/actors/cupsscanner/libraries/cupsscanner.py @@ -3,7 +3,7 @@ import os from leapp.exceptions import StopActorExecutionError from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import CupsChangedFeatures, InstalledRedHatSignedRPM +from leapp.models import CupsChangedFeatures, DistributionSignedRPM def _list_dir(path): @@ -40,7 +40,7 @@ def _check_package(pkg): :param str pkg: name of package """ - return has_package(InstalledRedHatSignedRPM, pkg) + return has_package(DistributionSignedRPM, pkg) def directive_exists(name, line): diff --git a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/actor.py b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/actor.py index 5f7aceb7..acd2d986 100644 --- a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/actor.py +++ b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import checkinstalleddebugkernels -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -15,7 +15,7 @@ class CheckInstalledDebugKernels(Actor): """ name = 'check_installed_debug_kernels' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (IPUWorkflowTag, ChecksPhaseTag) diff --git a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/libraries/checkinstalleddebugkernels.py b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/libraries/checkinstalleddebugkernels.py index 6586c7fa..889196ea 100644 --- a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/libraries/checkinstalleddebugkernels.py +++ b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/libraries/checkinstalleddebugkernels.py @@ -1,6 +1,6 @@ from leapp import reporting from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM def get_kernel_rpm_release(rpm): @@ -16,7 +16,7 @@ def get_kernel_debug_rpms(): """ Get all installed kernel-debug packages ordered by release number (ascending). """ - rpms = next(api.consume(InstalledRedHatSignedRPM), InstalledRedHatSignedRPM()) + rpms = next(api.consume(DistributionSignedRPM), DistributionSignedRPM()) return sorted([pkg for pkg in rpms.items if pkg.name == 'kernel-debug'], key=get_kernel_rpm_release) diff --git a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/tests/unit_test_checkinstalleddebugkernels.py b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/tests/unit_test_checkinstalleddebugkernels.py index a0e3a95d..86ec4c89 100644 --- a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/tests/unit_test_checkinstalleddebugkernels.py +++ b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddebugkernels/checkinstalleddebugkernels/tests/unit_test_checkinstalleddebugkernels.py @@ -1,6 +1,6 @@ import pytest -from leapp.models import InstalledRedHatSignedRPM, Report, RPM +from leapp.models import DistributionSignedRPM, Report, RPM from leapp.snactor.fixture import current_actor_context RH_PACKAGER = 'Red Hat, Inc. ' @@ -27,7 +27,7 @@ debug_kernels = [ @pytest.mark.parametrize('n', [0, 1, 2, 3]) def test_process_debug_kernels(current_actor_context, n): - current_actor_context.feed(InstalledRedHatSignedRPM(items=ballast1+debug_kernels[:n]+ballast2)) + current_actor_context.feed(DistributionSignedRPM(items=ballast1+debug_kernels[:n]+ballast2)) current_actor_context.run() if n < 2: assert not current_actor_context.consume(Report) diff --git a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/actor.py b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/actor.py index 41ebb2dc..4266323c 100644 --- a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/actor.py +++ b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import checkinstalleddevelkernels -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -15,7 +15,7 @@ class CheckInstalledDevelKernels(Actor): """ name = 'check_installed_devel_kernels' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (IPUWorkflowTag, ChecksPhaseTag) diff --git a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/libraries/checkinstalleddevelkernels.py b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/libraries/checkinstalleddevelkernels.py index bd9a3930..0ff4489f 100644 --- a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/libraries/checkinstalleddevelkernels.py +++ b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/libraries/checkinstalleddevelkernels.py @@ -1,6 +1,6 @@ from leapp import reporting from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM def get_kernel_rpm_release(rpm): @@ -16,7 +16,7 @@ def get_kernel_devel_rpms(): """ Get all installed kernel-devel packages ordered by release number (ascending). """ - rpms = next(api.consume(InstalledRedHatSignedRPM), InstalledRedHatSignedRPM()) + rpms = next(api.consume(DistributionSignedRPM), DistributionSignedRPM()) return sorted([pkg for pkg in rpms.items if pkg.name == 'kernel-devel'], key=get_kernel_rpm_release) diff --git a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/tests/unit_test_checkinstalleddevelkernels.py b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/tests/unit_test_checkinstalleddevelkernels.py index 2586f24e..d4f6b380 100644 --- a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/tests/unit_test_checkinstalleddevelkernels.py +++ b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/tests/unit_test_checkinstalleddevelkernels.py @@ -1,6 +1,6 @@ import pytest -from leapp.models import InstalledRedHatSignedRPM, Report, RPM +from leapp.models import DistributionSignedRPM, Report, RPM from leapp.snactor.fixture import current_actor_context RH_PACKAGER = 'Red Hat, Inc. ' @@ -27,7 +27,7 @@ devel_kernels = [ @pytest.mark.parametrize('n', [0, 1, 2, 3]) def test_process_devel_kernels(current_actor_context, n): - current_actor_context.feed(InstalledRedHatSignedRPM(items=ballast1+devel_kernels[:n]+ballast2)) + current_actor_context.feed(DistributionSignedRPM(items=ballast1+devel_kernels[:n]+ballast2)) current_actor_context.run() if n < 2: assert not current_actor_context.consume(Report) diff --git a/repos/system_upgrade/el7toel8/actors/multipathconfread/actor.py b/repos/system_upgrade/el7toel8/actors/multipathconfread/actor.py index da85414b..66b1f431 100644 --- a/repos/system_upgrade/el7toel8/actors/multipathconfread/actor.py +++ b/repos/system_upgrade/el7toel8/actors/multipathconfread/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import multipathconfread -from leapp.models import InstalledRedHatSignedRPM, MultipathConfFacts, TargetUserSpaceUpgradeTasks +from leapp.models import DistributionSignedRPM, MultipathConfFacts, TargetUserSpaceUpgradeTasks from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -19,7 +19,7 @@ class MultipathConfRead(Actor): """ name = 'multipath_conf_read' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (MultipathConfFacts, TargetUserSpaceUpgradeTasks) tags = (FactsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el7toel8/actors/multipathconfread/libraries/multipathconfread.py b/repos/system_upgrade/el7toel8/actors/multipathconfread/libraries/multipathconfread.py index de0215d0..6e6ab540 100644 --- a/repos/system_upgrade/el7toel8/actors/multipathconfread/libraries/multipathconfread.py +++ b/repos/system_upgrade/el7toel8/actors/multipathconfread/libraries/multipathconfread.py @@ -6,7 +6,7 @@ from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api from leapp.models import ( CopyFile, - InstalledRedHatSignedRPM, + DistributionSignedRPM, MultipathConfFacts, MultipathConfig, MultipathConfigOption, @@ -191,7 +191,7 @@ def _parse_config_dir(config_dir): def is_processable(): - res = has_package(InstalledRedHatSignedRPM, 'device-mapper-multipath') + res = has_package(DistributionSignedRPM, 'device-mapper-multipath') if not res: api.current_logger().debug('device-mapper-multipath is not installed.') return res diff --git a/repos/system_upgrade/el7toel8/actors/postgresqlcheck/actor.py b/repos/system_upgrade/el7toel8/actors/postgresqlcheck/actor.py index 2935d532..cd0c9c4d 100644 --- a/repos/system_upgrade/el7toel8/actors/postgresqlcheck/actor.py +++ b/repos/system_upgrade/el7toel8/actors/postgresqlcheck/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor.postgresqlcheck import report_installed_packages -from leapp.models import InstalledRedHatSignedRPM, Report +from leapp.models import DistributionSignedRPM, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,7 +12,7 @@ class PostgresqlCheck(Actor): with PostgreSQL installed. """ name = 'postgresql_check' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el7toel8/actors/postgresqlcheck/libraries/postgresqlcheck.py b/repos/system_upgrade/el7toel8/actors/postgresqlcheck/libraries/postgresqlcheck.py index 1c32cc8b..575a2798 100644 --- a/repos/system_upgrade/el7toel8/actors/postgresqlcheck/libraries/postgresqlcheck.py +++ b/repos/system_upgrade/el7toel8/actors/postgresqlcheck/libraries/postgresqlcheck.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM # Summary for postgresql-server report report_server_inst_summary = ( @@ -77,8 +77,8 @@ def report_installed_packages(_context=api): Additionally, create another report if the postgresql-contrib rpm is installed. """ - has_server = has_package(InstalledRedHatSignedRPM, 'postgresql-server', context=_context) - has_contrib = has_package(InstalledRedHatSignedRPM, 'postgresql-contrib', context=_context) + has_server = has_package(DistributionSignedRPM, 'postgresql-server', context=_context) + has_contrib = has_package(DistributionSignedRPM, 'postgresql-contrib', context=_context) if has_server: # postgresql-server diff --git a/repos/system_upgrade/el7toel8/actors/postgresqlcheck/tests/test_postgresqlcheck.py b/repos/system_upgrade/el7toel8/actors/postgresqlcheck/tests/test_postgresqlcheck.py index 658d3e4c..559c8f2d 100644 --- a/repos/system_upgrade/el7toel8/actors/postgresqlcheck/tests/test_postgresqlcheck.py +++ b/repos/system_upgrade/el7toel8/actors/postgresqlcheck/tests/test_postgresqlcheck.py @@ -4,7 +4,7 @@ from leapp import reporting from leapp.libraries.actor.postgresqlcheck import report_installed_packages from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM def _generate_rpm_with_name(name): @@ -55,7 +55,7 @@ def test_actor_execution(monkeypatch, has_server, has_contrib): # Add postgresql-contrib rpms += [_generate_rpm_with_name('postgresql-contrib')] - curr_actor_mocked = CurrentActorMocked(msgs=[InstalledRedHatSignedRPM(items=rpms)]) + curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms)]) monkeypatch.setattr(api, 'current_actor', curr_actor_mocked) monkeypatch.setattr(reporting, "create_report", create_report_mocked()) diff --git a/repos/system_upgrade/el7toel8/actors/powertop/actor.py b/repos/system_upgrade/el7toel8/actors/powertop/actor.py index 66af92f6..905dd729 100644 --- a/repos/system_upgrade/el7toel8/actors/powertop/actor.py +++ b/repos/system_upgrade/el7toel8/actors/powertop/actor.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.reporting import create_report, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,12 +12,12 @@ class PowerTop(Actor): """ name = 'powertop' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) def process(self): - if has_package(InstalledRedHatSignedRPM, 'powertop'): + if has_package(DistributionSignedRPM, 'powertop'): create_report([ reporting.Title('PowerTOP compatibility options removed in the next major version'), reporting.Summary( diff --git a/repos/system_upgrade/el7toel8/actors/powertop/tests/component_test_powertop.py b/repos/system_upgrade/el7toel8/actors/powertop/tests/component_test_powertop.py index 9ae59684..0e45d19d 100644 --- a/repos/system_upgrade/el7toel8/actors/powertop/tests/component_test_powertop.py +++ b/repos/system_upgrade/el7toel8/actors/powertop/tests/component_test_powertop.py @@ -1,4 +1,4 @@ -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM from leapp.reporting import Report from leapp.snactor.fixture import current_actor_context @@ -6,7 +6,7 @@ RH_PACKAGER = 'Red Hat, Inc. ' def create_modulesfacts(installed_rpm): - return InstalledRedHatSignedRPM(items=installed_rpm) + return DistributionSignedRPM(items=installed_rpm) def test_actor_with_powertop_package(current_actor_context): diff --git a/repos/system_upgrade/el7toel8/actors/quaggadaemons/actor.py b/repos/system_upgrade/el7toel8/actors/quaggadaemons/actor.py index 72fb6312..b623017c 100644 --- a/repos/system_upgrade/el7toel8/actors/quaggadaemons/actor.py +++ b/repos/system_upgrade/el7toel8/actors/quaggadaemons/actor.py @@ -1,7 +1,7 @@ from leapp.actors import Actor from leapp.libraries.actor.quaggadaemons import process_daemons from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM, QuaggaToFrrFacts +from leapp.models import DistributionSignedRPM, QuaggaToFrrFacts from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -15,10 +15,10 @@ class QuaggaDaemons(Actor): """ name = 'quagga_daemons' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (QuaggaToFrrFacts,) tags = (FactsPhaseTag, IPUWorkflowTag) def process(self): - if has_package(InstalledRedHatSignedRPM, 'quagga'): + if has_package(DistributionSignedRPM, 'quagga'): self.produce(process_daemons()) diff --git a/repos/system_upgrade/el7toel8/actors/sanebackendsmigrate/actor.py b/repos/system_upgrade/el7toel8/actors/sanebackendsmigrate/actor.py index edb1f628..a57ff366 100644 --- a/repos/system_upgrade/el7toel8/actors/sanebackendsmigrate/actor.py +++ b/repos/system_upgrade/el7toel8/actors/sanebackendsmigrate/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import sanebackendsmigrate -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag @@ -13,7 +13,7 @@ class SanebackendsMigrate(Actor): """ name = 'sanebackends_migrate' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = () tags = (ApplicationsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el7toel8/actors/sanebackendsmigrate/libraries/sanebackendsmigrate.py b/repos/system_upgrade/el7toel8/actors/sanebackendsmigrate/libraries/sanebackendsmigrate.py index 5f8dd24b..4cf15dff 100644 --- a/repos/system_upgrade/el7toel8/actors/sanebackendsmigrate/libraries/sanebackendsmigrate.py +++ b/repos/system_upgrade/el7toel8/actors/sanebackendsmigrate/libraries/sanebackendsmigrate.py @@ -1,6 +1,6 @@ from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM # Database of changes in configuration files of sane-backends # between RHELs @@ -278,7 +278,7 @@ def _check_package(pkg_name): :param str pkg_name: name of package """ - return has_package(InstalledRedHatSignedRPM, pkg_name) + return has_package(DistributionSignedRPM, pkg_name) def update_sane(debug_log=api.current_logger().debug, diff --git a/repos/system_upgrade/el7toel8/actors/spamassassinconfigread/actor.py b/repos/system_upgrade/el7toel8/actors/spamassassinconfigread/actor.py index 6b88968d..87451f1a 100644 --- a/repos/system_upgrade/el7toel8/actors/spamassassinconfigread/actor.py +++ b/repos/system_upgrade/el7toel8/actors/spamassassinconfigread/actor.py @@ -3,7 +3,7 @@ import os from leapp.actors import Actor from leapp.libraries.actor import spamassassinconfigread from leapp.libraries.common.utils import read_file -from leapp.models import InstalledRedHatSignedRPM, SpamassassinFacts +from leapp.models import DistributionSignedRPM, SpamassassinFacts from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -16,7 +16,7 @@ class SpamassassinConfigRead(Actor): """ name = 'spamassassin_config_read' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (SpamassassinFacts,) tags = (FactsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el7toel8/actors/spamassassinconfigread/libraries/spamassassinconfigread.py b/repos/system_upgrade/el7toel8/actors/spamassassinconfigread/libraries/spamassassinconfigread.py index fde24f16..9ed8c091 100644 --- a/repos/system_upgrade/el7toel8/actors/spamassassinconfigread/libraries/spamassassinconfigread.py +++ b/repos/system_upgrade/el7toel8/actors/spamassassinconfigread/libraries/spamassassinconfigread.py @@ -1,14 +1,14 @@ from leapp.libraries.actor import spamassassinconfigread_spamc, spamassassinconfigread_spamd from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, SpamassassinFacts +from leapp.models import DistributionSignedRPM, SpamassassinFacts def is_processable(): """ Checks whether the spamassassin package is installed. """ - res = has_package(InstalledRedHatSignedRPM, 'spamassassin') + res = has_package(DistributionSignedRPM, 'spamassassin') if not res: api.current_logger().debug('spamassassin is not installed.') return res diff --git a/repos/system_upgrade/el7toel8/actors/tcpwrapperscheck/actor.py b/repos/system_upgrade/el7toel8/actors/tcpwrapperscheck/actor.py index f6af63ba..63f4e712 100644 --- a/repos/system_upgrade/el7toel8/actors/tcpwrapperscheck/actor.py +++ b/repos/system_upgrade/el7toel8/actors/tcpwrapperscheck/actor.py @@ -4,7 +4,7 @@ from leapp.exceptions import StopActorExecutionError from leapp.libraries.actor.tcpwrapperscheck import config_affects_daemons from leapp.libraries.common.rpms import create_lookup from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, Report, TcpWrappersFacts +from leapp.models import DistributionSignedRPM, Report, TcpWrappersFacts from leapp.reporting import create_report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -38,7 +38,7 @@ class TcpWrappersCheck(Actor): """ name = 'tcp_wrappers_check' - consumes = (TcpWrappersFacts, InstalledRedHatSignedRPM,) + consumes = (TcpWrappersFacts, DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) @@ -54,7 +54,7 @@ class TcpWrappersCheck(Actor): ) # Convert installed packages message to list - packages = create_lookup(InstalledRedHatSignedRPM, field='items', keys=('name',)) + packages = create_lookup(DistributionSignedRPM, field='items', keys=('name',)) found_packages = config_affects_daemons(tcp_wrappers_facts, packages, DAEMONS) diff --git a/repos/system_upgrade/el7toel8/actors/tcpwrapperscheck/libraries/tcpwrapperscheck.py b/repos/system_upgrade/el7toel8/actors/tcpwrapperscheck/libraries/tcpwrapperscheck.py index 5c3e93bb..ad7f07ec 100644 --- a/repos/system_upgrade/el7toel8/actors/tcpwrapperscheck/libraries/tcpwrapperscheck.py +++ b/repos/system_upgrade/el7toel8/actors/tcpwrapperscheck/libraries/tcpwrapperscheck.py @@ -7,7 +7,7 @@ def config_affects_daemons(tcp_wrappers_facts, packages_list, daemons): configuration of tcp_wrappers based on the. :param tcp_wrappers_facts: Facts provided by the TcpWrappersFacts - :param packages_list: List of packages provided by InstalledRedHatSignedRPM + :param packages_list: List of packages provided by DistributionSignedRPM :param daemons: List of packages and keywords affecting daemons in this format: [{"package-name", ["daemon1", "daemon2", ...], ...}] """ diff --git a/repos/system_upgrade/el7toel8/actors/vimmigrate/actor.py b/repos/system_upgrade/el7toel8/actors/vimmigrate/actor.py index 7ac50d17..14b57341 100644 --- a/repos/system_upgrade/el7toel8/actors/vimmigrate/actor.py +++ b/repos/system_upgrade/el7toel8/actors/vimmigrate/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import vimmigrate -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag @@ -11,7 +11,7 @@ class VimMigrate(Actor): """ name = 'vim_migrate' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = () tags = (ApplicationsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el7toel8/actors/vimmigrate/libraries/vimmigrate.py b/repos/system_upgrade/el7toel8/actors/vimmigrate/libraries/vimmigrate.py index 4c403229..2934ccc4 100644 --- a/repos/system_upgrade/el7toel8/actors/vimmigrate/libraries/vimmigrate.py +++ b/repos/system_upgrade/el7toel8/actors/vimmigrate/libraries/vimmigrate.py @@ -1,6 +1,6 @@ from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM def _append_string(path, content): @@ -50,7 +50,7 @@ def _check_package(pkg): :param str pkg: name of package """ - return has_package(InstalledRedHatSignedRPM, pkg) + return has_package(DistributionSignedRPM, pkg) def update_vim(debug_log=api.current_logger().debug, diff --git a/repos/system_upgrade/el7toel8/actors/vsftpdconfigread/actor.py b/repos/system_upgrade/el7toel8/actors/vsftpdconfigread/actor.py index c478d6be..99b8ec21 100644 --- a/repos/system_upgrade/el7toel8/actors/vsftpdconfigread/actor.py +++ b/repos/system_upgrade/el7toel8/actors/vsftpdconfigread/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import vsftpdconfigread -from leapp.models import InstalledRedHatSignedRPM, VsftpdFacts +from leapp.models import DistributionSignedRPM, VsftpdFacts from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -10,11 +10,11 @@ class VsftpdConfigRead(Actor): """ name = 'vsftpd_config_read' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (VsftpdFacts,) tags = (FactsPhaseTag, IPUWorkflowTag) def process(self): - installed_rpm_facts = next(self.consume(InstalledRedHatSignedRPM)) + installed_rpm_facts = next(self.consume(DistributionSignedRPM)) if vsftpdconfigread.is_processable(installed_rpm_facts): self.produce(vsftpdconfigread.get_vsftpd_facts()) diff --git a/repos/system_upgrade/el7toel8/actors/vsftpdconfigread/tests/test_library_vsftpdconfigread.py b/repos/system_upgrade/el7toel8/actors/vsftpdconfigread/tests/test_library_vsftpdconfigread.py index d92ac1ed..6f62617b 100644 --- a/repos/system_upgrade/el7toel8/actors/vsftpdconfigread/tests/test_library_vsftpdconfigread.py +++ b/repos/system_upgrade/el7toel8/actors/vsftpdconfigread/tests/test_library_vsftpdconfigread.py @@ -3,7 +3,7 @@ import os from leapp.libraries.actor import vsftpdconfigread from leapp.libraries.common.testutils import make_IOError, make_OSError -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM class MockFileOperations(object): @@ -194,7 +194,7 @@ def test_is_processable_vsftpd_installed(): packager='foo', arch='x86_64', pgpsig='bar'), RPM(name='postfix', version='2.10.1', release='7.el7', epoch='0', packager='foo', arch='x86_64', pgpsig='bar')] - installed_rpm_facts = InstalledRedHatSignedRPM(items=installed_rpms) + installed_rpm_facts = DistributionSignedRPM(items=installed_rpms) res = vsftpdconfigread.is_processable(installed_rpm_facts) @@ -207,7 +207,7 @@ def test_is_processable_vsftpd_not_installed(): packager='foo', arch='x86_64', pgpsig='bar'), RPM(name='postfix', version='2.10.1', release='7.el7', epoch='0', packager='foo', arch='x86_64', pgpsig='bar')] - installed_rpm_facts = InstalledRedHatSignedRPM(items=installed_rpms) + installed_rpm_facts = DistributionSignedRPM(items=installed_rpms) res = vsftpdconfigread.is_processable(installed_rpm_facts) diff --git a/repos/system_upgrade/el8toel9/actors/dotnet/actor.py b/repos/system_upgrade/el8toel9/actors/dotnet/actor.py index d6e3e465..75489c61 100644 --- a/repos/system_upgrade/el8toel9/actors/dotnet/actor.py +++ b/repos/system_upgrade/el8toel9/actors/dotnet/actor.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.actors import Actor from leapp.libraries.common.rpms import has_package -from leapp.models import InstalledRedHatSignedRPM, Report +from leapp.models import DistributionSignedRPM, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag UNSUPPORTED_VERSIONS = ['2.1', '3.0', '3.1', '5.0'] @@ -13,7 +13,7 @@ class DotnetUnsupportedVersionsCheck(Actor): """ name = 'dotnet_unsupported_versions_check' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) @@ -22,7 +22,7 @@ class DotnetUnsupportedVersionsCheck(Actor): for unsupported_version in UNSUPPORTED_VERSIONS: runtime_package = f'dotnet-runtime-{unsupported_version}' - if has_package(InstalledRedHatSignedRPM, runtime_package): + if has_package(DistributionSignedRPM, runtime_package): unsupported_versions_report_text += '{0}{1}'.format('\n - ', unsupported_version) if unsupported_versions_report_text: diff --git a/repos/system_upgrade/el8toel9/actors/dotnet/tests/test_dotnet.py b/repos/system_upgrade/el8toel9/actors/dotnet/tests/test_dotnet.py index 93fae569..a58403d5 100644 --- a/repos/system_upgrade/el8toel9/actors/dotnet/tests/test_dotnet.py +++ b/repos/system_upgrade/el8toel9/actors/dotnet/tests/test_dotnet.py @@ -1,6 +1,6 @@ import pytest -from leapp.models import InstalledRedHatSignedRPM, Report, RPM +from leapp.models import DistributionSignedRPM, Report, RPM def _generate_rpm_with_name(name): @@ -34,7 +34,7 @@ def test_actor_execution(monkeypatch, current_actor_context, unsupported_version rpms += [_generate_rpm_with_name(f'dotnet-runtime-{version}')] # Executed actor fed with fake RPMs - current_actor_context.feed(InstalledRedHatSignedRPM(items=rpms)) + current_actor_context.feed(DistributionSignedRPM(items=rpms)) current_actor_context.run() if unsupported_versions: diff --git a/repos/system_upgrade/el8toel9/actors/kernel/checkkpatch/actor.py b/repos/system_upgrade/el8toel9/actors/kernel/checkkpatch/actor.py index 392fde04..e7f6179c 100644 --- a/repos/system_upgrade/el8toel9/actors/kernel/checkkpatch/actor.py +++ b/repos/system_upgrade/el8toel9/actors/kernel/checkkpatch/actor.py @@ -1,7 +1,7 @@ from leapp.actors import Actor from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import CopyFile, InstalledRedHatSignedRPM, TargetUserSpacePreupgradeTasks +from leapp.models import CopyFile, DistributionSignedRPM, TargetUserSpacePreupgradeTasks from leapp.tags import ChecksPhaseTag, IPUWorkflowTag PLUGIN_PKGNAME = "kpatch-dnf" @@ -18,12 +18,12 @@ class CheckKpatch(Actor): """ name = 'check_kpatch' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (TargetUserSpacePreupgradeTasks,) tags = (IPUWorkflowTag, ChecksPhaseTag) def process(self): - if has_package(InstalledRedHatSignedRPM, PLUGIN_PKGNAME): + if has_package(DistributionSignedRPM, PLUGIN_PKGNAME): api.produce(TargetUserSpacePreupgradeTasks( install_rpms=[PLUGIN_PKGNAME], copy_files=[CopyFile(src=CONFIG_PATH)])) diff --git a/repos/system_upgrade/el8toel9/actors/mariadbcheck/actor.py b/repos/system_upgrade/el8toel9/actors/mariadbcheck/actor.py index 2e7ebc16..8bd8ae23 100644 --- a/repos/system_upgrade/el8toel9/actors/mariadbcheck/actor.py +++ b/repos/system_upgrade/el8toel9/actors/mariadbcheck/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor.mariadbcheck import report_installed_packages -from leapp.models import InstalledRedHatSignedRPM, Report +from leapp.models import DistributionSignedRPM, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,7 +12,7 @@ class MariadbCheck(Actor): with MariaDB installed. """ name = 'mariadb_check' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el8toel9/actors/mariadbcheck/libraries/mariadbcheck.py b/repos/system_upgrade/el8toel9/actors/mariadbcheck/libraries/mariadbcheck.py index 45e3d8c4..c56c6422 100644 --- a/repos/system_upgrade/el8toel9/actors/mariadbcheck/libraries/mariadbcheck.py +++ b/repos/system_upgrade/el8toel9/actors/mariadbcheck/libraries/mariadbcheck.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM # Summary for mariadb-server report report_server_inst_summary = ( @@ -47,7 +47,7 @@ def report_installed_packages(_context=api): Create the report if the mariadb-server rpm (RH signed) is installed. """ - has_server = has_package(InstalledRedHatSignedRPM, 'mariadb-server', context=_context) + has_server = has_package(DistributionSignedRPM, 'mariadb-server', context=_context) if has_server: _report_server_installed() diff --git a/repos/system_upgrade/el8toel9/actors/mariadbcheck/tests/test_mariadbcheck.py b/repos/system_upgrade/el8toel9/actors/mariadbcheck/tests/test_mariadbcheck.py index 15e70ede..02cffb21 100644 --- a/repos/system_upgrade/el8toel9/actors/mariadbcheck/tests/test_mariadbcheck.py +++ b/repos/system_upgrade/el8toel9/actors/mariadbcheck/tests/test_mariadbcheck.py @@ -4,7 +4,7 @@ from leapp import reporting from leapp.libraries.actor.mariadbcheck import report_installed_packages from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM def _generate_rpm_with_name(name): @@ -50,7 +50,7 @@ def test_actor_execution(monkeypatch, has_server): # Add mariadb-server rpms += [_generate_rpm_with_name('mariadb-server')] - curr_actor_mocked = CurrentActorMocked(msgs=[InstalledRedHatSignedRPM(items=rpms)]) + curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms)]) monkeypatch.setattr(api, 'current_actor', curr_actor_mocked) monkeypatch.setattr(reporting, "create_report", create_report_mocked()) diff --git a/repos/system_upgrade/el8toel9/actors/multipathconfread/actor.py b/repos/system_upgrade/el8toel9/actors/multipathconfread/actor.py index ec558cbe..2b41ae8b 100644 --- a/repos/system_upgrade/el8toel9/actors/multipathconfread/actor.py +++ b/repos/system_upgrade/el8toel9/actors/multipathconfread/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import multipathconfread -from leapp.models import InstalledRedHatSignedRPM, MultipathConfFacts8to9, TargetUserSpaceUpgradeTasks +from leapp.models import DistributionSignedRPM, MultipathConfFacts8to9, TargetUserSpaceUpgradeTasks from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -19,7 +19,7 @@ class MultipathConfRead8to9(Actor): """ name = 'multipath_conf_read_8to9' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (MultipathConfFacts8to9, TargetUserSpaceUpgradeTasks) tags = (FactsPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el8toel9/actors/multipathconfread/libraries/multipathconfread.py b/repos/system_upgrade/el8toel9/actors/multipathconfread/libraries/multipathconfread.py index 9acd243e..e5b3f06c 100644 --- a/repos/system_upgrade/el8toel9/actors/multipathconfread/libraries/multipathconfread.py +++ b/repos/system_upgrade/el8toel9/actors/multipathconfread/libraries/multipathconfread.py @@ -6,7 +6,7 @@ from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api from leapp.models import ( CopyFile, - InstalledRedHatSignedRPM, + DistributionSignedRPM, MultipathConfFacts8to9, MultipathConfig8to9, TargetUserSpaceUpgradeTasks @@ -78,7 +78,7 @@ def _parse_config_dir(config_dir): def is_processable(): - res = has_package(InstalledRedHatSignedRPM, 'device-mapper-multipath') + res = has_package(DistributionSignedRPM, 'device-mapper-multipath') if not res: api.current_logger().debug('device-mapper-multipath is not installed.') return res diff --git a/repos/system_upgrade/el8toel9/actors/nischeck/actor.py b/repos/system_upgrade/el8toel9/actors/nischeck/actor.py index 9b70ae83..a5099b10 100644 --- a/repos/system_upgrade/el8toel9/actors/nischeck/actor.py +++ b/repos/system_upgrade/el8toel9/actors/nischeck/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor.nischeck import report_nis -from leapp.models import InstalledRedHatSignedRPM, NISConfig, Report +from leapp.models import DistributionSignedRPM, NISConfig, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -11,7 +11,7 @@ class NISCheck(Actor): """ name = 'nis_check' - consumes = (InstalledRedHatSignedRPM, NISConfig) + consumes = (DistributionSignedRPM, NISConfig) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el8toel9/actors/nischeck/libraries/nischeck.py b/repos/system_upgrade/el8toel9/actors/nischeck/libraries/nischeck.py index 7e3d9a80..c5d85977 100644 --- a/repos/system_upgrade/el8toel9/actors/nischeck/libraries/nischeck.py +++ b/repos/system_upgrade/el8toel9/actors/nischeck/libraries/nischeck.py @@ -2,7 +2,7 @@ from leapp import reporting from leapp.exceptions import StopActorExecutionError from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, NISConfig +from leapp.models import DistributionSignedRPM, NISConfig report_summary = ( 'The NIS components (ypserv, ypbind, and yp-tools) are no longer available in RHEL-9.' @@ -47,7 +47,7 @@ def report_nis(): configured_rpms = nis_conf.nis_not_default_conf installed_packages = [package for package in ( - 'ypserv', 'ypbind') if has_package(InstalledRedHatSignedRPM, package)] + 'ypserv', 'ypbind') if has_package(DistributionSignedRPM, package)] # Final list of NIS packages (configured and installed) rpms_configured_installed = [x for x in installed_packages if x in configured_rpms] diff --git a/repos/system_upgrade/el8toel9/actors/nischeck/tests/test_nischeck.py b/repos/system_upgrade/el8toel9/actors/nischeck/tests/test_nischeck.py index 7bdfed02..3889b532 100644 --- a/repos/system_upgrade/el8toel9/actors/nischeck/tests/test_nischeck.py +++ b/repos/system_upgrade/el8toel9/actors/nischeck/tests/test_nischeck.py @@ -6,7 +6,7 @@ from leapp import reporting from leapp.libraries.actor import nischeck from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, NISConfig, RPM +from leapp.models import DistributionSignedRPM, NISConfig, RPM _generate_rpm = functools.partial(RPM, pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 199e2f91fd431d51', @@ -51,7 +51,7 @@ def test_actor_nis(monkeypatch, pkgs_installed, pkgs_configured): # Generate NIS facts nis_facts = NISConfig(nis_not_default_conf=pkgs_configured) - curr_actor_mocked = CurrentActorMocked(msgs=[InstalledRedHatSignedRPM(items=rpms), nis_facts]) + curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms), nis_facts]) monkeypatch.setattr(api, 'current_actor', curr_actor_mocked) monkeypatch.setattr(reporting, "create_report", create_report_mocked()) diff --git a/repos/system_upgrade/el8toel9/actors/opensshdropindirectory/actor.py b/repos/system_upgrade/el8toel9/actors/opensshdropindirectory/actor.py index 17a0c01a..f39311c5 100644 --- a/repos/system_upgrade/el8toel9/actors/opensshdropindirectory/actor.py +++ b/repos/system_upgrade/el8toel9/actors/opensshdropindirectory/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import opensshdropindirectory -from leapp.models import InstalledRedHatSignedRPM, OpenSshConfig +from leapp.models import DistributionSignedRPM, OpenSshConfig from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag @@ -21,7 +21,7 @@ class OpenSshDropInDirectory(Actor): """ name = 'open_ssh_drop_in_directory' - consumes = (OpenSshConfig, InstalledRedHatSignedRPM,) + consumes = (OpenSshConfig, DistributionSignedRPM,) produces = () tags = (IPUWorkflowTag, ApplicationsPhaseTag,) diff --git a/repos/system_upgrade/el8toel9/actors/opensshdropindirectory/libraries/opensshdropindirectory.py b/repos/system_upgrade/el8toel9/actors/opensshdropindirectory/libraries/opensshdropindirectory.py index 3b4b24f8..d5bbc204 100644 --- a/repos/system_upgrade/el8toel9/actors/opensshdropindirectory/libraries/opensshdropindirectory.py +++ b/repos/system_upgrade/el8toel9/actors/opensshdropindirectory/libraries/opensshdropindirectory.py @@ -1,7 +1,7 @@ from leapp.exceptions import StopActorExecutionError from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM # The main SSHD configuration file SSHD_CONFIG = '/etc/ssh/sshd_config' @@ -49,7 +49,7 @@ def process(openssh_messages): ) # If the package is not installed, there is no need to do anything - if not has_package(InstalledRedHatSignedRPM, 'openssh-server'): + if not has_package(DistributionSignedRPM, 'openssh-server'): return # If the configuration file was not modified, the rpm update will bring the new diff --git a/repos/system_upgrade/el8toel9/actors/opensshdropindirectorycheck/actor.py b/repos/system_upgrade/el8toel9/actors/opensshdropindirectorycheck/actor.py index 19f0e44d..5d52e3ca 100644 --- a/repos/system_upgrade/el8toel9/actors/opensshdropindirectorycheck/actor.py +++ b/repos/system_upgrade/el8toel9/actors/opensshdropindirectorycheck/actor.py @@ -3,7 +3,7 @@ from leapp.actors import Actor from leapp.exceptions import StopActorExecutionError from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, OpenSshConfig, Report +from leapp.models import DistributionSignedRPM, OpenSshConfig, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -18,7 +18,7 @@ class OpenSshDropInDirectoryCheck(Actor): """ name = 'open_ssh_drop_in_directory_check' - consumes = (OpenSshConfig, InstalledRedHatSignedRPM,) + consumes = (OpenSshConfig, DistributionSignedRPM,) produces = (Report,) tags = (IPUWorkflowTag, ChecksPhaseTag,) @@ -33,7 +33,7 @@ class OpenSshDropInDirectoryCheck(Actor): ) # If the package is not installed, there is no need to do anything - if not has_package(InstalledRedHatSignedRPM, 'openssh-server'): + if not has_package(DistributionSignedRPM, 'openssh-server'): return # If the configuration file was not modified, the rpm update will bring the new diff --git a/repos/system_upgrade/el8toel9/actors/opensshsubsystemsftp/actor.py b/repos/system_upgrade/el8toel9/actors/opensshsubsystemsftp/actor.py index 14d8b882..a4e7f010 100644 --- a/repos/system_upgrade/el8toel9/actors/opensshsubsystemsftp/actor.py +++ b/repos/system_upgrade/el8toel9/actors/opensshsubsystemsftp/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import opensshsubsystemsftp -from leapp.models import InstalledRedHatSignedRPM, OpenSshConfig +from leapp.models import DistributionSignedRPM, OpenSshConfig from leapp.reporting import Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -14,7 +14,7 @@ class OpenSshSubsystemSftp(Actor): """ name = 'open_ssh_subsystem_sftp' - consumes = (OpenSshConfig, InstalledRedHatSignedRPM,) + consumes = (OpenSshConfig, DistributionSignedRPM,) produces = (Report,) tags = (IPUWorkflowTag, ChecksPhaseTag) diff --git a/repos/system_upgrade/el8toel9/actors/postgresqlcheck/actor.py b/repos/system_upgrade/el8toel9/actors/postgresqlcheck/actor.py index 2935d532..cd0c9c4d 100644 --- a/repos/system_upgrade/el8toel9/actors/postgresqlcheck/actor.py +++ b/repos/system_upgrade/el8toel9/actors/postgresqlcheck/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor.postgresqlcheck import report_installed_packages -from leapp.models import InstalledRedHatSignedRPM, Report +from leapp.models import DistributionSignedRPM, Report from leapp.tags import ChecksPhaseTag, IPUWorkflowTag @@ -12,7 +12,7 @@ class PostgresqlCheck(Actor): with PostgreSQL installed. """ name = 'postgresql_check' - consumes = (InstalledRedHatSignedRPM,) + consumes = (DistributionSignedRPM,) produces = (Report,) tags = (ChecksPhaseTag, IPUWorkflowTag) diff --git a/repos/system_upgrade/el8toel9/actors/postgresqlcheck/libraries/postgresqlcheck.py b/repos/system_upgrade/el8toel9/actors/postgresqlcheck/libraries/postgresqlcheck.py index ae6d625f..42519aaf 100644 --- a/repos/system_upgrade/el8toel9/actors/postgresqlcheck/libraries/postgresqlcheck.py +++ b/repos/system_upgrade/el8toel9/actors/postgresqlcheck/libraries/postgresqlcheck.py @@ -1,7 +1,7 @@ from leapp import reporting from leapp.libraries.common.rpms import has_package from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM +from leapp.models import DistributionSignedRPM # Summary for postgresql-server report report_server_inst_summary = ( @@ -47,7 +47,7 @@ def report_installed_packages(_context=api): Create the report if the postgresql-server rpm (RH signed) is installed. """ - has_server = has_package(InstalledRedHatSignedRPM, 'postgresql-server', context=_context) + has_server = has_package(DistributionSignedRPM, 'postgresql-server', context=_context) if has_server: # postgresql-server diff --git a/repos/system_upgrade/el8toel9/actors/postgresqlcheck/tests/test_postgresqlcheck.py b/repos/system_upgrade/el8toel9/actors/postgresqlcheck/tests/test_postgresqlcheck.py index 7b6f4384..7210a117 100644 --- a/repos/system_upgrade/el8toel9/actors/postgresqlcheck/tests/test_postgresqlcheck.py +++ b/repos/system_upgrade/el8toel9/actors/postgresqlcheck/tests/test_postgresqlcheck.py @@ -4,7 +4,7 @@ from leapp import reporting from leapp.libraries.actor.postgresqlcheck import report_installed_packages from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked from leapp.libraries.stdlib import api -from leapp.models import InstalledRedHatSignedRPM, RPM +from leapp.models import DistributionSignedRPM, RPM def _generate_rpm_with_name(name): @@ -50,7 +50,7 @@ def test_actor_execution(monkeypatch, has_server): # Add postgresql-server rpms += [_generate_rpm_with_name('postgresql-server')] - curr_actor_mocked = CurrentActorMocked(msgs=[InstalledRedHatSignedRPM(items=rpms)]) + curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms)]) monkeypatch.setattr(api, 'current_actor', curr_actor_mocked) monkeypatch.setattr(reporting, "create_report", create_report_mocked()) diff --git a/repos/system_upgrade/el8toel9/actors/vdoconversionscanner/actor.py b/repos/system_upgrade/el8toel9/actors/vdoconversionscanner/actor.py index 035299e3..db2a6ebc 100644 --- a/repos/system_upgrade/el8toel9/actors/vdoconversionscanner/actor.py +++ b/repos/system_upgrade/el8toel9/actors/vdoconversionscanner/actor.py @@ -1,6 +1,6 @@ from leapp.actors import Actor from leapp.libraries.actor import vdoconversionscanner -from leapp.models import InstalledRedHatSignedRPM, StorageInfo, VdoConversionInfo +from leapp.models import DistributionSignedRPM, StorageInfo, VdoConversionInfo from leapp.tags import FactsPhaseTag, IPUWorkflowTag @@ -59,7 +59,7 @@ class VdoConversionScanner(Actor): """ name = 'vdo_conversion_scanner' - consumes = (InstalledRedHatSignedRPM, StorageInfo) + consumes = (DistributionSignedRPM, StorageInfo) produces = (VdoConversionInfo,) tags = (IPUWorkflowTag, FactsPhaseTag) diff --git a/repos/system_upgrade/el8toel9/actors/vdoconversionscanner/libraries/vdoconversionscanner.py b/repos/system_upgrade/el8toel9/actors/vdoconversionscanner/libraries/vdoconversionscanner.py index cea1fe56..fc325e27 100644 --- a/repos/system_upgrade/el8toel9/actors/vdoconversionscanner/libraries/vdoconversionscanner.py +++ b/repos/system_upgrade/el8toel9/actors/vdoconversionscanner/libraries/vdoconversionscanner.py @@ -37,11 +37,11 @@ def _check_vdo_pre_conversion(device): def _lvm_package_installed(): - return rpms.has_package(models.InstalledRedHatSignedRPM, 'lvm2') + return rpms.has_package(models.DistributionSignedRPM, 'lvm2') def _vdo_package_installed(): - return rpms.has_package(models.InstalledRedHatSignedRPM, 'vdo') + return rpms.has_package(models.DistributionSignedRPM, 'vdo') def get_info(storage_info): -- 2.43.0