From 2f847399074d59ffaf71675a64926d1079896fb0 Mon Sep 17 00:00:00 2001 From: Yuriy Kohut Date: Tue, 16 Jul 2024 17:49:37 +0300 Subject: [PATCH] Update ELevate patch: - Fix ELS kernels detection and add TuxCare and ELevate keys Bump the package release. --- SOURCES/leapp-repository-0.16.0-elevate.patch | 36 ++++++++++++++----- SPECS/leapp-repository.spec | 5 ++- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/SOURCES/leapp-repository-0.16.0-elevate.patch b/SOURCES/leapp-repository-0.16.0-elevate.patch index fbc4410..c4ad433 100644 --- a/SOURCES/leapp-repository-0.16.0-elevate.patch +++ b/SOURCES/leapp-repository-0.16.0-elevate.patch @@ -4671,9 +4671,27 @@ index edf978f6..7fea4ece 100644 variant_id=data.get('VARIANT_ID', '').strip('"') or None ) diff --git a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py -index 134d1aad..2b4dd5ce 100644 +index 134d1aad..e216d35f 100644 --- a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py +++ b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py +@@ -29,7 +29,7 @@ def get_current_kernel_release(): + """ + Get the release of the current kernel as a string. + """ +- return api.current_actor().configuration.kernel.split('-')[1] ++ return api.current_actor().configuration.kernel.split('-')[1].rsplit('.', 1)[0] + + + def get_current_kernel_evr(): +@@ -78,7 +78,7 @@ def get_newest_evr(pkgs): + """ + if not pkgs: + return None +- rpms_evr = _get_pkgs_evr(pkgs) ++ rpms_evr = [ ('', pkg.version, pkg.release) for pkg in pkgs ] + + newest_evr = rpms_evr.pop() + for pkg in rpms_evr: @@ -87,12 +87,23 @@ def get_newest_evr(pkgs): return newest_evr @@ -5074,10 +5092,10 @@ index f4b02e9f..c22165e5 100644 def test_pes_data_not_found(monkeypatch): def read_or_fetch_mocked(filename, directory="/etc/leapp/files", service=None, allow_empty=False): diff --git a/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py b/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py -index 01f6df38..5c128f83 100644 +index 01f6df38..bcfa6e18 100644 --- a/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py +++ b/repos/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py -@@ -1,27 +1,70 @@ +@@ -1,27 +1,72 @@ from leapp.actors import Actor from leapp.libraries.common import rhui -from leapp.models import InstalledRedHatSignedRPM, InstalledRPM, InstalledUnsignedRPM @@ -5097,10 +5115,12 @@ index 01f6df38..5c128f83 100644 + '4eb84e71f2ee9d55', + 'a963bbdbf533f4fa', + '6c7cb6ef305d49d6'], -+ 'cloudlinux': ['8c55a6628608cb71'], ++ 'cloudlinux': ['8c55a6628608cb71', ++ 'd07bf2a08d50eb66'], # TuxCare + 'almalinux': ['51d6647ec21ad6ea', + 'd36cb86cb86b3716', -+ '2ae81e8aced7258b'], ++ '2ae81e8aced7258b', ++ '429785e181b961a5'], # ELevate + 'rocky': ['15af5dac6d745a60', + '702d426d350d275d'], + 'ol': ['72f97b74ec551f03', @@ -5158,7 +5178,7 @@ index 01f6df38..5c128f83 100644 signed_pkgs = InstalledRedHatSignedRPM() unsigned_pkgs = InstalledUnsignedRPM() -@@ -32,11 +75,11 @@ class RedHatSignedRpmScanner(Actor): +@@ -32,11 +77,11 @@ class RedHatSignedRpmScanner(Actor): all_signed = [ env for env in env_vars @@ -5173,7 +5193,7 @@ index 01f6df38..5c128f83 100644 def is_gpg_pubkey(pkg): """Check if gpg-pubkey pkg exists or LEAPP_DEVEL_RPMS_ALL_SIGNED=1 -@@ -44,15 +87,30 @@ class RedHatSignedRpmScanner(Actor): +@@ -44,15 +89,30 @@ class RedHatSignedRpmScanner(Actor): gpg-pubkey is not signed as it would require another package to verify its signature """ @@ -5209,7 +5229,7 @@ index 01f6df38..5c128f83 100644 def is_azure_pkg(pkg): """Whitelist Azure config package.""" -@@ -68,16 +126,25 @@ class RedHatSignedRpmScanner(Actor): +@@ -68,16 +128,25 @@ class RedHatSignedRpmScanner(Actor): for pkg in rpm_pkgs.items: if any( [ diff --git a/SPECS/leapp-repository.spec b/SPECS/leapp-repository.spec index 13a73b4..d562b47 100644 --- a/SPECS/leapp-repository.spec +++ b/SPECS/leapp-repository.spec @@ -43,7 +43,7 @@ py2_byte_compile "%1" "%2"} Epoch: 1 Name: leapp-repository Version: 0.16.0 -Release: 6%{?dist}.elevate.20 +Release: 6%{?dist}.elevate.21 Summary: Repositories for leapp License: ASL 2.0 @@ -250,6 +250,9 @@ done; # no files here %changelog +* Tue Jul 16 2024 Andrew Lukoshko - 0.16.0-6.elevate.21 +- Fix ELS kernels detection and add TuxCare and ELevate keys + * Tue Apr 23 2024 Yuriy Kohut - 0.16.0-6.elevate.20 - Add EuroLinux to the list of distributions, where grub config should be created in case if EFI - Update actor.py to support NVMe device enumeration