diff --git a/SOURCES/leapp-repository-0.22.0-elevate.patch b/SOURCES/leapp-repository-0.22.0-elevate.patch index 9f0d836..1cc1046 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 @@ -5110,7 +5071,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 +5082,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..d9fb991 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