From 110dd56521a043c83cda0849623eebded12c95a6 Mon Sep 17 00:00:00 2001 From: Yuriy Kohut Date: Fri, 16 May 2025 15:50:02 +0300 Subject: [PATCH] Update Vendors patch: - revert converting dot-less CentOS Stream release to X.999 - change the upgrade path: - add 'default' and '_virtual_versions' for CentOS 7 - AlmaLinux and Rocky: remove MAJOR only versions, add 8.10 to 9.6 leapp-repository.spec: - create symlinks of RHSM certs path: prod-certs/8 -> prod-certs/8.10 prod-certs/9 -> prod-certs/9.5 prod-certs/10 -> prod-certs/10.0 --- SOURCES/leapp-repository-0.22.0-elevate.patch | 66 +++++-------------- SPECS/leapp-repository.spec | 16 ++++- 2 files changed, 30 insertions(+), 52 deletions(-) diff --git a/SOURCES/leapp-repository-0.22.0-elevate.patch b/SOURCES/leapp-repository-0.22.0-elevate.patch index 9f0d836..307ceb8 100644 --- a/SOURCES/leapp-repository-0.22.0-elevate.patch +++ b/SOURCES/leapp-repository-0.22.0-elevate.patch @@ -3727,45 +3727,6 @@ index 582a5821..18f2c33f 100644 + to_reinstall=list(to_reinstall), modules_to_reset=list(modules_to_reset.values()), modules_to_enable=list(modules_to_enable.values()))) -diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py -index f76677fd..baee9922 100644 ---- a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py -+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py -@@ -1,5 +1,6 @@ - import json - import os -+import sys - import platform - - from leapp.exceptions import StopActorExecutionError -@@ -49,15 +50,25 @@ def get_os_release(path): - :return: `OSRelease` model if the file can be parsed - :raises: `IOError` - """ -+ if sys.version_info.minor < 9: -+ os_version = platform.dist()[1] -+ else: -+ import distro -+ os_version = distro.version() -+ os_version = '.'.join(os_version.split('.')[:2]) - try: - with open(path) as f: - data = dict(l.strip().split('=', 1) for l in f.readlines() if '=' in l) -+ release_id = data.get('ID', '').strip('"') -+ version_id = data.get('VERSION_ID', '').strip('"') -+ if release_id == 'centos' and '.' not in os_version: -+ os_version = "{}.999".format(version_id) - return OSRelease( -- release_id=data.get('ID', '').strip('"'), -+ release_id=release_id, - name=data.get('NAME', '').strip('"'), - pretty_name=data.get('PRETTY_NAME', '').strip('"'), - version=data.get('VERSION', '').strip('"'), -- version_id=data.get('VERSION_ID', '').strip('"'), -+ version_id=os_version, - variant=data.get('VARIANT', '').strip('"') or None, - variant_id=data.get('VARIANT_ID', '').strip('"') or None - ) diff --git a/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py b/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py index 32e4527b..1e595e9a 100644 --- a/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py @@ -5059,10 +5020,10 @@ index 34f7b8f9..acba532c 100644 if self.opts.tid[0] == 'check': diff --git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json -index 279e6eaa..fcfe3306 100644 +index 279e6eaa..fcc9ed87 100644 --- a/repos/system_upgrade/common/files/upgrade_paths.json +++ b/repos/system_upgrade/common/files/upgrade_paths.json -@@ -1,24 +1,15 @@ +@@ -1,31 +1,34 @@ { - "rhel": { + "almalinux": { @@ -5079,27 +5040,30 @@ index 279e6eaa..fcfe3306 100644 - "7": ["8.10"], - "8.10": ["9.6", "9.4"], - "8": ["9.6", "9.4"], -+ "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5"], - "9.6": ["10.0"], -+ "8": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5"], - "9": ["10.0"] +- "9.6": ["10.0"], +- "9": ["10.0"] ++ "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6"], ++ "9.5": ["10.0"], ++ "9.6": ["10.0"] } }, "centos": { "default": { ++ "7": ["8"], + "7.9": ["8"], "8": ["9"], "9": ["10"] }, -@@ -27,5 +18,17 @@ + "_virtual_versions": { ++ "7": "7.9", + "8": "8.10", "9": "9.6", "10": "10.0" } + }, + "rocky": { + "default": { -+ "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5"], -+ "8": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5"] ++ "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6"] + } + }, + "scientific": { @@ -5110,7 +5074,7 @@ index 279e6eaa..fcfe3306 100644 } } diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py -index 7f29c9cd..4523a007 100644 +index 7f29c9cd..a9c61ea3 100644 --- a/repos/system_upgrade/common/libraries/config/version.py +++ b/repos/system_upgrade/common/libraries/config/version.py @@ -18,9 +18,9 @@ OP_MAP = { @@ -5121,8 +5085,8 @@ index 7f29c9cd..4523a007 100644 - '8': {'rhel': ['8.10'], 'rhel-saphana': ['8.10']}, - '9': {'rhel': ['9.6'], 'rhel-saphana': ['9.6']}, + '7': {'rhel': ['7.9'], 'rhel-alt': [], 'rhel-saphana': ['7.9'], 'centos': ['7.9'], 'ol': ['7.9'], 'scientific': ['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'], 'ol': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'rocky': ['8.6', '8.7', '8.8', '8.9', '8.10']}, -+ '9': {'rhel': ['9.4', '9.5', '9.6'], 'rhel-saphana': ['9.4', '9.6'], 'centos': ['9.999'], 'almalinux': ['9.4', '9.5', '9.6'], 'rocky': ['9.4', '9.5', '9.6']}, ++ '8': {'rhel': ['8.8', '8.10'], 'rhel-saphana': ['8.8', '8.10'], 'centos': ['8.5', '8'], 'almalinux': ['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']}, ++ '9': {'rhel': ['9.4', '9.5', '9.6'], 'rhel-saphana': ['9.4', '9.6'], 'centos': ['9'], 'almalinux': ['9.4', '9.5', '9.6'], 'rocky': ['9.4', '9.5', '9.6']}, } diff --git a/SPECS/leapp-repository.spec b/SPECS/leapp-repository.spec index 450ee44..9809ff9 100644 --- a/SPECS/leapp-repository.spec +++ b/SPECS/leapp-repository.spec @@ -369,6 +369,18 @@ done; %py_byte_compile %{__python3} %{buildroot}%{repositorydir}/* %endif +# TODO: that's to awoid "Cannot find the product certificate file for the chosen target system" inhibitor. +# certificates should not be used if system with no RHSM or LEAPP_NO_RHSM=1 used +cd %{buildroot}%{repositorydir}/system_upgrade/common/files/prod-certs/ +%if 0%{?next_major_ver} == 8 +ln -s 8.10 %{next_major_ver} +%else + %if 0%{?next_major_ver} == 9 +ln -s 9.5 %{next_major_ver} + %else +ln -s 10.0 %{next_major_ver} + %endif +%endif %files -n %{lpr_name} %doc README.md @@ -397,7 +409,9 @@ done; %changelog * Thu May 15 2025 Yuriy Kohut - 0.22.0-3.elevate.1 -- Vendors patch: update against upstream 0.22.0-3 (hash ffd6d8e456484630f99d98d5bff955914af02aa5) +- Update ELevate patch: + - rebase to upstream 0.22.0-3 (hash ffd6d8e456484630f99d98d5bff955914af02aa5) +- Create symlinks of RHSM certs path like prod-certs/VERSION_MAJOR -> prod-certs/VERSION_MAJOR.VERSION_MINOR - Exclude CentOS packages public GPG keys * Wed May 14 2025 Petr Stodulka - 0.22.0-3