diff --git a/packaging/leapp-repository.spec b/packaging/leapp-repository.spec index 19047e01d4..2e6f5d2e86 100644 --- a/packaging/leapp-repository.spec +++ b/packaging/leapp-repository.spec @@ -240,8 +240,6 @@ rm -rf %{buildroot}%{leapp_python_sitelib}/leapp/cli/commands/tests rm -rf %{buildroot}%{repositorydir}/system_upgrade/el8toel9 %else rm -rf %{buildroot}%{repositorydir}/system_upgrade/el7toel8 -# CloudLinux migration only supports el7 to el8 -rm -rf %{buildroot}%{repositorydir}/system_upgrade/cloudlinux %endif # remove component/unit tests, Makefiles, ... stuff that related to testing only diff --git a/repos/system_upgrade/cloudlinux/.leapp/info b/repos/system_upgrade/cloudlinux/.leapp/info index 1f16b9fae1..07be6e6e18 100644 --- a/repos/system_upgrade/cloudlinux/.leapp/info +++ b/repos/system_upgrade/cloudlinux/.leapp/info @@ -1 +1 @@ -{"name": "cloudlinux", "id": "427ddd90-9b5e-4400-b21e-73d77791f175", "repos": ["644900a5-c347-43a3-bfab-f448f46d9647", "c47fbc3d-ae38-416e-9176-7163d67d94f6", "efcf9016-f2d1-4609-9329-a298e6587b3c"]} \ No newline at end of file +{"name": "cloudlinux", "id": "427ddd90-9b5e-4400-b21e-73d77791f175", "repos": ["644900a5-c347-43a3-bfab-f448f46d9647", "efcf9016-f2d1-4609-9329-a298e6587b3c"]} \ No newline at end of file diff --git a/repos/system_upgrade/cloudlinux/actors/checkrhnclienttools/actor.py b/repos/system_upgrade/cloudlinux/actors/checkrhnclienttools/actor.py index 596f3c6d22..a36712ba45 100644 --- a/repos/system_upgrade/cloudlinux/actors/checkrhnclienttools/actor.py +++ b/repos/system_upgrade/cloudlinux/actors/checkrhnclienttools/actor.py @@ -27,6 +27,9 @@ class CheckRhnClientToolsVersion(Actor): @run_on_cloudlinux def process(self): + # todo: (CLOS-3202) update the actor + return + title, summary, remediation = None, None, None # ex: # Version : 2.0.2 diff --git a/repos/system_upgrade/cloudlinux/actors/clearpackageconflicts/actor.py b/repos/system_upgrade/cloudlinux/actors/clearpackageconflicts/actor.py index 5c70a62307..fc642d5029 100644 --- a/repos/system_upgrade/cloudlinux/actors/clearpackageconflicts/actor.py +++ b/repos/system_upgrade/cloudlinux/actors/clearpackageconflicts/actor.py @@ -97,5 +97,6 @@ def lua_cjson_handle(self): @run_on_cloudlinux def process(self): - self.rpm_lookup = {rpm for rpm in self.consume(InstalledRPM)} + # todo: (CLOS-3205) investigate why set is needed here + self.rpm_lookup = [rpm for rpm in self.consume(InstalledRPM)] self.alt_python37_handle() diff --git a/repos/system_upgrade/cloudlinux/actors/switchclnchanneldownload/actor.py b/repos/system_upgrade/cloudlinux/actors/switchclnchanneldownload/actor.py index 7293991145..bc1c9f5075 100644 --- a/repos/system_upgrade/cloudlinux/actors/switchclnchanneldownload/actor.py +++ b/repos/system_upgrade/cloudlinux/actors/switchclnchanneldownload/actor.py @@ -9,6 +9,7 @@ from leapp.libraries.common.cln_switch import cln_switch, get_target_userspace_path from leapp import reporting from leapp.reporting import Report +from leapp.libraries.common.config.version import get_target_major_version @@ -29,7 +30,7 @@ class SwitchClnChannelDownload(Actor): @run_on_cloudlinux def process(self): try: - cln_switch(target=8) + cln_switch(target=int(get_target_major_version())) except CalledProcessError as e: reporting.create_report( [ diff --git a/repos/system_upgrade/cloudlinux/actors/switchclnchannelreset/actor.py b/repos/system_upgrade/cloudlinux/actors/switchclnchannelreset/actor.py index 74090f7d53..637cefb571 100644 --- a/repos/system_upgrade/cloudlinux/actors/switchclnchannelreset/actor.py +++ b/repos/system_upgrade/cloudlinux/actors/switchclnchannelreset/actor.py @@ -4,6 +4,7 @@ from leapp.libraries.stdlib import CalledProcessError from leapp.libraries.common.cllaunch import run_on_cloudlinux from leapp.libraries.common.cln_switch import cln_switch +from leapp.libraries.common.config.version import get_source_major_version from leapp import reporting from leapp.reporting import Report @@ -21,12 +22,12 @@ class SwitchClnChannelReset(Actor): @run_on_cloudlinux def process(self): try: - cln_switch(target=7) + cln_switch(target=get_source_major_version()) except CalledProcessError as e: reporting.create_report( [ reporting.Title( - "Failed to switch CloudLinux Network channel from to 7." + "Failed to switch CloudLinux Network channel." ), reporting.Summary( "Command {} failed with exit code {}." diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py index 5345297433..dce6735389 100644 --- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py +++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py @@ -215,8 +215,8 @@ def _handle_transaction_err_msg_size(err): def enable_spacewalk_module(context): - enabled_repos = ["cloudlinux8-baseos"] target_major_version = get_target_major_version() + enabled_repos = ["cloudlinux{version}-baseos".format(version=target_major_version)] repos_opt = [['--enablerepo', repo] for repo in enabled_repos] repos_opt = list(itertools.chain(*repos_opt)) @@ -260,10 +260,18 @@ def prepare_target_userspace(context, userspace_dir, enabled_repos, packages): _import_gpg_keys(context, install_root_dir, target_major_version) api.current_logger().debug('Installing cloudlinux-release') - context.call(['rpm', '--import', 'https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux'], callback_raw=utils.logging_handler) - context.call(['dnf', '-y', 'localinstall', 'https://repo.cloudlinux.com/cloudlinux/migrate/release-files/cloudlinux/8/x86_64/cloudlinux8-release-current.x86_64.rpm'], callback_raw=utils.logging_handler) - - enable_spacewalk_module(context) + context.call(['rpm', '--import', 'https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux'], + callback_raw=utils.logging_handler) + cloudlinux_release_url = ( + 'https://repo.cloudlinux.com/cloudlinux/migrate/release-files' + '/cloudlinux/{version}/x86_64/cloudlinux{version}-release-current.x86_64.rpm' + ).format(version=target_major_version) + context.call(['dnf', '-y', 'localinstall', cloudlinux_release_url], + callback_raw=utils.logging_handler) + + # cloudlinux 9 does not have modular packages + if target_major_version == '8': + enable_spacewalk_module(context) api.current_logger().debug('Installing packages into target userspace: {}'.format(packages)) @@ -333,7 +341,7 @@ def prepare_target_userspace(context, userspace_dir, enabled_repos, packages): # transaction check phase is done - so the preupgrade checks won't affect the host system. # The 'switch_cln_channel_download' actor should take care of switching the channel back to the CL8 channel # when it's time to download the upgrade packages. - cln_switch(target=8) + cln_switch(target=int(target_major_version)) def _query_rpm_for_pkg_files(context, pkgs): diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py index 4ebbdf4d9d..337ff8cd2f 100644 --- a/repos/system_upgrade/common/libraries/config/version.py +++ b/repos/system_upgrade/common/libraries/config/version.py @@ -16,7 +16,7 @@ _SUPPORTED_VERSIONS = { # Note: 'rhel-alt' is detected when on 'rhel' with kernel 4.x '7': {'rhel': ['7.9'], 'rhel-alt': [], 'rhel-saphana': ['7.9'], 'centos': ['7.9'], 'eurolinux': ['7.9'], 'ol': ['7.9'], 'scientific': ['7.9'], 'cloudlinux': ['7.9']}, - '8': {'rhel': ['8.8', '8.10'], 'rhel-saphana': ['8.8', '8.10'], 'centos': ['8.5', '8.999'], 'almalinux': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'eurolinux': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'ol': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'rocky': ['8.6', '8.7', '8.8', '8.9', '8.10']}, + '8': {'rhel': ['8.8', '8.10'], 'rhel-saphana': ['8.8', '8.10'], 'centos': ['8.5', '8.999'], 'almalinux': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'eurolinux': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'ol': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'rocky': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'cloudlinux': ['8.10']}, } diff --git a/repos/system_upgrade/el8toel9/actors/checkdeprecatedrpmsignature/actor.py b/repos/system_upgrade/el8toel9/actors/checkdeprecatedrpmsignature/actor.py index 549b4c7d63..bbf2981740 100644 --- a/repos/system_upgrade/el8toel9/actors/checkdeprecatedrpmsignature/actor.py +++ b/repos/system_upgrade/el8toel9/actors/checkdeprecatedrpmsignature/actor.py @@ -37,4 +37,6 @@ class CheckDeprecatedRPMSignature(Actor): tags = (IPUWorkflowTag, ChecksPhaseTag) def process(self): - checkdeprecatedrpmsignature.process() + # todo: (CLOS-3206) resign all packages and turn the check back on + # checkdeprecatedrpmsignature.process() + pass