Update ELevate patch

This commit is contained in:
Andrew Lukoshko 2022-08-31 13:05:11 +00:00
parent 93f6a68056
commit f2a51df8b8

View File

@ -415,10 +415,10 @@ index f4b02e9..c22165e 100644
def test_pes_data_not_found(monkeypatch): def test_pes_data_not_found(monkeypatch):
def read_or_fetch_mocked(filename, directory="/etc/leapp/files", service=None, allow_empty=False): def read_or_fetch_mocked(filename, directory="/etc/leapp/files", service=None, allow_empty=False):
diff --git a/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py b/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py diff --git a/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py b/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py
index 01f6df3..4ba05f0 100644 index 01f6df3..0bb0726 100644
--- a/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py --- a/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py
+++ b/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py +++ b/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py
@@ -1,27 +1,52 @@ @@ -1,27 +1,65 @@
from leapp.actors import Actor from leapp.actors import Actor
from leapp.libraries.common import rhui from leapp.libraries.common import rhui
-from leapp.models import InstalledRedHatSignedRPM, InstalledRPM, InstalledUnsignedRPM -from leapp.models import InstalledRedHatSignedRPM, InstalledRPM, InstalledUnsignedRPM
@ -436,13 +436,26 @@ index 01f6df3..4ba05f0 100644
+ 'centos': ['24c6a8a7f4a80eb5', + 'centos': ['24c6a8a7f4a80eb5',
+ '05b555b38483c65d', + '05b555b38483c65d',
+ '4eb84e71f2ee9d55'], + '4eb84e71f2ee9d55'],
+ 'cloudlinux': ['8c55a6628608cb71'] + 'cloudlinux': ['8c55a6628608cb71'],
+ 'almalinux': ['51d6647ec21ad6ea',
+ 'd36cb86cb86b3716'],
+ 'rocky': ['15af5dac6d745a60',
+ '702d426d350d275d'],
+ 'ol': ['72f97b74ec551f03',
+ '82562ea9ad986da3',
+ 'bc4d06a08d8b756f'],
+ 'eurolinux': ['75c333f418cd4a9e',
+ 'b413acad6275f250',
+ 'f7ad3e5a1c9fd080']
+} +}
+ +
+VENDOR_PACKAGERS = { +VENDOR_PACKAGERS = {
+ "rhel": "Red Hat, Inc.", + "rhel": "Red Hat, Inc.",
+ "centos": "CentOS", + "centos": "CentOS",
+ "cloudlinux": "CloudLinux Packaging Team", + "cloudlinux": "CloudLinux Packaging Team",
+ "almalinux": "AlmaLinux Packaging Team",
+ "rocky": "infrastructure@rockylinux.org",
+ "eurolinux": "EuroLinux",
+} +}
+ +
+ +
@ -481,7 +494,7 @@ index 01f6df3..4ba05f0 100644
signed_pkgs = InstalledRedHatSignedRPM() signed_pkgs = InstalledRedHatSignedRPM()
unsigned_pkgs = InstalledUnsignedRPM() unsigned_pkgs = InstalledUnsignedRPM()
@@ -32,11 +57,11 @@ class RedHatSignedRpmScanner(Actor): @@ -32,11 +70,11 @@ class RedHatSignedRpmScanner(Actor):
all_signed = [ all_signed = [
env env
for env in env_vars for env in env_vars
@ -496,7 +509,7 @@ index 01f6df3..4ba05f0 100644
def is_gpg_pubkey(pkg): def is_gpg_pubkey(pkg):
"""Check if gpg-pubkey pkg exists or LEAPP_DEVEL_RPMS_ALL_SIGNED=1 """Check if gpg-pubkey pkg exists or LEAPP_DEVEL_RPMS_ALL_SIGNED=1
@@ -44,15 +69,15 @@ class RedHatSignedRpmScanner(Actor): @@ -44,15 +82,15 @@ class RedHatSignedRpmScanner(Actor):
gpg-pubkey is not signed as it would require another package gpg-pubkey is not signed as it would require another package
to verify its signature to verify its signature
""" """
@ -517,7 +530,7 @@ index 01f6df3..4ba05f0 100644
def is_azure_pkg(pkg): def is_azure_pkg(pkg):
"""Whitelist Azure config package.""" """Whitelist Azure config package."""
@@ -68,16 +93,24 @@ class RedHatSignedRpmScanner(Actor): @@ -68,16 +106,24 @@ class RedHatSignedRpmScanner(Actor):
for pkg in rpm_pkgs.items: for pkg in rpm_pkgs.items:
if any( if any(
[ [
@ -984,6 +997,33 @@ index 00de073..fb86639 100644
class SetupTargetRepos(Actor): class SetupTargetRepos(Actor):
diff --git a/repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py b/repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
index 3f34aed..2992037 100644
--- a/repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
+++ b/repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
@@ -59,9 +59,20 @@ def _get_used_repo_dict():
def _setup_repomap_handler(src_repoids):
- repo_mappig_msg = next(api.consume(RepositoriesMapping), RepositoriesMapping())
+ combined_mapping = []
+ combined_repositories = []
+ # Depending on whether there are any vendors present, we might get more than one message.
+ for msg in api.consume(RepositoriesMapping):
+ combined_mapping.extend(msg.mapping)
+ combined_repositories.extend(msg.repositories)
+
+ combined_repomapping = RepositoriesMapping(
+ mapping=combined_mapping,
+ repositories=combined_repositories
+ )
+
rhui_info = next(api.consume(RHUIInfo), RHUIInfo(provider=''))
- repomap = setuptargetrepos_repomap.RepoMapDataHandler(repo_mappig_msg, cloud_provider=rhui_info.provider)
+ repomap = setuptargetrepos_repomap.RepoMapDataHandler(combined_repomapping, cloud_provider=rhui_info.provider)
# TODO(pstodulk): what about skip this completely and keep the default 'ga'..?
default_channels = setuptargetrepos_repomap.get_default_repository_channels(repomap, src_repoids)
repomap.set_default_channels(default_channels)
diff --git a/repos/system_upgrade/common/actors/systemfacts/actor.py b/repos/system_upgrade/common/actors/systemfacts/actor.py diff --git a/repos/system_upgrade/common/actors/systemfacts/actor.py b/repos/system_upgrade/common/actors/systemfacts/actor.py
index 59b12c8..85d4a09 100644 index 59b12c8..85d4a09 100644
--- a/repos/system_upgrade/common/actors/systemfacts/actor.py --- a/repos/system_upgrade/common/actors/systemfacts/actor.py
@ -1183,18 +1223,20 @@ index 0000000..204d0dc
+ # for repomap in vendor_repomap_collection.maps: + # for repomap in vendor_repomap_collection.maps:
+ # self.produce(repomap) + # self.produce(repomap)
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
index 03f3cd4..783075d 100644 index 03f3cd4..7fcb6aa 100644
--- a/repos/system_upgrade/common/libraries/config/version.py --- a/repos/system_upgrade/common/libraries/config/version.py
+++ b/repos/system_upgrade/common/libraries/config/version.py +++ b/repos/system_upgrade/common/libraries/config/version.py
@@ -13,7 +13,7 @@ OP_MAP = { @@ -13,8 +13,8 @@ OP_MAP = {
_SUPPORTED_VERSIONS = { _SUPPORTED_VERSIONS = {
# Note: 'rhel-alt' is detected when on 'rhel' with kernel 4.x # Note: 'rhel-alt' is detected when on 'rhel' with kernel 4.x
- '7': {'rhel': ['7.9'], 'rhel-alt': ['7.6'], 'rhel-saphana': ['7.9']}, - '7': {'rhel': ['7.9'], 'rhel-alt': ['7.6'], 'rhel-saphana': ['7.9']},
+ '7': {'rhel': ['7.9'], 'rhel-alt': ['7.6'], 'rhel-saphana': ['7.9'], 'centos': ['7.9']}, - '8': {'rhel': ['8.5', '8.6']},
'8': {'rhel': ['8.5', '8.6']}, + '7': {'rhel': ['7.9'], 'rhel-alt': ['7.6'], 'rhel-saphana': ['7.9'], 'centos': ['7.9'], 'eurolinux': ['7.9'], 'ol': ['7.9']},
+ '8': {'rhel': ['8.5', '8.6'], 'centos': ['8.5'], 'almalinux': ['8.6'], 'eurolinux': ['8.6'], 'ol': ['8.6'], 'rocky': ['8.6']},
} }
diff --git a/repos/system_upgrade/common/libraries/dnfplugin.py b/repos/system_upgrade/common/libraries/dnfplugin.py diff --git a/repos/system_upgrade/common/libraries/dnfplugin.py b/repos/system_upgrade/common/libraries/dnfplugin.py
index 4010e9f..00323a7 100644 index 4010e9f..00323a7 100644
--- a/repos/system_upgrade/common/libraries/dnfplugin.py --- a/repos/system_upgrade/common/libraries/dnfplugin.py