From 436985a6cb4994bbdd1ad3f258e7e339b6062365 Mon Sep 17 00:00:00 2001 From: Yuriy Kohut Date: Thu, 15 May 2025 11:58:36 +0300 Subject: [PATCH] Add Vendors patch created against upstream 0.22.0-3 (hash ffd6d8e456484630f99d98d5bff955914af02aa5) Exclude CentOS packages public GPG keys from the package Bump version to 0.22.0-3.elevate.1 --- SOURCES/leapp-repository-0.22.0-elevate.patch | 140 +++++++++--------- SPECS/leapp-repository.spec | 9 +- 2 files changed, 76 insertions(+), 73 deletions(-) diff --git a/SOURCES/leapp-repository-0.22.0-elevate.patch b/SOURCES/leapp-repository-0.22.0-elevate.patch index f52b039..9f0d836 100644 --- a/SOURCES/leapp-repository-0.22.0-elevate.patch +++ b/SOURCES/leapp-repository-0.22.0-elevate.patch @@ -3421,19 +3421,6 @@ index 00000000..370758e6 + end + end +end -diff --git a/commands/command_utils.py b/commands/command_utils.py -index 84b9de1b..387468f3 100644 ---- a/commands/command_utils.py -+++ b/commands/command_utils.py -@@ -16,7 +16,7 @@ LEAPP_UPGRADE_FLAVOUR_DEFAULT = 'default' - LEAPP_UPGRADE_FLAVOUR_SAP_HANA = 'saphana' - LEAPP_UPGRADE_PATHS = 'upgrade_paths.json' - --VERSION_REGEX = re.compile(r"^([1-9]\d*)\.(\d+)$") -+VERSION_REGEX = re.compile(r"^([1-9]\d*)(\.(\d+))?$") - - - def check_version(version): diff --git a/etc/leapp/transaction/to_reinstall b/etc/leapp/transaction/to_reinstall new file mode 100644 index 00000000..c6694a8e @@ -3741,16 +3728,17 @@ index 582a5821..18f2c33f 100644 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 749b3347..39e4487f 100644 +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,4 +1,5 @@ +@@ -1,5 +1,6 @@ + import json import os +import sys import platform from leapp.exceptions import StopActorExecutionError -@@ -47,15 +48,25 @@ def get_os_release(path): +@@ -49,15 +50,25 @@ def get_os_release(path): :return: `OSRelease` model if the file can be parsed :raises: `IOError` """ @@ -4590,7 +4578,7 @@ index 59b12c87..85d4a09e 100644 def process(self): self.produce(systemfacts.get_sysctls_status()) diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py -index 12736ab7..f90bf6e3 100644 +index 9fc96a52..3b873b68 100644 --- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py +++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py @@ -152,9 +152,10 @@ def _import_gpg_keys(context, install_root_dir, target_major_version): @@ -5071,29 +5059,61 @@ 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 1c54dae8..5ce5a666 100644 +index 279e6eaa..fcfe3306 100644 --- a/repos/system_upgrade/common/files/upgrade_paths.json +++ b/repos/system_upgrade/common/files/upgrade_paths.json -@@ -1,10 +1,10 @@ +@@ -1,24 +1,15 @@ { - "default": { -- "7.9": ["8.10"], -- "8.10": ["9.4", "9.6"], -+ "7.9": ["8.7", "8.8", "8.9", "8.10"], -+ "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5"], - "9.6": ["10.0"], -- "7": ["8.10"], -- "8": ["9.4", "9.6"], -+ "7": ["8.7", "8.8", "8.9", "8.10"], -+ "8": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5"], - "9": ["10.0"] +- "rhel": { ++ "almalinux": { + "default": { +- "7.9": ["8.10"], +- "8.10": ["9.4", "9.6"], +- "9.6": ["10.0"], +- "7": ["8.10"], +- "8": ["9.4", "9.6"], +- "9": ["10.0"] +- }, +- "saphana": { +- "7.9": ["8.10"], +- "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"] + } }, - "saphana": { + "centos": { + "default": { ++ "7.9": ["8"], + "8": ["9"], + "9": ["10"] + }, +@@ -27,5 +18,17 @@ + "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"] ++ } ++ }, ++ "scientific": { ++ "default": { ++ "7.9": ["8.7", "8.8", "8.9", "8.10"], ++ "7": ["8.7", "8.8", "8.9", "8.10"] ++ } + } + } diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py -index febeed36..0d075535 100644 +index 7f29c9cd..4523a007 100644 --- a/repos/system_upgrade/common/libraries/config/version.py +++ b/repos/system_upgrade/common/libraries/config/version.py -@@ -17,9 +17,9 @@ OP_MAP = { +@@ -18,9 +18,9 @@ OP_MAP = { # These will not be supported fo IPU 9 -> 10 _SUPPORTED_VERSIONS = { # Note: 'rhel-alt' is detected when on 'rhel' with kernel 4.x @@ -5134,40 +5154,6 @@ index 2ed5eacd..219d31d1 100644 + distro_config_json["keys"].extend(siglist.sigs) + + return distro_config_json -diff --git a/repos/system_upgrade/common/libraries/dnfconfig.py b/repos/system_upgrade/common/libraries/dnfconfig.py -index 5b8180f0..4b5afeb5 100644 ---- a/repos/system_upgrade/common/libraries/dnfconfig.py -+++ b/repos/system_upgrade/common/libraries/dnfconfig.py -@@ -1,28 +1,8 @@ - from leapp.exceptions import StopActorExecutionError --from leapp.libraries.common.config.version import get_source_major_version -+from leapp.libraries.common.rpms import get_leapp_packages - from leapp.libraries.stdlib import api, CalledProcessError - - --def get_leapp_packages(): -- """ -- Return the list of leapp and leapp-repository rpms that should be preserved -- during the upgrade. -- -- It's list of packages that should be preserved, not what is really -- installed. -- -- The snactor RPM doesn't have to be installed, but if so, we have to take -- care about that too as well to prevent broken dnf transaction. -- """ -- # TODO: should we set the seatbelt and exclude leapp RPMs from the target -- # system too? -- generic = ['leapp', 'snactor'] -- if get_source_major_version() == '7': -- return generic + ['python2-leapp', 'leapp-upgrade-el7toel8'] -- -- return generic + ['python3-leapp', 'leapp-upgrade-el8toel9'] -- -- - def _strip_split(data, sep, maxsplit=-1): - """ - Just like str.split(), but remove ambient whitespaces from all items diff --git a/repos/system_upgrade/common/libraries/dnfplugin.py b/repos/system_upgrade/common/libraries/dnfplugin.py index 4f0c3a99..0f31f101 100644 --- a/repos/system_upgrade/common/libraries/dnfplugin.py @@ -5204,17 +5190,27 @@ index 82bf4ff3..cb20d775 100644 except ValueError: msg = 'The {0} file (at {1}) does not contain a valid JSON object.'.format(asset_fulltext_name, asset_filename) diff --git a/repos/system_upgrade/common/libraries/gpg.py b/repos/system_upgrade/common/libraries/gpg.py -index a8071329..1e0bac46 100644 +index c9c3f1fc..96907be0 100644 --- a/repos/system_upgrade/common/libraries/gpg.py +++ b/repos/system_upgrade/common/libraries/gpg.py -@@ -121,7 +121,10 @@ def get_path_to_gpg_certs(): - # only beta is special in regards to the GPG signing keys +@@ -122,12 +122,15 @@ def get_path_to_gpg_certs(): if target_product_type == 'beta': certs_dir = '{}beta'.format(target_major_version) -- return os.path.join(api.get_common_folder_path(GPG_CERTS_FOLDER), certs_dir) + distro = api.current_actor().configuration.os_release.release_id +- return os.path.join( +- api.get_common_folder_path('distro'), +- distro, +- GPG_CERTS_FOLDER, +- certs_dir +- ) + return [ + "/etc/leapp/files/vendors.d/rpm-gpg/", -+ os.path.join(api.get_common_folder_path(GPG_CERTS_FOLDER), certs_dir) ++ os.path.join( ++ api.get_common_folder_path('distro'), ++ distro, ++ GPG_CERTS_FOLDER, ++ certs_dir ++ ) + ] diff --git a/SPECS/leapp-repository.spec b/SPECS/leapp-repository.spec index 4805a29..450ee44 100644 --- a/SPECS/leapp-repository.spec +++ b/SPECS/leapp-repository.spec @@ -53,7 +53,7 @@ py2_byte_compile "%1" "%2"} Epoch: 1 Name: leapp-repository Version: 0.22.0 -Release: 3%{?dist} +Release: 3%{?dist}.elevate.1 Summary: Repositories for leapp License: ASL 2.0 @@ -104,6 +104,7 @@ Patch0034: 0034-Introduce-distro-based-rpm-gpg-trusted-directory.patch Patch0035: 0035-Add-official-Centos-Stream-9-and-10-RPM-GPG-keys.patch Patch0036: 0036-Deprecate-is_rhel_alt-from-share-libraries.patch Patch0037: 0037-data-update-data-files-stream-3.3-1380.patch +Patch0100: leapp-repository-0.22.0-elevate.patch %description @@ -309,6 +310,7 @@ Requires: libdb-utils %patch -P 0035 -p1 %patch -P 0036 -p1 %patch -P 0037 -p1 +%patch -P 0100 -p1 %build @@ -386,6 +388,7 @@ done; %{_sysconfdir}/leapp/repos.d/* %{_sysconfdir}/leapp/transaction/* %{repositorydir}/* +%exclude %{repositorydir}/system_upgrade/common/files/distro/centos/rpm-gpg/* %{leapp_python_sitelib}/leapp/cli/commands/* @@ -393,6 +396,10 @@ done; # no files here %changelog +* Thu May 15 2025 Yuriy Kohut - 0.22.0-3.elevate.1 +- Vendors patch: update against upstream 0.22.0-3 (hash ffd6d8e456484630f99d98d5bff955914af02aa5) +- Exclude CentOS packages public GPG keys + * Wed May 14 2025 Petr Stodulka - 0.22.0-3 - Rebuild