Update (1) patch to support AlmaLinux

Bump the package release
This commit is contained in:
Yuriy Kohut 2025-07-22 16:14:49 +03:00
parent f3fac85068
commit 0636255067
2 changed files with 180 additions and 479 deletions

View File

@ -1,394 +1,58 @@
diff --git a/etc/leapp/files/repomap.json b/etc/leapp/files/repomap.json From 5b702f9cdd791a4f39147be4b2c071a0b5f407fb Mon Sep 17 00:00:00 2001
index fc0c42f1..84257d40 100644 From: Yuriy Kohut <yura.kohut@gmail.com>
--- a/etc/leapp/files/repomap.json Date: Fri, 27 Jun 2025 12:25:51 +0300
+++ b/etc/leapp/files/repomap.json Subject: [PATCH] Allow upgrades of almalinux (AlmaLinux OS)
@@ -302,6 +302,38 @@
{ * add information about 'almalinux' new distro and its 'default' upgrade path
"pesid": "rhel10-BaseOS", * update mapping with 'almalinux' distro ID and its OS version format
"entries": [ * add AlmaLinux OS release 9 and 10 RPM GPG keys, fingerprints of GPG keys, and obsoleted GPG keys
+ { * update unit tests to cover 'almalinux'
+ "major_version": "10", ---
+ "repoid": "baseos", commands/command_utils.py | 2 +
+ "arch": "aarch64", .../test_distributionsignedrpmscanner.py | 33 ++++++++++
+ "channel": "ga", .../tests/test_ipuworkflowconfig.py | 20 ++++++
+ "repo_type": "rpm", .../tests/files/repomap_example.json | 39 +++++++++++
+ "distro": "almalinux" .../tests/unit_test_repositoriesmapping.py | 12 +++-
+ }, .../tests/test_repomapping.py | 10 ++-
+ { .../tests/test_setuptargetrepos.py | 66 ++++++++++---------
+ "major_version": "10", .../distro/almalinux/gpg-signatures.json | 18 +++++
+ "repoid": "baseos", .../rpm-gpg/10/RPM-GPG-KEY-AlmaLinux-10 | 29 ++++++++
+ "arch": "ppc64le", .../rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9 | 52 +++++++++++++++
+ "channel": "ga", .../common/files/upgrade_paths.json | 6 ++
+ "repo_type": "rpm", .../common/libraries/tests/test_gpg.py | 2 +
+ "distro": "almalinux" 12 files changed, 256 insertions(+), 33 deletions(-)
+ }, create mode 100644 repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json
+ { create mode 100644 repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/10/RPM-GPG-KEY-AlmaLinux-10
+ "major_version": "10", create mode 100644 repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9
+ "repoid": "baseos",
+ "arch": "s390x", diff --git a/commands/command_utils.py b/commands/command_utils.py
+ "channel": "ga", index 155bacad..ef5daf03 100644
+ "repo_type": "rpm", --- a/commands/command_utils.py
+ "distro": "almalinux" +++ b/commands/command_utils.py
+ }, @@ -36,11 +36,13 @@ class _VersionKind(str, Enum):
+ { class DistroIDs(str, Enum):
+ "major_version": "10", RHEL = 'rhel'
+ "repoid": "baseos", CENTOS = 'centos'
+ "arch": "x86_64", + ALMALINUX = 'almalinux'
+ "channel": "ga",
+ "repo_type": "rpm",
+ "distro": "almalinux" _DISTRO_VERSION_FORMATS = {
+ }, DistroIDs.RHEL: VersionFormats.MAJOR_MINOR,
{ DistroIDs.CENTOS: VersionFormats.MAJOR_ONLY,
"major_version": "10", + DistroIDs.ALMALINUX: VersionFormats.MAJOR_MINOR,
"repoid": "baseos", }
@@ -485,6 +517,38 @@ """
{ Maps distro ID to the expected OS version format.
"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 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 index f138bcb2..af21bc8d 100644
--- a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py --- a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py
+++ b/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 ( @@ -110,6 +110,39 @@ def test_actor_execution_with_signed_unsigned_data_centos(current_actor_context)
)
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 assert len(current_actor_context.consume(InstalledUnsignedRPM)[0].items) == 6
+def test_actor_execution_with_signed_unsigned_data_almalinux(current_actor_context): +def test_actor_execution_with_signed_unsigned_data_almalinux(current_actor_context):
+ ALMALINUX_PACKAGER = 'AlmaLinux Packaging Team <packager@almalinux.org>'
+ config = mock_configs.CONFIG + config = mock_configs.CONFIG
+ +
+ config.os_release = OSRelease( + config.os_release = OSRelease(
@ -612,127 +276,153 @@ index af40c443..1b0a3122 100644
) )
def test_get_target_pesid_repos(monkeypatch, repomap_data_for_pesid_repo_retrieval, distro, expected_repos_index): 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 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 index 91d9cd24..1f898e8f 100644
--- a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_setuptargetrepos.py --- a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_setuptargetrepos.py
+++ b/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): @@ -100,94 +100,99 @@ def test_repositories_setup_tasks(monkeypatch):
expected_rhel_repoids = {'rhel-8-for-x86_64-baseos-htb-rpms', 'rhel-8-for-x86_64-appstream-htb-rpms', assert rhel_repos[0].repoid == 'rhel-8-server-rpms'
'rhel-8-for-x86_64-satellite-extras-rpms'}
assert produced_rhel_repoids == expected_rhel_repoids
+ -def test_repos_mapping(monkeypatch):
+
+@pytest.mark.parametrize('distro_id', ['rhel', 'centos', 'almalinux']) +@pytest.mark.parametrize('distro_id', ['rhel', 'centos', 'almalinux'])
+def test_repos_mapping_for_distro(monkeypatch, distro_id): +def test_repos_mapping_for_distro(monkeypatch, distro_id):
+ """ """
+ Tests whether actor correctly determines what repositories should be enabled on target based 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 on the information about what repositories are enabled on the source system using
- the RepositoriesMapping information.
+ the RepositoriesMapping information for a specific distro. + the RepositoriesMapping information for a specific distro.
+ """ """
+ repos_data = [ repos_data = [
- RepositoryData(repoid='rhel-7-server-rpms', name='RHEL 7 Server'),
- RepositoryData(repoid='rhel-7-blacklisted-rpms', name='RHEL 7 Blacklisted')]
+ RepositoryData(repoid='{}-7-server-rpms'.format(distro_id), name='{} 7 Server'.format(distro_id)), + 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))] + 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)] repos_files = [RepositoryFile(file='/etc/yum.repos.d/redhat.repo', data=repos_data)]
+ facts = RepositoriesFacts(repositories=repos_files) facts = RepositoriesFacts(repositories=repos_files)
+ installed_rpms = InstalledRPM( installed_rpms = InstalledRPM(
- items=[mock_package('foreman', 'rhel-7-for-x86_64-satellite-extras-rpms'),
- mock_package('foreman-proxy', 'nosuch-rhel-7-for-x86_64-satellite-extras-rpms')])
+ items=[mock_package('foreman', '{}-7-for-x86_64-satellite-extras-rpms'.format(distro_id)), + 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))]) + mock_package('foreman-proxy', 'nosuch-{}-7-for-x86_64-satellite-extras-rpms'.format(distro_id))])
+
+ repomap = RepositoriesMapping( repomap = RepositoriesMapping(
- mapping=[RepoMapEntry(source='rhel7-base', target=['rhel8-baseos', 'rhel8-appstream', 'rhel8-blacklist']),
- RepoMapEntry(source='rhel7-satellite-extras', target=['rhel8-satellite-extras'])],
+ mapping=[RepoMapEntry(source='{0}7-base'.format(distro_id), + mapping=[RepoMapEntry(source='{0}7-base'.format(distro_id),
+ target=['{0}8-baseos'.format(distro_id), + target=['{0}8-baseos'.format(distro_id),
+ '{0}8-appstream'.format(distro_id), + '{0}8-appstream'.format(distro_id),
+ '{0}8-blacklist'.format(distro_id)]), + '{0}8-blacklist'.format(distro_id)]),
+ RepoMapEntry(source='{0}7-satellite-extras'.format(distro_id), + RepoMapEntry(source='{0}7-satellite-extras'.format(distro_id),
+ target=['{0}8-satellite-extras'.format(distro_id)])], + target=['{0}8-satellite-extras'.format(distro_id)])],
+ repositories=[ repositories=[
+ PESIDRepositoryEntry( PESIDRepositoryEntry(
- pesid='rhel7-base',
- repoid='rhel-7-server-rpms',
+ pesid='{0}7-base'.format(distro_id), + pesid='{0}7-base'.format(distro_id),
+ repoid='{0}-7-server-rpms'.format(distro_id), + repoid='{0}-7-server-rpms'.format(distro_id),
+ major_version='7', major_version='7',
+ arch='x86_64', arch='x86_64',
+ repo_type='rpm', repo_type='rpm',
+ channel='ga', channel='ga',
+ rhui='', rhui='',
- distro='rhel',
+ distro=distro_id, + distro=distro_id,
+ ), ),
+ PESIDRepositoryEntry( PESIDRepositoryEntry(
- pesid='rhel8-baseos',
- repoid='rhel-8-for-x86_64-baseos-htb-rpms',
+ pesid='{0}8-baseos'.format(distro_id), + pesid='{0}8-baseos'.format(distro_id),
+ repoid='{0}-8-for-x86_64-baseos-htb-rpms'.format(distro_id), + repoid='{0}-8-for-x86_64-baseos-htb-rpms'.format(distro_id),
+ major_version='8', major_version='8',
+ arch='x86_64', arch='x86_64',
+ repo_type='rpm', repo_type='rpm',
+ channel='ga', channel='ga',
+ rhui='', rhui='',
- distro='rhel',
+ distro=distro_id, + distro=distro_id,
+ ), ),
+ PESIDRepositoryEntry( PESIDRepositoryEntry(
- pesid='rhel8-appstream',
- repoid='rhel-8-for-x86_64-appstream-htb-rpms',
+ pesid='{0}8-appstream'.format(distro_id), + pesid='{0}8-appstream'.format(distro_id),
+ repoid='{0}-8-for-x86_64-appstream-htb-rpms'.format(distro_id), + repoid='{0}-8-for-x86_64-appstream-htb-rpms'.format(distro_id),
+ major_version='8', major_version='8',
+ arch='x86_64', arch='x86_64',
+ repo_type='rpm', repo_type='rpm',
+ channel='ga', channel='ga',
+ rhui='', rhui='',
- distro='rhel',
+ distro=distro_id, + distro=distro_id,
+ ), ),
+ PESIDRepositoryEntry( PESIDRepositoryEntry(
- pesid='rhel8-blacklist',
- repoid='rhel-8-blacklisted-rpms',
+ pesid='{0}8-blacklist'.format(distro_id), + pesid='{0}8-blacklist'.format(distro_id),
+ repoid='{0}-8-blacklisted-rpms'.format(distro_id), + repoid='{0}-8-blacklisted-rpms'.format(distro_id),
+ major_version='8', major_version='8',
+ arch='x86_64', arch='x86_64',
+ repo_type='rpm', repo_type='rpm',
+ channel='ga', channel='ga',
+ rhui='', rhui='',
- distro='rhel',
+ distro=distro_id, + distro=distro_id,
+ ), ),
+ PESIDRepositoryEntry( PESIDRepositoryEntry(
- pesid='rhel7-satellite-extras',
- repoid='rhel-7-for-x86_64-satellite-extras-rpms',
+ pesid='{0}7-satellite-extras'.format(distro_id), + pesid='{0}7-satellite-extras'.format(distro_id),
+ repoid='{0}-7-for-x86_64-satellite-extras-rpms'.format(distro_id), + repoid='{0}-7-for-x86_64-satellite-extras-rpms'.format(distro_id),
+ major_version='7', major_version='7',
+ arch='x86_64', arch='x86_64',
+ repo_type='rpm', repo_type='rpm',
+ channel='ga', channel='ga',
+ rhui='', rhui='',
- distro='rhel',
+ distro=distro_id, + distro=distro_id,
+ ), ),
+ PESIDRepositoryEntry( PESIDRepositoryEntry(
- pesid='rhel8-satellite-extras',
- repoid='rhel-8-for-x86_64-satellite-extras-rpms',
+ pesid='{0}8-satellite-extras'.format(distro_id), + pesid='{0}8-satellite-extras'.format(distro_id),
+ repoid='{0}-8-for-x86_64-satellite-extras-rpms'.format(distro_id), + repoid='{0}-8-for-x86_64-satellite-extras-rpms'.format(distro_id),
+ major_version='8', major_version='8',
+ arch='x86_64', arch='x86_64',
+ repo_type='rpm', repo_type='rpm',
+ channel='ga', channel='ga',
+ rhui='', rhui='',
- distro='rhel',
+ distro=distro_id, + distro=distro_id,
+ ), ),
+ ] ]
+ ) )
+
- repos_blacklisted = RepositoriesBlacklisted(repoids=['rhel-8-blacklisted-rpms'])
+ repos_blacklisted = RepositoriesBlacklisted(repoids=['{}-8-blacklisted-rpms'.format(distro_id)]) + repos_blacklisted = RepositoriesBlacklisted(repoids=['{}-8-blacklisted-rpms'.format(distro_id)])
+
+ msgs = [facts, repomap, repos_blacklisted, installed_rpms] msgs = [facts, repomap, repos_blacklisted, installed_rpms]
+
- monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(msgs=msgs))
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(msgs=msgs, release_id=distro_id)) + monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(msgs=msgs, release_id=distro_id))
+ monkeypatch.setattr(api, 'produce', produce_mocked()) monkeypatch.setattr(api, 'produce', produce_mocked())
+
+ setuptargetrepos.process() setuptargetrepos.process()
+ assert api.produce.called @@ -197,6 +202,7 @@ def test_repos_mapping(monkeypatch):
+ assert len(rhel_repos) == 3
+ 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 = {'rhel-8-for-x86_64-baseos-htb-rpms', 'rhel-8-for-x86_64-appstream-htb-rpms',
+ produced_rhel_repoids = {repo.repoid for repo in rhel_repos} - 'rhel-8-for-x86_64-satellite-extras-rpms'}
+ expected_rhel_repoids = {'{0}-8-for-x86_64-baseos-htb-rpms'.format(distro_id), + 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-appstream-htb-rpms'.format(distro_id),
+ '{0}-8-for-x86_64-satellite-extras-rpms'.format(distro_id)} + '{0}-8-for-x86_64-satellite-extras-rpms'.format(distro_id)}
+ assert produced_rhel_repoids == expected_rhel_repoids 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 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 new file mode 100644
index 00000000..51607273 index 00000000..24bc93ba
--- /dev/null --- /dev/null
+++ b/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json +++ b/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json
@@ -0,0 +1,25 @@ @@ -0,0 +1,18 @@
+{ +{
+ "keys": [ + "keys": [
+ "51d6647ec21ad6ea", + "51d6647ec21ad6ea",
@ -743,20 +433,13 @@ index 00000000..51607273
+ ], + ],
+ "obsoleted-keys": { + "obsoleted-keys": {
+ "7": [], + "7": [],
+ "8": [ + "8": [],
+ "gpg-pubkey-2fa658e0-45700c69",
+ "gpg-pubkey-37017186-45761324",
+ "gpg-pubkey-db42a60e-37ea5438"
+ ],
+ "9": [ + "9": [
+ "gpg-pubkey-d4082792-5b32db75",
+ "gpg-pubkey-3abb34f8-5ffd890e", + "gpg-pubkey-3abb34f8-5ffd890e",
+ "gpg-pubkey-6275f250-5e26cb2e", + "gpg-pubkey-ced7258b-6525146f"
+ "gpg-pubkey-73e3b907-6581b071"
+ ], + ],
+ "10": [] + "10": ["gpg-pubkey-b86b3716-61e69f29"]
+ } + }
+
+} +}
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 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 new file mode 100644
@ -852,10 +535,10 @@ index 00000000..d4165d58
+=jk2t +=jk2t
+-----END PGP PUBLIC KEY BLOCK----- +-----END PGP PUBLIC KEY BLOCK-----
diff --git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json diff --git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json
index 279e6eaa..e9df8d5f 100644 index 279e6eaa..f99d9c48 100644
--- a/repos/system_upgrade/common/files/upgrade_paths.json --- a/repos/system_upgrade/common/files/upgrade_paths.json
+++ b/repos/system_upgrade/common/files/upgrade_paths.json +++ b/repos/system_upgrade/common/files/upgrade_paths.json
@@ -27,5 +27,12 @@ @@ -27,5 +27,11 @@
"9": "9.6", "9": "9.6",
"10": "10.0" "10": "10.0"
} }
@ -863,8 +546,23 @@ index 279e6eaa..e9df8d5f 100644
+ "almalinux": { + "almalinux": {
+ "default": { + "default": {
+ "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6"], + "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6"],
+ "9.5": ["10.0"],
+ "9.6": ["10.0"] + "9.6": ["10.0"]
+ } + }
} }
} }
diff --git a/repos/system_upgrade/common/libraries/tests/test_gpg.py b/repos/system_upgrade/common/libraries/tests/test_gpg.py
index 82b51abb..47617ad8 100644
--- a/repos/system_upgrade/common/libraries/tests/test_gpg.py
+++ b/repos/system_upgrade/common/libraries/tests/test_gpg.py
@@ -18,6 +18,8 @@ from leapp.models import GpgKey, InstalledRPM, RPM
('9.2', 'ga', 'rhel', '../../files/distro/rhel/rpm-gpg/9'),
('10.0', 'ga', 'rhel', '../../files/distro/rhel/rpm-gpg/10'),
('10', 'ga', 'centos', '../../files/distro/centos/rpm-gpg/10'),
+ ('9.6', 'ga', 'almalinux', '../../files/distro/almalinux/rpm-gpg/9'),
+ ('10.0', 'ga', 'almalinux', '../../files/distro/almalinux/rpm-gpg/10'),
])
def test_get_path_to_gpg_certs(monkeypatch, target, product_type, distro, exp):
current_actor = CurrentActorMocked(dst_ver=target, release_id=distro,
--
2.49.0

View File

@ -52,7 +52,7 @@ py2_byte_compile "%1" "%2"}
Name: leapp-repository Name: leapp-repository
Version: 0.22.0 Version: 0.22.0
Release: 4.1%{?dist} Release: 4%{?dist}.alma.2
Summary: Repositories for leapp Summary: Repositories for leapp
License: ASL 2.0 License: ASL 2.0
@ -111,7 +111,7 @@ Patch0040: 0040-Fix-parsing-of-the-kernel-cmdline.patch
Patch0041: 0041-repomap-Process-repositories-based-on-distro.patch Patch0041: 0041-repomap-Process-repositories-based-on-distro.patch
Patch0042: 0042-Update-the-upgrade-data-files-stream-4.0.patch Patch0042: 0042-Update-the-upgrade-data-files-stream-4.0.patch
Patch0043: 0043-unit-tests-suppress-deprecation-warning-for-is_rhel_.patch Patch0043: 0043-unit-tests-suppress-deprecation-warning-for-is_rhel_.patch
Patch0100: leapp-repository-0.22.0-almalinux.patch Patch0100: 0100-Allow-upgrades-of-almalinux-AlmaLinux-OS.patch
%description %description
%{summary} %{summary}
@ -404,7 +404,10 @@ done;
# no files here # no files here
%changelog %changelog
* Fri Jun 27 2025 Yuriy Kohut <ykohut@almalinux.org> - 0.22.0-4.1 * Tue Jul 22 2025 Yuriy Kohut <ykohut@almalinux.org> - 0.22.0-4.alma.2
- Support of AlmaLinux OS. Phase 1 (update 1)
* Fri Jun 27 2025 Yuriy Kohut <ykohut@almalinux.org> - 0.22.0-4.alma.1
- Support of AlmaLinux OS. Phase 1 - Support of AlmaLinux OS. Phase 1
* Thu Jun 05 2025 Karolina Kula <kkula@redhat.com> - 0.22.0-4 * Thu Jun 05 2025 Karolina Kula <kkula@redhat.com> - 0.22.0-4