leapp-repository/SOURCES/leapp-repository-0.22.0-almalinux.patch
Yuriy Kohut f3fac85068 Add patch to support AlmaLinux
Bump the package release
2025-06-27 18:16:33 +03:00

871 lines
35 KiB
Diff

diff --git a/etc/leapp/files/repomap.json b/etc/leapp/files/repomap.json
index fc0c42f1..84257d40 100644
--- a/etc/leapp/files/repomap.json
+++ b/etc/leapp/files/repomap.json
@@ -302,6 +302,38 @@
{
"pesid": "rhel10-BaseOS",
"entries": [
+ {
+ "major_version": "10",
+ "repoid": "baseos",
+ "arch": "aarch64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "baseos",
+ "arch": "ppc64le",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "baseos",
+ "arch": "s390x",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "baseos",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "10",
"repoid": "baseos",
@@ -485,6 +517,38 @@
{
"pesid": "rhel10-AppStream",
"entries": [
+ {
+ "major_version": "10",
+ "repoid": "appstream",
+ "arch": "aarch64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "appstream",
+ "arch": "ppc64le",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "appstream",
+ "arch": "s390x",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "appstream",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "10",
"repoid": "appstream",
@@ -813,6 +877,38 @@
"channel": "ga",
"repo_type": "rpm",
"distro": "centos"
+ },
+ {
+ "major_version": "10",
+ "repoid": "crb",
+ "arch": "aarch64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "crb",
+ "arch": "ppc64le",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "crb",
+ "arch": "s390x",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "crb",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
}
]
},
@@ -984,12 +1080,28 @@
"channel": "ga",
"repo_type": "rpm",
"distro": "centos"
+ },
+ {
+ "major_version": "10",
+ "repoid": "rt",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
}
]
},
{
"pesid": "rhel10-NFV",
"entries": [
+ {
+ "major_version": "10",
+ "repoid": "nfv",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "10",
"repoid": "nfv",
@@ -1181,6 +1293,38 @@
{
"pesid": "rhel10-HighAvailability",
"entries": [
+ {
+ "major_version": "10",
+ "repoid": "highavailability",
+ "arch": "aarch64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "highavailability",
+ "arch": "ppc64le",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "highavailability",
+ "arch": "s390x",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "10",
+ "repoid": "highavailability",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "10",
"repoid": "highavailability",
@@ -4256,6 +4400,38 @@
{
"pesid": "rhel9-BaseOS",
"entries": [
+ {
+ "major_version": "9",
+ "repoid": "baseos",
+ "arch": "aarch64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "baseos",
+ "arch": "ppc64le",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "baseos",
+ "arch": "s390x",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "baseos",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "9",
"repoid": "baseos",
@@ -4537,6 +4713,38 @@
{
"pesid": "rhel9-AppStream",
"entries": [
+ {
+ "major_version": "9",
+ "repoid": "appstream",
+ "arch": "aarch64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "appstream",
+ "arch": "ppc64le",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "appstream",
+ "arch": "s390x",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "appstream",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "9",
"repoid": "appstream",
@@ -4973,6 +5181,38 @@
"repo_type": "rpm",
"distro": "centos"
},
+ {
+ "major_version": "9",
+ "repoid": "crb",
+ "arch": "aarch64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "crb",
+ "arch": "ppc64le",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "crb",
+ "arch": "s390x",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "crb",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "9",
"repoid": "rhui-codeready-builder-for-rhel-9-aarch64-rhui-rpms",
@@ -5206,12 +5446,28 @@
"channel": "ga",
"repo_type": "rpm",
"distro": "centos"
+ },
+ {
+ "major_version": "9",
+ "repoid": "rt",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
}
]
},
{
"pesid": "rhel9-NFV",
"entries": [
+ {
+ "major_version": "9",
+ "repoid": "nfv",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "9",
"repoid": "nfv",
@@ -5466,6 +5722,38 @@
{
"pesid": "rhel9-HighAvailability",
"entries": [
+ {
+ "major_version": "9",
+ "repoid": "highavailability",
+ "arch": "aarch64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "highavailability",
+ "arch": "ppc64le",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "highavailability",
+ "arch": "s390x",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
+ {
+ "major_version": "9",
+ "repoid": "highavailability",
+ "arch": "x86_64",
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux"
+ },
{
"major_version": "9",
"repoid": "highavailability",
diff --git a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py b/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py
index f138bcb2..a4ec9016 100644
--- a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py
+++ b/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py
@@ -15,6 +15,7 @@ from leapp.models import (
)
RH_PACKAGER = 'Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>'
+ALMALINUX_PACKAGER = 'AlmaLinux Packaging Team <packager@almalinux.org>'
class MockObject(Model):
@@ -110,6 +111,38 @@ def test_actor_execution_with_signed_unsigned_data_centos(current_actor_context)
assert len(current_actor_context.consume(InstalledUnsignedRPM)[0].items) == 6
+def test_actor_execution_with_signed_unsigned_data_almalinux(current_actor_context):
+ config = mock_configs.CONFIG
+
+ config.os_release = OSRelease(
+ release_id='almalinux',
+ name='AlmaLinux',
+ pretty_name='AlmaLinux 8.10 (Cerulean Leopard)',
+ version='8.10 (Cerulean Leopard)',
+ version_id='8.10'
+ )
+
+ installed_rpm = [
+ RPM(name='sample01', version='0.1', release='1.sm01', epoch='1', packager=ALMALINUX_PACKAGER, arch='noarch',
+ pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 2ae81e8aced7258b'),
+ RPM(name='sample02', version='0.1', release='1.sm01', epoch='1', packager=ALMALINUX_PACKAGER, arch='noarch',
+ pgpsig='SOME_OTHER_SIG_X'),
+ RPM(name='sample03', version='0.1', release='1.sm01', epoch='1', packager=ALMALINUX_PACKAGER, arch='noarch',
+ pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 51d6647ec21ad6ea'),
+ RPM(name='sample04', version='0.1', release='1.sm01', epoch='1', packager=ALMALINUX_PACKAGER, arch='noarch',
+ pgpsig='SOME_OTHER_SIG_X'),
+ ]
+
+ current_actor_context.feed(InstalledRPM(items=installed_rpm))
+ current_actor_context.run(config_model=config)
+ assert current_actor_context.consume(DistributionSignedRPM)
+ assert len(current_actor_context.consume(DistributionSignedRPM)[0].items) == 2
+ assert current_actor_context.consume(InstalledRedHatSignedRPM)
+ assert not current_actor_context.consume(InstalledRedHatSignedRPM)[0].items
+ assert current_actor_context.consume(InstalledUnsignedRPM)
+ assert len(current_actor_context.consume(InstalledUnsignedRPM)[0].items) == 2
+
+
def test_actor_execution_with_unknown_distro(current_actor_context):
config = mock_configs.CONFIG
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
index 6184121b..8b7faffb 100644
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
@@ -129,6 +129,13 @@ def test_construct_models_for_paths_matching_source_major(source_major_version,
'9': ['10.0']
}
),
+ (
+ 'almalinux', 'default',
+ {
+ '8.10': ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5', '9.6'],
+ '9.6': ['10.0']
+ }
+ ),
)
)
def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flavour, expected_result):
@@ -147,6 +154,12 @@ def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flav
'9.6': ['10.0'],
'9': ['10.0']
}
+ },
+ 'almalinux': {
+ 'default': {
+ '8.10': ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5', '9.6'],
+ '9.6': ['10.0']
+ }
}
}
@@ -160,6 +173,7 @@ def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flav
[
(('centos', '8', '9'), ('8.10', '9.5')),
(('rhel', '8.10', '9.4'), ('8.10', '9.4')),
+ (('almalinux', '8.10', '9.6'), ('8.10', '9.6')),
]
)
def test_virtual_version_construction(construction_params, expected_versions):
@@ -186,6 +200,12 @@ def test_virtual_version_construction(construction_params, expected_versions):
'9': '9.5',
}
},
+ 'almalinux': {
+ 'default': {
+ '8.10': ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5', '9.6'],
+ '9.6': ['10.0']
+ }
+ },
}
result = ipuworkflowconfig.construct_virtual_versions(defined_upgrade_paths, *construction_params)
diff --git a/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json b/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
index 1f04d72d..9ce8c410 100644
--- a/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
+++ b/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
@@ -120,6 +120,45 @@
"distro": "centos"
}
]
+ },
+ {
+ "pesid": "pesid8",
+ "entries": [
+ {
+ "major_version": "8",
+ "repoid": "some-almalinux-8-repoid1",
+ "arch": "x86_64",
+ "repo_type": "rpm",
+ "channel": "ga",
+ "distro": "almalinux"
+ }
+ ]
+ },
+ {
+ "pesid": "pesid9",
+ "entries": [
+ {
+ "major_version": "9",
+ "repoid": "some-almalinux-9-repoid1",
+ "arch": "x86_64",
+ "repo_type": "rpm",
+ "channel": "ga",
+ "distro": "almalinux"
+ }
+ ]
+ },
+ {
+ "pesid": "pesid10",
+ "entries": [
+ {
+ "major_version": "10",
+ "repoid": "some-almalinux-10-repoid1",
+ "arch": "x86_64",
+ "repo_type": "rpm",
+ "channel": "ga",
+ "distro": "almalinux"
+ }
+ ]
}
]
}
diff --git a/repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py b/repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py
index 9d781125..6d1a173a 100644
--- a/repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py
+++ b/repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py
@@ -52,7 +52,7 @@ def test_scan_existing_valid_data(monkeypatch, adjust_cwd):
# 2. Verify that only repositories valid for the current IPU are produced
pesid_repos = repo_mapping.repositories
fail_description = 'Actor produced incorrect number of IPU-relevant pesid repos.'
- assert len(pesid_repos) == 5, fail_description
+ assert len(pesid_repos) == 6, fail_description
expected_pesid_repos = [
PESIDRepositoryEntry(
@@ -105,6 +105,16 @@ def test_scan_existing_valid_data(monkeypatch, adjust_cwd):
rhui='',
distro='centos',
),
+ PESIDRepositoryEntry(
+ pesid='pesid8',
+ major_version='8',
+ repoid='some-almalinux-8-repoid1',
+ arch='x86_64',
+ repo_type='rpm',
+ channel='ga',
+ rhui='',
+ distro='almalinux',
+ ),
]
fail_description = 'Expected pesid repo is not present in the deserialization output.'
diff --git a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py b/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py
index af40c443..1b0a3122 100644
--- a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py
+++ b/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py
@@ -75,6 +75,9 @@ def repomap_data_multiple_distros():
make_pesid_repo("pesid3", "10", "pesid3-repoid-eus", channel="eus"),
make_pesid_repo("pesid3", "10", "pesid3-repoid-aws", rhui="aws"),
make_pesid_repo("pesid3", "10", "pesid3-repoid-centos", distro="centos"),
+ make_pesid_repo("pesid1", "9", "pesid1-repoid-almalinux", distro="almalinux"),
+ make_pesid_repo("pesid2", "10", "pesid2-repoid-almalinux", distro="almalinux"),
+ make_pesid_repo("pesid3", "10", "pesid3-repoid-almalinux", distro="almalinux"),
],
)
return repomap_data
@@ -106,7 +109,7 @@ def test_get_pesid_repo_entry(monkeypatch, repomap_data_for_pesid_repo_retrieval
assert handler.get_pesid_repo_entry('nonexisting-repo', '7') is None, fail_description
-@pytest.mark.parametrize('distro', ('rhel', 'centos'))
+@pytest.mark.parametrize('distro', ('rhel', 'centos', 'almalinux'))
def test_get_pesid_repo_entry_distro(
monkeypatch, repomap_data_multiple_distros, distro
):
@@ -163,7 +166,7 @@ def test_get_target_pesids(monkeypatch, repomap_data_for_pesid_repo_retrieval):
assert [] == handler.get_target_pesids('pesid_no_mapping'), fail_description
-@pytest.mark.parametrize('distro', ('rhel', 'centos'))
+@pytest.mark.parametrize('distro', ('rhel', 'centos', 'almalinux'))
def test_get_target_pesids_distro(
monkeypatch, repomap_data_multiple_distros, distro
):
@@ -199,6 +202,7 @@ def test_get_target_pesids_distro(
[
('rhel', [5, 6, 7], [0, 1]),
('centos', [8], [2]),
+ ('almalinux', [11], [9]),
]
)
def test_get_pesid_repos(
@@ -251,6 +255,7 @@ def test_get_pesid_repos(
[
('rhel', [0, 1]),
('centos', []),
+ ('almalinux', []),
]
)
def test_get_source_pesid_repos(monkeypatch, repomap_data_for_pesid_repo_retrieval, distro, expected_repos_index):
@@ -291,6 +296,7 @@ def test_get_source_pesid_repos(monkeypatch, repomap_data_for_pesid_repo_retriev
[
('rhel', [3, 4, 5]),
('centos', []),
+ ('almalinux', []),
]
)
def test_get_target_pesid_repos(monkeypatch, repomap_data_for_pesid_repo_retrieval, distro, expected_repos_index):
diff --git a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_setuptargetrepos.py b/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_setuptargetrepos.py
index 91d9cd24..eff0d9ef 100644
--- a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_setuptargetrepos.py
+++ b/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_setuptargetrepos.py
@@ -200,3 +200,111 @@ def test_repos_mapping(monkeypatch):
expected_rhel_repoids = {'rhel-8-for-x86_64-baseos-htb-rpms', 'rhel-8-for-x86_64-appstream-htb-rpms',
'rhel-8-for-x86_64-satellite-extras-rpms'}
assert produced_rhel_repoids == expected_rhel_repoids
+
+
+@pytest.mark.parametrize('distro_id', ['rhel', 'centos', 'almalinux'])
+def test_repos_mapping_for_distro(monkeypatch, distro_id):
+ """
+ Tests whether actor correctly determines what repositories should be enabled on target based
+ on the information about what repositories are enabled on the source system using
+ the RepositoriesMapping information for a specific distro.
+ """
+ repos_data = [
+ RepositoryData(repoid='{}-7-server-rpms'.format(distro_id), name='{} 7 Server'.format(distro_id)),
+ RepositoryData(repoid='{}-7-blacklisted-rpms'.format(distro_id), name='{} 7 Blacklisted'.format(distro_id))]
+
+ repos_files = [RepositoryFile(file='/etc/yum.repos.d/redhat.repo', data=repos_data)]
+ facts = RepositoriesFacts(repositories=repos_files)
+ installed_rpms = InstalledRPM(
+ items=[mock_package('foreman', '{}-7-for-x86_64-satellite-extras-rpms'.format(distro_id)),
+ mock_package('foreman-proxy', 'nosuch-{}-7-for-x86_64-satellite-extras-rpms'.format(distro_id))])
+
+ repomap = RepositoriesMapping(
+ mapping=[RepoMapEntry(source='{0}7-base'.format(distro_id),
+ target=['{0}8-baseos'.format(distro_id),
+ '{0}8-appstream'.format(distro_id),
+ '{0}8-blacklist'.format(distro_id)]),
+ RepoMapEntry(source='{0}7-satellite-extras'.format(distro_id),
+ target=['{0}8-satellite-extras'.format(distro_id)])],
+ repositories=[
+ PESIDRepositoryEntry(
+ pesid='{0}7-base'.format(distro_id),
+ repoid='{0}-7-server-rpms'.format(distro_id),
+ major_version='7',
+ arch='x86_64',
+ repo_type='rpm',
+ channel='ga',
+ rhui='',
+ distro=distro_id,
+ ),
+ PESIDRepositoryEntry(
+ pesid='{0}8-baseos'.format(distro_id),
+ repoid='{0}-8-for-x86_64-baseos-htb-rpms'.format(distro_id),
+ major_version='8',
+ arch='x86_64',
+ repo_type='rpm',
+ channel='ga',
+ rhui='',
+ distro=distro_id,
+ ),
+ PESIDRepositoryEntry(
+ pesid='{0}8-appstream'.format(distro_id),
+ repoid='{0}-8-for-x86_64-appstream-htb-rpms'.format(distro_id),
+ major_version='8',
+ arch='x86_64',
+ repo_type='rpm',
+ channel='ga',
+ rhui='',
+ distro=distro_id,
+ ),
+ PESIDRepositoryEntry(
+ pesid='{0}8-blacklist'.format(distro_id),
+ repoid='{0}-8-blacklisted-rpms'.format(distro_id),
+ major_version='8',
+ arch='x86_64',
+ repo_type='rpm',
+ channel='ga',
+ rhui='',
+ distro=distro_id,
+ ),
+ PESIDRepositoryEntry(
+ pesid='{0}7-satellite-extras'.format(distro_id),
+ repoid='{0}-7-for-x86_64-satellite-extras-rpms'.format(distro_id),
+ major_version='7',
+ arch='x86_64',
+ repo_type='rpm',
+ channel='ga',
+ rhui='',
+ distro=distro_id,
+ ),
+ PESIDRepositoryEntry(
+ pesid='{0}8-satellite-extras'.format(distro_id),
+ repoid='{0}-8-for-x86_64-satellite-extras-rpms'.format(distro_id),
+ major_version='8',
+ arch='x86_64',
+ repo_type='rpm',
+ channel='ga',
+ rhui='',
+ distro=distro_id,
+ ),
+ ]
+ )
+
+ repos_blacklisted = RepositoriesBlacklisted(repoids=['{}-8-blacklisted-rpms'.format(distro_id)])
+
+ msgs = [facts, repomap, repos_blacklisted, installed_rpms]
+
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(msgs=msgs, release_id=distro_id))
+ monkeypatch.setattr(api, 'produce', produce_mocked())
+
+ setuptargetrepos.process()
+ assert api.produce.called
+
+ rhel_repos = api.produce.model_instances[0].rhel_repos
+ assert len(rhel_repos) == 3
+
+ produced_rhel_repoids = {repo.repoid for repo in rhel_repos}
+ expected_rhel_repoids = {'{0}-8-for-x86_64-baseos-htb-rpms'.format(distro_id),
+ '{0}-8-for-x86_64-appstream-htb-rpms'.format(distro_id),
+ '{0}-8-for-x86_64-satellite-extras-rpms'.format(distro_id)}
+ assert produced_rhel_repoids == expected_rhel_repoids
diff --git a/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json b/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json
new file mode 100644
index 00000000..51607273
--- /dev/null
+++ b/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json
@@ -0,0 +1,25 @@
+{
+ "keys": [
+ "51d6647ec21ad6ea",
+ "d36cb86cb86b3716",
+ "2ae81e8aced7258b",
+ "429785e181b961a5",
+ "d07bf2a08d50eb66"
+ ],
+ "obsoleted-keys": {
+ "7": [],
+ "8": [
+ "gpg-pubkey-2fa658e0-45700c69",
+ "gpg-pubkey-37017186-45761324",
+ "gpg-pubkey-db42a60e-37ea5438"
+ ],
+ "9": [
+ "gpg-pubkey-d4082792-5b32db75",
+ "gpg-pubkey-3abb34f8-5ffd890e",
+ "gpg-pubkey-6275f250-5e26cb2e",
+ "gpg-pubkey-73e3b907-6581b071"
+ ],
+ "10": []
+ }
+
+}
diff --git a/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/10/RPM-GPG-KEY-AlmaLinux-10 b/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/10/RPM-GPG-KEY-AlmaLinux-10
new file mode 100644
index 00000000..5228281c
--- /dev/null
+++ b/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/10/RPM-GPG-KEY-AlmaLinux-10
@@ -0,0 +1,29 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBGaP6O8BEACvg8IlAxGayV8zOi9Ex+Pd8lrj2BrBzloG8ri84ORp9o8ojq7l
+ykKmIElHe11cQD2Lf/a4lcQQ4Ec3baiD786X6K2eVSlBEAnZMzfjDg8R63SfsBuu
+8Yk+lUyqlBrDnSDYaPruOAzLIz2r82ikIC1jDbipZsMFPFHPI4/hayyWxJ3oGxRe
+0mbtYLB9ElEKngt+/hfo7JLklakbznyIRuVEF3VrZb91XC6r/idqfJoNyBXSKidj
+z0IwqOhgkLUk84rzltDo3AzwGqusd7PEuhOmqinOhp0hMdXsztD4TVyhw82iXu/O
+onOAObZTZYfM6Z8btmDqkoo0aT+oPPCuZ3yC/caU9dhvCSXET/CGoXc3hL55u9PV
+qmcVm/mwvuEImEAvxVc0/dBzEUk+FwW8KsaN3HoUKrC4/NqgmaQz8/42np7u2j+B
+OOJ4hAckNEdWd8rB86CYN00sdxnvLBsp8V3IwEqXLhGOoBsagy61Z8hKCM+siOGn
+xmbbybgaLOs+DPlxt9LrtgLJHODwmD96oysUPJuA0lv8KMiSpId0tSpp9Wn/wHBG
+kRgxGYfzQu7WRvRZqQaleft1JTXXOjNzPur0RkJyb3yFwAoxpePyo/WrupM41OHW
+58cEqdC6riCnJcS4U84RLj+hwvufBVB7areQ75sETnKeyozZW+P16E1t/wARAQAB
+tChBbG1hTGludXggT1MgMTAgPHBhY2thZ2VyQGFsbWFsaW51eC5vcmc+iQJMBBMB
+CgA2FiEE7m23uY9b9e3Z2g3l3uXBHMKh5XIFAmaP6O8CGwMECwkIBwQVCgkIBRYC
+AwEAAh4FAheAAAoJEN7lwRzCoeVy32AP/A2+KI+JhmsxnactSptkAWGyAAf1YBWW
+Js2sc9OJdKj7uIkzszCx7c7VIVeF/VLijIYpM/zwUgir5S5SimzQmY+FumwbKIml
+K5RBsoSog22i7Edho0MLa1pa6qvnKS0nkl9DEcu8EbMUhucWbxGnCG/22EEMTrY+
+Si1IZNkDGtlBHHBKMC+STbqqTxtdy4tAd2NYwWh3sBIh6PF7T4NLRAugu7PZQr5K
+amS4z2lV3ebshGjieA0Zoznwh0AXgN0gZ/0pC/LXI25gcgtrvkCyL8Fe0AyZUMd8
+UvZXaRSsm3SkCUIlGjPrvuItn1D7tHmqVSCDKXDM2TqjfiRm1JF+2OFCBNvGz19V
+LxWd/Gf+0qw0dtKxRMKzGh0mxXY40hjtmYZulrPxhG5itNDjStovgrevM1HBsXs9
+ikrkOGQ0pFcqizTn4ZKAmMozEMuIuV89Vof2bBCg7pHT1FmXVdAaYJxb6a7A/CgN
+qHjoh8AxBiGw/Q2NM4YJlUVhHqqd+/lUG3WJqACNEnqSlZkYQ3HqNNaKhHVbD4mN
+q/g6v+f8aWWDZDsI6IAfbJUB+KPEnIvQJQleWuHrq7kcUMhEq3dwBMIoTVEHhUUr
+RQKToSEM1rN7PcanaXQM2gy141dS7tFLxhapG8ug75LkIUnEOpPMtUjvrU1ZELGq
+36vVHBB+dTDg
+=tJCw
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9 b/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9
new file mode 100644
index 00000000..d4165d58
--- /dev/null
+++ b/repos/system_upgrade/common/files/distro/almalinux/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--git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json
index 279e6eaa..e9df8d5f 100644
--- a/repos/system_upgrade/common/files/upgrade_paths.json
+++ b/repos/system_upgrade/common/files/upgrade_paths.json
@@ -27,5 +27,12 @@
"9": "9.6",
"10": "10.0"
}
+ },
+ "almalinux": {
+ "default": {
+ "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6"],
+ "9.5": ["10.0"],
+ "9.6": ["10.0"]
+ }
}
}