forked from rpms/leapp-repository
Compare commits
2 Commits
c8
...
a8-upstrea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0636255067 | ||
|
|
f3fac85068 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
SOURCES/deps-pkgs-13.tar.gz
|
||||
SOURCES/leapp-repository-0.24.0.tar.gz
|
||||
SOURCES/leapp-repository-0.22.0.tar.gz
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
3590b33b4a79ebe62f5cfa0eeca7efb41d526498 SOURCES/deps-pkgs-13.tar.gz
|
||||
2271b92541564ebd07a038a8b45e5a33d5f8b9c9 SOURCES/leapp-repository-0.24.0.tar.gz
|
||||
e23b32573b375337b079dd7a0dc07e9232851b1c SOURCES/leapp-repository-0.22.0.tar.gz
|
||||
|
||||
@ -1,112 +0,0 @@
|
||||
From 34aeae1e023e61345a1bb020b42231a79a0be4a8 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Thu, 26 Feb 2026 17:52:23 +0100
|
||||
Subject: [PATCH 01/44] Remove legacy overlay solution leftovers
|
||||
|
||||
The solution was removed in 93429, however there are some leftovers.
|
||||
---
|
||||
.../libraries/userspacegen.py | 19 -------------------
|
||||
.../common/libraries/dnfplugin.py | 15 ++++-----------
|
||||
.../common/libraries/overlaygen.py | 6 ------
|
||||
3 files changed, 4 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
index 66843645..7dbadae2 100644
|
||||
--- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
+++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
@@ -178,26 +178,7 @@ def _import_gpg_keys(context, install_root_dir, target_major_version):
|
||||
)
|
||||
|
||||
|
||||
-def _handle_transaction_err_msg_size_old(err):
|
||||
- # NOTE(pstodulk): This is going to be removed in future!
|
||||
-
|
||||
- article_section = 'Generic case'
|
||||
- xfs_info = next(api.consume(XFSPresence), XFSPresence())
|
||||
- if xfs_info.present and xfs_info.without_ftype:
|
||||
- article_section = 'XFS ftype=0 case'
|
||||
-
|
||||
- message = ('There is not enough space on the file system hosting /var/lib/leapp directory '
|
||||
- 'to extract the packages.')
|
||||
- details = {'hint': "Please follow the instructions in the '{}' section of the article at: "
|
||||
- "link: https://access.redhat.com/solutions/5057391".format(article_section)}
|
||||
-
|
||||
- raise StopActorExecutionError(message=message, details=details)
|
||||
-
|
||||
-
|
||||
def _handle_transaction_err_msg_size(err):
|
||||
- if get_env('LEAPP_OVL_LEGACY', '0') == '1':
|
||||
- _handle_transaction_err_msg_size_old(err)
|
||||
- return # not needed actually as the above function raises error, but for visibility
|
||||
NO_SPACE_STR = 'more space needed on the'
|
||||
|
||||
# Disk Requirements:
|
||||
diff --git a/repos/system_upgrade/common/libraries/dnfplugin.py b/repos/system_upgrade/common/libraries/dnfplugin.py
|
||||
index d50dbbce..b91bcbe7 100644
|
||||
--- a/repos/system_upgrade/common/libraries/dnfplugin.py
|
||||
+++ b/repos/system_upgrade/common/libraries/dnfplugin.py
|
||||
@@ -7,7 +7,6 @@ import shutil
|
||||
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.common import dnfconfig, guards, mounting, overlaygen, rhsm, utils
|
||||
-from leapp.libraries.common.config import get_env
|
||||
from leapp.libraries.common.config.version import get_target_major_version, get_target_version
|
||||
from leapp.libraries.common.gpg import is_nogpgcheck_set
|
||||
from leapp.libraries.stdlib import api, CalledProcessError, config
|
||||
@@ -166,16 +165,10 @@ def _handle_transaction_err_msg_old(stage, xfs_info, err):
|
||||
raise StopActorExecutionError(message=message, details=details)
|
||||
|
||||
|
||||
-def _handle_transaction_err_msg(stage, xfs_info, err, is_container=False):
|
||||
- # ignore the fallback when the error is related to the container issue
|
||||
- # e.g. installation of packages inside the container; so it's unrelated
|
||||
- # to the upgrade transactions.
|
||||
- if get_env('LEAPP_OVL_LEGACY', '0') == '1' and not is_container:
|
||||
- _handle_transaction_err_msg_old(stage, xfs_info, err)
|
||||
- return # not needed actually as the above function raises error, but for visibility
|
||||
+def _handle_transaction_err_msg(err, is_container=False):
|
||||
NO_SPACE_STR = 'more space needed on the'
|
||||
- message = 'DNF execution failed with non zero exit code.'
|
||||
if NO_SPACE_STR not in err.stderr:
|
||||
+ message = 'DNF execution failed with non zero exit code.'
|
||||
# if there was a problem reaching repos and proxy is configured in DNF/YUM configs, the
|
||||
# proxy is likely the problem.
|
||||
# NOTE(mmatuska): We can't consistently detect there was a problem reaching some repos,
|
||||
@@ -308,7 +301,7 @@ def _transaction(context, stage, target_repoids, tasks, plugin_info, xfs_info,
|
||||
)
|
||||
except CalledProcessError as e:
|
||||
api.current_logger().error('Cannot calculate, check, test, or perform the upgrade transaction.')
|
||||
- _handle_transaction_err_msg(stage, xfs_info, e, is_container=False)
|
||||
+ _handle_transaction_err_msg(e, is_container=False)
|
||||
finally:
|
||||
if stage == 'check':
|
||||
backup_debug_data(context=context)
|
||||
@@ -384,7 +377,7 @@ def install_initramdisk_requirements(packages, target_userspace_info, used_repos
|
||||
api.current_logger().error(
|
||||
'Cannot install packages in the target container required to build the upgrade initramfs.'
|
||||
)
|
||||
- _handle_transaction_err_msg('', None, e, is_container=True)
|
||||
+ _handle_transaction_err_msg(e, is_container=True)
|
||||
|
||||
|
||||
def perform_transaction_install(target_userspace_info, storage_info, used_repos, tasks, plugin_info, xfs_info):
|
||||
diff --git a/repos/system_upgrade/common/libraries/overlaygen.py b/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
index f0d0ba1d..3091ab5b 100644
|
||||
--- a/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
+++ b/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
@@ -594,12 +594,6 @@ def create_source_overlay(
|
||||
in the OVERLAY_DO_NOT_MOUNT set. Such prepared OVL images are then composed
|
||||
together to reflect the real host filesystem. In the end everything is cleaned.
|
||||
|
||||
- The new solution can be now problematic for system with too many partitions
|
||||
- and loop devices. For such systems we keep for now the possibility of the
|
||||
- fallback to an old solution, which has however number of issues that are
|
||||
- fixed by the new design. To fallback to the old solution, set envar:
|
||||
- LEAPP_OVL_LEGACY=1
|
||||
-
|
||||
Disk images created for OVL are formatted with XFS by default. In case of
|
||||
problems, it's possible to switch to Ext4 FS using:
|
||||
LEAPP_OVL_IMG_FS_EXT4=1
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
From 092ea5e7c5b8a453bcd30be5fefb0e2ecab752c4 Mon Sep 17 00:00:00 2001
|
||||
From: Yuriy Kohut <yura.kohut@gmail.com>
|
||||
Date: Mon, 3 Mar 2025 15:36:43 +0200
|
||||
Subject: [PATCH 01/37] Use leapp.libraries.common.rpms.get_leapp_packages
|
||||
(which is backward compatible) to get the list of leapp and leapp-repository
|
||||
rpms, that should be preserved during the 9to10 upgrade
|
||||
|
||||
Do not import get_source_major_version as it isn't used anywhere
|
||||
---
|
||||
.../common/libraries/dnfconfig.py | 22 +------------------
|
||||
1 file changed, 1 insertion(+), 21 deletions(-)
|
||||
|
||||
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
|
||||
--
|
||||
2.49.0
|
||||
|
||||
38
SOURCES/0002-fix-spell-AllowZoneDrifting-correctly.patch
Normal file
38
SOURCES/0002-fix-spell-AllowZoneDrifting-correctly.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 1be52a6430b878bd4984bcf2577f3c7c847d2e48 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Ashcraft <joeashcraft@gmail.com>
|
||||
Date: Tue, 4 Mar 2025 16:31:14 -0600
|
||||
Subject: [PATCH 02/37] fix - spell AllowZoneDrifting correctly
|
||||
|
||||
resolves #1354
|
||||
---
|
||||
.../actors/firewalldcheckallowzonedrifting/actor.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py b/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
index 0002f6aa..6f1c8f43 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
@@ -7,9 +7,9 @@ from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
class FirewalldCheckAllowZoneDrifting(Actor):
|
||||
"""
|
||||
- This actor will check if AllowZoneDrifiting=yes in firewalld.conf. This
|
||||
+ This actor will check if AllowZoneDrifting=yes in firewalld.conf. This
|
||||
option has been removed in RHEL-9 and behavior is as if
|
||||
- AllowZoneDrifiting=no.
|
||||
+ AllowZoneDrifting=no.
|
||||
"""
|
||||
|
||||
name = 'firewalld_check_allow_zone_drifting'
|
||||
@@ -37,7 +37,7 @@ class FirewalldCheckAllowZoneDrifting(Actor):
|
||||
reporting.Summary('Firewalld has enabled configuration option '
|
||||
'"{conf_key}" which has been removed in RHEL-9. '
|
||||
'New behavior is as if "{conf_key}" was set to "no".'.format(
|
||||
- conf_key='AllowZoneDrifiting')),
|
||||
+ conf_key='AllowZoneDrifting')),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.SANITY, reporting.Groups.FIREWALL]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
--
|
||||
2.49.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,106 +0,0 @@
|
||||
From b96c610bb27ab5f7ef1ad65a1a763ed2d31b6816 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Tue, 17 Feb 2026 10:23:18 +0100
|
||||
Subject: [PATCH 03/44] Enable logrotate.timer during 8to9 IPU
|
||||
|
||||
On el8 logrotate uses cron, on el9 a systemd timer is used. This is not
|
||||
automatically migrated during an IPU, this patch adds a actor that
|
||||
does so.
|
||||
|
||||
Jira: RHEL-17361
|
||||
---
|
||||
.../actors/enablelogrotatetimer/actor.py | 22 +++++++++++++
|
||||
.../libraries/enablelogrotatetimer.py | 13 ++++++++
|
||||
.../tests/test_enablelogrotatetimer.py | 31 +++++++++++++++++++
|
||||
3 files changed, 66 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/actor.py
|
||||
create mode 100644 repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/libraries/enablelogrotatetimer.py
|
||||
create mode 100644 repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/tests/test_enablelogrotatetimer.py
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/actor.py b/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..bc3c7ec3
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/actor.py
|
||||
@@ -0,0 +1,22 @@
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.libraries.actor import enablelogrotatetimer
|
||||
+from leapp.models import SystemdServicesInfoTarget, SystemdServicesTasks
|
||||
+from leapp.tags import FinalizationPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+
|
||||
+class EnableLogrotateTimer(Actor):
|
||||
+ """
|
||||
+ Enable logrotate.timer on the target system after upgrade
|
||||
+
|
||||
+ The logrotate.timer systemd timer unit replaces the traditional cron-based
|
||||
+ logrotate execution used in RHEL 8. This actor ensures the timer is enabled
|
||||
+ after the in-place upgrade is complete.
|
||||
+ """
|
||||
+
|
||||
+ name = 'enable_logrotate_timer'
|
||||
+ consumes = (SystemdServicesInfoTarget,)
|
||||
+ produces = (SystemdServicesTasks,)
|
||||
+ tags = (FinalizationPhaseTag, IPUWorkflowTag)
|
||||
+
|
||||
+ def process(self):
|
||||
+ enablelogrotatetimer.process()
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/libraries/enablelogrotatetimer.py b/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/libraries/enablelogrotatetimer.py
|
||||
new file mode 100644
|
||||
index 00000000..c9783ae9
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/libraries/enablelogrotatetimer.py
|
||||
@@ -0,0 +1,13 @@
|
||||
+from leapp.libraries.common.systemd import enable_unit
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError
|
||||
+
|
||||
+LOGROTATE_TIMER = 'logrotate.timer'
|
||||
+
|
||||
+
|
||||
+def process():
|
||||
+ try:
|
||||
+ enable_unit(LOGROTATE_TIMER)
|
||||
+ except CalledProcessError as e:
|
||||
+ api.current_logger().error(
|
||||
+ "Failed to enable {}: {}".format(LOGROTATE_TIMER, e)
|
||||
+ )
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/tests/test_enablelogrotatetimer.py b/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/tests/test_enablelogrotatetimer.py
|
||||
new file mode 100644
|
||||
index 00000000..f366bd6a
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/enablelogrotatetimer/tests/test_enablelogrotatetimer.py
|
||||
@@ -0,0 +1,31 @@
|
||||
+from leapp.libraries.actor import enablelogrotatetimer
|
||||
+from leapp.libraries.common.testutils import logger_mocked
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError
|
||||
+
|
||||
+
|
||||
+def test_success(monkeypatch):
|
||||
+
|
||||
+ def mock_enable_unit(unit):
|
||||
+ assert unit == 'logrotate.timer'
|
||||
+
|
||||
+ monkeypatch.setattr(enablelogrotatetimer, "enable_unit", mock_enable_unit)
|
||||
+ enablelogrotatetimer.process()
|
||||
+
|
||||
+
|
||||
+def test_failed_to_enable(monkeypatch):
|
||||
+
|
||||
+ def mock_enable_unit(unit):
|
||||
+ assert unit == 'logrotate.timer'
|
||||
+ raise CalledProcessError(
|
||||
+ "Failed to enable logrotate.titmer",
|
||||
+ ["systemctl", "enable", "logrotate.timer"],
|
||||
+ {
|
||||
+ "exit_code": 1,
|
||||
+ "stderr": "err",
|
||||
+ },
|
||||
+ )
|
||||
+
|
||||
+ monkeypatch.setattr(enablelogrotatetimer, "enable_unit", mock_enable_unit)
|
||||
+ monkeypatch.setattr(api, "current_logger", logger_mocked())
|
||||
+ enablelogrotatetimer.process()
|
||||
+ assert "Failed to enable logrotate.timer" in api.current_logger.errmsg[0]
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,134 @@
|
||||
From 9ea195e84dbc70e4539efe86b6d8f8ca597e2661 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Thu, 27 Feb 2025 09:36:45 +0100
|
||||
Subject: [PATCH 03/37] cli(upgrade): allow users to enable entire experimental
|
||||
features
|
||||
|
||||
Introduce a new CLI option --enable-experimental-feature that allows
|
||||
users to enable entire features that might be facilitated by a large
|
||||
number of experimental actors. Previously, the used had to
|
||||
remember/figure out the names of all of these actors and list them
|
||||
manually using `--whitelist-experimental`. Using
|
||||
`--enable-experimental-feature` therefore lifts this burden from the
|
||||
user, and the user simply needs to know what experimental feature to
|
||||
enable. The help for the new options includes a list of all supported
|
||||
experimental feature - at the moment, the list contains only 'livemode'.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
commands/preupgrade/__init__.py | 4 ++++
|
||||
commands/rerun/__init__.py | 1 +
|
||||
commands/upgrade/__init__.py | 4 ++++
|
||||
commands/upgrade/util.py | 35 ++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 43 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/commands/preupgrade/__init__.py b/commands/preupgrade/__init__.py
|
||||
index c1fabbbd..e52b6561 100644
|
||||
--- a/commands/preupgrade/__init__.py
|
||||
+++ b/commands/preupgrade/__init__.py
|
||||
@@ -14,6 +14,10 @@ from leapp.utils.output import beautify_actor_exception, report_errors, report_i
|
||||
|
||||
@command('preupgrade', help='Generate preupgrade report')
|
||||
@command_opt('whitelist-experimental', action='append', metavar='ActorName', help='Enables experimental actors')
|
||||
+@command_opt('enable-experimental-feature', action='append', metavar='Feature',
|
||||
+ help=('Enable experimental feature. '
|
||||
+ 'Available experimental features: {}').format(util.get_help_str_with_avail_experimental_features()),
|
||||
+ choices=list(util.EXPERIMENTAL_FEATURES), default=[])
|
||||
@command_opt('debug', is_flag=True, help='Enable debug mode', inherit=False)
|
||||
@command_opt('verbose', is_flag=True, help='Enable verbose logging', inherit=False)
|
||||
@command_opt('no-rhsm', is_flag=True, help='Use only custom repositories and skip actions'
|
||||
diff --git a/commands/rerun/__init__.py b/commands/rerun/__init__.py
|
||||
index a06dd266..842178af 100644
|
||||
--- a/commands/rerun/__init__.py
|
||||
+++ b/commands/rerun/__init__.py
|
||||
@@ -71,6 +71,7 @@ def rerun(args):
|
||||
nogpgcheck=False,
|
||||
channel=None,
|
||||
report_schema='1.1.0',
|
||||
+ enable_experimental_feature=[],
|
||||
whitelist_experimental=[],
|
||||
enablerepo=[]))
|
||||
|
||||
diff --git a/commands/upgrade/__init__.py b/commands/upgrade/__init__.py
|
||||
index 608099ac..6f7504bf 100644
|
||||
--- a/commands/upgrade/__init__.py
|
||||
+++ b/commands/upgrade/__init__.py
|
||||
@@ -20,6 +20,10 @@ from leapp.utils.output import beautify_actor_exception, report_errors, report_i
|
||||
@command_opt('resume', is_flag=True, help='Continue the last execution after it was stopped (e.g. after reboot)')
|
||||
@command_opt('reboot', is_flag=True, help='Automatically performs reboot when requested.')
|
||||
@command_opt('whitelist-experimental', action='append', metavar='ActorName', help='Enable experimental actors')
|
||||
+@command_opt('enable-experimental-feature', action='append', metavar='Feature',
|
||||
+ help=('Enable experimental feature. '
|
||||
+ 'Available experimental features: {}').format(util.get_help_str_with_avail_experimental_features()),
|
||||
+ choices=list(util.EXPERIMENTAL_FEATURES), default=[])
|
||||
@command_opt('debug', is_flag=True, help='Enable debug mode', inherit=False)
|
||||
@command_opt('verbose', is_flag=True, help='Enable verbose logging', inherit=False)
|
||||
@command_opt('no-rhsm', is_flag=True, help='Use only custom repositories and skip actions'
|
||||
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
||||
index b20c316d..bfdbc4fa 100644
|
||||
--- a/commands/upgrade/util.py
|
||||
+++ b/commands/upgrade/util.py
|
||||
@@ -17,6 +17,25 @@ from leapp.utils.output import report_unsupported
|
||||
from leapp.utils.report import fetch_upgrade_report_messages, generate_report_file
|
||||
|
||||
|
||||
+EXPERIMENTAL_FEATURES = {
|
||||
+ 'livemode': [
|
||||
+ 'live_image_generator',
|
||||
+ 'live_mode_config_scanner',
|
||||
+ 'live_mode_reporter',
|
||||
+ 'prepare_live_image',
|
||||
+ 'emit_livemode_requirements',
|
||||
+ 'remove_live_image',
|
||||
+ ]
|
||||
+}
|
||||
+""" Maps experimental features to a set of experimental actors that need to be enabled. """
|
||||
+
|
||||
+
|
||||
+def get_help_str_with_avail_experimental_features():
|
||||
+ if EXPERIMENTAL_FEATURES:
|
||||
+ return ', '.join(EXPERIMENTAL_FEATURES)
|
||||
+ return 'There are no experimental features available'
|
||||
+
|
||||
+
|
||||
def disable_database_sync():
|
||||
def disable_db_sync_decorator(f):
|
||||
@functools.wraps(f)
|
||||
@@ -184,11 +203,25 @@ def handle_output_level(args):
|
||||
# the latest supported release because of target_version discovery attempt.
|
||||
def prepare_configuration(args):
|
||||
"""Returns a configuration dict object while setting a few env vars as a side-effect"""
|
||||
+
|
||||
if args.whitelist_experimental:
|
||||
args.whitelist_experimental = list(itertools.chain(*[i.split(',') for i in args.whitelist_experimental]))
|
||||
os.environ['LEAPP_EXPERIMENTAL'] = '1'
|
||||
else:
|
||||
os.environ['LEAPP_EXPERIMENTAL'] = '0'
|
||||
+ args.whitelist_experimental = []
|
||||
+
|
||||
+ for experimental_feature in set(args.enable_experimental_feature):
|
||||
+ # It might happen that there are no experimental features, which would allow user
|
||||
+ # to pass us any string as an experimental feature.
|
||||
+ if experimental_feature not in EXPERIMENTAL_FEATURES:
|
||||
+ continue
|
||||
+
|
||||
+ actors_needed_for_feature = EXPERIMENTAL_FEATURES[experimental_feature]
|
||||
+ args.whitelist_experimental.extend(actors_needed_for_feature)
|
||||
+ if args.enable_experimental_feature:
|
||||
+ os.environ['LEAPP_EXPERIMENTAL'] = '1'
|
||||
+
|
||||
os.environ['LEAPP_UNSUPPORTED'] = '0' if os.getenv('LEAPP_UNSUPPORTED', '0') == '0' else '1'
|
||||
if args.no_rhsm:
|
||||
os.environ['LEAPP_NO_RHSM'] = '1'
|
||||
@@ -235,7 +268,7 @@ def prepare_configuration(args):
|
||||
configuration = {
|
||||
'debug': os.getenv('LEAPP_DEBUG', '0'),
|
||||
'verbose': os.getenv('LEAPP_VERBOSE', '0'),
|
||||
- 'whitelist_experimental': args.whitelist_experimental or (),
|
||||
+ 'whitelist_experimental': args.whitelist_experimental or (), # Modified to also contain exp. features
|
||||
'environment': {env: os.getenv(env) for env in os.environ if env.startswith('LEAPP_')},
|
||||
'cmd': sys.argv,
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
From 11b9733cfe1c7cc10db675fba24d94c0c30f6b6e Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Thu, 27 Feb 2025 10:18:17 +0100
|
||||
Subject: [PATCH 04/37] feat(livemode): exclude DNF cache from the created
|
||||
squashfs image
|
||||
|
||||
Exclude /var/cache/dnf from the generated squashfs image. The DNF
|
||||
cache is not needed for the live system that we boot into, since leapp
|
||||
will always use DNF cache stored within target userspace container
|
||||
(/sysroot/var/lib/leapp/...). Therefore, this optimization saves
|
||||
a lot of disk space for the user (2GB->700mb).
|
||||
---
|
||||
.../libraries/liveimagegenerator.py | 22 ++++++++++++++-----
|
||||
.../tests/test_image_generation.py | 6 +++--
|
||||
2 files changed, 21 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/liveimagegenerator/libraries/liveimagegenerator.py b/repos/system_upgrade/common/actors/livemode/liveimagegenerator/libraries/liveimagegenerator.py
|
||||
index af8981d8..46118630 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/liveimagegenerator/libraries/liveimagegenerator.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/liveimagegenerator/libraries/liveimagegenerator.py
|
||||
@@ -24,7 +24,7 @@ def lighten_target_userpace(context):
|
||||
tree_to_prune, error)
|
||||
|
||||
|
||||
-def build_squashfs(livemode_config, userspace_info):
|
||||
+def build_squashfs(livemode_config, userspace_info, paths_to_exclude=None):
|
||||
"""
|
||||
Generate the live rootfs image based on the target userspace
|
||||
|
||||
@@ -34,8 +34,11 @@ def build_squashfs(livemode_config, userspace_info):
|
||||
target_userspace_fullpath = userspace_info.path
|
||||
squashfs_fullpath = livemode_config.squashfs_fullpath
|
||||
|
||||
- api.current_logger().info('Building the squashfs image %s from target userspace located at %s',
|
||||
- squashfs_fullpath, target_userspace_fullpath)
|
||||
+ if not paths_to_exclude:
|
||||
+ paths_to_exclude = []
|
||||
+
|
||||
+ api.current_logger().info('Building the squashfs image %s from target userspace located at %s with excludes: %s',
|
||||
+ squashfs_fullpath, target_userspace_fullpath, ', '.join(paths_to_exclude))
|
||||
|
||||
try:
|
||||
if os.path.exists(squashfs_fullpath):
|
||||
@@ -44,8 +47,13 @@ def build_squashfs(livemode_config, userspace_info):
|
||||
api.current_logger().warning('Failed to remove already existing %s. Full error: %s',
|
||||
squashfs_fullpath, error)
|
||||
|
||||
+ mksquashfs_command = ['mksquashfs', target_userspace_fullpath, squashfs_fullpath]
|
||||
+ if paths_to_exclude:
|
||||
+ mksquashfs_command.append('-e')
|
||||
+ mksquashfs_command.extend(paths_to_exclude)
|
||||
+
|
||||
try:
|
||||
- run(['mksquashfs', target_userspace_fullpath, squashfs_fullpath])
|
||||
+ run(mksquashfs_command)
|
||||
except CalledProcessError as error:
|
||||
raise StopActorExecutionError(
|
||||
'Cannot pack the target userspace into a squash image. ',
|
||||
@@ -68,5 +76,9 @@ def generate_live_image_if_enabled():
|
||||
|
||||
with mounting.NspawnActions(base_dir=userspace_info.path) as context:
|
||||
lighten_target_userpace(context)
|
||||
- squashfs_path = build_squashfs(livemode_config, userspace_info)
|
||||
+
|
||||
+ # Exclude the DNF cache - we do not need it, leapp mounts /sysroot and uses userspace's dnf cache from there
|
||||
+ paths_to_exclude = [os.path.join(userspace_info.path, 'var/cache/dnf')]
|
||||
+
|
||||
+ squashfs_path = build_squashfs(livemode_config, userspace_info, paths_to_exclude=paths_to_exclude)
|
||||
api.produce(LiveModeArtifacts(squashfs_path=squashfs_path))
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/liveimagegenerator/tests/test_image_generation.py b/repos/system_upgrade/common/actors/livemode/liveimagegenerator/tests/test_image_generation.py
|
||||
index 5c434a6b..16ae0a09 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/liveimagegenerator/tests/test_image_generation.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/liveimagegenerator/tests/test_image_generation.py
|
||||
@@ -78,10 +78,12 @@ def test_generate_live_image_if_enabled(monkeypatch, livemode_config, should_pro
|
||||
def __exit__(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
+ def build_squashfs_image_mock(livemode_config, userspace_info, *args, **kwargs):
|
||||
+ return '/squashfs'
|
||||
+
|
||||
monkeypatch.setattr(mounting, 'NspawnActions', NspawnMock)
|
||||
monkeypatch.setattr(live_image_generator_lib, 'lighten_target_userpace', lambda context: None)
|
||||
- monkeypatch.setattr(live_image_generator_lib, 'build_squashfs',
|
||||
- lambda livemode_config, userspace_info: '/squashfs')
|
||||
+ monkeypatch.setattr(live_image_generator_lib, 'build_squashfs', build_squashfs_image_mock)
|
||||
monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
|
||||
live_image_generator_lib.generate_live_image_if_enabled()
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
From 0e0db2860587d57193a52135ae88df8917d70538 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Wed, 11 Feb 2026 16:51:41 +0100
|
||||
Subject: [PATCH 04/44] feat(net-naming-scheme): enable by default on CS 9to10
|
||||
|
||||
This was done for RHEL 9to10 in
|
||||
91f37a3913c1608b24c9aa583ac3b13a08aace71.
|
||||
|
||||
Jira: RHEL-148291
|
||||
---
|
||||
.../libraries/emit_net_naming.py | 10 ++++------
|
||||
.../tests/test_emit_net_naming_scheme.py | 9 ++-------
|
||||
2 files changed, 6 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/emit_net_naming_scheme/libraries/emit_net_naming.py b/repos/system_upgrade/common/actors/emit_net_naming_scheme/libraries/emit_net_naming.py
|
||||
index 7b112ff0..ef2c0b79 100644
|
||||
--- a/repos/system_upgrade/common/actors/emit_net_naming_scheme/libraries/emit_net_naming.py
|
||||
+++ b/repos/system_upgrade/common/actors/emit_net_naming_scheme/libraries/emit_net_naming.py
|
||||
@@ -1,5 +1,5 @@
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
-from leapp.libraries.common.config import get_env, get_target_distro_id, version
|
||||
+from leapp.libraries.common.config import get_env, version
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import (
|
||||
KernelCmdline,
|
||||
@@ -49,11 +49,9 @@ def is_net_scheme_compatible_with_current_cmdline():
|
||||
def emit_msgs_to_use_net_naming_schemes():
|
||||
is_feature_enabled = get_env('LEAPP_DISABLE_NET_NAMING_SCHEMES', '0') != '1'
|
||||
|
||||
- is_net_naming_available = version.get_target_major_version() == "9" or (
|
||||
- version.matches_target_version(">= 10.2")
|
||||
- # TODO the net-naming-sysattrs pkg is not yet available on CS10, remove
|
||||
- # this when it becomes
|
||||
- and not get_target_distro_id() == "centos"
|
||||
+ is_net_naming_available = (
|
||||
+ version.get_target_major_version() == "9"
|
||||
+ or version.matches_target_version(">= 10.2")
|
||||
)
|
||||
|
||||
if not (is_feature_enabled and is_net_naming_available):
|
||||
diff --git a/repos/system_upgrade/common/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py b/repos/system_upgrade/common/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py
|
||||
index 9c1f91bb..d8eef404 100644
|
||||
--- a/repos/system_upgrade/common/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py
|
||||
+++ b/repos/system_upgrade/common/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py
|
||||
@@ -95,13 +95,8 @@ def test_emit_msgs_to_use_net_naming_schemes(
|
||||
pkg_name = emit_net_naming_lib.NET_NAMING_SYSATTRS_RPM_NAME[target_major]
|
||||
produced_messages = api.produce.model_instances
|
||||
|
||||
- if (
|
||||
- is_net_scheme_enabled
|
||||
- # the package is available since 10.2
|
||||
- and target_ver != "10.0"
|
||||
- # TODO not yet available in CS 10, remove this when it is
|
||||
- and not (target_distro == "centos" and target_major == "10")
|
||||
- ):
|
||||
+ # the package is available since 10.2
|
||||
+ if is_net_scheme_enabled and target_ver != "10.0":
|
||||
userspace_tasks = ensure_one_msg_of_type_produced(produced_messages, TargetUserSpaceUpgradeTasks)
|
||||
assert userspace_tasks.install_rpms == [pkg_name]
|
||||
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
From 26e4ca841b23907eda2de78288183285e6b54b1f Mon Sep 17 00:00:00 2001
|
||||
From: karolinku <kkula@redhat.com>
|
||||
Date: Tue, 3 Mar 2026 13:56:26 +0100
|
||||
Subject: [PATCH 05/44] Leapp_resume.service: Silence AVC SELinux warnings
|
||||
|
||||
Wrap the ExecStart command in `/bin/sh -c` to avoid SELinux AVC denials.
|
||||
|
||||
The leapp_resume.service unit is inherently "malformed" from SELinux's
|
||||
perspective: it directly executes /root/tmp_leapp_py3/leapp3, which is
|
||||
labeled admin_home_t. When the system boots in Permissive mode (as it
|
||||
does during the upgrade), SELinux logs AVC denials for this access
|
||||
rather than blocking it. These AVCs are expected but noisy and
|
||||
confusing.
|
||||
|
||||
By invoking the command through /bin/sh -c, the execution context is
|
||||
evaluated against /bin/sh (which carries a proper shell_exec_t label),
|
||||
avoiding the admin_home_t AVC altogether.
|
||||
|
||||
It is also confirmed with SELinux team that this issue could be
|
||||
solved with also following solution (in case of any future issues):
|
||||
```
|
||||
ExecStartPre=chcon -t bin_t /root/tmp_leapp_py3/leapp3
|
||||
ExecStart=/root/tmp_leapp_py3/leapp3 upgrade --resume
|
||||
````
|
||||
|
||||
Jira: RHEL-149141
|
||||
---
|
||||
.../actors/createresumeservice/files/leapp_resume.service | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/createresumeservice/files/leapp_resume.service b/repos/system_upgrade/common/actors/createresumeservice/files/leapp_resume.service
|
||||
index 39ac6112..859237a1 100644
|
||||
--- a/repos/system_upgrade/common/actors/createresumeservice/files/leapp_resume.service
|
||||
+++ b/repos/system_upgrade/common/actors/createresumeservice/files/leapp_resume.service
|
||||
@@ -9,7 +9,7 @@ Wants=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
# FIXME: this is temporary workaround for Python3
|
||||
-ExecStart=/root/tmp_leapp_py3/leapp3 upgrade --resume
|
||||
+ExecStart=/bin/sh -c "/root/tmp_leapp_py3/leapp3 upgrade --resume"
|
||||
StandardOutput=journal+console
|
||||
# FIXME: this shouldn't be needed, but Satellite upgrade runs installer, and that's slow
|
||||
TimeoutStartSec=infinity
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,156 @@
|
||||
From 36d245e59bab8f392c163c01a77f0ea9b210d0a2 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 28 Feb 2025 11:02:32 +0100
|
||||
Subject: [PATCH 05/37] livemode(cfg): add declaration of livemode config
|
||||
fields
|
||||
|
||||
Add definitions of all config classes that describe configuration of the
|
||||
livemode feature using the configurability provided by the leapp
|
||||
framework. The list of configuration options remains unchanged (except
|
||||
for the `is_enabled` field that is removed) when compared to the
|
||||
current implementation that relies on an ad-hoc INI file. The next step
|
||||
is to drop the INI-based implementation in favour of using
|
||||
framework-based configs relying on the field definitions from this PR.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
.../configs/livemode.py | 127 ++++++++++++++++++
|
||||
1 file changed, 127 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/common/actors/livemode/livemode_config_scanner/configs/livemode.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/configs/livemode.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/configs/livemode.py
|
||||
new file mode 100644
|
||||
index 00000000..eeef03f8
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/configs/livemode.py
|
||||
@@ -0,0 +1,127 @@
|
||||
+"""
|
||||
+Configuration keys for the 'livemode' feature.
|
||||
+"""
|
||||
+
|
||||
+from leapp.actors.config import Config
|
||||
+from leapp.models import fields
|
||||
+
|
||||
+LIVEMODE_CONFIG_SECTION = 'livemode'
|
||||
+
|
||||
+
|
||||
+class SquashfsImagePath(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "squashfs_image_path"
|
||||
+ type_ = fields.String()
|
||||
+ default = '/var/lib/leapp/live-upgrade.img'
|
||||
+ description = """
|
||||
+ Location where the squashfs image of the minimal target system will be placed.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class AdditionalPackages(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "additional_packages"
|
||||
+ type_ = fields.List(fields.String())
|
||||
+ default = []
|
||||
+ description = """
|
||||
+ Additional packages to be installed into the squashfs image.
|
||||
+
|
||||
+ Can be used to install various debugging utilities when connecting to the upgrade environment.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class AutostartUpgradeAfterReboot(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "autostart_upgrade_after_reboot"
|
||||
+ type_ = fields.Boolean()
|
||||
+ default = True
|
||||
+ description = """
|
||||
+ If set to True, the upgrade will start automatically after the reboot. Otherwise a manual trigger is required.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class SetupNetworkManager(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "setup_network_manager"
|
||||
+ type_ = fields.Boolean()
|
||||
+ default = False
|
||||
+ description = """
|
||||
+ Try enabling Network Manager in the squashfs image.
|
||||
+
|
||||
+ If set to True, leapp will copy source system's Network Manager profiles into the squashfs image and
|
||||
+ enable the Network Manager service.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class DracutNetwork(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "dracut_network"
|
||||
+ type_ = fields.String()
|
||||
+ default = ''
|
||||
+ description = """
|
||||
+ Dracut network arguments, required if the `url_to_load_squashfs_from` option is set.
|
||||
+
|
||||
+ Example:
|
||||
+ ip=192.168.122.146::192.168.122.1:255.255.255.0:foo::none
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class URLToLoadSquashfsImageFrom(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "url_to_load_squashfs_image_from"
|
||||
+ type_ = fields.String()
|
||||
+ default = ''
|
||||
+ description = """
|
||||
+ Url pointing to the squashfs image that should be used for the upgrade environment.
|
||||
+
|
||||
+ Example:
|
||||
+ http://192.168.122.1/live-upgrade.img
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class SetupPasswordlessRoot(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "setup_passwordless_root"
|
||||
+ type_ = fields.Boolean()
|
||||
+ default = False
|
||||
+ description = """
|
||||
+ If set to True, the root account of the squashfs image will have empty password. Use with caution.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class SetupOpenSSHDUsingAuthKeys(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "setup_opensshd_using_auth_keys"
|
||||
+ type_ = fields.String()
|
||||
+ default = ''
|
||||
+ description = """
|
||||
+ If set to a non-empty string, openssh daemon will be setup within the squashfs image using the provided
|
||||
+ authorized keys.
|
||||
+
|
||||
+ Example:
|
||||
+ /root/.ssh/authorized_keys
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class CaptureSTraceInfoInto(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "capture_strace_info_into"
|
||||
+ type_ = fields.String()
|
||||
+ default = ''
|
||||
+ description = """
|
||||
+ If set to a non-empty string, leapp will be executed under strace and results will be stored within
|
||||
+ the provided file path.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+livemode_cfg_fields = (
|
||||
+ AdditionalPackages,
|
||||
+ AutostartUpgradeAfterReboot,
|
||||
+ CaptureSTraceInfoInto,
|
||||
+ DracutNetwork,
|
||||
+ SetupNetworkManager,
|
||||
+ SetupOpenSSHDUsingAuthKeys,
|
||||
+ SetupPasswordlessRoot,
|
||||
+ SquashfsImagePath,
|
||||
+ URLToLoadSquashfsImageFrom,
|
||||
+)
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,138 +0,0 @@
|
||||
From 9827568a1e8caeb3e96c0c40a3d7a741997391c6 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Tue, 17 Feb 2026 16:56:43 +0100
|
||||
Subject: [PATCH 06/44] Add API to get a distro "report" name
|
||||
|
||||
Add a global variable DISTRO_REPORT_NAMES which can be directly be used
|
||||
in format_map() or unpacked into format() calls.
|
||||
There are also source and target fields which can be used in e.g.
|
||||
fstrings.
|
||||
|
||||
Jira: RHEL-130948
|
||||
---
|
||||
.../system_upgrade/common/libraries/distro.py | 72 ++++++++++++++++++-
|
||||
.../common/libraries/tests/test_distro.py | 19 +++++
|
||||
2 files changed, 90 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/distro.py b/repos/system_upgrade/common/libraries/distro.py
|
||||
index 34c48a57..1a5e3923 100644
|
||||
--- a/repos/system_upgrade/common/libraries/distro.py
|
||||
+++ b/repos/system_upgrade/common/libraries/distro.py
|
||||
@@ -1,9 +1,10 @@
|
||||
import json
|
||||
import os
|
||||
+from collections.abc import Mapping
|
||||
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.common import efi, repofileutils, rhsm
|
||||
-from leapp.libraries.common.config import get_target_distro_id
|
||||
+from leapp.libraries.common.config import get_source_distro_id, get_target_distro_id
|
||||
from leapp.libraries.common.config.architecture import ARCH_ACCEPTED, ARCH_X86_64
|
||||
from leapp.libraries.common.config.version import get_target_major_version
|
||||
from leapp.libraries.stdlib import api
|
||||
@@ -234,6 +235,75 @@ def distro_id_to_pretty_name(distro_id):
|
||||
}[distro_id]
|
||||
|
||||
|
||||
+def _distro_id_to_report_name(distro_id):
|
||||
+ """
|
||||
+ Get the display name for the given distro id.
|
||||
+
|
||||
+ The display name should be used for user facing text, such as in reports.
|
||||
+ For a real/full name see the :func:`distro_id_to_pretty_name` function.
|
||||
+ """
|
||||
+ return {
|
||||
+ "rhel": "RHEL",
|
||||
+ "centos": "CentOS Stream",
|
||||
+ "almalinux": "AlmaLinux"
|
||||
+ }[distro_id]
|
||||
+
|
||||
+
|
||||
+class _DistroReportNames(Mapping):
|
||||
+ """
|
||||
+ A mapping of distro names to be used in reports.
|
||||
+
|
||||
+ In addition to the properties :attr:`source` and :attr:`target`, this class
|
||||
+ can be used in :func:`format_map()` or unpacked to :func:`format` where it
|
||||
+ exposes them as 'source_distro' and 'target_distro'.
|
||||
+ """
|
||||
+
|
||||
+ @property
|
||||
+ def source(self) -> str:
|
||||
+ """
|
||||
+ The source distro report name.
|
||||
+
|
||||
+ :type: str
|
||||
+ """
|
||||
+ return _distro_id_to_report_name(get_source_distro_id())
|
||||
+
|
||||
+ @property
|
||||
+ def target(self) -> str:
|
||||
+ """
|
||||
+ The target distro report name.
|
||||
+
|
||||
+ :type: str
|
||||
+ """
|
||||
+ return _distro_id_to_report_name(get_target_distro_id())
|
||||
+
|
||||
+ def __getitem__(self, key):
|
||||
+ if key == 'source_distro':
|
||||
+ return self.source
|
||||
+
|
||||
+ if key == 'target_distro':
|
||||
+ return self.target
|
||||
+
|
||||
+ raise KeyError(f"Key '{key}' not found in {self.__class__.__name__}")
|
||||
+
|
||||
+ def __len__(self):
|
||||
+ return 2
|
||||
+
|
||||
+ def __iter__(self):
|
||||
+ yield from ['source_distro', 'target_distro']
|
||||
+
|
||||
+
|
||||
+DISTRO_REPORT_NAMES = _DistroReportNames()
|
||||
+"""
|
||||
+A mapping of distro "display" names for use in reports.
|
||||
+
|
||||
+Can be used as argument for format_map() or unpacked in format() calls.
|
||||
+The format string placeholders 'source_distro' and 'target_distro' are then
|
||||
+replaced by the respective distro names or abbreviations of them.
|
||||
+
|
||||
+See :class:`_DistroReportNames`.
|
||||
+"""
|
||||
+
|
||||
+
|
||||
def get_distro_efidir_canon_path(distro_id):
|
||||
"""
|
||||
Get canonical path to the distro EFI directory in the EFI mountpoint.
|
||||
diff --git a/repos/system_upgrade/common/libraries/tests/test_distro.py b/repos/system_upgrade/common/libraries/tests/test_distro.py
|
||||
index ec7d8f77..d266a9c6 100644
|
||||
--- a/repos/system_upgrade/common/libraries/tests/test_distro.py
|
||||
+++ b/repos/system_upgrade/common/libraries/tests/test_distro.py
|
||||
@@ -235,3 +235,22 @@ def test_get_distro_repoids_invalid_repo(monkeypatch):
|
||||
)
|
||||
def test__get_distro_efidir_canon_path(distro, expect):
|
||||
assert expect == distrolib.get_distro_efidir_canon_path(distro)
|
||||
+
|
||||
+
|
||||
+def test_distro_report_names(monkeypatch):
|
||||
+ current_actor = CurrentActorMocked(src_distro="centos", dst_distro="rhel")
|
||||
+ monkeypatch.setattr(api, "current_actor", current_actor)
|
||||
+
|
||||
+ assert distrolib.DISTRO_REPORT_NAMES.source == "CentOS Stream"
|
||||
+ assert distrolib.DISTRO_REPORT_NAMES.target == "RHEL"
|
||||
+
|
||||
+ expect = "CentOS Stream is upstream for RHEL"
|
||||
+ template = "{source_distro} is upstream for {target_distro}"
|
||||
+ assert expect == template.format_map(distrolib.DISTRO_REPORT_NAMES)
|
||||
+ assert expect == template.format(**distrolib.DISTRO_REPORT_NAMES)
|
||||
+
|
||||
+ template = "{source_distro} is {what} for {target_distro}"
|
||||
+ assert expect == template.format(what='upstream', **distrolib.DISTRO_REPORT_NAMES)
|
||||
+
|
||||
+ template = "{source_distro} is {what} for RHEL"
|
||||
+ assert expect == template.format(what='upstream', **distrolib.DISTRO_REPORT_NAMES)
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,250 @@
|
||||
From 849a8f2fcd04ee6d419b3856562fbff5b85577f5 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Thu, 6 Mar 2025 11:33:05 +0100
|
||||
Subject: [PATCH 06/37] livemode(cfg): use framework's configurability instead
|
||||
of ad-hoc INI
|
||||
|
||||
Drop the ad-hoc INI-based config for livemode in favour and replace it
|
||||
with configuration facilitated by the leapp framework. The list of
|
||||
configuration options remains (and their semantics) remains almost
|
||||
unchanged, save for some field names that are renamed in a way that
|
||||
better reveals their effect to the user.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
commands/upgrade/util.py | 1 -
|
||||
etc/leapp/files/devel-livemode.ini | 9 --
|
||||
.../livemode/livemode_config_scanner/actor.py | 2 +
|
||||
.../libraries/scan_livemode_config.py | 101 +++++-------------
|
||||
.../tests/test_config_scanner.py | 40 +++----
|
||||
5 files changed, 44 insertions(+), 109 deletions(-)
|
||||
delete mode 100644 etc/leapp/files/devel-livemode.ini
|
||||
|
||||
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
||||
index bfdbc4fa..6cdfa6d8 100644
|
||||
--- a/commands/upgrade/util.py
|
||||
+++ b/commands/upgrade/util.py
|
||||
@@ -16,7 +16,6 @@ from leapp.utils.audit import get_checkpoints, get_connection, get_messages
|
||||
from leapp.utils.output import report_unsupported
|
||||
from leapp.utils.report import fetch_upgrade_report_messages, generate_report_file
|
||||
|
||||
-
|
||||
EXPERIMENTAL_FEATURES = {
|
||||
'livemode': [
|
||||
'live_image_generator',
|
||||
diff --git a/etc/leapp/files/devel-livemode.ini b/etc/leapp/files/devel-livemode.ini
|
||||
deleted file mode 100644
|
||||
index b79ed4df..00000000
|
||||
--- a/etc/leapp/files/devel-livemode.ini
|
||||
+++ /dev/null
|
||||
@@ -1,9 +0,0 @@
|
||||
-# Configuration for the *experimental* livemode feature
|
||||
-# It is likely that this entire configuration file will be replaced by some
|
||||
-# other mechanism/file in the future. For the full list of configuration options,
|
||||
-# see models/livemode.py
|
||||
-[livemode]
|
||||
-squashfs_fullpath=/var/lib/leapp/live-upgrade.img
|
||||
-setup_network_manager=no
|
||||
-autostart_upgrade_after_reboot=yes
|
||||
-setup_passwordless_root=no
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/actor.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/actor.py
|
||||
index dc79ecff..bd909736 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/actor.py
|
||||
@@ -1,4 +1,5 @@
|
||||
from leapp.actors import Actor
|
||||
+from leapp.configs.actor import livemode as livemode_config_lib
|
||||
from leapp.libraries.actor import scan_livemode_config as scan_livemode_config_lib
|
||||
from leapp.models import InstalledRPM, LiveModeConfig
|
||||
from leapp.tags import ExperimentalTag, FactsPhaseTag, IPUWorkflowTag
|
||||
@@ -10,6 +11,7 @@ class LiveModeConfigScanner(Actor):
|
||||
"""
|
||||
|
||||
name = 'live_mode_config_scanner'
|
||||
+ config_schemas = livemode_config_lib.livemode_cfg_fields
|
||||
consumes = (InstalledRPM,)
|
||||
produces = (LiveModeConfig,)
|
||||
tags = (ExperimentalTag, FactsPhaseTag, IPUWorkflowTag,)
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
index b2f0af7f..57408c23 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
@@ -1,14 +1,9 @@
|
||||
-try:
|
||||
- import configparser
|
||||
-except ImportError:
|
||||
- import ConfigParser as configparser
|
||||
-
|
||||
+from leapp.configs.actor import livemode as livemode_config_lib
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.common.config import architecture, get_env
|
||||
from leapp.libraries.common.rpms import has_package
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import InstalledRPM, LiveModeConfig
|
||||
-from leapp.models.fields import ModelViolationError
|
||||
|
||||
LIVEMODE_CONFIG_LOCATION = '/etc/leapp/files/devel-livemode.ini'
|
||||
DEFAULT_SQUASHFS_PATH = '/var/lib/leapp/live-upgrade.img'
|
||||
@@ -50,76 +45,32 @@ def scan_config_and_emit_message():
|
||||
return
|
||||
|
||||
api.current_logger().info('Loading livemode config from %s', LIVEMODE_CONFIG_LOCATION)
|
||||
- parser = configparser.ConfigParser()
|
||||
|
||||
- try:
|
||||
- parser.read((LIVEMODE_CONFIG_LOCATION, ))
|
||||
- except configparser.ParsingError as error:
|
||||
- api.current_logger().error('Failed to parse live mode configuration due to the following error: %s', error)
|
||||
+ config = api.current_actor().config[livemode_config_lib.LIVEMODE_CONFIG_SECTION]
|
||||
+
|
||||
+ # Mapping from model field names to configuration fields - because we might have
|
||||
+ # changed some configuration field names for configuration to be more
|
||||
+ # comprehensible for our users.
|
||||
+ model_fields_to_config_options_map = {
|
||||
+ 'url_to_load_squashfs_from': livemode_config_lib.URLToLoadSquashfsImageFrom,
|
||||
+ 'squashfs_fullpath': livemode_config_lib.SquashfsImagePath,
|
||||
+ 'dracut_network': livemode_config_lib.DracutNetwork,
|
||||
+ 'setup_network_manager': livemode_config_lib.SetupNetworkManager,
|
||||
+ 'additional_packages': livemode_config_lib.AdditionalPackages,
|
||||
+ 'autostart_upgrade_after_reboot': livemode_config_lib.AutostartUpgradeAfterReboot,
|
||||
+ 'setup_opensshd_with_auth_keys': livemode_config_lib.SetupOpenSSHDUsingAuthKeys,
|
||||
+ 'setup_passwordless_root': livemode_config_lib.SetupPasswordlessRoot,
|
||||
+ 'capture_upgrade_strace_into': livemode_config_lib.CaptureSTraceInfoInto
|
||||
+ }
|
||||
|
||||
- details = 'Failed to read livemode configuration due to the following error: {0}.'
|
||||
- raise StopActorExecutionError(
|
||||
- 'Failed to read livemode configuration',
|
||||
- details={'Problem': details.format(error)}
|
||||
- )
|
||||
+ # Read values of model fields from user-supplied configuration according to the above mapping
|
||||
+ config_msg_init_kwargs = {}
|
||||
+ for model_field_name, config_field in model_fields_to_config_options_map.items():
|
||||
+ config_msg_init_kwargs[model_field_name] = config[config_field.name]
|
||||
|
||||
- livemode_section = 'livemode'
|
||||
- if not parser.has_section(livemode_section):
|
||||
- details = 'The configuration is missing the \'[{0}]\' section'.format(livemode_section)
|
||||
- raise StopActorExecutionError(
|
||||
- 'Live mode configuration does not have the required structure',
|
||||
- details={'Problem': details}
|
||||
- )
|
||||
-
|
||||
- config_kwargs = {
|
||||
- 'is_enabled': True,
|
||||
- 'url_to_load_squashfs_from': None,
|
||||
- 'squashfs_fullpath': DEFAULT_SQUASHFS_PATH,
|
||||
- 'dracut_network': None,
|
||||
- 'setup_network_manager': False,
|
||||
- 'additional_packages': [],
|
||||
- 'autostart_upgrade_after_reboot': True,
|
||||
- 'setup_opensshd_with_auth_keys': None,
|
||||
- 'setup_passwordless_root': False,
|
||||
- 'capture_upgrade_strace_into': None
|
||||
- }
|
||||
+ # Some fields of the LiveModeConfig are historical and can no longer be changed by the user
|
||||
+ # in the config. Therefore, we just hard-code them here.
|
||||
+ config_msg_init_kwargs['is_enabled'] = True
|
||||
|
||||
- config_str_options = (
|
||||
- 'url_to_load_squashfs_from',
|
||||
- 'squashfs_fullpath',
|
||||
- 'dracut_network',
|
||||
- 'setup_opensshd_with_auth_keys',
|
||||
- 'capture_upgrade_strace_into'
|
||||
- )
|
||||
-
|
||||
- config_list_options = (
|
||||
- 'additional_packages',
|
||||
- )
|
||||
-
|
||||
- config_bool_options = (
|
||||
- 'setup_network_manager',
|
||||
- 'setup_passwordless_root',
|
||||
- 'autostart_upgrade_after_reboot',
|
||||
- )
|
||||
-
|
||||
- for config_option in config_str_options:
|
||||
- if parser.has_option(livemode_section, config_option):
|
||||
- config_kwargs[config_option] = parser.get(livemode_section, config_option)
|
||||
-
|
||||
- for config_option in config_bool_options:
|
||||
- if parser.has_option(livemode_section, config_option):
|
||||
- config_kwargs[config_option] = parser.getboolean(livemode_section, config_option)
|
||||
-
|
||||
- for config_option in config_list_options:
|
||||
- if parser.has_option(livemode_section, config_option):
|
||||
- option_val = parser.get(livemode_section, config_option)
|
||||
- option_list = (opt_val.strip() for opt_val in option_val.split(','))
|
||||
- option_list = [opt for opt in option_list if opt]
|
||||
- config_kwargs[config_option] = option_list
|
||||
-
|
||||
- try:
|
||||
- config = LiveModeConfig(**config_kwargs)
|
||||
- except ModelViolationError as error:
|
||||
- raise StopActorExecutionError('Failed to parse livemode configuration.', details={'Problem': str(error)})
|
||||
-
|
||||
- api.produce(config)
|
||||
+ config_msg = LiveModeConfig(**config_msg_init_kwargs)
|
||||
+ api.produce(config_msg)
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
index 016f6c04..8ddde22e 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
@@ -86,29 +86,21 @@ def test_enablement_conditions(monkeypatch, case_descr):
|
||||
def test_config_scanning(monkeypatch):
|
||||
""" Test whether scanning a valid config is properly transcribed into a config message. """
|
||||
|
||||
- config_lines = [
|
||||
- '[livemode]',
|
||||
- 'squashfs_fullpath=IMG',
|
||||
- 'setup_network_manager=yes',
|
||||
- 'autostart_upgrade_after_reboot=no',
|
||||
- 'setup_opensshd_with_auth_keys=/root/.ssh/authorized_keys',
|
||||
- 'setup_passwordless_root=no',
|
||||
- 'additional_packages=pkgA,pkgB'
|
||||
- ]
|
||||
- config_content = '\n'.join(config_lines) + '\n'
|
||||
-
|
||||
- if sys.version[0] == '2':
|
||||
- config_content = config_content.decode('utf-8') # python2 compat
|
||||
-
|
||||
- class ConfigParserMock(configparser.ConfigParser): # pylint: disable=too-many-ancestors
|
||||
- def read(self, file_paths, *args, **kwargs):
|
||||
- self.read_string(config_content)
|
||||
- return file_paths
|
||||
-
|
||||
- monkeypatch.setattr(configparser, 'ConfigParser', ConfigParserMock)
|
||||
-
|
||||
+ config = {
|
||||
+ 'livemode': {
|
||||
+ 'squashfs_image_path': '/var/lib/leapp/live-upgrade2.img',
|
||||
+ 'additional_packages': ['petri-nets'],
|
||||
+ 'autostart_upgrade_after_reboot': True,
|
||||
+ 'setup_network_manager': True,
|
||||
+ 'setup_passwordless_root': True,
|
||||
+ 'dracut_network': '',
|
||||
+ 'url_to_load_squashfs_image_from': '',
|
||||
+ 'setup_opensshd_using_auth_keys': '/root/.ssh/authorized_keys',
|
||||
+ 'capture_strace_info_into': ''
|
||||
+ }
|
||||
+ }
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(config=config))
|
||||
monkeypatch.setattr(scan_livemode_config_lib, 'should_scan_config', lambda: True)
|
||||
-
|
||||
monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
|
||||
scan_livemode_config_lib.scan_config_and_emit_message()
|
||||
@@ -119,7 +111,7 @@ def test_config_scanning(monkeypatch):
|
||||
produced_message = api.produce.model_instances[0]
|
||||
assert isinstance(produced_message, LiveModeConfig)
|
||||
|
||||
- assert produced_message.additional_packages == ['pkgA', 'pkgB']
|
||||
- assert produced_message.squashfs_fullpath == 'IMG'
|
||||
+ assert produced_message.additional_packages == ['petri-nets']
|
||||
+ assert produced_message.squashfs_fullpath == '/var/lib/leapp/live-upgrade2.img'
|
||||
assert produced_message.setup_opensshd_with_auth_keys == '/root/.ssh/authorized_keys'
|
||||
assert produced_message.setup_network_manager
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
From 96c911454e4e68a749503b644c31df3a853e8a0b Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Thu, 20 Mar 2025 22:29:36 +0100
|
||||
Subject: [PATCH 07/37] fix(livemode): do not stop if dbus already appears to
|
||||
be enabled
|
||||
|
||||
Some of the systemd units might be already enabled in the target
|
||||
userspace container, causing an unhandled FileAlreadyExists error
|
||||
when we attempt to enable them. This commit ignores such errors, working
|
||||
on under the assumption that the services we wanted to enable are
|
||||
already enabled. Hence, we ignore the possibility that the file which
|
||||
unexpectedly resides at the destination of the symlink which enables the
|
||||
service might contain some unexpected/incorrect content.
|
||||
---
|
||||
.../libraries/prepareliveimage.py | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
index c573c84a..686c4cd6 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
@@ -1,3 +1,4 @@
|
||||
+import errno
|
||||
import grp
|
||||
import os
|
||||
import os.path
|
||||
@@ -253,16 +254,30 @@ def enable_dbus(context):
|
||||
Enable dbus-daemon into the target userspace
|
||||
Looks like it's not enabled by default when installing into a container.
|
||||
"""
|
||||
- api.current_logger().info('Configuring the dbus services')
|
||||
+ dbus_daemon_service = '/usr/lib/systemd/system/dbus-daemon.service'
|
||||
|
||||
links = ['/etc/systemd/system/multi-user.target.wants/dbus-daemon.service',
|
||||
'/etc/systemd/system/dbus.service',
|
||||
'/etc/systemd/system/messagebus.service']
|
||||
|
||||
+ api.current_logger().info(('Enabling dbus services. Leapp will attempt to create the following '
|
||||
+ 'symlinks: {0}, all pointing to {1}').format(', '.join(links),
|
||||
+ dbus_daemon_service))
|
||||
+
|
||||
for link in links:
|
||||
+ api.current_logger().debug('Creating symlink at {0} that points to {1}'.format(link, dbus_daemon_service))
|
||||
try:
|
||||
os.symlink('/usr/lib/systemd/system/dbus-daemon.service', context.full_path(link))
|
||||
except OSError as err:
|
||||
+ if err.errno == errno.EEXIST:
|
||||
+ # @Note: We are not catching FileExistsError because of python2 (there is no such error class)
|
||||
+ # We are performing installations within container, so the systemd symlinks that are created
|
||||
+ # during installation should have correct destination
|
||||
+ api.current_logger().debug(
|
||||
+ 'A file already exists at {0}, assuming it is a symlink with a correct content.'
|
||||
+ )
|
||||
+ continue
|
||||
+
|
||||
details = {'Problem': 'An error occurred while creating the systemd symlink', 'source_error': str(err)}
|
||||
raise StopActorExecutionError('Cannot enable the dbus services', details=details)
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,190 +0,0 @@
|
||||
From d6e4afe5c51ac8809649ca395e2ffafc5ab76922 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Wed, 4 Mar 2026 22:45:18 +0100
|
||||
Subject: [PATCH 07/44] livemode: copy upgrade kernel's hmac into /boot
|
||||
|
||||
Copying kernel's HMAC is necessary in order to boot with FIPS mode
|
||||
enabled. Standard (old) upgrade process copies the kernel HMAC file
|
||||
already, livemode did not in order to keep the initial implementation
|
||||
simple. This change adds copying of kernel HMAC also for livemode.
|
||||
|
||||
Jira-ref: RHEL-129571
|
||||
---
|
||||
.../libraries/upgradeinitramfsgenerator.py | 50 +++++++----
|
||||
.../unit_test_upgradeinitramfsgenerator.py | 84 ++++++++++++++++++-
|
||||
2 files changed, 118 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/libraries/upgradeinitramfsgenerator.py b/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/libraries/upgradeinitramfsgenerator.py
|
||||
index 03447b7c..1a0dccd8 100644
|
||||
--- a/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/libraries/upgradeinitramfsgenerator.py
|
||||
+++ b/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/libraries/upgradeinitramfsgenerator.py
|
||||
@@ -480,6 +480,16 @@ def prepare_boot_files_for_livemode(context):
|
||||
|
||||
copy_target_kernel_from_userspace_into_boot(context, target_kernel_ver, kernel_artifact_name)
|
||||
|
||||
+ uspace_kernel_hmac_path = context.full_path('/lib/modules/{}/.vmlinuz.hmac'.format(target_kernel_ver))
|
||||
+ upgrade_kernel_hmac_dest = '/boot/.{}.hmac'.format(kernel_artifact_name)
|
||||
+ create_upgrade_hmac_from_target_hmac(uspace_kernel_hmac_path, upgrade_kernel_hmac_dest, kernel_artifact_name)
|
||||
+ api.current_logger().info(
|
||||
+ 'Written hmac ({0}) for the upgrade kernel (based on {1})'.format(
|
||||
+ upgrade_kernel_hmac_dest,
|
||||
+ uspace_kernel_hmac_path
|
||||
+ )
|
||||
+ )
|
||||
+
|
||||
USERSPACE_ARTIFACTS_PATH = '/artifacts'
|
||||
context.makedirs(USERSPACE_ARTIFACTS_PATH, exists_ok=True)
|
||||
userspace_initramfs_dest = os.path.join(USERSPACE_ARTIFACTS_PATH, initramfs_artifact_name)
|
||||
@@ -493,25 +503,35 @@ def prepare_boot_files_for_livemode(context):
|
||||
|
||||
return BootContent(kernel_path=host_kernel_dest,
|
||||
initram_path=host_initramfs_dest,
|
||||
- kernel_hmac_path='')
|
||||
+ kernel_hmac_path=upgrade_kernel_hmac_dest)
|
||||
+
|
||||
+
|
||||
+def _read_file(path):
|
||||
+ with open(path) as in_file:
|
||||
+ return in_file.read()
|
||||
+
|
||||
+
|
||||
+def _write_file(path, data):
|
||||
+ with open(path, 'w') as out_file:
|
||||
+ out_file.write(data)
|
||||
|
||||
|
||||
-def create_upgrade_hmac_from_target_hmac(original_hmac_path, upgrade_hmac_path, upgrade_kernel):
|
||||
+def create_upgrade_hmac_from_target_hmac(original_hmac_path: str, upgrade_hmac_path: str, upgrade_kernel: str):
|
||||
# Rename the kernel name stored in the HMAC file as the upgrade kernel is named differently and the HMAC file
|
||||
# refers to the real target kernel
|
||||
- with open(original_hmac_path) as original_hmac_file:
|
||||
- hmac_file_lines = [line for line in original_hmac_file.read().split('\n') if line]
|
||||
- if len(hmac_file_lines) > 1:
|
||||
- details = ('Expected the target kernel HMAC file to containing only one HMAC line, '
|
||||
- 'found {0}'.format(len(hmac_file_lines)))
|
||||
- raise StopActorExecutionError('Failed to prepare HMAC file for upgrade kernel.',
|
||||
- details={'details': details})
|
||||
-
|
||||
- # Keep only non-empty strings after splitting on space
|
||||
- hmac, dummy_target_kernel_name = [fragment for fragment in hmac_file_lines[0].split(' ') if fragment]
|
||||
-
|
||||
- with open(upgrade_hmac_path, 'w') as upgrade_kernel_hmac_file:
|
||||
- upgrade_kernel_hmac_file.write('{hmac} {kernel}\n'.format(hmac=hmac, kernel=upgrade_kernel))
|
||||
+ original_hmac_file_content = _read_file(original_hmac_path)
|
||||
+ hmac_file_lines = [line for line in original_hmac_file_content.split('\n') if line]
|
||||
+ if len(hmac_file_lines) > 1:
|
||||
+ details = ('Expected the target kernel HMAC file to containing only one HMAC line, '
|
||||
+ 'found {0}'.format(len(hmac_file_lines)))
|
||||
+ raise StopActorExecutionError('Failed to prepare HMAC file for upgrade kernel.',
|
||||
+ details={'details': details})
|
||||
+
|
||||
+ # Keep only non-empty strings after splitting on space
|
||||
+ hmac, dummy_target_kernel_name = [fragment for fragment in hmac_file_lines[0].split(' ') if fragment]
|
||||
+
|
||||
+ upgrade_hmac_content = '{hmac} {kernel}\n'.format(hmac=hmac, kernel=upgrade_kernel)
|
||||
+ _write_file(upgrade_hmac_path, upgrade_hmac_content)
|
||||
|
||||
|
||||
def copy_boot_files(context):
|
||||
diff --git a/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py b/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py
|
||||
index b96bf79f..165a4df0 100644
|
||||
--- a/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py
|
||||
+++ b/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py
|
||||
@@ -116,7 +116,7 @@ class MockedContext:
|
||||
self.called_copy_to.append((src, dst))
|
||||
self.content.add(dst)
|
||||
|
||||
- def makedirs(self, path):
|
||||
+ def makedirs(self, path, exists_ok=True):
|
||||
self.called_makedirs.append(path)
|
||||
|
||||
def remove_tree(self, path):
|
||||
@@ -402,3 +402,85 @@ def test_copy_modules_duplicate_skip(monkeypatch, kind):
|
||||
assert context.content
|
||||
assert len(context.called_copy_to) == 1
|
||||
assert debugmsg in upgradeinitramfsgenerator.api.current_logger.dbgmsg
|
||||
+
|
||||
+
|
||||
+def test_create_upgrade_hmac_from_target_hmac(monkeypatch):
|
||||
+ upgrade_hmac_written = False
|
||||
+
|
||||
+ def _read_file_mock(path):
|
||||
+ assert path == '/original-hmac'
|
||||
+ return ('ff00a9674033eea61bec48d21a1d2c27eaac9bd6ed4997e31dd0d9307c7a4770eb81df7116c'
|
||||
+ '4ace25d354a06dfdcd75e38f504f2ea7c1c4bdc95ea7083b701c0 vmlinuz-6.12.0-55.9.1.el10_0.x86_64')
|
||||
+
|
||||
+ def _write_file_mock(path, content):
|
||||
+ assert path == '/boot/.vmlinuz-upgrade.x86_64.hmac'
|
||||
+ expected_content = ('ff00a9674033eea61bec48d21a1d2c27eaac9bd6ed4997e31dd0d9307c7a4770eb81df7116c'
|
||||
+ '4ace25d354a06dfdcd75e38f504f2ea7c1c4bdc95ea7083b701c0 '
|
||||
+ 'vmlinuz-upgrade.x86_64\n')
|
||||
+ assert content == expected_content
|
||||
+ nonlocal upgrade_hmac_written
|
||||
+ upgrade_hmac_written = True
|
||||
+
|
||||
+ monkeypatch.setattr(upgradeinitramfsgenerator, '_read_file', _read_file_mock)
|
||||
+ monkeypatch.setattr(upgradeinitramfsgenerator, '_write_file', _write_file_mock)
|
||||
+ upgradeinitramfsgenerator.create_upgrade_hmac_from_target_hmac(
|
||||
+ '/original-hmac', '/boot/.vmlinuz-upgrade.x86_64.hmac', 'vmlinuz-upgrade.x86_64')
|
||||
+
|
||||
+ assert upgrade_hmac_written
|
||||
+
|
||||
+
|
||||
+def test_prepare_boot_files_for_livemode(monkeypatch):
|
||||
+ context_mock = MockedContext()
|
||||
+
|
||||
+ monkeypatch.setattr(upgradeinitramfsgenerator,
|
||||
+ '_get_target_kernel_version',
|
||||
+ lambda ctx: '6.18.3-100.fc42.x86_64')
|
||||
+
|
||||
+ monkeypatch.setattr(upgradeinitramfsgenerator,
|
||||
+ 'get_boot_artifact_names',
|
||||
+ lambda: ('vmlinuz-upgrade.x86_64', 'initramfs-upgrade.x86_64.img'))
|
||||
+
|
||||
+ upgrade_kernel_present = False
|
||||
+ initramfs_generated = False
|
||||
+ upgrade_initramfs_present = False
|
||||
+ upgrade_kernel_hmac_present = False
|
||||
+
|
||||
+ def copy_target_kernel_mock(context, target_kernel_ver, kernel_artifact_name):
|
||||
+ nonlocal upgrade_kernel_present
|
||||
+ upgrade_kernel_present = True
|
||||
+
|
||||
+ def _generate_initramfs_mock(context, userspace_initramfs_dest, target_kernel_ver):
|
||||
+ nonlocal initramfs_generated
|
||||
+ initramfs_generated = True
|
||||
+
|
||||
+ def create_upgrade_hmac_from_target_hmac_mock(uspace_kernel_hmac_path,
|
||||
+ upgrade_kernel_hmac_dest,
|
||||
+ kernel_artifact_name):
|
||||
+ assert upgrade_kernel_hmac_dest == '/boot/.vmlinuz-upgrade.x86_64.hmac'
|
||||
+ nonlocal upgrade_kernel_hmac_present
|
||||
+ upgrade_kernel_hmac_present = True
|
||||
+
|
||||
+ monkeypatch.setattr(upgradeinitramfsgenerator,
|
||||
+ 'copy_target_kernel_from_userspace_into_boot',
|
||||
+ copy_target_kernel_mock)
|
||||
+
|
||||
+ monkeypatch.setattr(upgradeinitramfsgenerator,
|
||||
+ 'create_upgrade_hmac_from_target_hmac',
|
||||
+ create_upgrade_hmac_from_target_hmac_mock)
|
||||
+
|
||||
+ monkeypatch.setattr(upgradeinitramfsgenerator,
|
||||
+ '_generate_livemode_initramfs',
|
||||
+ _generate_initramfs_mock)
|
||||
+
|
||||
+ boot_content = upgradeinitramfsgenerator.prepare_boot_files_for_livemode(context_mock)
|
||||
+
|
||||
+ upgrade_initramfs_present = context_mock.called_copy_from[0][1] == '/boot/initramfs-upgrade.x86_64.img'
|
||||
+
|
||||
+ assert upgrade_kernel_present
|
||||
+ assert initramfs_generated
|
||||
+ assert upgrade_initramfs_present
|
||||
+ assert upgrade_kernel_hmac_present
|
||||
+
|
||||
+ assert boot_content.kernel_path == '/boot/vmlinuz-upgrade.x86_64'
|
||||
+ assert boot_content.initram_path == '/boot/initramfs-upgrade.x86_64.img'
|
||||
+ assert boot_content.kernel_hmac_path == '/boot/.vmlinuz-upgrade.x86_64.hmac'
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
From 6b3f6565e70290da1e02e3945851b430efb02109 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 11 Apr 2025 15:07:49 +0200
|
||||
Subject: [PATCH 08/37] feat(livemode): remove the use of
|
||||
LEAPP_DEVEL_ENABLE_LIVEMODE
|
||||
|
||||
The environmental variable has been introduced to prevent accidental
|
||||
execution of livemode. However, in order for users to use the feature,
|
||||
this environmental variable introduced unnecessary friction. Therefore,
|
||||
this patch removes the use of the variable. Instead, whitelisting
|
||||
experimental actors that facilitate livemode should be the only
|
||||
mechanism that is used to enabled/disable the feature.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
docs/source/configuring-ipu.md | 3 ---
|
||||
.../libraries/scan_livemode_config.py | 5 -----
|
||||
.../tests/test_config_scanner.py | 12 ++++--------
|
||||
3 files changed, 4 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/docs/source/configuring-ipu.md b/docs/source/configuring-ipu.md
|
||||
index 6b838b8f..059b72c2 100644
|
||||
--- a/docs/source/configuring-ipu.md
|
||||
+++ b/docs/source/configuring-ipu.md
|
||||
@@ -52,9 +52,6 @@ The alternative to the --channel leapp option. As a parameter accepts a channel
|
||||
To use development variables, the LEAPP_UNSUPPORTED variable has to be set.
|
||||
```
|
||||
|
||||
-#### LEAPP_DEVEL_ENABLE_LIVE_MODE
|
||||
-If set to `1`, enable the use of the experimental live mode
|
||||
-
|
||||
#### LEAPP_DEVEL_DM_DISABLE_UDEV
|
||||
Setting the environment variable provides a more convenient way of disabling udev support in libdevmapper, dmsetup and LVM2 tools globally without a need to modify any existing configuration settings. This is mostly useful if the system environment does not use udev.
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
index 57408c23..26fd9d09 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
@@ -11,16 +11,11 @@ DEFAULT_SQUASHFS_PATH = '/var/lib/leapp/live-upgrade.img'
|
||||
|
||||
def should_scan_config():
|
||||
is_unsupported = get_env('LEAPP_UNSUPPORTED', '0') == '1'
|
||||
- is_livemode_enabled = get_env('LEAPP_DEVEL_ENABLE_LIVE_MODE', '0') == '1'
|
||||
|
||||
if not is_unsupported:
|
||||
api.current_logger().debug('Will not scan livemode config - the upgrade is not unsupported.')
|
||||
return False
|
||||
|
||||
- if not is_livemode_enabled:
|
||||
- api.current_logger().debug('Will not scan livemode config - the live mode is not enabled.')
|
||||
- return False
|
||||
-
|
||||
if not architecture.matches_architecture(architecture.ARCH_X86_64):
|
||||
api.current_logger().debug('Will not scan livemode config - livemode is currently limited to x86_64.')
|
||||
details = 'Live upgrades are currently limited to x86_64 only.'
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
index 8ddde22e..e24aa366 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
@@ -29,19 +29,16 @@ EnablementTestCase = namedtuple('EnablementTestCase', ('env_vars', 'arch', 'pkgs
|
||||
@pytest.mark.parametrize(
|
||||
'case_descr',
|
||||
(
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '1'},
|
||||
+ EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1'},
|
||||
arch=architecture.ARCH_X86_64, pkgs=('squashfs-tools', ),
|
||||
result=EnablementResult.SCAN_CONFIG),
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '0', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '1'},
|
||||
+ EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '0'},
|
||||
arch=architecture.ARCH_X86_64, pkgs=('squashfs-tools', ),
|
||||
result=EnablementResult.DO_NOTHING),
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '0'},
|
||||
- arch=architecture.ARCH_X86_64, pkgs=('squashfs-tools', ),
|
||||
- result=EnablementResult.DO_NOTHING),
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '1'},
|
||||
+ EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1'},
|
||||
arch=architecture.ARCH_ARM64, pkgs=('squashfs-tools', ),
|
||||
result=EnablementResult.RAISE),
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '1'},
|
||||
+ EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1'},
|
||||
arch=architecture.ARCH_ARM64, pkgs=tuple(),
|
||||
result=EnablementResult.RAISE),
|
||||
)
|
||||
@@ -52,7 +49,6 @@ def test_enablement_conditions(monkeypatch, case_descr):
|
||||
|
||||
Enablement conditions:
|
||||
- LEAPP_UNSUPPORTED=1
|
||||
- - LEAPP_DEVEL_ENABLE_LIVE_MODE=1
|
||||
|
||||
Not meeting enablement conditions should prevent config message from being produced.
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,131 +0,0 @@
|
||||
From 0fc2075683ffe30b77e83c7d793815e9301fa41d Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 13 Mar 2026 10:03:19 +0100
|
||||
Subject: [PATCH 08/44] fix(livemode): make live.dir is relative to device root
|
||||
|
||||
Booting from an squashfs image (from a local block dev) requires to
|
||||
parameters:
|
||||
- identifier of the device where the squashfs image resides
|
||||
- path to the squashfs image on the given device (aka live.dir)
|
||||
Therefore, live.dir needs to be set up with a path that is relative to
|
||||
the device where the image resides. This patch fixes the current
|
||||
behavior where the path is being taken as it is, i.e., relative to the
|
||||
root of the source system.
|
||||
|
||||
Jira-ref: RHEL-104379
|
||||
---
|
||||
.../libraries/addupgradebootentry.py | 29 ++++++++++-----
|
||||
.../tests/unit_test_addupgradebootentry.py | 36 +++++++++++--------
|
||||
2 files changed, 43 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py b/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py
|
||||
index b28ec57c..5b635a83 100644
|
||||
--- a/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py
|
||||
+++ b/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py
|
||||
@@ -270,14 +270,26 @@ def local_os_stat(path):
|
||||
return os.stat(path)
|
||||
|
||||
|
||||
-def _get_device_uuid(path):
|
||||
+def _split_path_on_mount_point(path):
|
||||
+ """ Split a given path into a prefix where a device is mounted and suffix relative to the device root. """
|
||||
+ mount_point = path
|
||||
+ while not os.path.ismount(mount_point):
|
||||
+ mount_point = os.path.dirname(mount_point)
|
||||
+
|
||||
+ relative_suffix = path[len(mount_point):]
|
||||
+ if len(relative_suffix) == 0 or relative_suffix[0] != '/':
|
||||
+ # relative_suffix is '' if the squashfs dir is set to root (/)
|
||||
+ # relative_suffix does not start with '/' if the dir is located in /, i.e., /mydir
|
||||
+ relative_suffix = '/{}'.format(relative_suffix)
|
||||
+
|
||||
+ return (mount_point, relative_suffix)
|
||||
+
|
||||
+
|
||||
+def _get_device_uuid(mount_point):
|
||||
"""
|
||||
- Find the UUID of a device in which the given path is located.
|
||||
+ Find the UUID of a device mounted at a given mount point.
|
||||
"""
|
||||
- while not os.path.ismount(path):
|
||||
- path = os.path.dirname(path)
|
||||
-
|
||||
- needle_dev_id = local_os_stat(path).st_dev
|
||||
+ needle_dev_id = local_os_stat(mount_point).st_dev
|
||||
|
||||
for uuid in os.listdir('/dev/disk/by-uuid'):
|
||||
uuid_fullpath = os.path.join('/dev/disk/by-uuid/', uuid)
|
||||
@@ -333,8 +345,9 @@ def construct_cmdline_args_for_livemode():
|
||||
if livemode_config.url_to_load_squashfs_from:
|
||||
args['root'] = 'live:{}'.format(livemode_config.url_to_load_squashfs_from)
|
||||
else:
|
||||
- args['root'] = 'live:UUID={}'.format(_get_device_uuid(dir_path_containing_liveimg))
|
||||
- args['rd.live.dir'] = dir_path_containing_liveimg
|
||||
+ dev_mount_point, dir_location_on_dev = _split_path_on_mount_point(dir_path_containing_liveimg)
|
||||
+ args['root'] = 'live:UUID={}'.format(_get_device_uuid(dev_mount_point))
|
||||
+ args['rd.live.dir'] = dir_location_on_dev
|
||||
args['rd.live.squashimg'] = liveimg_filename
|
||||
|
||||
if livemode_config.dracut_network:
|
||||
diff --git a/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py b/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py
|
||||
index 7341602b..79c05a5d 100644
|
||||
--- a/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py
|
||||
+++ b/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py
|
||||
@@ -279,23 +279,31 @@ def test_get_rdlvm_arg_values(monkeypatch):
|
||||
assert args == ('A', 'B')
|
||||
|
||||
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('path', 'mount_point', 'suffix'),
|
||||
+ [
|
||||
+ ('/', '/', '/'),
|
||||
+ ('/dir', '/', '/dir'),
|
||||
+ ('/dir/squashfs', '/', '/dir/squashfs'),
|
||||
+ ('/dir/squashfs', '/dir', '/squashfs'),
|
||||
+ ]
|
||||
+)
|
||||
+def test_split_path_on_mount_point(monkeypatch, path, mount_point, suffix):
|
||||
+ def is_mount_mock(_path):
|
||||
+ return _path == mount_point
|
||||
+
|
||||
+ monkeypatch.setattr(os.path, 'ismount', is_mount_mock)
|
||||
+
|
||||
+ ret_mount_point, ret_suffix = addupgradebootentry._split_path_on_mount_point(path)
|
||||
+ assert ret_mount_point == mount_point
|
||||
+ assert ret_suffix == suffix
|
||||
+
|
||||
+
|
||||
def test_get_device_uuid(monkeypatch):
|
||||
"""
|
||||
The file in question is /var/lib/file
|
||||
Underlying partition /var is a device /dev/sda1 (dev_id=10) linked to from /dev/disk/by-uuid/MY_UUID1
|
||||
"""
|
||||
-
|
||||
- execution_stats = {
|
||||
- 'is_mount_call_count': 0
|
||||
- }
|
||||
-
|
||||
- def is_mount_mock(path):
|
||||
- execution_stats['is_mount_call_count'] += 1
|
||||
- assert execution_stats['is_mount_call_count'] <= 3
|
||||
- return path == '/var'
|
||||
-
|
||||
- monkeypatch.setattr(os.path, 'ismount', is_mount_mock)
|
||||
-
|
||||
StatResult = namedtuple('StatResult', ('st_dev', 'st_rdev'))
|
||||
|
||||
def stat_mock(path):
|
||||
@@ -325,8 +333,8 @@ def test_get_device_uuid(monkeypatch):
|
||||
|
||||
monkeypatch.setattr(os, 'readlink', readlink_mock)
|
||||
|
||||
- path = '/var/lib/file'
|
||||
- uuid = addupgradebootentry._get_device_uuid(path)
|
||||
+ mount_point = '/var'
|
||||
+ uuid = addupgradebootentry._get_device_uuid(mount_point)
|
||||
|
||||
assert uuid == 'MY_UUID1'
|
||||
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -1,61 +0,0 @@
|
||||
From 3a9cb366b7487bb5cc57e7650447af327c343b0d Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Wed, 18 Mar 2026 09:58:13 +0100
|
||||
Subject: [PATCH 09/44] fix(livemode): change location of source system tree
|
||||
|
||||
Before this patch, the generated squashfs image mounts the source system
|
||||
tree at /run/initramfs/live, which is the location used by dmsquash-live
|
||||
to mount the block device that holds the squashfs image. This device,
|
||||
however, might be arbitrary, e.g., it could be hosting /var of the
|
||||
source system. Therefore, the squashfs system would attempt to mount
|
||||
multiple things at /run/initramfs/live (/ and /var of the source
|
||||
system), creating problems. This patch changes the location of the
|
||||
source system tree to '/run/upgrade'.
|
||||
|
||||
Jira-ref: RHEL-104379
|
||||
---
|
||||
.../files/do-upgrade.sh | 4 ++--
|
||||
.../libraries/prepareliveimage.py | 12 ++++++++++--
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/files/do-upgrade.sh b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/files/do-upgrade.sh
|
||||
index 4b2f9a1f..51ebddb5 100755
|
||||
--- a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/files/do-upgrade.sh
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/files/do-upgrade.sh
|
||||
@@ -28,8 +28,8 @@ export LEAPPHOME=/root/tmp_leapp_py3
|
||||
export LEAPP3_BIN=$LEAPPHOME/leapp3
|
||||
|
||||
# this was initially a dracut script, hence $NEWROOT.
|
||||
-# the rootfs is mounted on /run/initramfs/live when booted with dmsquash-live
|
||||
-export NEWROOT=/run/initramfs/live
|
||||
+# the rootfs is mounted on /run/upgrade when booted with dmsquash-live
|
||||
+export NEWROOT=/run/upgrade
|
||||
|
||||
NSPAWN_OPTS="--capability=all --bind=/dev --bind=/dev/pts --bind=/proc --bind=/run/udev --bind=/run/lock"
|
||||
[ -d /dev/mapper ] && NSPAWN_OPTS="$NSPAWN_OPTS --bind=/dev/mapper"
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
index 2587bf89..96dadadf 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
@@ -18,8 +18,16 @@ LEAPP_CONSOLE_SERVICE_FILE = 'console.service'
|
||||
LEAPP_STRACE_SERVICE_FILE = 'upgrade-strace.service'
|
||||
""" Service that executes the upgrade while strace-ing the corresponding Leapp's process tree. """
|
||||
|
||||
-SOURCE_ROOT_MOUNT_LOCATION = '/run/initramfs/live'
|
||||
-""" Controls where the source system's root will be mounted inside the upgrade image. """
|
||||
+SOURCE_ROOT_MOUNT_LOCATION = '/run/upgrade'
|
||||
+"""
|
||||
+Controls where the source system's root will be mounted inside the upgrade image.
|
||||
+
|
||||
+Note: This cannot be set to /run/initramfs/live as the path is used by
|
||||
+ dmsquash-live by default to mount the block device that holds the squashfs
|
||||
+ image. As this device can be arbitrary (e.g., it can be mounted as /var on the
|
||||
+ source system), using /run/initramfs/live would cause mounting problems - we
|
||||
+ would attempt to mount / and also (for example) /var on the same location.
|
||||
+"""
|
||||
|
||||
|
||||
def create_fstab_mounting_current_root_elsewhere(context, host_fstab):
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
From 021f083509b074905c18b79afba4a22f8ca483f6 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 11 Apr 2025 15:12:18 +0200
|
||||
Subject: [PATCH 09/37] spec: require leapp-framework 6.1 for default CLI vals
|
||||
|
||||
Bump framework version as we want to use default=[] for the newly
|
||||
introduced `--enable-experimental-features` switch.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
packaging/leapp-repository.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packaging/leapp-repository.spec b/packaging/leapp-repository.spec
|
||||
index f45fda68..34768de1 100644
|
||||
--- a/packaging/leapp-repository.spec
|
||||
+++ b/packaging/leapp-repository.spec
|
||||
@@ -120,7 +120,7 @@ Requires: leapp-repository-dependencies = %{leapp_repo_deps}
|
||||
|
||||
# IMPORTANT: this is capability provided by the leapp framework rpm.
|
||||
# Check that 'version' instead of the real framework rpm version.
|
||||
-Requires: leapp-framework >= 6.0, leapp-framework < 7
|
||||
+Requires: leapp-framework >= 6.1, leapp-framework < 7
|
||||
|
||||
# Since we provide sub-commands for the leapp utility, we expect the leapp
|
||||
# tool to be installed as well.
|
||||
--
|
||||
2.49.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,98 @@
|
||||
From 51b26776405a926882509c3f62d0bedbb4eab188 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 14 Apr 2025 10:07:53 +0200
|
||||
Subject: [PATCH 10/37] docs(configuring-ipu): add experimental features
|
||||
section
|
||||
|
||||
With the upcoming introduction of documentation of the LiveMode feature,
|
||||
a question arises where to put the documentation. This patch introduces
|
||||
a new subsection 'Experimental features' under the 'Configuring IPU'
|
||||
section, so we have one place to where to put such features.
|
||||
---
|
||||
.../{ => configuring-ipu}/configuring-ipu.md | 0
|
||||
.../experimental-features/index.rst | 23 +++++++++++++++++++
|
||||
docs/source/configuring-ipu/index.rst | 23 +++++++++++++++++++
|
||||
docs/source/index.rst | 2 +-
|
||||
4 files changed, 47 insertions(+), 1 deletion(-)
|
||||
rename docs/source/{ => configuring-ipu}/configuring-ipu.md (100%)
|
||||
create mode 100644 docs/source/configuring-ipu/experimental-features/index.rst
|
||||
create mode 100644 docs/source/configuring-ipu/index.rst
|
||||
|
||||
diff --git a/docs/source/configuring-ipu.md b/docs/source/configuring-ipu/configuring-ipu.md
|
||||
similarity index 100%
|
||||
rename from docs/source/configuring-ipu.md
|
||||
rename to docs/source/configuring-ipu/configuring-ipu.md
|
||||
diff --git a/docs/source/configuring-ipu/experimental-features/index.rst b/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
new file mode 100644
|
||||
index 00000000..7a26116e
|
||||
--- /dev/null
|
||||
+++ b/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
@@ -0,0 +1,23 @@
|
||||
+Experimental features
|
||||
+========================================================
|
||||
+
|
||||
+This section provides descriptions of all available experimental
|
||||
+features. Low-level details and design decisions of these features
|
||||
+are provided.
|
||||
+
|
||||
+.. warning::
|
||||
+ Actor configuration is currently a preview of the feature, it might change in future releases.
|
||||
+
|
||||
+.. toctree::
|
||||
+ :maxdepth: 4
|
||||
+ :caption: Contents:
|
||||
+ :glob:
|
||||
+
|
||||
+
|
||||
+
|
||||
+.. Indices and tables
|
||||
+.. ==================
|
||||
+..
|
||||
+.. * :ref:`genindex`
|
||||
+.. * :ref:`modindex`
|
||||
+.. * :ref:`search`
|
||||
diff --git a/docs/source/configuring-ipu/index.rst b/docs/source/configuring-ipu/index.rst
|
||||
new file mode 100644
|
||||
index 00000000..1be3ebcf
|
||||
--- /dev/null
|
||||
+++ b/docs/source/configuring-ipu/index.rst
|
||||
@@ -0,0 +1,23 @@
|
||||
+Configuring the in-place upgrade
|
||||
+========================================================
|
||||
+
|
||||
+This section covers possible ways of modifying the in-place upgrade
|
||||
+without making any code changes. Leapp offers multiple mechanism
|
||||
+to affect the upgrade ranging from simple environmental variables
|
||||
+to more robust configuration files. This section also covers available
|
||||
+experimental features.
|
||||
+
|
||||
+.. toctree::
|
||||
+ :maxdepth: 4
|
||||
+ :caption: Contents:
|
||||
+ :glob:
|
||||
+
|
||||
+ configuring-ipu
|
||||
+ experimental-features/index
|
||||
+
|
||||
+.. Indices and tables
|
||||
+.. ==================
|
||||
+..
|
||||
+.. * :ref:`genindex`
|
||||
+.. * :ref:`modindex`
|
||||
+.. * :ref:`search`
|
||||
diff --git a/docs/source/index.rst b/docs/source/index.rst
|
||||
index 33a920ec..27537ca4 100644
|
||||
--- a/docs/source/index.rst
|
||||
+++ b/docs/source/index.rst
|
||||
@@ -19,7 +19,7 @@ providing Red Hat Enterprise Linux in-place upgrade functionality.
|
||||
tutorials/index
|
||||
project-structure/index
|
||||
upgrade-architecture-and-workflow/index
|
||||
- configuring-ipu
|
||||
+ configuring-ipu/index
|
||||
libraries-and-api/index
|
||||
contrib-and-devel-guidelines
|
||||
faq
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,86 +0,0 @@
|
||||
From f6838df00e3be7d8beec99bd9448ed47c7720853 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 18:25:09 +0100
|
||||
Subject: [PATCH 11/44] checkblacklistca: Respect distro name in reports
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../libraries/checkblacklistca.py | 28 +++++++++++++------
|
||||
.../tests/component_test_checkblacklistca.py | 9 ++++++
|
||||
2 files changed, 29 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/checkblacklistca/libraries/checkblacklistca.py b/repos/system_upgrade/el8toel9/actors/checkblacklistca/libraries/checkblacklistca.py
|
||||
index 53b912b8..635b3640 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/checkblacklistca/libraries/checkblacklistca.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/checkblacklistca/libraries/checkblacklistca.py
|
||||
@@ -1,4 +1,5 @@
|
||||
from leapp import reporting
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import BlackListCA, BlackListError
|
||||
|
||||
@@ -50,9 +51,14 @@ def process():
|
||||
reporting.Title('Distrusted CA certificates will be moved from blacklist to blocklist'),
|
||||
reporting.Summary(
|
||||
'The directories which store user and administrator supplied '
|
||||
- 'distrusted certificates have change names from blacklist in '
|
||||
- 'RHEL8 to blocklist in RHEL9. As a result {} and '
|
||||
- '{} will be deleted.'.format(reportString, deleteString)),
|
||||
+ 'distrusted certificates were renamed from blacklist in '
|
||||
+ '{source_distro} 8 to blocklist in {target_distro} 9. '
|
||||
+ 'As a result {report_string} and {delete_string} will be deleted.'.format(
|
||||
+ report_string=reportString,
|
||||
+ delete_string=deleteString,
|
||||
+ **DISTRO_REPORT_NAMES,
|
||||
+ )
|
||||
+ ),
|
||||
reporting.Severity(reporting.Severity.INFO),
|
||||
reporting.Groups([reporting.Groups.SECURITY]),
|
||||
reporting.Groups([reporting.Groups.AUTHENTICATION])
|
||||
@@ -63,11 +69,17 @@ def process():
|
||||
reporting.Summary(
|
||||
'The directories which stores user and administrator supplied '
|
||||
'distrusted certificates has change names from blacklist in '
|
||||
- 'RHEL8 to blocklist in RHEL9. But we are unable to access the '
|
||||
- 'RHEL8 directory {} because {}. You can clear this error by '
|
||||
- 'correcting the condition, or by moving the contents to {} '
|
||||
- 'and removing {} completely'
|
||||
- '. '.format(ble.sourceDir, ble.error, ble.targetDir, ble.sourceDir)),
|
||||
+ '{source_distro} 8 to blocklist in {target_distro} 9. '
|
||||
+ 'But we are unable to access the {source_distro} 8 directory '
|
||||
+ '{source_dir} because {error}. You can clear this error by '
|
||||
+ 'correcting the condition, or by moving the contents to '
|
||||
+ '{target_dir} and removing {source_dir} completely'.format(
|
||||
+ source_dir=ble.sourceDir,
|
||||
+ error=ble.error,
|
||||
+ target_dir=ble.targetDir,
|
||||
+ **DISTRO_REPORT_NAMES,
|
||||
+ )
|
||||
+ ),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.SECURITY]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/checkblacklistca/tests/component_test_checkblacklistca.py b/repos/system_upgrade/el8toel9/actors/checkblacklistca/tests/component_test_checkblacklistca.py
|
||||
index 2fc27501..af7e6305 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/checkblacklistca/tests/component_test_checkblacklistca.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/checkblacklistca/tests/component_test_checkblacklistca.py
|
||||
@@ -1,7 +1,16 @@
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.common import distro
|
||||
from leapp.models import BlackListCA, BlackListError, Report
|
||||
from leapp.utils.report import is_inhibitor
|
||||
|
||||
|
||||
+@pytest.fixture(autouse=True)
|
||||
+def common_mocks(monkeypatch):
|
||||
+ monkeypatch.setattr(distro, 'get_source_distro_id', lambda: 'rhel')
|
||||
+ monkeypatch.setattr(distro, 'get_target_distro_id', lambda: 'rhel')
|
||||
+
|
||||
+
|
||||
def test_actor_execution_empty(current_actor_context):
|
||||
current_actor_context.feed()
|
||||
current_actor_context.run()
|
||||
--
|
||||
2.53.0
|
||||
|
||||
142
SOURCES/0011-docs-livemode-add-LiveMode-documentation.patch
Normal file
142
SOURCES/0011-docs-livemode-add-LiveMode-documentation.patch
Normal file
@ -0,0 +1,142 @@
|
||||
From af35d1fd718258d37ed34be59084e7c77072096c Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 14 Apr 2025 10:14:12 +0200
|
||||
Subject: [PATCH 11/37] docs(livemode): add LiveMode documentation
|
||||
|
||||
This commit introduces a high-level documentation of the livemode
|
||||
feature. The following is documented:
|
||||
- how the upgrade process differs from the standard one when using
|
||||
livemode
|
||||
- why is the feature useful, i.e., why would anyone use it
|
||||
- how to enable and use the feature
|
||||
- what configuration options are available, including an example of
|
||||
configuration
|
||||
|
||||
Jira-ref: RHELMISC-9703
|
||||
---
|
||||
.github/workflows/codespell.yml | 2 +-
|
||||
.../experimental-features/index.rst | 1 +
|
||||
.../experimental-features/livemode.md | 86 +++++++++++++++++++
|
||||
3 files changed, 88 insertions(+), 1 deletion(-)
|
||||
create mode 100644 docs/source/configuring-ipu/experimental-features/livemode.md
|
||||
|
||||
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
|
||||
index b8da5ebb..3e595e32 100644
|
||||
--- a/.github/workflows/codespell.yml
|
||||
+++ b/.github/workflows/codespell.yml
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: codespell-project/actions-codespell@v2
|
||||
with:
|
||||
- ignore_words_list: ro,fo,couldn,repositor,zeor
|
||||
+ ignore_words_list: ro,fo,couldn,repositor,zeor,bootup
|
||||
skip: "./repos/system_upgrade/common/actors/storagescanner/tests/files/mounts,\
|
||||
./repos/system_upgrade/common/actors/networkmanagerreadconfig/tests/files/nm_cfg_file_error,\
|
||||
./repos/system_upgrade/el8toel9/actors/xorgdrvfact/tests/files/journalctl-xorg-intel,\
|
||||
diff --git a/docs/source/configuring-ipu/experimental-features/index.rst b/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
index 7a26116e..37de2fed 100644
|
||||
--- a/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
+++ b/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
@@ -13,6 +13,7 @@ are provided.
|
||||
:caption: Contents:
|
||||
:glob:
|
||||
|
||||
+ livemode
|
||||
|
||||
|
||||
.. Indices and tables
|
||||
diff --git a/docs/source/configuring-ipu/experimental-features/livemode.md b/docs/source/configuring-ipu/experimental-features/livemode.md
|
||||
new file mode 100644
|
||||
index 00000000..44200e80
|
||||
--- /dev/null
|
||||
+++ b/docs/source/configuring-ipu/experimental-features/livemode.md
|
||||
@@ -0,0 +1,86 @@
|
||||
+# LiveMode
|
||||
+
|
||||
+_LiveMode_ is an experimental feature that partially replaces
|
||||
+leapp's custom upgrade environment with a bootable squashfs image of the target
|
||||
+system. Intuitively, this squashfs-based mechanism is similar to using a live
|
||||
+CD (hence the name LiveMode) from which the DNF transaction and other
|
||||
+post-reboot steps will be applied. Such an upgrade environment closely
|
||||
+resembles an ordinary Linux installation, making developing desired
|
||||
+functionality (e.g. supporting network-based storage) much easier.
|
||||
+
|
||||
+## Technical details
|
||||
+During an upgrade, prior to rebooting, leapp constructs a minimal target system
|
||||
+container in order to obtain a version of the DNF stack expected by the new
|
||||
+packages installed during the upgrade. After the container is created, the new
|
||||
+DNF stack is used to download packages that will be installed during the
|
||||
+upgrade. Having all necessary packages, leapp checks the RPM transaction to be
|
||||
+performed during the upgrade. Finally, the upgrade environment is created - an
|
||||
+initramfs containing custom dracut modules that ultimately execute leapp very
|
||||
+early in the boot process. Such an upgrade environment guarantees isolation
|
||||
+from other system services as there is essentially only the upgrade process
|
||||
+running. However, the downside of using such an approach is that the bootup
|
||||
+process of the upgrade environment is non-standard, meaning that almost none of
|
||||
+the classical system initialisation services (e.g., LVM autoactivation) are
|
||||
+running. Developing advanced features such as support for network-based
|
||||
+storage, is, therefore demanding as only a little of the usual initialisation
|
||||
+is present and executed during bootup.
|
||||
+
|
||||
+The LiveMode feature obtains a similar isolation level of the upgrade process
|
||||
+in a different way. Instead of using an initramfs image that executes leapp
|
||||
+early, the system boots into a read-only squashfs system built from the target
|
||||
+system container build previously to check the upgrade RPM transaction. Since
|
||||
+leapp controls the creation of the target system container, it is also in
|
||||
+control of what will be running alongside the upgrade process, limiting the
|
||||
+possibility of arbitrary user-defined services interfering with the upgrade.
|
||||
+The upgrade environment boots into the `multi-user.target` target and leapp is
|
||||
+started as an ordinary systemd service. However, the squashfs image needs to be
|
||||
+stored on the disk, and, hence, the using feature **requires about 700mb of
|
||||
+additional disk space**.
|
||||
+
|
||||
+## Using the feature
|
||||
+It is possible to use the LiveMode feature by having set `LEAPP_UNSUPPORTED=1`
|
||||
+and running leapp as `leapp upgrade --enable-experimental-feature livemode`.
|
||||
+```
|
||||
+LEAPP_UNSUPPORTED=1 leapp upgrade --enable-experimental-feature livemode
|
||||
+```
|
||||
+### Configuration
|
||||
+The feature offers an extensive list of configuration options that can be set
|
||||
+by creating a YAML file in `/etc/leapp/actor_conf.d/` with the extension
|
||||
+`.yaml`. The content of the configuration file must be a mapping defining the
|
||||
+`livemode` key with a value that is a mapping with (some) of the following
|
||||
+keys:
|
||||
+
|
||||
+| Configuration field | Value type | Default | Semantics |
|
||||
+|---------------------|------------|---------|-----------|
|
||||
+| `squashfs_image_path` | `str` | `/var/lib/leapp/live-upgrade.img` | Location where the squashfs image of the minimal target system will be placed. |
|
||||
+| `additional_packages` | `List[str]` | `[]` | Additional packages to be installed into the squashfs image. |
|
||||
+| `autostart_upgrade_after_reboot` | `bool` | `True` | If set to True, the upgrade will start automatically after the reboot. Otherwise a manual trigger is required. |
|
||||
+| `setup_network_manager` | `bool` | `False` | Try enabling Network Manager in the squashfs image. |
|
||||
+| `dracut_network` | `str` | `''` | Dracut network arguments, required if the `url_to_load_squashfs_from` option is set. |
|
||||
+| `url_to_load_squashfs_image_from` | `str` | `''` | URL pointing to the squashfs image that should be used for the upgrade environment. |
|
||||
+| `setup_passwordless_root` | `bool` | `False` | If set to True, the root account of the squashfs image will have empty password. Use with caution. |
|
||||
+| `setup_opensshd_using_auth_keys` | `str` | `''` | If set to a non-empty string, openssh daemon will be setup within the squashfs image using the provided authorized keys file. |
|
||||
+| `capture_strace_info_into` | `str` | `''` | If set to a non-empty string, leapp will be executed under strace and results will be stored within the provided file path. |
|
||||
+
|
||||
+#### Configuration example
|
||||
+Consider the file `/etc/leapp/actor_conf.d/livemode.yaml` with the following contents.
|
||||
+```
|
||||
+livemode:
|
||||
+ additional_packages : [ vim ]
|
||||
+ autostart_upgrade_after_reboot : false
|
||||
+ setup_network_manager : true
|
||||
+ setup_opensshd_using_auth_keys : /root/.ssh/authorized_keys
|
||||
+```
|
||||
+
|
||||
+The configuration results in the following actions:
|
||||
+- Leapp will install the `vim` package into the upgrade environment.
|
||||
+- The upgrade will not be started automatically after reboot. Instead, user
|
||||
+ needs to resume the upgrade manually. Therefore, it is possible to manually
|
||||
+ inspect the system and verify that everything is in order, e.g., all of the
|
||||
+ necessary storage is mounted.
|
||||
+- Leapp will attempt to enable `NetworkManager` inside the upgrade environment
|
||||
+ using source system's network profiles. This attempt is best-effort, meaning
|
||||
+ that there is no guarantee that the network will be functional.
|
||||
+- Leapp will enable the `opensshd` service. If a network access is established
|
||||
+ successfully, it will be possible to login using ssh into the upgrade
|
||||
+ environment using the `root` account and interact with the system.
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
From c3ec002d6ebc825c1c918e3abe9e2c849ef9ddc4 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 16 Apr 2025 13:39:28 +0200
|
||||
Subject: [PATCH 12/37] DOC: rename configuring-ipu.md to envars.md
|
||||
|
||||
The file has bas been created before we introduced the section of
|
||||
"Configuring in-place upgrade" and it contained mixture of various
|
||||
stuff. We have the section now, so let's rename this file to envars
|
||||
and keep here documented environments variables only.
|
||||
|
||||
Dropping information from this file about actors' configurations.
|
||||
This needs to be anyway documented separately now and original
|
||||
information has not been so helpful.
|
||||
---
|
||||
.../configuring-ipu/{configuring-ipu.md => envars.md} | 8 --------
|
||||
docs/source/configuring-ipu/index.rst | 2 +-
|
||||
2 files changed, 1 insertion(+), 9 deletions(-)
|
||||
rename docs/source/configuring-ipu/{configuring-ipu.md => envars.md} (95%)
|
||||
|
||||
diff --git a/docs/source/configuring-ipu/configuring-ipu.md b/docs/source/configuring-ipu/envars.md
|
||||
similarity index 95%
|
||||
rename from docs/source/configuring-ipu/configuring-ipu.md
|
||||
rename to docs/source/configuring-ipu/envars.md
|
||||
index 059b72c2..61a50b82 100644
|
||||
--- a/docs/source/configuring-ipu/configuring-ipu.md
|
||||
+++ b/docs/source/configuring-ipu/envars.md
|
||||
@@ -78,11 +78,3 @@ Change the default target RHEL version. Format: `MAJOR.MINOR`.
|
||||
|
||||
#### LEAPP_DEVEL_USE_PERSISTENT_PACKAGE_CACHE
|
||||
Caches downloaded packages when set to `1`. This will reduce the time needed by leapp when executed multiple times, because it will not have to download already downloaded packages. However, this can lead to a random issues in case the data is not up-to-date or when setting or repositories change. The environment variable is meant to be used only for the part of the upgrade before the reboot and has no effect or use otherwise.
|
||||
-
|
||||
-## Actor configuration
|
||||
-```{warning}
|
||||
-Actor configuration is currently a preview of the feature, it might change in future releases.
|
||||
-```
|
||||
-The actor configuration is to be placed in the `/etc/leapp/actor_conf.d/` directory. An actor configuration is a file in YAML format.
|
||||
-
|
||||
-To define configuration options on your own actor refer to this tutorial TODO link.
|
||||
diff --git a/docs/source/configuring-ipu/index.rst b/docs/source/configuring-ipu/index.rst
|
||||
index 1be3ebcf..6490d6fd 100644
|
||||
--- a/docs/source/configuring-ipu/index.rst
|
||||
+++ b/docs/source/configuring-ipu/index.rst
|
||||
@@ -12,7 +12,7 @@ experimental features.
|
||||
:caption: Contents:
|
||||
:glob:
|
||||
|
||||
- configuring-ipu
|
||||
+ envars
|
||||
experimental-features/index
|
||||
|
||||
.. Indices and tables
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
From a2a3dfb9b14f9582b4c895bda28a3ecb604ea737 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 18:34:34 +0100
|
||||
Subject: [PATCH 12/44] blsgrubcfgonppc64: Respect distro name in reports
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../libraries/blsgrubcfgonppc64.py | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/checkblsgrubcfgonppc64/libraries/blsgrubcfgonppc64.py b/repos/system_upgrade/el8toel9/actors/checkblsgrubcfgonppc64/libraries/blsgrubcfgonppc64.py
|
||||
index d723df65..58d15e25 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/checkblsgrubcfgonppc64/libraries/blsgrubcfgonppc64.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/checkblsgrubcfgonppc64/libraries/blsgrubcfgonppc64.py
|
||||
@@ -1,6 +1,7 @@
|
||||
from leapp import reporting
|
||||
from leapp.libraries.common import grub
|
||||
from leapp.libraries.common.config import architecture
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import DefaultGrubInfo, FirmwareFacts, GrubCfgBios
|
||||
|
||||
@@ -31,8 +32,9 @@ def process():
|
||||
'Leapp cannot continue with upgrade on "ppc64le" bare metal systems'
|
||||
),
|
||||
reporting.Summary(
|
||||
- 'In-place upgrade to RHEL 9 is not supported on POWER8 and POWER9 bare metal systems. '
|
||||
- 'For more information, refer to the following article: {}'.format(URL)
|
||||
+ f'In-place upgrade to {DISTRO_REPORT_NAMES.target} 9 is not'
|
||||
+ ' supported on POWER8 and POWER9 bare metal systems. For more'
|
||||
+ ' information, refer to the attached article.'
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups(['inhibitor']),
|
||||
@@ -54,8 +56,9 @@ def process():
|
||||
'On "ppc64le" systems with BLS enabled, the GRUB configuration is not '
|
||||
'properly converted after the upgrade and Leapp has to run "grub2-mkconfig" '
|
||||
'-o /boot/grub2/grub.cfg command in order to fix an issue with booting into '
|
||||
- 'the RHEL 8 kernel instead of RHEL 9.'
|
||||
-
|
||||
+ 'the {source_distro} 8 kernel instead of {target_distro} 9.'.format_map(
|
||||
+ DISTRO_REPORT_NAMES
|
||||
+ )
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.BOOT]),
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
From b43ed18a6e4cea273def17c83c0c8d1742ba5145 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 16:16:17 +0100
|
||||
Subject: [PATCH 13/44] checkselinux: Respect distro name in report
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../common/actors/checkselinux/libraries/checkselinux.py | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkselinux/libraries/checkselinux.py b/repos/system_upgrade/common/actors/checkselinux/libraries/checkselinux.py
|
||||
index 2ef914ac..dbd79adf 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkselinux/libraries/checkselinux.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkselinux/libraries/checkselinux.py
|
||||
@@ -1,5 +1,6 @@
|
||||
from leapp import reporting
|
||||
from leapp.libraries.common.config.version import get_target_major_version
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import KernelCmdlineArg, SELinuxFacts, SelinuxPermissiveDecision, SelinuxRelabelDecision
|
||||
|
||||
@@ -20,10 +21,10 @@ def process():
|
||||
reporting.create_report([
|
||||
reporting.Title('LEAPP detected SELinux disabled in "/etc/selinux/config"'),
|
||||
reporting.Summary(
|
||||
- 'On RHEL 9, disabling SELinux in "/etc/selinux/config" is no longer possible. '
|
||||
- 'This way, the system starts with SELinux enabled but with no policy loaded. LEAPP '
|
||||
+ 'On {target_distro} 9, disabling SELinux in "/etc/selinux/config" is no longer possible. '
|
||||
+ 'This way, the system starts with SELinux enabled but with no policy loaded. Leapp '
|
||||
'will automatically disable SELinux using "SELINUX=0" kernel command line parameter. '
|
||||
- 'However, Red Hat strongly recommends to have SELinux enabled'
|
||||
+ 'However, it is strongly recommended to have SELinux enabled'.format_map(DISTRO_REPORT_NAMES)
|
||||
),
|
||||
reporting.Severity(reporting.Severity.INFO),
|
||||
reporting.Groups([reporting.Groups.SELINUX]),
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
From 53f125b42f3e17354cc2d3e93b80fe089cf4c3b2 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Tue, 4 Mar 2025 14:42:44 +0100
|
||||
Subject: [PATCH 13/37] fix(userspacegen): add exeception handling to swapping
|
||||
of RHUI clients
|
||||
|
||||
Leapp swaps to RHUI target clients (uninstall source client+install
|
||||
target client) in the scratch container to gain repository access.
|
||||
To perform this step atomically, without loosing repository access
|
||||
in between, `dnf shell` is invoked. The instruction as to which RPMs
|
||||
should be uninstalled and which should be installed are given on
|
||||
stdin of the `dnf shell` command. Currently, if we fail to swap clients
|
||||
we crash with an unhandled exception `CalledProcessError` that contains
|
||||
no information about what went wrong since the actual performed
|
||||
transaction is hidden within the stdin of the process. This patch
|
||||
adds error handling, so that we can tell that we have failed to swap
|
||||
RHUI clients. Leapp's logs also contain the full DNF transaction as well
|
||||
as possible explanations on why we failed.
|
||||
|
||||
jira-ref: RHEL-77945
|
||||
---
|
||||
.../libraries/userspacegen.py | 30 ++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
index 12736ab7..9fc96a52 100644
|
||||
--- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
+++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
@@ -1239,7 +1239,35 @@ def setup_target_rhui_access_if_needed(context, indata):
|
||||
'shell'
|
||||
]
|
||||
|
||||
- context.call(cmd, callback_raw=utils.logging_handler, stdin='\n'.join(dnf_transaction_steps))
|
||||
+ try:
|
||||
+ dnf_shell_instructions = '\n'.join(dnf_transaction_steps)
|
||||
+ api.current_logger().debug(
|
||||
+ 'Supplying the following instructions to the `dnf shell`: {}'.format(dnf_shell_instructions)
|
||||
+ )
|
||||
+ context.call(cmd, callback_raw=utils.logging_handler, stdin=dnf_shell_instructions)
|
||||
+ except CalledProcessError as error:
|
||||
+ api.current_logger().debug(
|
||||
+ 'Failed to swap RHUI clients. This is likely because there are no repositories '
|
||||
+ ' containing RHUI clients enabled, or we cannot access them.'
|
||||
+ )
|
||||
+ api.current_logger().debug(error)
|
||||
+
|
||||
+ swapping_clients_info_msg = 'Failed to swap `{0}` (source client{1}) with {2} (target client{3}).'
|
||||
+ swapping_clients_info_msg = swapping_clients_info_msg.format(
|
||||
+ ' '.join(indata.rhui_info.src_client_pkg_names),
|
||||
+ '' if len(indata.rhui_info.src_client_pkg_names) == 1 else 's',
|
||||
+ ' '.join(indata.rhui_info.target_client_pkg_names),
|
||||
+ '' if len(indata.rhui_info.target_client_pkg_names) == 1 else 's',
|
||||
+ )
|
||||
+
|
||||
+ details = {
|
||||
+ 'details': swapping_clients_info_msg,
|
||||
+ 'error': str(error)
|
||||
+ }
|
||||
+ raise StopActorExecutionError(
|
||||
+ 'Failed to swap RHUI clients to establish content access',
|
||||
+ details=details
|
||||
+ )
|
||||
|
||||
_apply_rhui_access_postinstall_tasks(context, setup_info)
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
From 60e54a82da37bb0d2f1bee1a35d1d7fa01cf3df7 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 16:44:04 +0100
|
||||
Subject: [PATCH 14/44] checkosrelease: Respect distro name in report
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../common/actors/checkosrelease/actor.py | 2 +-
|
||||
.../actors/checkosrelease/libraries/checkosrelease.py | 10 +++++++---
|
||||
.../actors/checkosrelease/tests/test_checkosrelease.py | 4 +++-
|
||||
3 files changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkosrelease/actor.py b/repos/system_upgrade/common/actors/checkosrelease/actor.py
|
||||
index 7747eb9b..8c60d968 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkosrelease/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkosrelease/actor.py
|
||||
@@ -6,7 +6,7 @@ from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
class CheckOSRelease(Actor):
|
||||
"""
|
||||
- Check if the current RHEL minor version is supported. If not, inhibit the upgrade process.
|
||||
+ Check if the current distro version is supported. If not, inhibit the upgrade process.
|
||||
|
||||
This check can be skipped by using the LEAPP_DEVEL_SKIP_CHECK_OS_RELEASE environment variable.
|
||||
"""
|
||||
diff --git a/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py b/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
index 1ee6e6ab..1ab89a8d 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
@@ -2,6 +2,7 @@ import os
|
||||
|
||||
from leapp import reporting
|
||||
from leapp.libraries.common.config import version
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
|
||||
COMMON_REPORT_TAGS = [reporting.Groups.SANITY]
|
||||
FMT_LIST_SEPARATOR = '\n - '
|
||||
@@ -14,7 +15,9 @@ def skip_check():
|
||||
if os.getenv('LEAPP_DEVEL_SKIP_CHECK_OS_RELEASE'):
|
||||
reporting.create_report([
|
||||
reporting.Title('Skipped OS release check'),
|
||||
- reporting.Summary('Source RHEL release check skipped via LEAPP_DEVEL_SKIP_CHECK_OS_RELEASE env var.'),
|
||||
+ reporting.Summary(
|
||||
+ 'Source system release check skipped via LEAPP_DEVEL_SKIP_CHECK_OS_RELEASE env variable.'
|
||||
+ ),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups(COMMON_REPORT_TAGS)
|
||||
] + related)
|
||||
@@ -24,7 +27,7 @@ def skip_check():
|
||||
|
||||
|
||||
def check_os_version():
|
||||
- """ Check the RHEL minor version and inhibit the upgrade if it does not match the supported ones """
|
||||
+ """ Check the distro version and inhibit the upgrade if it does not match the supported ones """
|
||||
if not version.is_supported_version():
|
||||
supported_releases = []
|
||||
for rel in version.SUPPORTED_VERSIONS:
|
||||
@@ -33,7 +36,8 @@ def check_os_version():
|
||||
current_release = ' '.join(version.current_version()).upper()
|
||||
reporting.create_report([
|
||||
reporting.Title(
|
||||
- 'The installed OS version is not supported for the in-place upgrade to the target RHEL version'
|
||||
+ 'The installed OS version is not supported for the in-place upgrade'
|
||||
+ ' to the target {target_distro} version'.format_map(DISTRO_REPORT_NAMES)
|
||||
),
|
||||
reporting.Summary(
|
||||
'The supported OS releases for the upgrade process:'
|
||||
diff --git a/repos/system_upgrade/common/actors/checkosrelease/tests/test_checkosrelease.py b/repos/system_upgrade/common/actors/checkosrelease/tests/test_checkosrelease.py
|
||||
index 1ca8a1d7..c1c43065 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkosrelease/tests/test_checkosrelease.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkosrelease/tests/test_checkosrelease.py
|
||||
@@ -3,7 +3,8 @@ import os
|
||||
from leapp import reporting
|
||||
from leapp.libraries.actor import checkosrelease
|
||||
from leapp.libraries.common.config import version
|
||||
-from leapp.libraries.common.testutils import create_report_mocked, produce_mocked
|
||||
+from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked, produce_mocked
|
||||
+from leapp.libraries.stdlib import api
|
||||
from leapp.utils.report import is_inhibitor
|
||||
|
||||
|
||||
@@ -26,6 +27,7 @@ def test_no_skip_check(monkeypatch):
|
||||
|
||||
|
||||
def test_not_supported_release(monkeypatch):
|
||||
+ monkeypatch.setattr(api, "current_actor", CurrentActorMocked())
|
||||
monkeypatch.setattr(version, "is_supported_version", lambda: False)
|
||||
monkeypatch.setattr(version, "get_source_major_version", lambda: '8')
|
||||
monkeypatch.setattr(version, "current_version", lambda: ('bad', '8'))
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
From 474b26cbcadc804ff50935a87ca78379999960d4 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Tue, 4 Mar 2025 11:49:05 +0100
|
||||
Subject: [PATCH 14/37] selinux: do not run "semodule" when no modules are
|
||||
selected
|
||||
|
||||
Fixes:
|
||||
2025-03-04 11:21:31.550 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: External command has finished: ['semodule', '-lfull']
|
||||
2025-03-04 11:21:31.551 INFO PID: 679 leapp.workflow.Applications.selinuxapplycustom: Processing custom SELinux policy modules. Count: 1.
|
||||
2025-03-04 11:21:31.551 INFO PID: 679 leapp.workflow.Applications.selinuxapplycustom: Skipping module permissive_rhcd_t on priority 400 because it is already installed.
|
||||
2025-03-04 11:21:31.551 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: External command has started: ['semodule']
|
||||
2025-03-04 11:21:31.555 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: At least one mode must be specified.
|
||||
2025-03-04 11:21:31.555 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: usage: semodule [option]... MODE...
|
||||
2025-03-04 11:21:31.555 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: Manage SELinux policy modules.
|
||||
2025-03-04 11:21:31.556 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: MODES:
|
||||
2025-03-04 11:21:31.556 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: -R, --reload reload policy
|
||||
...
|
||||
2025-03-04 11:21:31.564 WARNING PID: 679 leapp.workflow.Applications.selinuxapplycustom: Error installing modules in a single transaction:At least one mode must be specified.
|
||||
---
|
||||
.../common/actors/selinux/selinuxapplycustom/actor.py | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py b/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
index 55c64c3e..4856f36a 100644
|
||||
--- a/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
@@ -92,6 +92,10 @@ class SELinuxApplyCustom(Actor):
|
||||
|
||||
command.extend(['-X', str(module.priority), '-i', cil_filename])
|
||||
|
||||
+ if command == ['semodule']:
|
||||
+ # no modules selected for installation
|
||||
+ continue
|
||||
+
|
||||
try:
|
||||
run(command)
|
||||
except CalledProcessError as e:
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -0,0 +1,213 @@
|
||||
From 57dce775de28615260189a6612fe65e44a7d3bc9 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Sat, 29 Mar 2025 21:41:48 +0100
|
||||
Subject: [PATCH 15/37] feat(ipuconfig): provide info about supported upgrade
|
||||
paths
|
||||
|
||||
At the moment, information about supported upgrade paths is provided via
|
||||
a deprecated IPUPaths message. The current solution is temporary.
|
||||
This patch introduces new field in IPUConfig called
|
||||
'supported_upgrade_paths' that contains a "compressed", pre-filtered,
|
||||
list of upgrade paths. The decision to introduce this new field is
|
||||
because we want to refactor the config.version library to not contain
|
||||
its own supported upgrade paths definitions. Instead, we want to have the
|
||||
information represented only once. Therefore, in order to refactor
|
||||
config.version to use the information received by a message, we need
|
||||
the new field on IPUConfig as we cannot force already-written actors
|
||||
using config.version to add some message to their 'consumes' list.
|
||||
|
||||
Jira-ref: RHEL-80550
|
||||
---
|
||||
.../libraries/ipuworkflowconfig.py | 28 ++++++++++++++++++-
|
||||
.../common/libraries/config/mock_configs.py | 14 +++++++++-
|
||||
.../common/libraries/testutils.py | 20 +++++++++----
|
||||
.../system_upgrade/common/models/ipuconfig.py | 22 +++++++++++++++
|
||||
4 files changed, 77 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
index 749b3347..86df709e 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
@@ -85,6 +85,27 @@ def check_target_major_version(curr_version, target_version):
|
||||
)
|
||||
|
||||
|
||||
+def load_raw_upgrade_paths_for_flavour(flavour='default', paths_definition_file='upgrade_paths.json'):
|
||||
+ with open(api.get_common_file_path(paths_definition_file)) as fp:
|
||||
+ data = json.loads(fp.read())
|
||||
+
|
||||
+ raw_upgrade_paths = data.get(flavour, {})
|
||||
+
|
||||
+ if not raw_upgrade_paths:
|
||||
+ api.current_logger().warning('Cannot discover any upgrade paths for flavour: {}'.format(flavour))
|
||||
+
|
||||
+ return raw_upgrade_paths
|
||||
+
|
||||
+
|
||||
+def construct_models_for_paths_matching_source_major(raw_paths, src_major_version):
|
||||
+ multipaths_matching_source = []
|
||||
+ for src_version, target_versions in ipu_paths.items():
|
||||
+ if src_version.split('.')[0] == src_major_version:
|
||||
+ source_to_targets = IPUSourceToPossibleTargets(source_version=src_version, target_versions=target_versions)
|
||||
+ multipaths_matching_source.append()
|
||||
+ return multipaths_matching_source
|
||||
+
|
||||
+
|
||||
def produce_ipu_config(actor):
|
||||
flavour = os.environ.get('LEAPP_UPGRADE_PATH_FLAVOUR')
|
||||
target_version = os.environ.get('LEAPP_UPGRADE_PATH_TARGET_RELEASE')
|
||||
@@ -93,6 +114,10 @@ def produce_ipu_config(actor):
|
||||
|
||||
check_target_major_version(source_version, target_version)
|
||||
|
||||
+ raw_upgrade_paths = load_raw_upgrade_paths_for_flavour(flavour)
|
||||
+ source_major_version = source_version.split('.')[0]
|
||||
+ exposed_supported_paths = construct_models_for_paths_matching_source_major(raw_upgrade_paths, source_major_version)
|
||||
+
|
||||
actor.produce(IPUConfig(
|
||||
leapp_env_vars=get_env_vars(),
|
||||
os_release=os_release,
|
||||
@@ -102,5 +127,6 @@ def produce_ipu_config(actor):
|
||||
target=target_version
|
||||
),
|
||||
kernel=get_booted_kernel(),
|
||||
- flavour=flavour
|
||||
+ flavour=flavour,
|
||||
+ supported_upgrade_paths=exposed_supported_paths
|
||||
))
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/mock_configs.py b/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
index ee9dd760..a1c9c0fd 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
@@ -6,7 +6,7 @@ The library is supposed to be used only for testing purposes. Import of the
|
||||
library is expected only inside test files.
|
||||
"""
|
||||
|
||||
-from leapp.models import EnvVar, IPUConfig, OSRelease, Version
|
||||
+from leapp.models import EnvVar, IPUConfig, IPUSourceToPossibleTargets, OSRelease, Version
|
||||
|
||||
CONFIG = IPUConfig(
|
||||
leapp_env_vars=[EnvVar(name='LEAPP_DEVEL', value='0')],
|
||||
@@ -23,6 +23,9 @@ CONFIG = IPUConfig(
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ supported_upgrade_paths=[
|
||||
+ IPUSourceToPossibleTargets(source_version='7.6', target_versions=['8.0'])
|
||||
+ ]
|
||||
)
|
||||
|
||||
CONFIG_NO_NETWORK_RENAMING = IPUConfig(
|
||||
@@ -40,6 +43,9 @@ CONFIG_NO_NETWORK_RENAMING = IPUConfig(
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ supported_upgrade_paths=[
|
||||
+ IPUSourceToPossibleTargets(source_version='7.6', target_versions=['8.0'])
|
||||
+ ]
|
||||
)
|
||||
|
||||
CONFIG_ALL_SIGNED = IPUConfig(
|
||||
@@ -57,6 +63,9 @@ CONFIG_ALL_SIGNED = IPUConfig(
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ supported_upgrade_paths=[
|
||||
+ IPUSourceToPossibleTargets(source_version='7.6', target_versions=['8.0'])
|
||||
+ ]
|
||||
)
|
||||
|
||||
CONFIG_S390X = IPUConfig(
|
||||
@@ -73,4 +82,7 @@ CONFIG_S390X = IPUConfig(
|
||||
),
|
||||
architecture='s390x',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ supported_upgrade_paths=[
|
||||
+ IPUSourceToPossibleTargets(source_version='7.6', target_versions=['8.0'])
|
||||
+ ]
|
||||
)
|
||||
diff --git a/repos/system_upgrade/common/libraries/testutils.py b/repos/system_upgrade/common/libraries/testutils.py
|
||||
index afeb360a..1b3c3683 100644
|
||||
--- a/repos/system_upgrade/common/libraries/testutils.py
|
||||
+++ b/repos/system_upgrade/common/libraries/testutils.py
|
||||
@@ -6,7 +6,7 @@ from collections import namedtuple
|
||||
from leapp import reporting
|
||||
from leapp.actors.config import _normalize_config, normalize_schemas
|
||||
from leapp.libraries.common.config import architecture
|
||||
-from leapp.models import EnvVar
|
||||
+from leapp.models import EnvVar, IPUSourceToPossibleTargets
|
||||
from leapp.utils.deprecation import deprecated
|
||||
|
||||
|
||||
@@ -76,7 +76,11 @@ def _make_default_config(actor_config_schema):
|
||||
|
||||
class CurrentActorMocked(object): # pylint:disable=R0904
|
||||
def __init__(self, arch=architecture.ARCH_X86_64, envars=None, kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
- release_id='rhel', src_ver='7.8', dst_ver='8.1', msgs=None, flavour='default', config=None):
|
||||
+ release_id='rhel', src_ver='7.8', dst_ver='8.1', msgs=None, flavour='default', config=None,
|
||||
+ supported_upgrade_paths=None):
|
||||
+ """
|
||||
+ :param List[IPUSourceToPossibleTargets] supported_upgrade_paths: List of supported upgrade paths.
|
||||
+ """
|
||||
envarsList = [EnvVar(name=k, value=v) for k, v in envars.items()] if envars else []
|
||||
version = namedtuple('Version', ['source', 'target'])(src_ver, dst_ver)
|
||||
release = namedtuple('OS_release', ['release_id', 'version_id'])(release_id, src_ver)
|
||||
@@ -85,9 +89,15 @@ class CurrentActorMocked(object): # pylint:disable=R0904
|
||||
self._common_tools_folder = '../../tools'
|
||||
self._actor_folder = 'files'
|
||||
self._actor_tools_folder = 'tools'
|
||||
- self.configuration = namedtuple(
|
||||
- 'configuration', ['architecture', 'kernel', 'leapp_env_vars', 'os_release', 'version', 'flavour']
|
||||
- )(arch, kernel, envarsList, release, version, flavour)
|
||||
+
|
||||
+ if not supported_upgrade_paths:
|
||||
+ supported_upgrade_paths = [IPUSourceToPossibleTargets(source_version=src_ver, target_versions=[dst_ver])]
|
||||
+
|
||||
+ ipu_conf_fields = ['architecture', 'kernel', 'leapp_env_vars', 'os_release',
|
||||
+ 'version', 'flavour', 'supported_upgrade_paths']
|
||||
+ config_type = namedtuple('configuration', ipu_conf_fields)
|
||||
+ self.configuration = config_type(arch, kernel, envarsList, release, version, flavour, supported_upgrade_paths)
|
||||
+
|
||||
self._msgs = msgs or []
|
||||
self.config = {} if config is None else config
|
||||
|
||||
diff --git a/repos/system_upgrade/common/models/ipuconfig.py b/repos/system_upgrade/common/models/ipuconfig.py
|
||||
index 6e7e21b5..0a16b603 100644
|
||||
--- a/repos/system_upgrade/common/models/ipuconfig.py
|
||||
+++ b/repos/system_upgrade/common/models/ipuconfig.py
|
||||
@@ -34,6 +34,21 @@ class Version(Model):
|
||||
"""Version of the target system. E.g. '8.2.'."""
|
||||
|
||||
|
||||
+class IPUSourceToPossibleTargets(Model):
|
||||
+ """
|
||||
+ Represents upgrade paths from a source system version.
|
||||
+
|
||||
+ This model is not supposed to be produced nor consumed directly by any actor.
|
||||
+ """
|
||||
+ topic = SystemInfoTopic
|
||||
+
|
||||
+ source_version = fields.String()
|
||||
+ """Source system version."""
|
||||
+
|
||||
+ target_versions = fields.List(fields.String())
|
||||
+ """List of defined target system versions for the `source_version` system."""
|
||||
+
|
||||
+
|
||||
class IPUConfig(Model):
|
||||
"""
|
||||
IPU workflow configuration model
|
||||
@@ -59,3 +74,10 @@ class IPUConfig(Model):
|
||||
|
||||
flavour = fields.StringEnum(('default', 'saphana'), default='default')
|
||||
"""Flavour of the upgrade - Used to influence changes in supported source/target release"""
|
||||
+
|
||||
+ supported_upgrade_paths = fields.List(fields.Model(IPUSourceToPossibleTargets))
|
||||
+ """
|
||||
+ List of supported upgrade paths.
|
||||
+
|
||||
+ The list contains only upgrade paths for the `flavour` of the source system.
|
||||
+ """
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,113 +0,0 @@
|
||||
From ce379f96f128b60d93e02f95351e2f718940d2f2 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 23 Feb 2026 12:45:59 +0100
|
||||
Subject: [PATCH 15/44] rocecheck: Remove outadated check for source version
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../actors/rocecheck/libraries/rocecheck.py | 35 ++-----------------
|
||||
.../rocecheck/tests/unit_test_rocecheck.py | 22 ------------
|
||||
2 files changed, 3 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/rocecheck/libraries/rocecheck.py b/repos/system_upgrade/el8toel9/actors/rocecheck/libraries/rocecheck.py
|
||||
index 7549feb8..0ed2046a 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/rocecheck/libraries/rocecheck.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/rocecheck/libraries/rocecheck.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from leapp import reporting
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
-from leapp.libraries.common.config import architecture, version
|
||||
+from leapp.libraries.common.config import architecture
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import KernelCmdline, RoceDetected
|
||||
|
||||
@@ -37,36 +37,8 @@ def _fmt_list(items):
|
||||
return ''.join([FMT_LIST_SEPARATOR.format(i) for i in items])
|
||||
|
||||
|
||||
-def _report_old_version(roce):
|
||||
+def _report_wrong_setup(roce):
|
||||
roce_nics = roce.roce_nics_connected + roce.roce_nics_connecting
|
||||
- reporting.create_report([
|
||||
- reporting.Title('A newer version of RHEL 8 is required for the upgrade with RoCE.'),
|
||||
- reporting.Summary(
|
||||
- 'The RHEL 9 system uses different network schemes for NIC names'
|
||||
- ' than RHEL 8.'
|
||||
- ' RHEL {version} does not provide functionality to be able'
|
||||
- ' to set the system configuration in a way the network interface'
|
||||
- ' names used by RoCE are persistent on both (RHEL 8 and RHEL 9)'
|
||||
- ' systems.'
|
||||
- ' The in-place upgrade from the current version of RHEL to RHEL 9'
|
||||
- ' will break the RoCE network configuration.'
|
||||
- '\n\nRoCE detected on following NICs:{nics}'
|
||||
- .format(
|
||||
- version=version.get_source_version(),
|
||||
- nics=_fmt_list(roce_nics)
|
||||
- )
|
||||
- ),
|
||||
- reporting.Remediation(hint=(
|
||||
- 'Update the system to RHEL 8.8 or newer using DNF and then reboot'
|
||||
- ' the system prior the in-place upgrade to RHEL 9.'
|
||||
- )),
|
||||
- reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups([
|
||||
- reporting.Groups.INHIBITOR,
|
||||
- reporting.Groups.ACCESSIBILITY,
|
||||
- reporting.Groups.SANITY,
|
||||
- ]),
|
||||
- ])
|
||||
|
||||
|
||||
def _report_wrong_setup(roce):
|
||||
@@ -128,7 +100,6 @@ def process():
|
||||
# No used RoCE detected - nothing to do
|
||||
api.current_logger().debug('Skipping RoCE checks: No RoCE card detected.')
|
||||
return
|
||||
- if version.matches_source_version('<= 8.6'):
|
||||
- _report_old_version(roce)
|
||||
+
|
||||
if not is_kernel_arg_set():
|
||||
_report_wrong_setup(roce)
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/rocecheck/tests/unit_test_rocecheck.py b/repos/system_upgrade/el8toel9/actors/rocecheck/tests/unit_test_rocecheck.py
|
||||
index b5511d17..70e4a7b3 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/rocecheck/tests/unit_test_rocecheck.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/rocecheck/tests/unit_test_rocecheck.py
|
||||
@@ -52,7 +52,6 @@ def test_roce_noibmz(monkeypatch, arch):
|
||||
|
||||
monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(arch=arch))
|
||||
monkeypatch.setattr(reporting, "create_report", create_report_mocked())
|
||||
- monkeypatch.setattr(rocecheck, '_report_old_version', mocked_do_not_call_me)
|
||||
monkeypatch.setattr(rocecheck, '_report_wrong_setup', mocked_do_not_call_me)
|
||||
monkeypatch.setattr(rocecheck, 'is_kernel_arg_set', mocked_do_not_call_me)
|
||||
monkeypatch.setattr(rocecheck.api, 'consume', mocked_do_not_call_me)
|
||||
@@ -76,27 +75,6 @@ def test_roce_ok(monkeypatch, msgs, version):
|
||||
assert not reporting.create_report.called
|
||||
|
||||
|
||||
-@pytest.mark.parametrize('msgs', (
|
||||
- [_kernel_cmdline(['net.naming-scheme=rhel-8.7']), _roce(['eno'], [])],
|
||||
- [_kernel_cmdline(['net.naming-scheme=rhel-8.7']), _roce([], ['eno'])],
|
||||
- [_kernel_cmdline(['net.naming-scheme=rhel-8.6']), _roce(['eno'], [])],
|
||||
- [_kernel_cmdline(['net.naming-scheme=rhel-8.6']), _roce(['eno', 'eno1'], ['enp'])],
|
||||
- [_kernel_cmdline(['foo=bar']), _roce(['eno'], [])],
|
||||
- [_kernel_cmdline(), _roce(['eno'], [])],
|
||||
-))
|
||||
-@pytest.mark.parametrize('version', ['8.0', '8.3', '8.6'])
|
||||
-def test_roce_old_rhel(monkeypatch, msgs, version):
|
||||
- curr_actor_mocked = CurrentActorMocked(arch=architecture.ARCH_S390X, src_ver=version, msgs=msgs)
|
||||
- monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
- monkeypatch.setattr(reporting, "create_report", create_report_mocked())
|
||||
- rocecheck.process()
|
||||
- assert reporting.create_report.called
|
||||
- assert any(
|
||||
- 'version of RHEL' in report['title']
|
||||
- for report in reporting.create_report.reports
|
||||
- )
|
||||
-
|
||||
-
|
||||
# NOTE: what about the situation when net.naming-scheme is configured multiple times???
|
||||
@pytest.mark.parametrize('msgs', (
|
||||
[_kernel_cmdline(['net.naming-scheme=rhel-8.6']), _roce(['eno'], [])],
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,381 @@
|
||||
From 6bfb0ae05f8ac05f34b5974a85ae5a703ada72b0 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Sat, 29 Mar 2025 21:56:07 +0100
|
||||
Subject: [PATCH 16/37] feat(upgrade_paths): include information about distro
|
||||
id
|
||||
|
||||
This patch tweaks upgrade_paths.json and the code reading it to contain
|
||||
information about what for what distro are the upgrade paths defined.
|
||||
This allows the upgrade tooling to possibly support also other distros,
|
||||
such as CentOS Stream. However, this patch is only a small step towards
|
||||
such a goal and further work is needed to support these systems.
|
||||
|
||||
Jira-ref: RHEL-80550
|
||||
---
|
||||
commands/command_utils.py | 28 ++++--
|
||||
commands/tests/test_upgrade_paths.py | 15 ++--
|
||||
.../libraries/ipuworkflowconfig.py | 35 +++++---
|
||||
.../tests/test_ipuworkflowconfig.py | 85 ++++++++++++++++++-
|
||||
.../tests/files/upgrade_paths.json | 29 ++++---
|
||||
.../common/files/upgrade_paths.json | 36 +++++---
|
||||
6 files changed, 177 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/commands/command_utils.py b/commands/command_utils.py
|
||||
index 84b9de1b..a13ca59b 100644
|
||||
--- a/commands/command_utils.py
|
||||
+++ b/commands/command_utils.py
|
||||
@@ -71,15 +71,24 @@ def get_upgrade_flavour():
|
||||
return LEAPP_UPGRADE_FLAVOUR_DEFAULT
|
||||
|
||||
|
||||
+def _retrieve_os_release_contents(_os_release_path='/etc/os-release'):
|
||||
+ """
|
||||
+ Retrieve the contents of /etc/os-release
|
||||
+
|
||||
+ :rtype: dict[str, str]
|
||||
+ """
|
||||
+ with open(_os_release_path) as os_release_handle:
|
||||
+ lines = os_release_handle.readlines()
|
||||
+ return dict(line.strip().split('=', 1) for line in lines if '=' in line)
|
||||
+
|
||||
+
|
||||
def get_os_release_version_id(filepath):
|
||||
"""
|
||||
Retrieve data about System OS release from provided file.
|
||||
|
||||
:return: `str` version_id
|
||||
"""
|
||||
- with open(filepath) as f:
|
||||
- data = dict(l.strip().split('=', 1) for l in f.readlines() if '=' in l)
|
||||
- return data.get('VERSION_ID', '').strip('"')
|
||||
+ return _retrieve_os_release_contents(_os_release_path=filepath).get('VERSION_ID', '').strip('"')
|
||||
|
||||
|
||||
def get_upgrade_paths_config():
|
||||
@@ -92,13 +101,13 @@ def get_upgrade_paths_config():
|
||||
return upgrade_paths_map
|
||||
|
||||
|
||||
-def get_target_versions_from_config(src_version_id, flavor):
|
||||
+def get_target_versions_from_config(src_version_id, distro, flavor):
|
||||
"""
|
||||
Retrieve all possible target versions from upgrade_paths_map.
|
||||
If no match is found returns empty list.
|
||||
"""
|
||||
upgrade_paths_map = get_upgrade_paths_config()
|
||||
- return upgrade_paths_map.get(flavor, {}).get(src_version_id, [])
|
||||
+ return upgrade_paths_map.get(distro, {}).get(flavor, {}).get(src_version_id, [])
|
||||
|
||||
|
||||
def get_supported_target_versions(flavour=get_upgrade_flavour()):
|
||||
@@ -107,14 +116,17 @@ def get_supported_target_versions(flavour=get_upgrade_flavour()):
|
||||
The default value for `flavour` is `default`.
|
||||
"""
|
||||
|
||||
- current_version_id = get_os_release_version_id('/etc/os-release')
|
||||
- target_versions = get_target_versions_from_config(current_version_id, flavour)
|
||||
+ os_release_contents = _retrieve_os_release_contents()
|
||||
+ current_version_id = os_release_contents.get('VERSION_ID', '').strip('"')
|
||||
+ distro_id = os_release_contents.get('ID', '').strip('"')
|
||||
+
|
||||
+ target_versions = get_target_versions_from_config(current_version_id, distro_id, flavour)
|
||||
if not target_versions:
|
||||
# If we cannot find a particular major.minor version in the map,
|
||||
# we fallback to pick a target version just based on a major version.
|
||||
# This can happen for example when testing not yet released versions
|
||||
major_version = get_major_version(current_version_id)
|
||||
- target_versions = get_target_versions_from_config(major_version, flavour)
|
||||
+ target_versions = get_target_versions_from_config(major_version, distro_id, flavour)
|
||||
|
||||
return target_versions
|
||||
|
||||
diff --git a/commands/tests/test_upgrade_paths.py b/commands/tests/test_upgrade_paths.py
|
||||
index f1312f66..c2cb09aa 100644
|
||||
--- a/commands/tests/test_upgrade_paths.py
|
||||
+++ b/commands/tests/test_upgrade_paths.py
|
||||
@@ -8,19 +8,24 @@ from leapp.exceptions import CommandError
|
||||
|
||||
|
||||
@mock.patch("leapp.cli.commands.command_utils.get_upgrade_paths_config",
|
||||
- return_value={"default": {"7.9": ["8.4"], "8.6": ["9.0"], "7": ["8.4"], "8": ["9.0"]}})
|
||||
+ return_value={'rhel': {"default": {"7.9": ["8.4"], "8.6": ["9.0"], "7": ["8.4"], "8": ["9.0"]}}})
|
||||
def test_get_target_version(mock_open, monkeypatch):
|
||||
-
|
||||
- monkeypatch.setattr(command_utils, 'get_os_release_version_id', lambda x: '8.6')
|
||||
+ etc_os_release_contents = {'ID': 'rhel', 'VERSION_ID': '8.6'}
|
||||
+ monkeypatch.setattr(command_utils, '_retrieve_os_release_contents',
|
||||
+ lambda *args, **kwargs: etc_os_release_contents)
|
||||
assert command_utils.get_target_version('default') == '9.0'
|
||||
|
||||
monkeypatch.setenv('LEAPP_DEVEL_TARGET_RELEASE', '')
|
||||
- monkeypatch.setattr(command_utils, 'get_os_release_version_id', lambda x: '8.6')
|
||||
+ etc_os_release_contents = {'ID': 'rhel', 'VERSION_ID': '8.6'}
|
||||
+ monkeypatch.setattr(command_utils, '_retrieve_os_release_contents',
|
||||
+ lambda *args, **kwargs: etc_os_release_contents)
|
||||
assert command_utils.get_target_version('default') == '9.0'
|
||||
|
||||
monkeypatch.delenv('LEAPP_DEVEL_TARGET_RELEASE', raising=True)
|
||||
# unsupported path
|
||||
- monkeypatch.setattr(command_utils, 'get_os_release_version_id', lambda x: '8.5')
|
||||
+ etc_os_release_contents = {'ID': 'rhel', 'VERSION_ID': '8.5'}
|
||||
+ monkeypatch.setattr(command_utils, '_retrieve_os_release_contents',
|
||||
+ lambda *args, **kwargs: etc_os_release_contents)
|
||||
assert command_utils.get_target_version('default') == '9.0'
|
||||
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
index 86df709e..35f61669 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
@@ -1,9 +1,10 @@
|
||||
+import json
|
||||
import os
|
||||
import platform
|
||||
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
-from leapp.libraries.stdlib import CalledProcessError, run
|
||||
-from leapp.models import EnvVar, IPUConfig, OSRelease, Version
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
+from leapp.models import EnvVar, IPUConfig, IPUSourceToPossibleTargets, OSRelease, Version
|
||||
|
||||
ENV_IGNORE = ('LEAPP_CURRENT_PHASE', 'LEAPP_CURRENT_ACTOR', 'LEAPP_VERBOSE',
|
||||
'LEAPP_DEBUG')
|
||||
@@ -85,24 +86,34 @@ def check_target_major_version(curr_version, target_version):
|
||||
)
|
||||
|
||||
|
||||
-def load_raw_upgrade_paths_for_flavour(flavour='default', paths_definition_file='upgrade_paths.json'):
|
||||
+def load_upgrade_paths_definitions(paths_definition_file):
|
||||
with open(api.get_common_file_path(paths_definition_file)) as fp:
|
||||
- data = json.loads(fp.read())
|
||||
+ definitions = json.loads(fp.read())
|
||||
+ return definitions
|
||||
|
||||
- raw_upgrade_paths = data.get(flavour, {})
|
||||
|
||||
- if not raw_upgrade_paths:
|
||||
- api.current_logger().warning('Cannot discover any upgrade paths for flavour: {}'.format(flavour))
|
||||
+def load_raw_upgrade_paths_for_distro_and_flavour(distro_id, flavour, paths_definition_file='upgrade_paths.json'):
|
||||
+ all_definitions = load_upgrade_paths_definitions(paths_definition_file)
|
||||
+ raw_upgrade_paths_for_distro = all_definitions.get(distro_id, {})
|
||||
|
||||
- return raw_upgrade_paths
|
||||
+ if not raw_upgrade_paths_for_distro:
|
||||
+ api.current_logger().warning('No upgrade paths defined for distro \'{}\''.format(distro_id))
|
||||
+
|
||||
+ raw_upgrade_paths_for_flavour = raw_upgrade_paths_for_distro.get(flavour, {})
|
||||
+
|
||||
+ if not raw_upgrade_paths_for_flavour:
|
||||
+ api.current_logger().warning('Cannot discover any upgrade paths for flavour: {}/{}'.format(distro_id, flavour))
|
||||
+
|
||||
+ return raw_upgrade_paths_for_flavour
|
||||
|
||||
|
||||
def construct_models_for_paths_matching_source_major(raw_paths, src_major_version):
|
||||
multipaths_matching_source = []
|
||||
- for src_version, target_versions in ipu_paths.items():
|
||||
+ for src_version, target_versions in raw_paths.items():
|
||||
if src_version.split('.')[0] == src_major_version:
|
||||
- source_to_targets = IPUSourceToPossibleTargets(source_version=src_version, target_versions=target_versions)
|
||||
- multipaths_matching_source.append()
|
||||
+ source_to_targets = IPUSourceToPossibleTargets(source_version=src_version,
|
||||
+ target_versions=target_versions)
|
||||
+ multipaths_matching_source.append(source_to_targets)
|
||||
return multipaths_matching_source
|
||||
|
||||
|
||||
@@ -114,7 +125,7 @@ def produce_ipu_config(actor):
|
||||
|
||||
check_target_major_version(source_version, target_version)
|
||||
|
||||
- raw_upgrade_paths = load_raw_upgrade_paths_for_flavour(flavour)
|
||||
+ raw_upgrade_paths = load_raw_upgrade_paths_for_distro_and_flavour(os_release.release_id, flavour)
|
||||
source_major_version = source_version.split('.')[0]
|
||||
exposed_supported_paths = construct_models_for_paths_matching_source_major(raw_upgrade_paths, source_major_version)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
index a5e4d03b..d88424ce 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
@@ -7,7 +7,7 @@ import pytest
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.actor import ipuworkflowconfig
|
||||
from leapp.libraries.stdlib import CalledProcessError
|
||||
-from leapp.models import OSRelease
|
||||
+from leapp.models import IPUSourceToPossibleTargets, OSRelease
|
||||
|
||||
CUR_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -70,3 +70,86 @@ def test_get_booted_kernel(monkeypatch):
|
||||
monkeypatch.setattr(ipuworkflowconfig, 'run', _raise_call_error)
|
||||
with pytest.raises(StopActorExecutionError):
|
||||
ipuworkflowconfig.get_booted_kernel()
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('source_major_version', 'expected_result'),
|
||||
+ (
|
||||
+ ('7', []),
|
||||
+ (
|
||||
+ '8',
|
||||
+ [
|
||||
+ IPUSourceToPossibleTargets(source_version='8.10', target_versions=['9.4', '9.5', '9.6']),
|
||||
+ IPUSourceToPossibleTargets(source_version='8.4', target_versions=['9.2']),
|
||||
+ IPUSourceToPossibleTargets(source_version='8', target_versions=['9.4', '9.5', '9.6']),
|
||||
+ ]
|
||||
+ ),
|
||||
+ (
|
||||
+ '80',
|
||||
+ [
|
||||
+ IPUSourceToPossibleTargets(source_version='80.0', target_versions=['81.0']),
|
||||
+ ]
|
||||
+ ),
|
||||
+ )
|
||||
+)
|
||||
+def test_construct_models_for_paths_matching_source_major(source_major_version, expected_result):
|
||||
+ RAW_PATHS = {
|
||||
+ '8.10': ['9.4', '9.5', '9.6'],
|
||||
+ '8.4': ['9.2'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '8': ['9.4', '9.5', '9.6'],
|
||||
+ '80.0': ['81.0']
|
||||
+ }
|
||||
+
|
||||
+ result = ipuworkflowconfig.construct_models_for_paths_matching_source_major(RAW_PATHS, source_major_version)
|
||||
+ result = sorted(result, key=lambda x: x.source_version)
|
||||
+ assert result == sorted(expected_result, key=lambda x: x.source_version)
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('distro', 'flavour', 'expected_result'),
|
||||
+ (
|
||||
+ ('fedora', 'default', {}),
|
||||
+ (
|
||||
+ 'rhel', 'default',
|
||||
+ {
|
||||
+ '8.10': ['9.4', '9.5', '9.6'],
|
||||
+ '8.4': ['9.2'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '8': ['9.4', '9.5', '9.6'],
|
||||
+ '9': ['10.0']
|
||||
+ }
|
||||
+ ),
|
||||
+ (
|
||||
+ 'rhel', 'saphana',
|
||||
+ {
|
||||
+ '8.10': ['9.6', '9.4'],
|
||||
+ '8': ['9.6', '9.4'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '9': ['10.0']
|
||||
+ }
|
||||
+ ),
|
||||
+ )
|
||||
+)
|
||||
+def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flavour, expected_result):
|
||||
+ defined_upgrade_paths = {
|
||||
+ 'rhel': {
|
||||
+ 'default': {
|
||||
+ '8.10': ['9.4', '9.5', '9.6'],
|
||||
+ '8.4': ['9.2'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '8': ['9.4', '9.5', '9.6'],
|
||||
+ '9': ['10.0']
|
||||
+ },
|
||||
+ 'saphana': {
|
||||
+ '8.10': ['9.6', '9.4'],
|
||||
+ '8': ['9.6', '9.4'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '9': ['10.0']
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ monkeypatch.setattr(ipuworkflowconfig, 'load_upgrade_paths_definitions', lambda *args: defined_upgrade_paths)
|
||||
+
|
||||
+ result = ipuworkflowconfig.load_raw_upgrade_paths_for_distro_and_flavour(distro, flavour)
|
||||
+ assert result == expected_result
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json b/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
index edd32224..b6107376 100644
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
+++ b/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
@@ -1,15 +1,22 @@
|
||||
{
|
||||
- "default": {
|
||||
- "8.10": ["9.4", "9.5", "9.6"],
|
||||
- "8.4": ["9.2"],
|
||||
- "9.6": ["10.0"],
|
||||
- "8": ["9.4", "9.5", "9.6"],
|
||||
- "9": ["10.0"]
|
||||
+ "rhel": {
|
||||
+ "default": {
|
||||
+ "8.10": ["9.4", "9.5", "9.6"],
|
||||
+ "8.4": ["9.2"],
|
||||
+ "9.6": ["10.0"],
|
||||
+ "8": ["9.4", "9.5", "9.6"],
|
||||
+ "9": ["10.0"]
|
||||
+ },
|
||||
+ "saphana": {
|
||||
+ "8.10": ["9.6", "9.4"],
|
||||
+ "8": ["9.6", "9.4"],
|
||||
+ "9.6": ["10.0"],
|
||||
+ "9": ["10.0"]
|
||||
+ }
|
||||
},
|
||||
- "saphana": {
|
||||
- "8.10": ["9.6", "9.4"],
|
||||
- "8": ["9.6", "9.4"],
|
||||
- "9.6": ["10.0"],
|
||||
- "9": ["10.0"]
|
||||
+ "centos": {
|
||||
+ "default": {
|
||||
+ "8": ["9"]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
diff --git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
index 1c54dae8..7ace7943 100644
|
||||
--- a/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
+++ b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
@@ -1,18 +1,26 @@
|
||||
{
|
||||
- "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"]
|
||||
+ "rhel": {
|
||||
+ "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"],
|
||||
+ "9.6": ["10.0"],
|
||||
+ "9": ["10.0"]
|
||||
+ }
|
||||
},
|
||||
- "saphana": {
|
||||
- "7.9": ["8.10"],
|
||||
- "7": ["8.10"],
|
||||
- "8.10": ["9.6", "9.4"],
|
||||
- "8": ["9.6", "9.4"],
|
||||
- "9.6": ["10.0"],
|
||||
- "9": ["10.0"]
|
||||
+ "centos": {
|
||||
+ "default": {
|
||||
+ "8": ["9"],
|
||||
+ "9": ["10"]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,114 +0,0 @@
|
||||
From 18fa991962cb1198173f0ad08a34de27467c32fe Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 23 Feb 2026 13:59:35 +0100
|
||||
Subject: [PATCH 16/44] rocecheck: Respect distro name in report
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../actors/rocecheck/libraries/rocecheck.py | 81 ++++++++++---------
|
||||
1 file changed, 44 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/rocecheck/libraries/rocecheck.py b/repos/system_upgrade/el8toel9/actors/rocecheck/libraries/rocecheck.py
|
||||
index 0ed2046a..5014a8db 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/rocecheck/libraries/rocecheck.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/rocecheck/libraries/rocecheck.py
|
||||
@@ -1,6 +1,7 @@
|
||||
from leapp import reporting
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
-from leapp.libraries.common.config import architecture
|
||||
+from leapp.libraries.common.config import architecture, get_target_distro_id
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import KernelCmdline, RoceDetected
|
||||
|
||||
@@ -40,45 +41,51 @@ def _fmt_list(items):
|
||||
def _report_wrong_setup(roce):
|
||||
roce_nics = roce.roce_nics_connected + roce.roce_nics_connecting
|
||||
|
||||
+ summary = (
|
||||
+ 'The {target_distro} 9 system uses different network schemes for NIC names'
|
||||
+ ' than {source_distro} 8.'
|
||||
+ ' The below listed RoCE NICs need to be reconfigured to the new'
|
||||
+ ' interface naming scheme in order to prevent loss of network'
|
||||
+ ' access to your system via these interfaces after the upgrade.'
|
||||
+ ' For more information, see: {url}'
|
||||
+ '\n\nRoCE detected on the following NICs:{nics}'
|
||||
+ ).format(
|
||||
+ nics=_fmt_list(roce_nics),
|
||||
+ url=DOC_URL,
|
||||
+ **DISTRO_REPORT_NAMES,
|
||||
+ )
|
||||
+ remmediation_hint = (
|
||||
+ 'Prerequisite for upgrading to {target_distro} {target_version}:'
|
||||
+ 'In {source_distro} 8, all RoCE cards must be configured with the interface'
|
||||
+ ' names they should have in {target_distro} {target_version}.\n'
|
||||
+ 'For more information, see chapter 1.4 of the RHEL 8 Product'
|
||||
+ ' Documentation (see the attached link) and follow these steps:\n'
|
||||
+ '1.) determine the current interface device names of the RoCE'
|
||||
+ ' cards that are in "connected to" or in "connecting" state\n'
|
||||
+ '2.) determine if UID uniqueness is set for these cards\n'
|
||||
+ '3.) compute new interface device names from the UID or the'
|
||||
+ ' function ID, respectively\n'
|
||||
+ '4.) change the network interface device names in ifcfg'
|
||||
+ ' files\n'
|
||||
+ '5.) set the kernel parameter net.naming-scheme=rhel-8.7 in the'
|
||||
+ ' effective .conf file in /boot/loader/entries\n'
|
||||
+ '6.) adjust other settings that rely on the interface device names'
|
||||
+ ' (e.g. firewall) by changing the interface device names'
|
||||
+ ' accordingly\n'
|
||||
+ '7.) run `zipl -V` and reboot the system\n'
|
||||
+ '8.) check your network connectivity\n'
|
||||
+ '\n'
|
||||
+ 'Caution: Creating an incorrect configuration might cause the loss'
|
||||
+ ' of your network connection after reboot!'
|
||||
+ ).format(
|
||||
+ target_version="9" if get_target_distro_id() == "centos" else "9.x",
|
||||
+ **DISTRO_REPORT_NAMES,
|
||||
+ )
|
||||
|
||||
-def _report_wrong_setup(roce):
|
||||
- roce_nics = roce.roce_nics_connected + roce.roce_nics_connecting
|
||||
reporting.create_report([
|
||||
reporting.Title('Invalid RoCE configuration for the in-place upgrade'),
|
||||
- reporting.Summary(
|
||||
- 'The RHEL 9 system uses different network schemes for NIC names'
|
||||
- ' than RHEL 8.'
|
||||
- ' The below listed RoCE NICs need to be reconfigured to the new'
|
||||
- ' interface naming scheme in order to prevent loss of network'
|
||||
- ' access to your system via these interfaces after the upgrade.'
|
||||
- ' For more information, see: {url}'
|
||||
- '\n\nRoCE detected on the following NICs:{nics}'
|
||||
- .format(nics=_fmt_list(roce_nics), url=DOC_URL)
|
||||
- ),
|
||||
- reporting.Remediation(hint=(
|
||||
- 'Prerequisite for upgrading to RHEL9.x:'
|
||||
- 'In RHEL 8, all RoCE cards must be configured with the interface'
|
||||
- ' names they should have in RHEL9.x.\n'
|
||||
- 'For more information, see chapter 1.4 of the RHEL8 Product'
|
||||
- ' Documentation (see the attached link) and follow these steps:\n'
|
||||
- '1.) determine the current interface device names of the RoCE'
|
||||
- ' cards that are in "connected to" or in "connecting" state\n'
|
||||
- '2.) determine if UID uniqueness is set for these cards\n'
|
||||
- '3.) compute new interface device names from the UID or the'
|
||||
- ' function ID, respectively\n'
|
||||
- '4.) change the network interface device names in ifcfg'
|
||||
- ' files\n'
|
||||
- '5.) set the kernel parameter net.naming-scheme=rhel-8.7 in the'
|
||||
- ' effective .conf file in /boot/loader/entries\n'
|
||||
- '6.) adjust other settings that rely on the interface device names'
|
||||
- ' (e.g. firewall) by changing the interface device names'
|
||||
- ' accordingly\n'
|
||||
- '7.) run `zipl -V` and reboot the system\n'
|
||||
- '8.) check your network connectivity\n'
|
||||
- '\n'
|
||||
- 'Caution: Creating an incorrect configuration might cause the loss'
|
||||
- ' of your network connection after reboot!'
|
||||
- )),
|
||||
+ reporting.Summary(summary),
|
||||
+ reporting.Remediation(hint=remmediation_hint),
|
||||
reporting.ExternalLink(
|
||||
title='Predictable network interface device names on the System z platform',
|
||||
url=DOC_URL),
|
||||
--
|
||||
2.53.0
|
||||
|
||||
407
SOURCES/0017-cleanup-ipupaths-remove-IPUPaths-message.patch
Normal file
407
SOURCES/0017-cleanup-ipupaths-remove-IPUPaths-message.patch
Normal file
@ -0,0 +1,407 @@
|
||||
From 4432e62f02af820d040f45d7fc59296cf734bdc5 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Sat, 29 Mar 2025 22:00:38 +0100
|
||||
Subject: [PATCH 17/37] cleanup(ipupaths): remove IPUPaths message
|
||||
|
||||
Drop the already deprecated IPUPaths message that was used to inform
|
||||
actors about supported upgrade paths. Instead, the functionality has
|
||||
been assumed by IPUConfig.
|
||||
|
||||
Jira-ref: RHEL-80550
|
||||
---
|
||||
.../common/actors/checktargetversion/actor.py | 3 +-
|
||||
.../libraries/checktargetversion.py | 15 +--
|
||||
.../tests/test_checktargetversion.py | 27 +++---
|
||||
.../actors/scandefinedipupaths/actor.py | 31 ------
|
||||
.../libraries/scandefinedipupaths.py | 43 --------
|
||||
.../tests/files/upgrade_paths.json | 22 -----
|
||||
.../tests/test_scandefinedipupaths.py | 97 -------------------
|
||||
.../system_upgrade/common/models/ipupaths.py | 43 --------
|
||||
8 files changed, 17 insertions(+), 264 deletions(-)
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scandefinedipupaths/actor.py
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scandefinedipupaths/libraries/scandefinedipupaths.py
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scandefinedipupaths/tests/test_scandefinedipupaths.py
|
||||
delete mode 100644 repos/system_upgrade/common/models/ipupaths.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checktargetversion/actor.py b/repos/system_upgrade/common/actors/checktargetversion/actor.py
|
||||
index 291ce3da..31375bfc 100644
|
||||
--- a/repos/system_upgrade/common/actors/checktargetversion/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checktargetversion/actor.py
|
||||
@@ -1,6 +1,5 @@
|
||||
from leapp.actors import Actor
|
||||
from leapp.libraries.actor import checktargetversion
|
||||
-from leapp.models import IPUPaths
|
||||
from leapp.reporting import Report
|
||||
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
@@ -14,7 +13,7 @@ class CheckTargetVersion(Actor):
|
||||
"""
|
||||
|
||||
name = 'check_target_version'
|
||||
- consumes = (IPUPaths,)
|
||||
+ consumes = ()
|
||||
produces = (Report,)
|
||||
tags = (ChecksPhaseTag, IPUWorkflowTag)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checktargetversion/libraries/checktargetversion.py b/repos/system_upgrade/common/actors/checktargetversion/libraries/checktargetversion.py
|
||||
index 0df1ece2..2369ae11 100644
|
||||
--- a/repos/system_upgrade/common/actors/checktargetversion/libraries/checktargetversion.py
|
||||
+++ b/repos/system_upgrade/common/actors/checktargetversion/libraries/checktargetversion.py
|
||||
@@ -1,22 +1,15 @@
|
||||
from leapp import reporting
|
||||
-from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.common.config import get_env, version
|
||||
from leapp.libraries.stdlib import api
|
||||
-from leapp.models import IPUPaths
|
||||
-from leapp.utils.deprecation import suppress_deprecation
|
||||
|
||||
FMT_LIST_SEPARATOR = '\n - '
|
||||
|
||||
|
||||
-@suppress_deprecation(IPUPaths)
|
||||
def get_supported_target_versions():
|
||||
- ipu_paths = next(api.consume(IPUPaths), None)
|
||||
src_version = version.get_source_version()
|
||||
- if not ipu_paths:
|
||||
- # NOTE: missing unit-tests. Unexpected situation and the solution
|
||||
- # is possibly temporary
|
||||
- raise StopActorExecutionError('Missing the IPUPaths message. Cannot determine defined upgrade paths.')
|
||||
- for ipu_path in ipu_paths.data:
|
||||
+ supported_paths = api.current_actor().configuration.supported_upgrade_paths
|
||||
+
|
||||
+ for ipu_path in supported_paths:
|
||||
if ipu_path.source_version == src_version:
|
||||
return ipu_path.target_versions
|
||||
|
||||
@@ -28,7 +21,7 @@ def get_supported_target_versions():
|
||||
.format(src_version)
|
||||
)
|
||||
maj_version = version.get_source_major_version()
|
||||
- for ipu_path in ipu_paths.data:
|
||||
+ for ipu_path in supported_paths:
|
||||
if ipu_path.source_version == maj_version:
|
||||
return ipu_path.target_versions
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checktargetversion/tests/test_checktargetversion.py b/repos/system_upgrade/common/actors/checktargetversion/tests/test_checktargetversion.py
|
||||
index 07391e7a..6927af23 100644
|
||||
--- a/repos/system_upgrade/common/actors/checktargetversion/tests/test_checktargetversion.py
|
||||
+++ b/repos/system_upgrade/common/actors/checktargetversion/tests/test_checktargetversion.py
|
||||
@@ -4,36 +4,33 @@ import pytest
|
||||
|
||||
from leapp import reporting
|
||||
from leapp.libraries.actor import checktargetversion
|
||||
+from leapp.libraries.common.config import architecture
|
||||
from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked, logger_mocked
|
||||
from leapp.libraries.stdlib import api
|
||||
-from leapp.models import IPUPath, IPUPaths
|
||||
+from leapp.models import IPUSourceToPossibleTargets
|
||||
from leapp.utils.deprecation import suppress_deprecation
|
||||
from leapp.utils.report import is_inhibitor
|
||||
|
||||
|
||||
-# It must be in a function so we can suppress the deprecation warning in tests.
|
||||
-@suppress_deprecation(IPUPaths)
|
||||
-def _get_upgrade_paths_data():
|
||||
- return IPUPaths(data=[
|
||||
- IPUPath(source_version='7.9', target_versions=['8.10']),
|
||||
- IPUPath(source_version='8.10', target_versions=['9.4', '9.5', '9.6']),
|
||||
- IPUPath(source_version='9.6', target_versions=['10.0']),
|
||||
- IPUPath(source_version='7', target_versions=['8.10']),
|
||||
- IPUPath(source_version='8', target_versions=['9.4', '9.5', '9.6']),
|
||||
- IPUPath(source_version='9', target_versions=['10.0'])
|
||||
- ])
|
||||
-
|
||||
-
|
||||
@pytest.fixture
|
||||
def setup_monkeypatch(monkeypatch):
|
||||
"""Fixture to set up common monkeypatches."""
|
||||
|
||||
def _setup(source_version, target_version, leapp_unsupported='0'):
|
||||
+ suppoted_upgrade_paths = [
|
||||
+ IPUSourceToPossibleTargets(source_version='7.9', target_versions=['8.10']),
|
||||
+ IPUSourceToPossibleTargets(source_version='8.10', target_versions=['9.4', '9.5', '9.6']),
|
||||
+ IPUSourceToPossibleTargets(source_version='9.6', target_versions=['10.0']),
|
||||
+ IPUSourceToPossibleTargets(source_version='7', target_versions=['8.10']),
|
||||
+ IPUSourceToPossibleTargets(source_version='8', target_versions=['9.4', '9.5', '9.6']),
|
||||
+ IPUSourceToPossibleTargets(source_version='9', target_versions=['10.0'])
|
||||
+ ]
|
||||
+
|
||||
curr_actor_mocked = CurrentActorMocked(
|
||||
src_ver=source_version,
|
||||
dst_ver=target_version,
|
||||
envars={'LEAPP_UNSUPPORTED': leapp_unsupported},
|
||||
- msgs=[_get_upgrade_paths_data()]
|
||||
+ supported_upgrade_paths=suppoted_upgrade_paths
|
||||
)
|
||||
monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
monkeypatch.setattr(api, 'current_logger', logger_mocked())
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/actor.py b/repos/system_upgrade/common/actors/scandefinedipupaths/actor.py
|
||||
deleted file mode 100644
|
||||
index a84c85f2..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/actor.py
|
||||
+++ /dev/null
|
||||
@@ -1,31 +0,0 @@
|
||||
-from leapp.actors import Actor
|
||||
-from leapp.libraries.actor import scandefinedipupaths
|
||||
-from leapp.models import IPUPaths
|
||||
-from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
-
|
||||
-
|
||||
-class ScanDefinedIPUPaths(Actor):
|
||||
- """
|
||||
- Load defined IPU paths for the current major source system version
|
||||
- and defined upgrade flavour.
|
||||
-
|
||||
- The upgrade paths are defined inside `files/upgrade_paths.json`.
|
||||
- Based on the defined upgrade flavour (default, saphana, ..) loads particular
|
||||
- definitions and filter out all upgrade paths from other system major versions.
|
||||
- I.e. for RHEL 8.10 system with the default upgrade flavour, load all upgrade
|
||||
- paths from any RHEL 8 system defined under the 'default' flavour.
|
||||
-
|
||||
- The code is mostly taken from the CLI command_utils. The duplicate solution
|
||||
- is not so problematic now as it will be unified next time.
|
||||
-
|
||||
- Note the deprecation suppression is expected here as this is considered as
|
||||
- temporary solution now.
|
||||
- """
|
||||
-
|
||||
- name = 'scan_defined_ipu_paths'
|
||||
- consumes = ()
|
||||
- produces = (IPUPaths,)
|
||||
- tags = (IPUWorkflowTag, FactsPhaseTag)
|
||||
-
|
||||
- def process(self):
|
||||
- scandefinedipupaths.process()
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/libraries/scandefinedipupaths.py b/repos/system_upgrade/common/actors/scandefinedipupaths/libraries/scandefinedipupaths.py
|
||||
deleted file mode 100644
|
||||
index 1e39f2c8..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/libraries/scandefinedipupaths.py
|
||||
+++ /dev/null
|
||||
@@ -1,43 +0,0 @@
|
||||
-import json
|
||||
-
|
||||
-from leapp.libraries.common.config.version import get_source_major_version
|
||||
-from leapp.libraries.stdlib import api
|
||||
-from leapp.models import IPUPath, IPUPaths
|
||||
-from leapp.utils.deprecation import suppress_deprecation
|
||||
-
|
||||
-
|
||||
-def load_ipu_paths_for_flavour(flavour, _filename='upgrade_paths.json'):
|
||||
- """
|
||||
- Load defined IPU paths from the upgrade_paths.json file for the specified
|
||||
- flavour.
|
||||
-
|
||||
- Note the file is required to be always present, so skipping any test
|
||||
- for the missing file. Crash hard and terribly if the file is missing
|
||||
- or the content is invalid.
|
||||
-
|
||||
- We expect the flavour to be always good as it is under our control
|
||||
- (already sanitized in IPUConfig), but return empty dict and log it if missing.
|
||||
- """
|
||||
- with open(api.get_common_file_path(_filename)) as fp:
|
||||
- data = json.loads(fp.read())
|
||||
- if flavour not in data:
|
||||
- api.current_logger().warning(
|
||||
- 'Cannot discover any upgrade paths for flavour: {}'
|
||||
- .format(flavour)
|
||||
- )
|
||||
- return data.get(flavour, {})
|
||||
-
|
||||
-
|
||||
-def get_filtered_ipu_paths(ipu_paths, src_major_version):
|
||||
- result = []
|
||||
- for src_version, tgt_versions in ipu_paths.items():
|
||||
- if src_version.split('.')[0] == src_major_version:
|
||||
- result.append(IPUPath(source_version=src_version, target_versions=tgt_versions))
|
||||
- return result
|
||||
-
|
||||
-
|
||||
-@suppress_deprecation(IPUPaths)
|
||||
-def process():
|
||||
- flavour = api.current_actor().configuration.flavour
|
||||
- ipu_paths = load_ipu_paths_for_flavour(flavour)
|
||||
- api.produce(IPUPaths(data=get_filtered_ipu_paths(ipu_paths, get_source_major_version())))
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json b/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
deleted file mode 100644
|
||||
index b6107376..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
+++ /dev/null
|
||||
@@ -1,22 +0,0 @@
|
||||
-{
|
||||
- "rhel": {
|
||||
- "default": {
|
||||
- "8.10": ["9.4", "9.5", "9.6"],
|
||||
- "8.4": ["9.2"],
|
||||
- "9.6": ["10.0"],
|
||||
- "8": ["9.4", "9.5", "9.6"],
|
||||
- "9": ["10.0"]
|
||||
- },
|
||||
- "saphana": {
|
||||
- "8.10": ["9.6", "9.4"],
|
||||
- "8": ["9.6", "9.4"],
|
||||
- "9.6": ["10.0"],
|
||||
- "9": ["10.0"]
|
||||
- }
|
||||
- },
|
||||
- "centos": {
|
||||
- "default": {
|
||||
- "8": ["9"]
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/test_scandefinedipupaths.py b/repos/system_upgrade/common/actors/scandefinedipupaths/tests/test_scandefinedipupaths.py
|
||||
deleted file mode 100644
|
||||
index 9ffc9829..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/test_scandefinedipupaths.py
|
||||
+++ /dev/null
|
||||
@@ -1,97 +0,0 @@
|
||||
-import json
|
||||
-import os
|
||||
-
|
||||
-import pytest
|
||||
-
|
||||
-from leapp.libraries.actor import scandefinedipupaths
|
||||
-from leapp.libraries.common.testutils import CurrentActorMocked, produce_mocked
|
||||
-from leapp.models import IPUPath, IPUPaths
|
||||
-from leapp.utils.deprecation import suppress_deprecation
|
||||
-
|
||||
-CUR_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
-
|
||||
-
|
||||
-class CurrentActorMockedModified(CurrentActorMocked):
|
||||
- def get_common_file_path(self, fname):
|
||||
- fpath = os.path.join(CUR_DIR, 'files', fname)
|
||||
- assert os.path.exists(fpath)
|
||||
- if os.path.exists(fpath):
|
||||
- return fpath
|
||||
- return None
|
||||
-
|
||||
-
|
||||
-@pytest.mark.parametrize(('flavour', 'expected_result'), (
|
||||
- ('nonsense', {}),
|
||||
- (
|
||||
- 'default',
|
||||
- {
|
||||
- '8.10': ['9.4', '9.5', '9.6'],
|
||||
- '8.4': ['9.2'],
|
||||
- '9.6': ['10.0'],
|
||||
- '8': ['9.4', '9.5', '9.6'],
|
||||
- '9': ['10.0']
|
||||
- }
|
||||
- ),
|
||||
- (
|
||||
- 'saphana',
|
||||
- {
|
||||
- '8.10': ['9.6', '9.4'],
|
||||
- '8': ['9.6', '9.4'],
|
||||
- '9.6': ['10.0'],
|
||||
- '9': ['10.0']
|
||||
- }
|
||||
- ),
|
||||
-))
|
||||
-def test_load_ipu_paths_for_flavour(monkeypatch, flavour, expected_result):
|
||||
- monkeypatch.setattr(scandefinedipupaths.api, 'current_actor', CurrentActorMockedModified())
|
||||
-
|
||||
- result = scandefinedipupaths.load_ipu_paths_for_flavour(flavour=flavour)
|
||||
- assert result == expected_result
|
||||
-
|
||||
-
|
||||
-_DATA_IPU_PATHS = {
|
||||
- '8.10': ['9.4', '9.5', '9.6'],
|
||||
- '8.4': ['9.2'],
|
||||
- '9.6': ['10.0'],
|
||||
- '8': ['9.4', '9.5', '9.6'],
|
||||
- '80.0': ['81.0']
|
||||
-}
|
||||
-
|
||||
-
|
||||
-@suppress_deprecation(IPUPaths)
|
||||
-@pytest.mark.parametrize(('maj_version', 'expected_result'), (
|
||||
- ('7', []),
|
||||
- (
|
||||
- '8',
|
||||
- [
|
||||
- IPUPath(source_version='8.10', target_versions=['9.4', '9.5', '9.6']),
|
||||
- IPUPath(source_version='8.4', target_versions=['9.2']),
|
||||
- IPUPath(source_version='8', target_versions=['9.4', '9.5', '9.6']),
|
||||
- ]
|
||||
- ),
|
||||
- (
|
||||
- '80',
|
||||
- [
|
||||
- IPUPath(source_version='80.0', target_versions=['81.0']),
|
||||
- ]
|
||||
- ),
|
||||
-
|
||||
-
|
||||
-))
|
||||
-def test_get_filtered_ipu_paths(monkeypatch, maj_version, expected_result):
|
||||
- result = scandefinedipupaths.get_filtered_ipu_paths(_DATA_IPU_PATHS, maj_version)
|
||||
- result = sorted(result, key=lambda x: x.source_version)
|
||||
- assert result == sorted(expected_result, key=lambda x: x.source_version)
|
||||
-
|
||||
-
|
||||
-def test_scan_defined_ipu_paths(monkeypatch):
|
||||
- # let's try one 'full' happy run
|
||||
- monkeypatch.setattr(scandefinedipupaths.api, 'current_actor', CurrentActorMockedModified(src_ver='9.6'))
|
||||
- monkeypatch.setattr(scandefinedipupaths.api, 'produce', produce_mocked())
|
||||
- scandefinedipupaths.process()
|
||||
-
|
||||
- assert scandefinedipupaths.api.produce.called == 1
|
||||
- msg = scandefinedipupaths.api.produce.model_instances[0]
|
||||
- assert isinstance(msg, IPUPaths)
|
||||
- assert len(msg.data) == 2
|
||||
- assert {i.source_version for i in msg.data} == {'9', '9.6'}
|
||||
diff --git a/repos/system_upgrade/common/models/ipupaths.py b/repos/system_upgrade/common/models/ipupaths.py
|
||||
deleted file mode 100644
|
||||
index 5469f25e..00000000
|
||||
--- a/repos/system_upgrade/common/models/ipupaths.py
|
||||
+++ /dev/null
|
||||
@@ -1,43 +0,0 @@
|
||||
-from leapp.models import fields, Model
|
||||
-from leapp.topics import SystemInfoTopic
|
||||
-from leapp.utils.deprecation import deprecated
|
||||
-
|
||||
-
|
||||
-class IPUPath(Model):
|
||||
- """
|
||||
- Represent upgrade paths from a source system version.
|
||||
-
|
||||
- This model is not supposed to be produced nor consumed directly by any actor.
|
||||
- See `IPUPaths` instead.
|
||||
- """
|
||||
- topic = SystemInfoTopic
|
||||
-
|
||||
- source_version = fields.String()
|
||||
- """Version of a particular source system."""
|
||||
-
|
||||
- target_versions = fields.List(fields.String())
|
||||
- """List of defined target system versions for the `source_version` system."""
|
||||
-
|
||||
-
|
||||
-@deprecated(
|
||||
- since="2025-02-01",
|
||||
- message="This model is temporary and not assumed to be used in any actors."
|
||||
-)
|
||||
-class IPUPaths(Model):
|
||||
- """
|
||||
- Defined Upgrade paths from the source system major version and used upgrade flavour.
|
||||
-
|
||||
- In example for the RHEL 8.10 system with the 'default' upgrade flavour it will
|
||||
- contain information about all defined upgrade paths from any RHEL 8 system
|
||||
- for the 'default' flavour (other flavour can be e.g. 'saphana' for systems
|
||||
- with SAP HANA installed.
|
||||
-
|
||||
- Note this model is marked as deprecated now as it is considered as a temporary
|
||||
- solution. It can be removed in any future release!
|
||||
- """
|
||||
- topic = SystemInfoTopic
|
||||
-
|
||||
- data = fields.List(fields.Model(IPUPath))
|
||||
- """
|
||||
- List of defined (filtered) upgrade paths.
|
||||
- """
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,101 +0,0 @@
|
||||
From 71aa340ff3c2b5b9cd25e0aa731ace1b87e46d7f Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 23 Feb 2026 14:15:18 +0100
|
||||
Subject: [PATCH 17/44] opensshpermitrootlogincheck: Remove 7to8 related code
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../opensshpermitrootlogincheck/actor.py | 64 +------------------
|
||||
1 file changed, 2 insertions(+), 62 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py b/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
index 98d329ab..3aedfd5e 100644
|
||||
--- a/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
@@ -1,7 +1,7 @@
|
||||
from leapp import reporting
|
||||
from leapp.actors import Actor
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
-from leapp.libraries.actor.opensshpermitrootlogincheck import global_value, semantics_changes
|
||||
+from leapp.libraries.actor.opensshpermitrootlogincheck import global_value
|
||||
from leapp.libraries.common.config.version import get_source_major_version
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import OpenSshConfig, Report
|
||||
@@ -46,73 +46,13 @@ class OpenSshPermitRootLoginCheck(Actor):
|
||||
'Could not check openssh configuration', details={'details': 'No OpenSshConfig facts found.'}
|
||||
)
|
||||
|
||||
- if get_source_major_version() == '7':
|
||||
- self.process7to8(config)
|
||||
- elif get_source_major_version() == '8':
|
||||
+ if get_source_major_version() == '8':
|
||||
self.process8to9(config)
|
||||
elif int(get_source_major_version()) >= 9:
|
||||
pass
|
||||
else:
|
||||
api.current_logger().warning('Unknown source major version: {}'.format(get_source_major_version()))
|
||||
|
||||
- @staticmethod
|
||||
- def process7to8(config):
|
||||
- # when the config was not modified, we can pass this check and let the
|
||||
- # rpm handle the configuration file update
|
||||
- if not config.modified:
|
||||
- return
|
||||
-
|
||||
- # When the configuration does not contain *any* PermitRootLogin directive and
|
||||
- # the configuration file was locally modified, it will not get updated by
|
||||
- # RPM and the user might be locked away from the server with new default
|
||||
- if not config.permit_root_login:
|
||||
- create_report([
|
||||
- reporting.Title('Possible problems with remote login using root account'),
|
||||
- reporting.Summary(
|
||||
- 'OpenSSH configuration file does not explicitly state '
|
||||
- 'the option PermitRootLogin in sshd_config file, '
|
||||
- 'which will default in RHEL8 to "prohibit-password".'
|
||||
- ),
|
||||
- reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups(COMMON_REPORT_TAGS),
|
||||
- reporting.Remediation(
|
||||
- hint='If you depend on remote root logins using passwords, consider '
|
||||
- 'setting up a different user for remote administration or adding '
|
||||
- '"PermitRootLogin yes" to sshd_config. '
|
||||
- 'If this change is ok for you, add explicit '
|
||||
- '"PermitRootLogin prohibit-password" to your sshd_config '
|
||||
- 'to ignore this inhibitor'
|
||||
- ),
|
||||
- reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
- ] + COMMON_RESOURCES)
|
||||
- return
|
||||
-
|
||||
- # Check if there is at least one PermitRootLogin other than "no"
|
||||
- # in match blocks (other than Match All).
|
||||
- # This usually means some more complicated setup depending on the
|
||||
- # default value being globally "yes" and being overwritten by this
|
||||
- # match block
|
||||
- if semantics_changes(config):
|
||||
- create_report([
|
||||
- reporting.Title('OpenSSH configured to allow root login'),
|
||||
- reporting.Summary(
|
||||
- 'OpenSSH is configured to deny root logins in match '
|
||||
- 'blocks, but not explicitly enabled in global or '
|
||||
- '"Match all" context. This update changes the '
|
||||
- 'default to disable root logins using passwords '
|
||||
- 'so your server might get inaccessible.'
|
||||
- ),
|
||||
- reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups(COMMON_REPORT_TAGS),
|
||||
- reporting.Remediation(
|
||||
- hint='Consider using different user for administrative '
|
||||
- 'logins or make sure your configuration file '
|
||||
- 'contains the line "PermitRootLogin yes" '
|
||||
- 'in global context if desired.'
|
||||
- ),
|
||||
- reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
- ] + COMMON_RESOURCES)
|
||||
-
|
||||
@staticmethod
|
||||
def process8to9(config):
|
||||
# RHEL8 default sshd configuration file is not modified: It will get replaced by rpm and
|
||||
--
|
||||
2.53.0
|
||||
|
||||
123
SOURCES/0018-libs-version-use-supported_upgrade_paths.patch
Normal file
123
SOURCES/0018-libs-version-use-supported_upgrade_paths.patch
Normal file
@ -0,0 +1,123 @@
|
||||
From 09ef3dee08656058d9ac4b9c69d6848b2eae6dfb Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 31 Mar 2025 09:56:58 +0200
|
||||
Subject: [PATCH 18/37] libs(version): use supported_upgrade_paths
|
||||
|
||||
Refactor the config.version library to use actor.configuration to obtain
|
||||
the list of supported upgrade paths instead of having its own (duplicit)
|
||||
definitions.
|
||||
|
||||
Mark leapp.libraries.common.config.version.SUPPORTED_VERSIONS as
|
||||
deprecated and update the documentation.
|
||||
|
||||
Jira-ref: RHEL-80550
|
||||
---
|
||||
.../libraries-and-api/deprecations-list.md | 3 +-
|
||||
.../libraries/config/tests/test_version.py | 28 +++++++++----------
|
||||
.../common/libraries/config/version.py | 23 +++++++++------
|
||||
3 files changed, 31 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/docs/source/libraries-and-api/deprecations-list.md b/docs/source/libraries-and-api/deprecations-list.md
|
||||
index 07cbf1d6..c8489af3 100644
|
||||
--- a/docs/source/libraries-and-api/deprecations-list.md
|
||||
+++ b/docs/source/libraries-and-api/deprecations-list.md
|
||||
@@ -14,7 +14,8 @@ Only the versions in which a deprecation has been made are listed.
|
||||
|
||||
## Next release <span style="font-size:0.5em; font-weight:normal">(till TODO date)</span>
|
||||
|
||||
-- No new deprecation yet
|
||||
+- Shared libraries
|
||||
+ - **`leapp.libraries.common.config.version.SUPPORTED_VERSIONS`** - The `SUPPORTED_VERSIONS` dict has been deprecated as it is problematic with the new design. Use `leapp.libraries.common.config.version.is_supported_version()` or `IPUConfig.supported_upgrade_paths` instead.
|
||||
|
||||
## v0.20.0 <span style="font-size:0.5em; font-weight:normal">(till September 2024)</span>
|
||||
- Models
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index 303e4de5..37a91c00 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -3,6 +3,7 @@ import pytest
|
||||
from leapp.libraries.common.config import version
|
||||
from leapp.libraries.common.testutils import CurrentActorMocked
|
||||
from leapp.libraries.stdlib import api
|
||||
+from leapp.models import IPUSourceToPossibleTargets
|
||||
from leapp.utils.deprecation import suppress_deprecation
|
||||
|
||||
|
||||
@@ -92,21 +93,20 @@ def test_is_rhel_alt(monkeypatch, result, kernel, release_id, src_ver):
|
||||
assert version.is_rhel_alt() == result
|
||||
|
||||
|
||||
-@pytest.mark.parametrize('result,is_alt,src_ver,saphana', [
|
||||
- (True, True, '7.6', False),
|
||||
- (True, False, '7.8', False),
|
||||
- (False, True, '7.8', False),
|
||||
- (False, False, '7.6', False),
|
||||
- (True, True, '7.6', True),
|
||||
- (True, False, '7.7', True),
|
||||
- (False, True, '7.7', True),
|
||||
- (False, False, '7.6', True),
|
||||
+@pytest.mark.parametrize('result,src_ver,is_saphana', [
|
||||
+ (True, '7.8', False), # default rhel
|
||||
+ (False, '7.6', False),
|
||||
+ (True, '7.7', True), # saphana
|
||||
+ (False, '7.6', True),
|
||||
])
|
||||
-def test_is_supported_version(monkeypatch, result, is_alt, src_ver, saphana):
|
||||
- monkeypatch.setattr(version, 'is_rhel_alt', lambda: is_alt)
|
||||
- monkeypatch.setattr(version, 'is_sap_hana_flavour', lambda: saphana)
|
||||
- monkeypatch.setattr(version, 'SUPPORTED_VERSIONS', {'rhel': ['7.8'], 'rhel-alt': ['7.6'], 'rhel-saphana': ['7.7']})
|
||||
- monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(src_ver=src_ver))
|
||||
+def test_is_supported_version(monkeypatch, result, src_ver, is_saphana):
|
||||
+ if is_saphana:
|
||||
+ supported_upgrade_paths = [IPUSourceToPossibleTargets(source_version='7.7', target_versions=['8.10'])]
|
||||
+ else:
|
||||
+ supported_upgrade_paths = [IPUSourceToPossibleTargets(source_version='7.8', target_versions=['8.10'])]
|
||||
+
|
||||
+ actor_mock = CurrentActorMocked(src_ver=src_ver, supported_upgrade_paths=supported_upgrade_paths)
|
||||
+ monkeypatch.setattr(api, 'current_actor', actor_mock)
|
||||
assert version.is_supported_version() == result
|
||||
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index febeed36..b8fc550b 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -126,6 +126,12 @@ class _SupportedVersionsDict(dict):
|
||||
|
||||
|
||||
SUPPORTED_VERSIONS = _SupportedVersionsDict()
|
||||
+"""
|
||||
+Deprecated since 2025-03-31.
|
||||
+
|
||||
+Use is_supported_version(), or IPUConfig.supported_upgrade_paths to check what source
|
||||
+versions are supported for the current (release, flavour).
|
||||
+"""
|
||||
|
||||
|
||||
def _version_to_tuple(version):
|
||||
@@ -319,13 +325,14 @@ def is_supported_version():
|
||||
:return: `True` if the current version is supported and `False` otherwise.
|
||||
:rtype: bool
|
||||
"""
|
||||
- release_id, version_id = current_version()
|
||||
- if is_rhel_alt():
|
||||
- release_id = 'rhel-alt'
|
||||
- elif is_sap_hana_flavour():
|
||||
- release_id = 'rhel-saphana'
|
||||
+ source_version = get_source_version()
|
||||
+ supported_upgrade_paths = api.current_actor().configuration.supported_upgrade_paths
|
||||
|
||||
- if not matches_release(SUPPORTED_VERSIONS, release_id):
|
||||
- return False
|
||||
+ # Check if there are any paths defined from the current source_version. If not,
|
||||
+ # the upgrade version is unsupported
|
||||
+ for ipu_source_to_targets in supported_upgrade_paths:
|
||||
+ # No need to use matches_version - our version list is always a singleton
|
||||
+ if ipu_source_to_targets.source_version == source_version:
|
||||
+ return True
|
||||
|
||||
- return matches_version(SUPPORTED_VERSIONS[release_id], version_id)
|
||||
+ return False
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,60 +0,0 @@
|
||||
From d5edd261a729f0a83aa9642bf3655acf63f8808e Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 23 Feb 2026 14:15:38 +0100
|
||||
Subject: [PATCH 18/44] opensshpermitrootlogincheck: Respect target distro name
|
||||
in report
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../actors/opensshpermitrootlogincheck/actor.py | 17 ++++++++++-------
|
||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py b/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
index 3aedfd5e..93ee5021 100644
|
||||
--- a/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
@@ -3,6 +3,7 @@ from leapp.actors import Actor
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.actor.opensshpermitrootlogincheck import global_value
|
||||
from leapp.libraries.common.config.version import get_source_major_version
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import OpenSshConfig, Report
|
||||
from leapp.reporting import create_report
|
||||
@@ -62,12 +63,12 @@ class OpenSshPermitRootLoginCheck(Actor):
|
||||
create_report([
|
||||
reporting.Title('Possible problems with remote login using root account'),
|
||||
reporting.Summary(
|
||||
- 'OpenSSH configuration file will get updated to RHEL9 '
|
||||
+ 'OpenSSH configuration file will get updated to {target_distro} 9 '
|
||||
'version, no longer allowing root login with password. '
|
||||
'It is a good practice to use non-root administrative '
|
||||
'user and non-password authentications, but if you rely '
|
||||
'on the remote root login, this change can lock you out '
|
||||
- 'of this system.'
|
||||
+ 'of this system.'.format_map(DISTRO_REPORT_NAMES)
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups(COMMON_REPORT_TAGS),
|
||||
@@ -93,11 +94,13 @@ class OpenSshPermitRootLoginCheck(Actor):
|
||||
create_report([
|
||||
reporting.Title('Remote root logins globally allowed using password'),
|
||||
reporting.Summary(
|
||||
- 'RHEL9 no longer allows remote root logins, but the '
|
||||
- 'server configuration explicitly overrides this default. '
|
||||
- 'The configuration file will not be updated and root is '
|
||||
- 'still going to be allowed to login with password. '
|
||||
- 'This is not recommended and considered as a security risk.'
|
||||
+ '{target_distro} 9 no longer allows remote root logins, but '
|
||||
+ 'the server configuration explicitly overrides this default. '
|
||||
+ 'The configuration file will not be updated and root is still'
|
||||
+ 'going to be allowed to login with password. This is not '
|
||||
+ 'recommended and considered as a security risk. '.format_map(
|
||||
+ DISTRO_REPORT_NAMES
|
||||
+ )
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups(COMMON_REPORT_TAGS),
|
||||
--
|
||||
2.53.0
|
||||
|
||||
322
SOURCES/0019-Remove-7to8-CI-tests.patch
Normal file
322
SOURCES/0019-Remove-7to8-CI-tests.patch
Normal file
@ -0,0 +1,322 @@
|
||||
From e330fef6ef748dd1ae1ca1f4ec2a4142818d1e43 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Fratrik <tomasfratrik8@gmail.com>
|
||||
Date: Mon, 14 Apr 2025 14:40:19 +0200
|
||||
Subject: [PATCH 19/37] Remove 7to8 CI tests
|
||||
|
||||
Removing 7to8 CI tests because the upgrade path from RHEL-7 to RHEL-8 is no longer supported.
|
||||
|
||||
Jira: RHELMISC-11004
|
||||
---
|
||||
.github/workflows/reuse-copr-build.yml | 4 +-
|
||||
.github/workflows/tmt-tests.yml | 59 ----------
|
||||
.github/workflows/unit-tests.yml | 17 ---
|
||||
.packit.yaml | 152 -------------------------
|
||||
4 files changed, 2 insertions(+), 230 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/reuse-copr-build.yml b/.github/workflows/reuse-copr-build.yml
|
||||
index c6702e1a..a772fb64 100644
|
||||
--- a/.github/workflows/reuse-copr-build.yml
|
||||
+++ b/.github/workflows/reuse-copr-build.yml
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
id: copr_build
|
||||
env:
|
||||
COPR_CONFIG: "copr_fedora.conf"
|
||||
- COPR_CHROOT: "epel-7-x86_64,epel-8-x86_64"
|
||||
+ COPR_CHROOT: "epel-8-x86_64"
|
||||
COPR_REPO: "@oamg/leapp"
|
||||
run: |
|
||||
cat << EOF > $COPR_CONFIG
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
||||
env:
|
||||
COPR_CONFIG: "copr_fedora.conf"
|
||||
- COPR_CHROOT: "epel-7-x86_64,epel-8-x86_64"
|
||||
+ COPR_CHROOT: "epel-8-x86_64"
|
||||
COPR_REPO: "@oamg/leapp"
|
||||
run: |
|
||||
cat << EOF > $COPR_CONFIG
|
||||
diff --git a/.github/workflows/tmt-tests.yml b/.github/workflows/tmt-tests.yml
|
||||
index 1fa00e60..c9f76ef7 100644
|
||||
--- a/.github/workflows/tmt-tests.yml
|
||||
+++ b/.github/workflows/tmt-tests.yml
|
||||
@@ -10,65 +10,6 @@ jobs:
|
||||
uses: ./.github/workflows/reuse-copr-build.yml
|
||||
secrets: inherit
|
||||
|
||||
- call_workflow_tests_79to88_integration:
|
||||
- needs: call_workflow_copr_build
|
||||
- uses: oamg/leapp/.github/workflows/reuse-tests-7to8.yml@main
|
||||
- secrets: inherit
|
||||
- with:
|
||||
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
||||
- tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*8to9)(?!.*max_sst)"
|
||||
- pull_request_status_name: "7.9to8.8"
|
||||
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.8;LEAPPDATA_BRANCH=upstream'
|
||||
- if: |
|
||||
- github.event.issue.pull_request
|
||||
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
||||
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
||||
-
|
||||
- call_workflow_tests_79to86_integration:
|
||||
- needs: call_workflow_copr_build
|
||||
- uses: oamg/leapp/.github/workflows/reuse-tests-7to8.yml@main
|
||||
- secrets: inherit
|
||||
- with:
|
||||
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
||||
- tmt_plan_regex: "^(?!.*max_sst)(.*tier1)"
|
||||
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.6;LEAPPDATA_BRANCH=upstream'
|
||||
- pull_request_status_name: "7.9to8.6"
|
||||
- if: |
|
||||
- github.event.issue.pull_request
|
||||
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
||||
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
||||
-
|
||||
- call_workflow_tests_79to88_sst:
|
||||
- needs: call_workflow_copr_build
|
||||
- uses: oamg/leapp/.github/workflows/reuse-tests-7to8.yml@main
|
||||
- secrets: inherit
|
||||
- with:
|
||||
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
||||
- tmt_plan_regex: "^(?!.*tier[2-3].*)(.*max_sst.*)"
|
||||
- pull_request_status_name: "7.9to8.8-sst"
|
||||
- update_pull_request_status: 'false'
|
||||
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.8;LEAPPDATA_BRANCH=upstream'
|
||||
- if: |
|
||||
- github.event.issue.pull_request
|
||||
- && startsWith(github.event.comment.body, '/rerun-sst')
|
||||
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
||||
-
|
||||
- call_workflow_tests_7to8_aws:
|
||||
- needs: call_workflow_copr_build
|
||||
- uses: oamg/leapp/.github/workflows/reuse-tests-7to8.yml@main
|
||||
- secrets: inherit
|
||||
- with:
|
||||
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
||||
- tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*8to9)(.*e2e)"
|
||||
- compose: "RHEL-7.9-rhui"
|
||||
- environment_settings: '{"provisioning": {"post_install_script": "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; echo 42; yum-config-manager --enable rhel-7-server-rhui-optional-rpms"}}'
|
||||
- pull_request_status_name: "7to8-aws-e2e"
|
||||
- variables: "SOURCE_RELEASE=7.9;TARGET_RELEASE=8.6;RHUI=aws;LEAPPDATA_BRANCH=upstream"
|
||||
- if: |
|
||||
- github.event.issue.pull_request
|
||||
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
||||
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
||||
-
|
||||
call_workflow_tests_86to90_integration:
|
||||
needs: call_workflow_copr_build
|
||||
uses: oamg/leapp/.github/workflows/reuse-tests-8to9.yml@main
|
||||
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
|
||||
index 42b72b8d..37748396 100644
|
||||
--- a/.github/workflows/unit-tests.yml
|
||||
+++ b/.github/workflows/unit-tests.yml
|
||||
@@ -49,23 +49,6 @@ jobs:
|
||||
python: python3.6
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi8-lint
|
||||
- # 7to8
|
||||
- - name: Run unit tests for el7toel8 and common repositories on python 3.6
|
||||
- python: python3.6
|
||||
- repos: 'el7toel8,common'
|
||||
- container: ubi8
|
||||
- - name: Run python linters for el7toel8 and common repositories on python 3.6
|
||||
- python: python3.6
|
||||
- repos: 'el7toel8,common'
|
||||
- container: ubi8-lint
|
||||
- - name: Run unit tests for el7toel8 and common repositories on python 2.7
|
||||
- python: python2.7
|
||||
- repos: 'el7toel8,common'
|
||||
- container: ubi7
|
||||
- - name: Run python linters for el7toel8 and common repositories on python 2.7
|
||||
- python: python2.7
|
||||
- repos: 'el7toel8,common'
|
||||
- container: ubi7-lint
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
diff --git a/.packit.yaml b/.packit.yaml
|
||||
index dd17303a..75788a25 100644
|
||||
--- a/.packit.yaml
|
||||
+++ b/.packit.yaml
|
||||
@@ -32,7 +32,6 @@ jobs:
|
||||
owner: "@oamg"
|
||||
project: leapp
|
||||
targets:
|
||||
- - epel-7-x86_64
|
||||
- epel-8-x86_64
|
||||
- epel-9-x86_64
|
||||
actions:
|
||||
@@ -53,7 +52,6 @@ jobs:
|
||||
owner: "@oamg"
|
||||
project: leapp
|
||||
targets:
|
||||
- - epel-7-x86_64
|
||||
- epel-8-x86_64
|
||||
- epel-9-x86_64
|
||||
actions:
|
||||
@@ -73,7 +71,6 @@ jobs:
|
||||
owner: "@oamg"
|
||||
project: leapp
|
||||
targets:
|
||||
- - epel-7-x86_64
|
||||
- epel-8-x86_64
|
||||
- epel-9-x86_64
|
||||
actions:
|
||||
@@ -95,155 +92,6 @@ jobs:
|
||||
# >7tox path https://gitlab.cee.redhat.com/oamg/leapp-tests/-/blob/main/config.yaml
|
||||
# Available only to RH Employees.
|
||||
|
||||
-# ###################################################################### #
|
||||
-# ############################### 7 TO 8 ############################### #
|
||||
-# ###################################################################### #
|
||||
-
|
||||
-# ###################################################################### #
|
||||
-# ### Abstract job definitions to make individual tests/jobs smaller ### #
|
||||
-# ###################################################################### #
|
||||
-- &sanity-abstract-7to8
|
||||
- job: tests
|
||||
- trigger: ignore
|
||||
- fmf_url: "https://gitlab.cee.redhat.com/oamg/leapp-tests"
|
||||
- fmf_ref: "rhel7"
|
||||
- use_internal_tf: True
|
||||
- labels:
|
||||
- - sanity
|
||||
- targets:
|
||||
- epel-7-x86_64:
|
||||
- distros: [RHEL-7.9-ZStream]
|
||||
- identifier: sanity-abstract-7to8
|
||||
- tmt_plan: ""
|
||||
-
|
||||
-- &sanity-abstract-7to8-aws
|
||||
- <<: *sanity-abstract-7to8
|
||||
- labels:
|
||||
- - sanity
|
||||
- - aws
|
||||
- targets:
|
||||
- epel-7-x86_64:
|
||||
- distros: [RHEL-7.9-rhui]
|
||||
- identifier: sanity-abstract-7to8-aws
|
||||
-
|
||||
-# On-demand minimal beaker tests
|
||||
-- &beaker-minimal-7to8-abstract-ondemand
|
||||
- <<: *sanity-abstract-7to8
|
||||
- manual_trigger: True
|
||||
- labels:
|
||||
- - beaker-minimal
|
||||
- identifier: beaker-minimal-7to8-abstract-ondemand
|
||||
-
|
||||
-# On-demand kernel-rt tests
|
||||
-- &kernel-rt-abstract-7to8-ondemand
|
||||
- <<: *beaker-minimal-7to8-abstract-ondemand
|
||||
- labels:
|
||||
- - kernel-rt
|
||||
- identifier: sanity-7to8-kernel-rt-abstract-ondemand
|
||||
-
|
||||
-# ###################################################################### #
|
||||
-# ######################### Individual tests ########################### #
|
||||
-# ###################################################################### #
|
||||
-
|
||||
-# Tests: 7.9 -> 8.10
|
||||
-- &sanity-79to810
|
||||
- <<: *sanity-abstract-7to8
|
||||
- trigger: pull_request
|
||||
- identifier: sanity-7.9to8.10
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:7to8 & tag:sanity & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-7.9"
|
||||
- distro_target: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.10"
|
||||
-
|
||||
-- &sanity-79to810-aws
|
||||
- <<: *sanity-abstract-7to8-aws
|
||||
- trigger: pull_request
|
||||
- identifier: sanity-7.9to8.10-aws
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:7to8 & tag:upgrade_happy_path & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-7.9"
|
||||
- distro_target: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.10"
|
||||
- RHUI: "aws"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_NO_RHSM: "1"
|
||||
- USE_CUSTOM_REPOS: rhui
|
||||
-
|
||||
-- &beaker-minimal-79to810
|
||||
- <<: *beaker-minimal-7to8-abstract-ondemand
|
||||
- trigger: pull_request
|
||||
- labels:
|
||||
- - beaker-minimal
|
||||
- - beaker-minimal-7.9to8.10
|
||||
- - 7.9to8.10
|
||||
- identifier: sanity-7.9to8.10-beaker-minimal-ondemand
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:7to8 & tag:partitioning & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-7.9"
|
||||
- distro_target: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.10"
|
||||
-
|
||||
-- &kernel-rt-79to810
|
||||
- <<: *kernel-rt-abstract-7to8-ondemand
|
||||
- trigger: pull_request
|
||||
- labels:
|
||||
- - kernel-rt
|
||||
- - kernel-rt-7.9to8.10
|
||||
- - 7.9to8.10
|
||||
- identifier: sanity-7.9to8.10-kernel-rt-ondemand
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:7to8 & tag:kernel-rt & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-7.9"
|
||||
- distro_target: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.10"
|
||||
-
|
||||
-
|
||||
# ###################################################################### #
|
||||
# ############################## 8 TO 9 ################################ #
|
||||
# ###################################################################### #
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,120 +0,0 @@
|
||||
From 61dc43540b15c71a8a2c2d5705c5952de059b6d8 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 18:05:37 +0100
|
||||
Subject: [PATCH 19/44] checkifcfg_ifcfg: Respect distro name in report
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../checkifcfg/libraries/checkifcfg_ifcfg.py | 37 +++++++++++++------
|
||||
.../checkifcfg/tests/unit_test_ifcfg.py | 9 ++++-
|
||||
2 files changed, 32 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/checkifcfg/libraries/checkifcfg_ifcfg.py b/repos/system_upgrade/el8toel9/actors/checkifcfg/libraries/checkifcfg_ifcfg.py
|
||||
index ed666350..79ede81e 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/checkifcfg/libraries/checkifcfg_ifcfg.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/checkifcfg/libraries/checkifcfg_ifcfg.py
|
||||
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
|
||||
from leapp import reporting
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.common.rpms import has_package
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import IfCfg, InstalledRPM, RpmTransactionTasks
|
||||
@@ -8,6 +9,12 @@ from leapp.models import IfCfg, InstalledRPM, RpmTransactionTasks
|
||||
FMT_LIST_SEPARATOR = '\n - '
|
||||
|
||||
|
||||
+def _format_files_list(files):
|
||||
+ return "".join(
|
||||
+ ["{}{}".format(FMT_LIST_SEPARATOR, f) for f in files]
|
||||
+ )
|
||||
+
|
||||
+
|
||||
def process():
|
||||
TRUE_VALUES = ['yes', 'true', '1']
|
||||
TYPE_MAP = {
|
||||
@@ -74,12 +81,15 @@ def process():
|
||||
|
||||
if bad_type_files:
|
||||
title = 'Network configuration for unsupported device types detected'
|
||||
- summary = ('RHEL 9 does not support the legacy network-scripts'
|
||||
- ' package that was deprecated in RHEL 8 in favor of'
|
||||
- ' NetworkManager. Files for device types that are not'
|
||||
- ' supported by NetworkManager are present in the system.'
|
||||
- ' Files with the problematic configuration:{}').format(
|
||||
- ''.join(['{}{}'.format(FMT_LIST_SEPARATOR, bfile) for bfile in bad_type_files])
|
||||
+ summary = (
|
||||
+ "{target_distro} 9 does not support the legacy network-scripts"
|
||||
+ " package that was deprecated in {source_distro} 8 in favor of"
|
||||
+ " NetworkManager. Files for device types that are not"
|
||||
+ " supported by NetworkManager are present in the system."
|
||||
+ " Files with the problematic configuration:{bad_files}".format(
|
||||
+ bad_files=_format_files_list(bad_type_files),
|
||||
+ **DISTRO_REPORT_NAMES,
|
||||
+ )
|
||||
)
|
||||
remediation = ('Consult the nm-settings-ifcfg-rh(5) manual for'
|
||||
' valid types of ifcfg files. Remove configuration'
|
||||
@@ -104,12 +114,15 @@ def process():
|
||||
|
||||
if not_controlled_files:
|
||||
title = 'Network configuration with disabled NetworkManager support detected'
|
||||
- summary = ('RHEL 9 does not support the legacy network-scripts'
|
||||
- ' package that was deprecated in RHEL 8 in favor of'
|
||||
- ' NetworkManager. Configuration present in the system'
|
||||
- ' prohibit NetworkManager from loading it.'
|
||||
- ' Files with the problematic configuration:{}').format(
|
||||
- ''.join(['{}{}'.format(FMT_LIST_SEPARATOR, bfile) for bfile in not_controlled_files])
|
||||
+ summary = (
|
||||
+ '{target_distro} 9 does not support the legacy network-scripts'
|
||||
+ ' package that was deprecated in {source_distro} 8 in favor of'
|
||||
+ ' NetworkManager. Configuration present in the system'
|
||||
+ ' prohibit NetworkManager from loading it.'
|
||||
+ ' Files with the problematic configuration:{bad_files}'
|
||||
+ ).format(
|
||||
+ bad_files=_format_files_list(not_controlled_files),
|
||||
+ **DISTRO_REPORT_NAMES,
|
||||
)
|
||||
remediation = ('Ensure the ifcfg files comply with format described in'
|
||||
' nm-settings-ifcfg-rh(5) manual and remove the'
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/checkifcfg/tests/unit_test_ifcfg.py b/repos/system_upgrade/el8toel9/actors/checkifcfg/tests/unit_test_ifcfg.py
|
||||
index ddabedf2..02ffc65c 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/checkifcfg/tests/unit_test_ifcfg.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/checkifcfg/tests/unit_test_ifcfg.py
|
||||
@@ -1,3 +1,4 @@
|
||||
+from leapp.libraries.common import distro
|
||||
from leapp.models import IfCfg, IfCfgProperty, InstalledRPM, RPM, RpmTransactionTasks
|
||||
from leapp.reporting import Report
|
||||
from leapp.utils.report import is_inhibitor
|
||||
@@ -85,10 +86,12 @@ def test_ifcfg_good_type(current_actor_context):
|
||||
assert rpm_transaction.to_install == ["NetworkManager"]
|
||||
|
||||
|
||||
-def test_ifcfg_not_controlled(current_actor_context):
|
||||
+def test_ifcfg_not_controlled(monkeypatch, current_actor_context):
|
||||
"""
|
||||
Report if there's a NM_CONTROLLED=no file.
|
||||
"""
|
||||
+ monkeypatch.setattr(distro, 'get_source_distro_id', lambda: 'rhel')
|
||||
+ monkeypatch.setattr(distro, 'get_target_distro_id', lambda: 'rhel')
|
||||
|
||||
current_actor_context.feed(IfCfg(
|
||||
filename="/NM/ifcfg-eth0",
|
||||
@@ -105,10 +108,12 @@ def test_ifcfg_not_controlled(current_actor_context):
|
||||
assert "disabled NetworkManager" in report_fields['title']
|
||||
|
||||
|
||||
-def test_ifcfg_unknown_type(current_actor_context):
|
||||
+def test_ifcfg_unknown_type(monkeypatch, current_actor_context):
|
||||
"""
|
||||
Report if there's configuration for a type we don't recognize.
|
||||
"""
|
||||
+ monkeypatch.setattr(distro, 'get_source_distro_id', lambda: 'rhel')
|
||||
+ monkeypatch.setattr(distro, 'get_target_distro_id', lambda: 'rhel')
|
||||
|
||||
current_actor_context.feed(IfCfg(
|
||||
filename="/NM/ifcfg-pigeon0",
|
||||
--
|
||||
2.53.0
|
||||
|
||||
45
SOURCES/0020-Fix-lint-in-Makefile-for-docs.patch
Normal file
45
SOURCES/0020-Fix-lint-in-Makefile-for-docs.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 9dd50a2fc3f30d3f5a00998ed9fc96d34129426d Mon Sep 17 00:00:00 2001
|
||||
From: karolinku <kkula@redhat.com>
|
||||
Date: Fri, 25 Apr 2025 14:23:20 +0200
|
||||
Subject: [PATCH 20/37] Fix lint in Makefile for docs
|
||||
|
||||
isort is failing when getting empty list of arguments, what takes
|
||||
place when only doc files was modified in a commit. This fix handles
|
||||
that issue.
|
||||
|
||||
JIRA: RHELMISC-11679
|
||||
---
|
||||
Makefile | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 3e090159..ceb013ab 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -356,16 +356,17 @@ lint:
|
||||
echo "--- Linting done. ---"; \
|
||||
fi
|
||||
|
||||
- if [[ "`git rev-parse --abbrev-ref HEAD`" != "$(MASTER_BRANCH)" ]] && [[ -n "`git diff $(MASTER_BRANCH) --name-only --diff-filter AMR`" ]]; then \
|
||||
+ if [[ "`git rev-parse --abbrev-ref HEAD`" != "$(MASTER_BRANCH)" ]]; then \
|
||||
. $(VENVNAME)/bin/activate; \
|
||||
- git diff $(MASTER_BRANCH) --name-only --diff-filter AMR | grep -v "^docs/" | xargs isort -c --diff || \
|
||||
- { \
|
||||
+ files_to_sort=`git diff main --name-only --diff-filter AMR | grep -v "^docs/"`; \
|
||||
+ if [ -n "$$files_to_sort" ]; then \
|
||||
+ echo "$$files_to_sort" | xargs isort -c --diff || { \
|
||||
echo; \
|
||||
- echo "------------------------------------------------------------------------------"; \
|
||||
- echo "Hint: Apply the required changes."; \
|
||||
+ echo "Hint: Apply the required changes.";\
|
||||
echo " Execute the following command to apply them automatically: make lint_fix"; \
|
||||
exit 1; \
|
||||
- } && echo "--- isort check done. ---"; \
|
||||
+ } && echo "--- isort check done. ---"; \
|
||||
+ fi \
|
||||
fi
|
||||
|
||||
lint_fix:
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,155 +0,0 @@
|
||||
From 747e4467aafe7c97b2a02b67527af70083a89e91 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 18:11:02 +0100
|
||||
Subject: [PATCH 20/44] opensslproviders: Use distro name in the leapp comment
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../libraries/add_provider.py | 13 ++--
|
||||
.../tests/test_add_provider.py | 66 ++++++++++++-------
|
||||
2 files changed, 53 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/opensslproviders/libraries/add_provider.py b/repos/system_upgrade/el8toel9/actors/opensslproviders/libraries/add_provider.py
|
||||
index 91462f18..3bf4cbf8 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/opensslproviders/libraries/add_provider.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/opensslproviders/libraries/add_provider.py
|
||||
@@ -2,13 +2,13 @@ import re
|
||||
|
||||
from leapp import reporting
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
|
||||
# The openssl configuration file
|
||||
# TODO copied from opensslconfigscanner/libraries/readconf.py
|
||||
CONFIG = '/etc/pki/tls/openssl.cnf'
|
||||
|
||||
-LEAPP_COMMENT = '# Modified by leapp during upgrade to RHEL 9\n'
|
||||
APPEND_STRING = (
|
||||
'[provider_sect]\n'
|
||||
'default = default_sect\n'
|
||||
@@ -22,6 +22,11 @@ APPEND_STRING = (
|
||||
)
|
||||
|
||||
|
||||
+def _get_leapp_comment():
|
||||
+ # cannot access DISTRO_REPORT_NAMES at top level
|
||||
+ return f"# Modified by leapp during upgrade to {DISTRO_REPORT_NAMES.target} 9\n"
|
||||
+
|
||||
+
|
||||
def _add_lines(lines, add):
|
||||
"""
|
||||
Add lines to the list of lines. Breaking possible newlines onto separate items
|
||||
@@ -76,12 +81,12 @@ def _modify_file(f, fail_on_error=True):
|
||||
lines = f.readlines()
|
||||
lines = _replace(lines, r"openssl_conf\s*=\s*default_modules",
|
||||
"openssl_conf = openssl_init",
|
||||
- LEAPP_COMMENT, True, fail_on_error)
|
||||
+ _get_leapp_comment(), True, fail_on_error)
|
||||
lines = _replace(lines, r"\[\s*default_modules\s*\]",
|
||||
"[openssl_init]\n"
|
||||
"providers = provider_sect",
|
||||
- LEAPP_COMMENT, True, fail_on_error)
|
||||
- lines = _append(lines, APPEND_STRING, LEAPP_COMMENT)
|
||||
+ _get_leapp_comment(), True, fail_on_error)
|
||||
+ lines = _append(lines, APPEND_STRING, _get_leapp_comment())
|
||||
f.seek(0)
|
||||
f.write(''.join(lines))
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/opensslproviders/tests/test_add_provider.py b/repos/system_upgrade/el8toel9/actors/opensslproviders/tests/test_add_provider.py
|
||||
index 78f2e9c6..c6e31c29 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/opensslproviders/tests/test_add_provider.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/opensslproviders/tests/test_add_provider.py
|
||||
@@ -3,12 +3,14 @@ import pytest
|
||||
from leapp.libraries.actor.add_provider import (
|
||||
_add_lines,
|
||||
_append,
|
||||
+ _get_leapp_comment,
|
||||
_modify_file,
|
||||
_replace,
|
||||
APPEND_STRING,
|
||||
- LEAPP_COMMENT,
|
||||
NotFoundException
|
||||
)
|
||||
+from leapp.libraries.common.testutils import CurrentActorMocked
|
||||
+from leapp.libraries.stdlib import api
|
||||
|
||||
testdata = (
|
||||
([], 'one', ['one\n']),
|
||||
@@ -80,32 +82,52 @@ class MockFile:
|
||||
|
||||
|
||||
testdata = (
|
||||
- ('', ''),
|
||||
- ('openssl_conf=default_modules\n',
|
||||
- '{}# openssl_conf=default_modules\nopenssl_conf = openssl_init\n'.format(LEAPP_COMMENT)),
|
||||
- ('openssl_conf = default_modules\n',
|
||||
- '{}# openssl_conf = default_modules\nopenssl_conf = openssl_init\n'.format(LEAPP_COMMENT)),
|
||||
- ('openssl_conf = default_modules\n',
|
||||
- '{}# openssl_conf = default_modules\nopenssl_conf = openssl_init\n'.format(LEAPP_COMMENT)),
|
||||
- (' openssl_conf = default_modules \n',
|
||||
- '{}# openssl_conf = default_modules \nopenssl_conf = openssl_init\n'.format(LEAPP_COMMENT)),
|
||||
- ('[default_modules]\n',
|
||||
- '{}# [default_modules]\n[openssl_init]\nproviders = provider_sect\n'.format(LEAPP_COMMENT)),
|
||||
- ('[ default_modules ]\n',
|
||||
- '{}# [ default_modules ]\n[openssl_init]\nproviders = provider_sect\n'.format(LEAPP_COMMENT)),
|
||||
- (' [ default_modules ] \n',
|
||||
- '{}# [ default_modules ] \n[openssl_init]\nproviders = provider_sect\n'.format(LEAPP_COMMENT)),
|
||||
- ('openssl_conf=default_modules\n[default_modules]\n',
|
||||
- '{c}# openssl_conf=default_modules\nopenssl_conf = openssl_init\n'
|
||||
- '{c}# [default_modules]\n[openssl_init]\nproviders = provider_sect\n'.format(c=LEAPP_COMMENT)),
|
||||
+ ("", ""),
|
||||
+ (
|
||||
+ "openssl_conf=default_modules\n",
|
||||
+ "{c}# openssl_conf=default_modules\nopenssl_conf = openssl_init\n",
|
||||
+ ),
|
||||
+ (
|
||||
+ "openssl_conf = default_modules\n",
|
||||
+ "{c}# openssl_conf = default_modules\nopenssl_conf = openssl_init\n",
|
||||
+ ),
|
||||
+ (
|
||||
+ "openssl_conf = default_modules\n",
|
||||
+ "{c}# openssl_conf = default_modules\nopenssl_conf = openssl_init\n",
|
||||
+ ),
|
||||
+ (
|
||||
+ " openssl_conf = default_modules \n",
|
||||
+ "{c}# openssl_conf = default_modules \nopenssl_conf = openssl_init\n",
|
||||
+ ),
|
||||
+ (
|
||||
+ "[default_modules]\n",
|
||||
+ "{c}# [default_modules]\n[openssl_init]\nproviders = provider_sect\n",
|
||||
+ ),
|
||||
+ (
|
||||
+ "[ default_modules ]\n",
|
||||
+ "{c}# [ default_modules ]\n[openssl_init]\nproviders = provider_sect\n",
|
||||
+ ),
|
||||
+ (
|
||||
+ " [ default_modules ] \n",
|
||||
+ "{c}# [ default_modules ] \n[openssl_init]\nproviders = provider_sect\n",
|
||||
+ ),
|
||||
+ (
|
||||
+ "openssl_conf=default_modules\n[default_modules]\n",
|
||||
+ "{c}# openssl_conf=default_modules\nopenssl_conf = openssl_init\n"
|
||||
+ "{c}# [default_modules]\n[openssl_init]\nproviders = provider_sect\n",
|
||||
+ ),
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('file_content,expected', testdata)
|
||||
-def test_modify_file(file_content, expected):
|
||||
- f = MockFile(file_content)
|
||||
+def test_modify_file(monkeypatch, file_content, expected):
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
+
|
||||
+ f = MockFile(file_content.format(c=_get_leapp_comment()))
|
||||
|
||||
# Test separate replaces and do not fail if pattern is not found
|
||||
_modify_file(f, False)
|
||||
|
||||
- assert f.content == "{}{}{}\n".format(expected, LEAPP_COMMENT, APPEND_STRING)
|
||||
+ assert f.content == "{}{}{}\n".format(
|
||||
+ expected.format(c=_get_leapp_comment()), _get_leapp_comment(), APPEND_STRING
|
||||
+ )
|
||||
--
|
||||
2.53.0
|
||||
|
||||
41
SOURCES/0021-Improve-report-of-removed-kernel-drivers.patch
Normal file
41
SOURCES/0021-Improve-report-of-removed-kernel-drivers.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 47f37314e26fe0e899b8fdd2fe280f2f8ebf15b5 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Fratrik <tomasfratrik8@gmail.com>
|
||||
Date: Mon, 28 Apr 2025 14:32:54 +0200
|
||||
Subject: [PATCH 21/37] Improve report of removed kernel drivers
|
||||
|
||||
* Insert target RHEL version in report KCS titles for removed kernel drivers.
|
||||
|
||||
Jira: RHEL-49402
|
||||
---
|
||||
.../libraries/checkdddd.py | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py b/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
index defe3f9a..1f01adde 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
@@ -37,13 +37,17 @@ def create_inhibitors(inhibiting_entries):
|
||||
),
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/solutions/6971716',
|
||||
- title='Leapp preupgrade getting "Inhibitor: Detected loaded kernel drivers which have been '
|
||||
- 'removed in RHEL 8. Upgrade cannot proceed." '
|
||||
+ title=('Leapp preupgrade getting "Inhibitor: Detected loaded kernel drivers which have been '
|
||||
+ 'removed in RHEL {target}. Upgrade cannot proceed."').format(target=get_target_major_version())
|
||||
),
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/solutions/5436131',
|
||||
- title='Leapp upgrade fail with error "Inhibitor: Detected loaded kernel drivers which '
|
||||
- 'have been removed in RHEL 8. Upgrade cannot proceed."'
|
||||
+ title=(
|
||||
+ 'Leapp upgrade fail with error "Inhibitor: Detected loaded kernel drivers which '
|
||||
+ 'have been removed in RHEL {target}. Upgrade cannot proceed."'
|
||||
+ ).format(
|
||||
+ target=get_target_major_version()
|
||||
+ )
|
||||
),
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL, reporting.Groups.DRIVERS]),
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,75 +0,0 @@
|
||||
From 35ea535848223e32bd01d726a838abd2ae84fa3e Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 18:30:51 +0100
|
||||
Subject: [PATCH 21/44] opensslconfigcheck: Dont make the recommendation as
|
||||
redhat if not rhel target
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../opensslconfigcheck/libraries/opensslconfigcheck.py | 9 +++++++--
|
||||
.../tests/component_test_opensslconfigcheck.py | 7 +++++--
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/opensslconfigcheck/libraries/opensslconfigcheck.py b/repos/system_upgrade/el8toel9/actors/opensslconfigcheck/libraries/opensslconfigcheck.py
|
||||
index 07c1b22f..a686a7f2 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/opensslconfigcheck/libraries/opensslconfigcheck.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/opensslconfigcheck/libraries/opensslconfigcheck.py
|
||||
@@ -1,4 +1,5 @@
|
||||
from leapp import reporting
|
||||
+from leapp.libraries.common.config import get_target_distro_id
|
||||
from leapp.libraries.stdlib import api
|
||||
|
||||
|
||||
@@ -228,14 +229,18 @@ def check_crypto_policies(config):
|
||||
path=("default_modules", "ssl_conf", "ssl_module",
|
||||
"system_default", "crypto_policy", ".include"),
|
||||
value="/etc/crypto-policies/back-ends/opensslcnf.config"):
|
||||
+
|
||||
reporting.create_report([
|
||||
reporting.Title('The OpenSSL configuration is missing the crypto policies integration'),
|
||||
+
|
||||
reporting.Summary(
|
||||
'The OpenSSL configuration file `/etc/pki/tls/openssl.cnf` does not contain the '
|
||||
'directive to include the system-wide crypto policies. This is not recommended '
|
||||
- 'by Red Hat and can lead to decreasing overall system security and inconsistent '
|
||||
+ '{} can lead to decreasing overall system security and inconsistent '
|
||||
'behavior between applications. If you need to adjust the crypto policies to your '
|
||||
- 'needs, it is recommended to use custom crypto policies.'
|
||||
+ 'needs, it is recommended to use custom crypto policies.'.format(
|
||||
+ "by Red Hat and" if get_target_distro_id() == "rhel" else "as it"
|
||||
+ )
|
||||
),
|
||||
reporting.Severity(reporting.Severity.MEDIUM),
|
||||
reporting.Groups([
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/opensslconfigcheck/tests/component_test_opensslconfigcheck.py b/repos/system_upgrade/el8toel9/actors/opensslconfigcheck/tests/component_test_opensslconfigcheck.py
|
||||
index d3363def..892cb7f1 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/opensslconfigcheck/tests/component_test_opensslconfigcheck.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/opensslconfigcheck/tests/component_test_opensslconfigcheck.py
|
||||
@@ -1,3 +1,4 @@
|
||||
+from leapp.libraries.actor import opensslconfigcheck
|
||||
from leapp.models import OpenSslConfig, OpenSslConfigBlock, OpenSslConfigPair, Report
|
||||
|
||||
|
||||
@@ -12,7 +13,8 @@ def test_actor_execution_empty(current_actor_context):
|
||||
assert not current_actor_context.consume(Report)
|
||||
|
||||
|
||||
-def test_actor_execution_empty_modified(current_actor_context):
|
||||
+def test_actor_execution_empty_modified(current_actor_context, monkeypatch):
|
||||
+ monkeypatch.setattr(opensslconfigcheck, 'get_target_distro_id', lambda: 'rhel')
|
||||
current_actor_context.feed(
|
||||
OpenSslConfig(
|
||||
blocks=[],
|
||||
@@ -25,7 +27,8 @@ def test_actor_execution_empty_modified(current_actor_context):
|
||||
assert 'missing the crypto policies integration' in r[0].report['title']
|
||||
|
||||
|
||||
-def test_actor_execution_default_modified(current_actor_context):
|
||||
+def test_actor_execution_default_modified(current_actor_context, monkeypatch):
|
||||
+ monkeypatch.setattr(opensslconfigcheck, 'get_target_distro_id', lambda: 'rhel')
|
||||
current_actor_context.feed(
|
||||
OpenSslConfig(
|
||||
openssl_conf='default_modules',
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,151 @@
|
||||
From daaf3cea58f4065e9e938c0c76ecd5d302ec7969 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Fratrik <tomasfratrik8@gmail.com>
|
||||
Date: Mon, 28 Apr 2025 14:19:01 +0200
|
||||
Subject: [PATCH 22/37] Improve report of unsupported network configuration
|
||||
|
||||
* Remove KCS from summary since it is present in the related links.
|
||||
* Generalize KCS title when using Kernel-Assigned NIC Names.
|
||||
* Show KCS about unsupported network configuration device types only when IPU 8 -> 9.
|
||||
* Adjust unit tests to reflect this change.
|
||||
|
||||
Jira: RHEL-77175
|
||||
---
|
||||
.../actors/persistentnetnamesdisable/actor.py | 24 ++++++----
|
||||
.../tests/test_persistentnetnamesdisable.py | 46 +++++++++++++++++--
|
||||
2 files changed, 56 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
index 1f7f1413..1add3588 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
@@ -2,6 +2,7 @@ import re
|
||||
|
||||
from leapp import reporting
|
||||
from leapp.actors import Actor
|
||||
+from leapp.libraries.common.config.version import get_target_major_version
|
||||
from leapp.models import KernelCmdlineArg, PersistentNetNamesFacts
|
||||
from leapp.reporting import create_report, Report
|
||||
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
@@ -39,26 +40,31 @@ class PersistentNetNamesDisable(Actor):
|
||||
if self.single_eth0(interfaces):
|
||||
self.disable_persistent_naming()
|
||||
elif len(interfaces) > 1 and self.ethX_count(interfaces) > 0:
|
||||
- create_report([
|
||||
+ report_entries = [
|
||||
reporting.Title('Unsupported network configuration'),
|
||||
reporting.Summary(
|
||||
'Detected multiple physical network interfaces where one or more use kernel naming (e.g. eth0). '
|
||||
'Upgrade process can not continue because stability of names can not be guaranteed. '
|
||||
- 'Please read the article at https://access.redhat.com/solutions/4067471 for more information.'
|
||||
),
|
||||
reporting.ExternalLink(
|
||||
- title='How to perform an in-place upgrade to RHEL 8 when using kernel NIC names on RHEL 7',
|
||||
+ title='How to Perform an In-Place Upgrade when Using Kernel-Assigned NIC Names',
|
||||
url='https://access.redhat.com/solutions/4067471'
|
||||
),
|
||||
- reporting.ExternalLink(
|
||||
- title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
- '"Network configuration for unsupported device types detected"',
|
||||
- url='https://access.redhat.com/solutions/7009239'
|
||||
- ),
|
||||
reporting.Remediation(
|
||||
hint='Rename all ethX network interfaces following the attached KB solution article.'
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.NETWORK]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
- ])
|
||||
+ ]
|
||||
+
|
||||
+ if get_target_major_version() == '9':
|
||||
+ report_entries.append(
|
||||
+ reporting.ExternalLink(
|
||||
+ title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
+ '"Network configuration for unsupported device types detected"',
|
||||
+ url='https://access.redhat.com/solutions/7009239'
|
||||
+ )
|
||||
+ )
|
||||
+
|
||||
+ create_report(report_entries)
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
index 96768da9..95b695c0 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
@@ -1,3 +1,6 @@
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.common.config import version
|
||||
from leapp.models import Interface, KernelCmdlineArg, PCIAddress, PersistentNetNamesFacts
|
||||
from leapp.reporting import Report
|
||||
from leapp.snactor.fixture import current_actor_context
|
||||
@@ -14,7 +17,11 @@ def test_actor_single_eth0(current_actor_context):
|
||||
assert not current_actor_context.consume(Report)
|
||||
|
||||
|
||||
-def test_actor_more_ethX(current_actor_context):
|
||||
+@pytest.mark.parametrize(
|
||||
+ 'target_version', ['9', '10']
|
||||
+)
|
||||
+def test_actor_more_ethX(monkeypatch, current_actor_context, target_version):
|
||||
+ monkeypatch.setattr(version, 'get_target_major_version', lambda: target_version)
|
||||
pci1 = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
pci2 = PCIAddress(domain="0000", bus="3d", function="00", device="Serial controller")
|
||||
interface = [Interface(name="eth0", mac="52:54:00:0b:4a:6d", vendor="redhat",
|
||||
@@ -25,8 +32,20 @@ def test_actor_more_ethX(current_actor_context):
|
||||
devpath="/devices/hidraw/hidraw0")]
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
- assert current_actor_context.consume(Report)
|
||||
- assert is_inhibitor(current_actor_context.consume(Report)[0].report)
|
||||
+
|
||||
+ report_fields = current_actor_context.consume(Report)[0].report
|
||||
+ assert is_inhibitor(report_fields)
|
||||
+
|
||||
+ external_links = report_fields.get('detail', {}).get('external', [])
|
||||
+
|
||||
+ rhel8to9_present = any(
|
||||
+ 'RHEL 8 to RHEL 9' in link.get('title', '') for link in external_links
|
||||
+ )
|
||||
+
|
||||
+ if target_version == '9':
|
||||
+ assert rhel8to9_present
|
||||
+ else:
|
||||
+ assert not rhel8to9_present
|
||||
|
||||
|
||||
def test_actor_single_int_not_ethX(current_actor_context):
|
||||
@@ -39,7 +58,11 @@ def test_actor_single_int_not_ethX(current_actor_context):
|
||||
assert not current_actor_context.consume(Report)
|
||||
|
||||
|
||||
-def test_actor_ethX_and_not_ethX(current_actor_context):
|
||||
+@pytest.mark.parametrize(
|
||||
+ 'target_version', ['9', '10']
|
||||
+)
|
||||
+def test_actor_ethX_and_not_ethX(monkeypatch, current_actor_context, target_version):
|
||||
+ monkeypatch.setattr(version, 'get_target_major_version', lambda: target_version)
|
||||
pci1 = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
pci2 = PCIAddress(domain="0000", bus="3d", function="00", device="Serial controller")
|
||||
interface = [Interface(name="virbr0", mac="52:54:00:0b:4a:6d", vendor="redhat",
|
||||
@@ -51,4 +74,17 @@ def test_actor_ethX_and_not_ethX(current_actor_context):
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
assert current_actor_context.consume(Report)
|
||||
- assert is_inhibitor(current_actor_context.consume(Report)[0].report)
|
||||
+
|
||||
+ report_fields = current_actor_context.consume(Report)[0].report
|
||||
+ assert is_inhibitor(report_fields)
|
||||
+
|
||||
+ external_links = report_fields.get('detail', {}).get('external', [])
|
||||
+
|
||||
+ rhel8to9_present = any(
|
||||
+ 'RHEL 8 to RHEL 9' in link.get('title', '') for link in external_links
|
||||
+ )
|
||||
+
|
||||
+ if target_version == '9':
|
||||
+ assert rhel8to9_present
|
||||
+ else:
|
||||
+ assert not rhel8to9_present
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
From 367654a5eeaa1a13d857ff04acdc1e7890550fc1 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 17:35:53 +0100
|
||||
Subject: [PATCH 22/44] checkmicroarchitecture: Respect distro name in report
|
||||
|
||||
Also add stable report key, the title used for key computation was using
|
||||
target major ver == 8:
|
||||
'Current x86-64 microarchitecture is unsupported in RHEL8'
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../libraries/checkmicroarchitecture.py | 17 ++++++++++-------
|
||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkmicroarchitecture/libraries/checkmicroarchitecture.py b/repos/system_upgrade/common/actors/checkmicroarchitecture/libraries/checkmicroarchitecture.py
|
||||
index a063b534..3011f906 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkmicroarchitecture/libraries/checkmicroarchitecture.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkmicroarchitecture/libraries/checkmicroarchitecture.py
|
||||
@@ -3,6 +3,7 @@ from collections import namedtuple
|
||||
from leapp import reporting
|
||||
from leapp.libraries.common.config.architecture import ARCH_X86_64, matches_architecture
|
||||
from leapp.libraries.common.config.version import get_target_major_version
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import CPUInfo
|
||||
|
||||
@@ -13,11 +14,11 @@ X86_64_V3_FLAGS = ['avx2', 'bmi1', 'bmi2', 'f16c', 'fma', 'abm', 'movbe', 'xsave
|
||||
MicroarchInfo = namedtuple('MicroarchInfo', ('required_flags', 'extra_report_fields', 'microarch_ver'))
|
||||
|
||||
|
||||
-def _inhibit_upgrade(missing_flags, target_rhel, microarch_ver, extra_report_fields=None):
|
||||
- title = 'Current x86-64 microarchitecture is unsupported in {0}'.format(target_rhel)
|
||||
+def _inhibit_upgrade(missing_flags, target_distro, microarch_ver, extra_report_fields=None):
|
||||
+ title = 'Current x86-64 microarchitecture is unsupported in the target OS'
|
||||
summary = ('{0} has a higher CPU requirement than older versions, it now requires a CPU '
|
||||
'compatible with {1} instruction set or higher.\n\n'
|
||||
- 'Missings flags detected are: {2}\n').format(target_rhel, microarch_ver, ', '.join(missing_flags))
|
||||
+ 'Missings flags detected are: {2}\n').format(target_distro, microarch_ver, ', '.join(missing_flags))
|
||||
|
||||
report_fields = [
|
||||
reporting.Title(title),
|
||||
@@ -28,7 +29,8 @@ def _inhibit_upgrade(missing_flags, target_rhel, microarch_ver, extra_report_fie
|
||||
reporting.Remediation(hint=('If a case of using virtualization, virtualization platforms often allow '
|
||||
'configuring a minimum denominator CPU model for compatibility when migrating '
|
||||
'between different CPU models. Ensure that minimum requirements are not below '
|
||||
- 'that of {0}\n').format(target_rhel)),
|
||||
+ 'that of {0}\n').format(target_distro)),
|
||||
+ reporting.Key('0f48cdbe5aa2584e2ca7f4eb470b9b79da9e515d')
|
||||
]
|
||||
|
||||
if extra_report_fields:
|
||||
@@ -69,14 +71,15 @@ def process():
|
||||
|
||||
microarch_info = rhel_major_to_microarch_reqs.get(get_target_major_version())
|
||||
if not microarch_info:
|
||||
- api.current_logger().info('No known microarchitecture requirements are known for target RHEL%s.',
|
||||
- get_target_major_version())
|
||||
+ api.current_logger().info(
|
||||
+ 'No known microarchitecture requirements are known'
|
||||
+ ' for target {target_distro} {version}.'.format(**DISTRO_REPORT_NAMES, version=get_target_major_version()))
|
||||
return
|
||||
|
||||
missing_flags = [flag for flag in microarch_info.required_flags if flag not in cpuinfo.flags]
|
||||
api.current_logger().debug('Required flags missing: %s', missing_flags)
|
||||
if missing_flags:
|
||||
_inhibit_upgrade(missing_flags,
|
||||
- 'RHEL{0}'.format(get_target_major_version()),
|
||||
+ '{target_distro} {version}'.format(**DISTRO_REPORT_NAMES, version=get_target_major_version()),
|
||||
microarch_info.microarch_ver,
|
||||
extra_report_fields=microarch_info.extra_report_fields)
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
From d3793ab2546148d3fc9832e5164a2f0a7de80352 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 30 Apr 2025 13:29:40 +0200
|
||||
Subject: [PATCH 23/37] DOCS: add missing envar LEAPP_OVL_IMG_FS_EXT4
|
||||
|
||||
The LEAPP_OVL_IMG_FS_EXT4 has not been documented and it can be
|
||||
quite useful on some systems.
|
||||
---
|
||||
docs/source/configuring-ipu/envars.md | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/docs/source/configuring-ipu/envars.md b/docs/source/configuring-ipu/envars.md
|
||||
index 61a50b82..a042ba4a 100644
|
||||
--- a/docs/source/configuring-ipu/envars.md
|
||||
+++ b/docs/source/configuring-ipu/envars.md
|
||||
@@ -47,6 +47,16 @@ Set the path to the target OS ISO image that should be used for the IPU. It‘s
|
||||
#### LEAPP_TARGET_PRODUCT_CHANNEL
|
||||
The alternative to the --channel leapp option. As a parameter accepts a channel acronym. E.g. `eus` or `e4s`. For more info, see the leapp preupgrade --help. In case the beta channel is required, use the `LEAPP_DEVEL_TARGET_PRODUCT_TYPE` envar instead.
|
||||
|
||||
+#### LEAPP_OVL_IMG_FS_EXT4
|
||||
+During the execution of IPUWorkflow the process requires creation of internal
|
||||
+disk images for the correct virtualisation of the host storage and creation
|
||||
+of OverlayFS (OVL) layer. During that time these images are formatted with
|
||||
+XFS filesystem by default. However for some system setups this could be
|
||||
+problematic and could lead sometimes to issues. For these uncommon problems
|
||||
+it is possible to specify `LEAPP_OVL_IMG_FS_EXT4=1` when running leapp to
|
||||
+instruct the use of the EXT4 file system instead.
|
||||
+
|
||||
+
|
||||
### Development variables
|
||||
```{note}
|
||||
To use development variables, the LEAPP_UNSUPPORTED variable has to be set.
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
From 0e250cdc4672263d753209c420c15a33f9ae90eb Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 17:45:16 +0100
|
||||
Subject: [PATCH 23/44] checkmemory: Respect distro name in reports
|
||||
|
||||
Also add stable key to the report, the distro key was computed as if for
|
||||
7->8 upgrade, the title:
|
||||
'Minimum memory requirements for RHEL 8 are not met'
|
||||
|
||||
as the reports for 8->9 and 9->10 are unified with the above report, the
|
||||
following keys are no longer used:
|
||||
Minimum memory requirements for RHEL 9 are not met -> e3066f6fae135718b3158597145554c4f22b9372
|
||||
Minimum memory requirements for RHEL 10 are not met -> ccf14c3ac899f3cdc3123dadac399cafe28ce2ef
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../checkmemory/libraries/checkmemory.py | 33 ++++++++++---------
|
||||
.../checkmemory/tests/test_checkmemory.py | 2 +-
|
||||
2 files changed, 18 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkmemory/libraries/checkmemory.py b/repos/system_upgrade/common/actors/checkmemory/libraries/checkmemory.py
|
||||
index 040b404b..cdf8faa6 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkmemory/libraries/checkmemory.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkmemory/libraries/checkmemory.py
|
||||
@@ -1,6 +1,6 @@
|
||||
from leapp import reporting
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
-from leapp.libraries.common.config import architecture, version
|
||||
+from leapp.libraries.common.config import architecture
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import MemoryInfo
|
||||
|
||||
@@ -32,23 +32,24 @@ def process():
|
||||
minimum_req_error = _check_memory(memoryinfo)
|
||||
|
||||
if minimum_req_error:
|
||||
- title = 'Minimum memory requirements for RHEL {} are not met'.format(version.get_target_major_version())
|
||||
+ title = "Minimum memory requirements for the target OS are not met"
|
||||
summary = 'Memory detected: {} MiB, required: {} MiB'.format(
|
||||
int(minimum_req_error['detected'] / 1024),
|
||||
int(minimum_req_error['minimal_req'] / 1024),
|
||||
)
|
||||
reporting.create_report([
|
||||
- reporting.Title(title),
|
||||
- reporting.Summary(summary),
|
||||
- reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups([reporting.Groups.SANITY, reporting.Groups.INHIBITOR]),
|
||||
- reporting.ExternalLink(
|
||||
- url='https://access.redhat.com/solutions/7014179',
|
||||
- title='Leapp upgrade fail with error"Minimum memory requirements '
|
||||
- 'for RHEL 8 are not met"Upgrade cannot proceed'
|
||||
- ),
|
||||
- reporting.ExternalLink(
|
||||
- url='https://access.redhat.com/articles/rhel-limits',
|
||||
- title='Red Hat Enterprise Linux Technology Capabilities and Limits'
|
||||
- ),
|
||||
- ])
|
||||
+ reporting.Title(title),
|
||||
+ reporting.Summary(summary),
|
||||
+ reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Groups([reporting.Groups.SANITY, reporting.Groups.INHIBITOR]),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7014179',
|
||||
+ title='Leapp upgrade fail with error "Minimum memory requirements '
|
||||
+ 'for RHEL 8 are not met"Upgrade cannot proceed'
|
||||
+ ),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/articles/rhel-limits',
|
||||
+ title='Red Hat Enterprise Linux Technology Capabilities and Limits'
|
||||
+ ),
|
||||
+ reporting.Key('be50646b45beb8304c13daf5380d836a4be8e1cc'),
|
||||
+ ])
|
||||
diff --git a/repos/system_upgrade/common/actors/checkmemory/tests/test_checkmemory.py b/repos/system_upgrade/common/actors/checkmemory/tests/test_checkmemory.py
|
||||
index 79158dc6..38ddfa33 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkmemory/tests/test_checkmemory.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkmemory/tests/test_checkmemory.py
|
||||
@@ -21,7 +21,7 @@ def test_check_memory_high(monkeypatch):
|
||||
|
||||
|
||||
def test_report(monkeypatch):
|
||||
- title_msg = 'Minimum memory requirements for RHEL 9 are not met'
|
||||
+ title_msg = 'Minimum memory requirements for the target OS are not met'
|
||||
monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
monkeypatch.setattr(api, 'consume', lambda x: iter([MemoryInfo(mem_total=129)]))
|
||||
monkeypatch.setattr(reporting, "create_report", create_report_mocked())
|
||||
--
|
||||
2.53.0
|
||||
|
||||
83751
SOURCES/0024-data-update-data-files-stream-3.3-1358.patch
Normal file
83751
SOURCES/0024-data-update-data-files-stream-3.3-1358.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,126 +0,0 @@
|
||||
From 73b2a3f76e6f808c381a29253ef7e1cd5bfd4f69 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 18:11:43 +0100
|
||||
Subject: [PATCH 24/44] targetuserspacecreator: Respect distro name in report
|
||||
|
||||
Also add stable report key for no base repos inhibitor. The key was
|
||||
computed with 'Cannot find required basic RHEL target repositories.' as
|
||||
the title.
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../libraries/userspacegen.py | 34 ++++++++++---------
|
||||
.../tests/unit_test_targetuserspacecreator.py | 10 +++---
|
||||
2 files changed, 23 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
index 7dbadae2..2475aad4 100644
|
||||
--- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
+++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
@@ -844,9 +844,8 @@ def _inhibit_if_no_base_repos(distro_repoids):
|
||||
no_baseos = all("baseos" not in ri for ri in distro_repoids)
|
||||
no_appstream = all("appstream" not in ri for ri in distro_repoids)
|
||||
if no_baseos or no_appstream:
|
||||
- reporting.create_report([
|
||||
- # TODO: Make the report distro agnostic
|
||||
- reporting.Title('Cannot find required basic RHEL target repositories.'),
|
||||
+ report = [
|
||||
+ reporting.Title('Cannot find required basic target OS repositories.'),
|
||||
reporting.Summary(
|
||||
'This can happen when a repository ID was entered incorrectly either while using the --enablerepo'
|
||||
' option of leapp or in a third party actor that produces a CustomTargetRepositoryMessage.'
|
||||
@@ -854,17 +853,6 @@ def _inhibit_if_no_base_repos(distro_repoids):
|
||||
reporting.Groups([reporting.Groups.REPOSITORY]),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
- reporting.Remediation(hint=(
|
||||
- 'It is required to have RHEL repositories on the system'
|
||||
- ' provided by the subscription-manager unless the --no-rhsm'
|
||||
- ' option is specified. You might be missing a valid SKU for'
|
||||
- ' the target system or have a failed network connection.'
|
||||
- ' Check whether your system is attached to a valid SKU that is'
|
||||
- ' providing RHEL {} repositories.'
|
||||
- ' If you are using Red Hat Satellite, read the upgrade documentation'
|
||||
- ' to set up Satellite and the system properly.'
|
||||
-
|
||||
- ).format(target_major_version)),
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/solutions/5392811',
|
||||
title='RHEL 7 to RHEL 8 LEAPP Upgrade Failing When Using Red Hat Satellite'
|
||||
@@ -874,8 +862,22 @@ def _inhibit_if_no_base_repos(distro_repoids):
|
||||
# https://red.ht/preparing-for-upgrade-to-rhel9
|
||||
# https://red.ht/preparing-for-upgrade-to-rhel10
|
||||
url='https://red.ht/preparing-for-upgrade-to-rhel{}'.format(target_major_version),
|
||||
- title='Preparing for the upgrade')
|
||||
- ])
|
||||
+ title='Preparing for the upgrade'),
|
||||
+ reporting.Key('f5770a56e540f27d370da7b697cb4a2e81e2c30d'),
|
||||
+ ]
|
||||
+ if get_target_distro_id() == 'rhel':
|
||||
+ report.append(reporting.Remediation(hint=(
|
||||
+ 'It is required to have RHEL repositories on the system'
|
||||
+ ' provided by the subscription-manager unless the --no-rhsm'
|
||||
+ ' option is specified. You might be missing a valid SKU for'
|
||||
+ ' the target system or have a failed network connection.'
|
||||
+ ' Check whether your system is attached to a valid SKU that is'
|
||||
+ ' providing RHEL {} repositories.'
|
||||
+ ' If you are using Red Hat Satellite, read the upgrade documentation'
|
||||
+ ' to set up Satellite and the system properly.'
|
||||
+ .format(target_major_version)))
|
||||
+ )
|
||||
+ reporting.create_report(report)
|
||||
raise StopActorExecution()
|
||||
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/tests/unit_test_targetuserspacecreator.py b/repos/system_upgrade/common/actors/targetuserspacecreator/tests/unit_test_targetuserspacecreator.py
|
||||
index e8853979..b49eff56 100644
|
||||
--- a/repos/system_upgrade/common/actors/targetuserspacecreator/tests/unit_test_targetuserspacecreator.py
|
||||
+++ b/repos/system_upgrade/common/actors/targetuserspacecreator/tests/unit_test_targetuserspacecreator.py
|
||||
@@ -1103,7 +1103,7 @@ def test_gather_target_repositories_none_available(monkeypatch):
|
||||
reports = [m.report for m in mocked_produce.model_instances if isinstance(m, reporting.Report)]
|
||||
inhibitors = [m for m in reports if 'INHIBITOR' in m.get('flags', ())]
|
||||
assert len(inhibitors) == 1
|
||||
- assert inhibitors[0].get('title', '') == 'Cannot find required basic RHEL target repositories.'
|
||||
+ assert inhibitors[0].get('title', '') == 'Cannot find required basic target OS repositories.'
|
||||
|
||||
|
||||
@suppress_deprecation(models.RHELTargetRepository)
|
||||
@@ -1166,7 +1166,7 @@ def test_gather_target_repositories_baseos_appstream_not_available(monkeypatch):
|
||||
reports = [m.report for m in mocked_produce.model_instances if isinstance(m, reporting.Report)]
|
||||
inhibitors = [m for m in reports if 'inhibitor' in m.get('groups', ())]
|
||||
assert len(inhibitors) == 1
|
||||
- assert inhibitors[0].get('title', '') == 'Cannot find required basic RHEL target repositories.'
|
||||
+ assert inhibitors[0].get('title', '') == 'Cannot find required basic target OS repositories.'
|
||||
# Now test the case when either of AppStream and BaseOs is not available, upgrade should be inhibited
|
||||
mocked_produce = produce_mocked()
|
||||
monkeypatch.setattr(userspacegen.api, 'current_actor', CurrentActorMocked())
|
||||
@@ -1181,7 +1181,7 @@ def test_gather_target_repositories_baseos_appstream_not_available(monkeypatch):
|
||||
reports = [m.report for m in mocked_produce.model_instances if isinstance(m, reporting.Report)]
|
||||
inhibitors = [m for m in reports if 'inhibitor' in m.get('groups', ())]
|
||||
assert len(inhibitors) == 1
|
||||
- assert inhibitors[0].get('title', '') == 'Cannot find required basic RHEL target repositories.'
|
||||
+ assert inhibitors[0].get('title', '') == 'Cannot find required basic target OS repositories.'
|
||||
mocked_produce = produce_mocked()
|
||||
monkeypatch.setattr(userspacegen.api, 'current_actor', CurrentActorMocked())
|
||||
monkeypatch.setattr(userspacegen.api.current_actor(), 'produce', mocked_produce)
|
||||
@@ -1195,7 +1195,7 @@ def test_gather_target_repositories_baseos_appstream_not_available(monkeypatch):
|
||||
reports = [m.report for m in mocked_produce.model_instances if isinstance(m, reporting.Report)]
|
||||
inhibitors = [m for m in reports if 'inhibitor' in m.get('groups', ())]
|
||||
assert len(inhibitors) == 1
|
||||
- assert inhibitors[0].get('title', '') == 'Cannot find required basic RHEL target repositories.'
|
||||
+ assert inhibitors[0].get('title', '') == 'Cannot find required basic target OS repositories.'
|
||||
|
||||
|
||||
def test__get_distro_available_repoids_norhsm_norhui(monkeypatch):
|
||||
@@ -1254,7 +1254,7 @@ def test__get_distro_available_repoids_nobaserepos_inhibit(
|
||||
# TODO adjust the asserts when the report is made distro agnostic
|
||||
assert reporting.create_report.called == 1
|
||||
report = reporting.create_report.reports[0]
|
||||
- assert "Cannot find required basic RHEL target repositories" in report["title"]
|
||||
+ assert "Cannot find required basic target OS repositories" in report["title"]
|
||||
assert reporting.Groups.INHIBITOR in report["groups"]
|
||||
|
||||
|
||||
--
|
||||
2.53.0
|
||||
|
||||
701
SOURCES/0025-Add-RHEL-10.1-and-9.7-product-certificates.patch
Normal file
701
SOURCES/0025-Add-RHEL-10.1-and-9.7-product-certificates.patch
Normal file
@ -0,0 +1,701 @@
|
||||
From 5fe6b4df9cfde15f527b5ecf52fda4e7fec6dfe5 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Mon, 5 May 2025 13:55:35 +0200
|
||||
Subject: [PATCH 25/37] Add RHEL 10.1 and 9.7 product certificates
|
||||
|
||||
---
|
||||
.../common/files/prod-certs/10.1/279.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/362.pem | 36 +++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/363.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/419.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/433.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/479.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/486.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/72.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/279.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/362.pem | 36 +++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/363.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/419.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/433.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/479.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/486.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/72.pem | 35 ++++++++++++++++++
|
||||
16 files changed, 562 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/279.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/362.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/363.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/419.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/433.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/479.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/486.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/72.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/279.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/362.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/363.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/419.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/433.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/479.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/486.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/72.pem
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/279.pem b/repos/system_upgrade/common/files/prod-certs/10.1/279.pem
|
||||
new file mode 100644
|
||||
index 00000000..958d5716
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/279.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGKDCCBBCgAwIBAgIJALDxRLt/tU/zMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDkwM1oXDTQ1MDEy
|
||||
+OTEyNDkwM1owRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs3YzNhZTNl
|
||||
+ZC01M2U1LTQ3MjYtOGM4Ny1kNGIwZjk4MTU5MjNdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBsTCBrjAJBgNVHRMEAjAAMEMGDCsGAQQBkggJAYIXAQQzDDFSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIFBvd2VyLCBsaXR0bGUgZW5kaWFuMBYGDCsG
|
||||
+AQQBkggJAYIXAgQGDAQxMC4xMBkGDCsGAQQBkggJAYIXAwQJDAdwcGM2NGxlMCkG
|
||||
+DCsGAQQBkggJAYIXBAQZDBdyaGVsLTEwLHJoZWwtMTAtcHBjNjRsZTANBgkqhkiG
|
||||
+9w0BAQsFAAOCAgEAfVg6glBn6Igkl0ynxbwfLLrR7D3HcWhIBpcFFfw9btjx74Zi
|
||||
+Pi7RcQeV8xR03S7SQO0B+84yTAy48DMtv0jTGZacqovv9iXNqJBuXhfFZgSvYnr/
|
||||
+cqAXExpQc5PvCzDW0/6JKWkGJsrxS++KtRRwPjZKV/Ie9Xa0P/LnVhraDZUGHRLt
|
||||
+fo5lbElmpy0GvYnOp/xVMfP/R7Gy/rC3AfrTxrTUY911eguT4ziJftzTVbq0Bpn4
|
||||
+tEBqPQ9B0NBpgwiQJteLHtwHjm8c46E+bzb5JHRNtHVUX6ukG9FPPpehJyJmgILu
|
||||
+tNadbee3gpRvNpVTInDZyftIcXHZzh+rirWg8oC9b0kj/z7Cr+OBx5BHAlcFzJNb
|
||||
+KX49ezONhjWgSlKGTu90fcJk60TvrWfYymXpym0B70uCKZbKXTAwDTtg2gIydFS/
|
||||
+YZydCgY6h6/s4Vk7NeccIHRz7xSQ/eiVSGk7TM/DbACjp1pl9CVX2BMn5p1GNn3W
|
||||
+oS0c9DY/pbphdlGVDrcDRmYjuAZ6fNtmy7zDqtUSJnen0A+PrcRIc5ICEoTXUE9l
|
||||
+RtxUFT2Caja3PWVumVu1kNGzjbNAvFRD9FHQt80ADpSLgEcG0HEaFUdevYN3glKb
|
||||
+7J1RXTKEhhnBBCI9qfrl4SIz3VvLrxW4AeJ87h/7FPJZFAJrkKQmQPeyadA=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/362.pem b/repos/system_upgrade/common/files/prod-certs/10.1/362.pem
|
||||
new file mode 100644
|
||||
index 00000000..6382f50a
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/362.pem
|
||||
@@ -0,0 +1,36 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGNzCCBB+gAwIBAgIJALDxRLt/tU/gMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDg0NFoXDTQ1MDEy
|
||||
+OTEyNDg0NFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs0MGFlYjVl
|
||||
+ZC0yZjNiLTRiZWYtOTRjYi00YjgzMDkyZmEzY2NdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBwDCBvTAJBgNVHRMEAjAAMEgGDCsGAQQBkggJAYJqAQQ4DDZSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIFBvd2VyLCBsaXR0bGUgZW5kaWFuIEJldGEw
|
||||
+GwYMKwYBBAGSCAkBgmoCBAsMCTEwLjEgQmV0YTAZBgwrBgEEAZIICQGCagMECQwH
|
||||
+cHBjNjRsZTAuBgwrBgEEAZIICQGCagQEHgwccmhlbC0xMCxyaGVsLTEwLWJldGEt
|
||||
+cHBjNjRsZTANBgkqhkiG9w0BAQsFAAOCAgEA1SukDSn9NakDXTq8UO5TatAHiSu+
|
||||
+qWNgEtddX3XUZ1nB8S3n8QDhk4RoQIs2e66w95vOYyNipBO93gqVeJbEK7Krxgbl
|
||||
+Xx6s08kPuwcdG8FxgqPC8jote7eVEHmrMnlhOyNz9WRYULyz6IlfQ6gQe7SmeSrC
|
||||
+lsla8bykzN2/7MnDPqjByF0zbdtdoZ9U5JXlqJn2UuTIe+Z65jDqSwBv8bQF+F8g
|
||||
+EiZtesy4n7sxXpINSFBkh24ohRd0ur8BXCoOLpzS96YkyHvXXdqaJcCoSJ6abqe0
|
||||
+Q7IFWYfUIU7GCwtSL4M9ODjc8Cr5YUJgnsnlC1qYekOB1pGfROMC/9qEAU2TsOYp
|
||||
+8yOZN+NmrsmSnaBLHEN9lhwpt+2It5Dm9B/SAW64fil/oVyHUj3qfIDXSzbD+l0q
|
||||
+LQ6l66epVP/b3UU1R7+JzDDLUDm2bBWFr205L4CKkcpaReK+mXM3eTuMtiHWnLkY
|
||||
+MQ6jgDAM+5GGGHqq/iJmBWM+Trp5HfyI3XEVWsXDBJ2zEDAAEwByWwhwGFI58SFy
|
||||
+Zv3x3vpv56b7MW5fALXYFKkHzwjVw9YVXnhJmXO09GN7auPVYsFEPl3QUS/OiXPL
|
||||
+suQmwYd7aS8Bua3kgAfg204O6OppflhkExzroRvvr7FT/9LftaaBI+HLDnvOdd2n
|
||||
+y+Nqehto96G/A6A=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/363.pem b/repos/system_upgrade/common/files/prod-certs/10.1/363.pem
|
||||
new file mode 100644
|
||||
index 00000000..2b7eeb6d
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/363.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGKTCCBBGgAwIBAgIJALDxRLt/tU/fMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDg0NFoXDTQ1MDEy
|
||||
+OTEyNDg0NFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs4MGRiNGJj
|
||||
+MC1hZTY1LTRhMjgtODRjNC1hZTgwZWFjZDQ2M2VdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBsjCBrzAJBgNVHRMEAjAAMDoGDCsGAQQBkggJAYJrAQQqDChSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIEFSTSA2NCBCZXRhMBsGDCsGAQQBkggJAYJr
|
||||
+AgQLDAkxMC4xIEJldGEwGQYMKwYBBAGSCAkBgmsDBAkMB2FhcmNoNjQwLgYMKwYB
|
||||
+BAGSCAkBgmsEBB4MHHJoZWwtMTAscmhlbC0xMC1iZXRhLWFhcmNoNjQwDQYJKoZI
|
||||
+hvcNAQELBQADggIBAJ1siyraC4EY80gYkCaBag7l8BaLUuXcVgk67a4VNsCytxnn
|
||||
+Pe0RGLoNcfI1p3Y3S2rDXCNQeAkMaJkraAt2TWxJz16pQY2XL2jS4J3wH3cD3MWc
|
||||
+inEyJOxNRtx7vT2+2dWCKtgyLlg/GCu8q3Eojd97krId3Uz6f2obDcgawkmhvZZc
|
||||
+QmwLncbhc9knDQX/Dxeep53i3QGgojOfCqRWj/xY/9L3Fq7KcHupMrXx8IktHEZL
|
||||
+8yvFLx3QoqtYGKckxRC91RqKWG4edk8LYeL2mUSuONwzGpXvqKcfIMyWAhLaVfnG
|
||||
+AqC7keoSm4RyGA47tL3dIFPuu5IYMa+Kdr4lyNGNmAfSYiPhkjte8YxMz9Y3fGBX
|
||||
+BTRrWMN5LvvodEz33prFFfHl647sq4j7Qq6GSDBllV5B0nlJZvDIiBLGa/rpnJie
|
||||
+dD76DhtNdtWr1ghqZTS0dQ+vxI3bZBcqYWxFoV30+3e700Xq2p+C4peY9fWGupVC
|
||||
+w79WsJHj0aF2GBUtJlhqYo1ReZm4YH6CDv+DHDNEVmtu7bR0klTEpmFznuni6/Kr
|
||||
++z/9FFnAYzVkECKA5zzQ52EfqclkYscADhlnBqY/knVDaAJAXZD5QIFlcGeXMxiS
|
||||
+zIhD+K2P9GM4Z4n1CoYZceTwIaCDogRGo/2gO20dB0AZW2tPjvr/RpfI7zpR
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/419.pem b/repos/system_upgrade/common/files/prod-certs/10.1/419.pem
|
||||
new file mode 100644
|
||||
index 00000000..906b58e2
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/419.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGGjCCBAKgAwIBAgIJALDxRLt/tU/yMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDkwM1oXDTQ1MDEy
|
||||
+OTEyNDkwM1owRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs4ZDMyOWZh
|
||||
+MS0wYTgyLTRlMTktYmUxMy1mYzFiNWUxNDVhYzhdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBozCBoDAJBgNVHRMEAjAAMDUGDCsGAQQBkggJAYMjAQQlDCNSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIEFSTSA2NDAWBgwrBgEEAZIICQGDIwIEBgwE
|
||||
+MTAuMTAZBgwrBgEEAZIICQGDIwMECQwHYWFyY2g2NDApBgwrBgEEAZIICQGDIwQE
|
||||
+GQwXcmhlbC0xMCxyaGVsLTEwLWFhcmNoNjQwDQYJKoZIhvcNAQELBQADggIBAHgs
|
||||
+Io5uxwPYpQFtIBiQ/wTzNfokMoBcL2eBt/pnCXMPBmAlscm1l96P92pB9b+uGxXx
|
||||
+WWUPlwwsn87WABQkIVJJgW2Y723ZqJungj4duhuQB/c8pXqy6bEOIkSFqoiez3n+
|
||||
+49adg2Fr/uXSj1NBbY+CGFU3QStKLNbDfFQJEEwvFbajTE4jp1e9Db0B60H4nX4n
|
||||
+Z09Rl7IrBC+AO3d/bIc4Ed2Uk5oTozR+vVx6/JFewAE5aEYdrdqXVj+NHpLBbVpE
|
||||
+KDlHJ41LdPu7HKXcqw/sqTyYuZJHqi5AZ2eLbBB6+0FRfgZC4B29LFokTlAoDTCM
|
||||
+C0q7e2NwITdDDULLJq37DZlZiHBdDRrwyBNM5O4P5Ufyy6y5djN/93P/OxNhXMum
|
||||
+n2J/yAQNvmzONEgz4g8Rfl+EIdNRaXMYdEHzQ4Rn0ba6f68hAilqVUgIdUdiLFG9
|
||||
+ni0ISWWPQefkMRAWpOZymD0cumQUI2s+2nkzwVzTsmrQPAyFwHpIn+yfbUUDNBUR
|
||||
+osnW+tTG51K7b2RVTkh6/ecXTGgaxHlltg6FILj/sS7umphD2CEmDSAK0eqLvUaE
|
||||
+SqjtntlkgwbEGdHSvoMBVdl232yXCvxTX612VauD3e3HGr01Z2/lXqDq/5lZfZe9
|
||||
+5YO65vQQLn1D8bNvKJ5hhI9m0qc4vYVbvwNqztLh
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/433.pem b/repos/system_upgrade/common/files/prod-certs/10.1/433.pem
|
||||
new file mode 100644
|
||||
index 00000000..b834a5f4
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/433.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGLDCCBBSgAwIBAgIJALDxRLt/tU/hMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDg0NFoXDTQ1MDEy
|
||||
+OTEyNDg0NFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFsxMWVlMzk5
|
||||
+MC1lNmJiLTQzMDUtOWNiMi0zYTk1OGQ2OTJlYzBdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBtTCBsjAJBgNVHRMEAjAAMEEGDCsGAQQBkggJAYMxAQQxDC9SZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIElCTSB6IFN5c3RlbXMgQmV0YTAbBgwrBgEE
|
||||
+AZIICQGDMQIECwwJMTAuMSBCZXRhMBcGDCsGAQQBkggJAYMxAwQHDAVzMzkweDAs
|
||||
+BgwrBgEEAZIICQGDMQQEHAwacmhlbC0xMCxyaGVsLTEwLWJldGEtczM5MHgwDQYJ
|
||||
+KoZIhvcNAQELBQADggIBACwo67Ht6qWmhyumMwWHpdlU7yzLc/s4oGTixAYsNEjf
|
||||
++wtcCNtoO89crtwd6upsrK0V/qaDRpqugk40QyoGwDKGN7J9GLqrSBDTtMwKv5vY
|
||||
+gE0GNiK/AUmE65uT6qAHq35OCAsNphGHyvOhDSEnLdAeU0VAMAOxi3Rb2KxmquE9
|
||||
+mpjledsrBHUTHxUYobHKKEVSRS3JmVTIxcuLEKnIS69k4jq3hnbbd7y9jyadZQWB
|
||||
+3ASqCnrm+1jKg4U8sYdF1yRdkh9TTU1XS+7z5MZ3tB6Fdzd67SJCkvH2XQGLdx/8
|
||||
+4AL7Dm09uJrYWBunjs3DRKSIJ7As+l8iE99C4yfgR1rqogQmss57+24uI0UTC3O2
|
||||
+4q1G+MfPXqF3N4NUuQmuO/M2ATfCXAfM3T6pkdS4g4XhWrpn5Pm5LvLhjU3/3/GM
|
||||
+I8fANCW84MZmadnPjx77MJphF/mJzvwbkp8sCNUYy5Lbk/vleWOClGG/sgqrUlBj
|
||||
+k8lI2ngkuIV3+tk0wfIZDOGIt67r3HZ9hP17jhmOR5olSaB36EB1q6OHktEO19uX
|
||||
+xSRKHqgNMP7KQT/YmxKJb4lz49yQEj8XUiEt+K0r18OmA4QDJrl4jQ37yerlZLQj
|
||||
+tKniBp5H/p7UN1dO5bKQ5Dp0p4YjXpqp6/K4kpJs6eVZh0Ikp3KcSO5afv604/aF
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/479.pem b/repos/system_upgrade/common/files/prod-certs/10.1/479.pem
|
||||
new file mode 100644
|
||||
index 00000000..23ff46a9
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/479.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGGDCCBACgAwIBAgIJALDxRLt/tU/1MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDkwM1oXDTQ1MDEy
|
||||
+OTEyNDkwM1owRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFszMWE2MzI1
|
||||
+Zi1mOTE3LTQzNjgtOGM2MC05ODYwMDgyNWQzOThdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBoTCBnjAJBgNVHRMEAjAAMDUGDCsGAQQBkggJAYNfAQQlDCNSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIHg4Nl82NDAWBgwrBgEEAZIICQGDXwIEBgwE
|
||||
+MTAuMTAYBgwrBgEEAZIICQGDXwMECAwGeDg2XzY0MCgGDCsGAQQBkggJAYNfBAQY
|
||||
+DBZyaGVsLTEwLHJoZWwtMTAteDg2XzY0MA0GCSqGSIb3DQEBCwUAA4ICAQAEY2Oc
|
||||
+fkUeiHFmZFf9Pb9nnCZqfRmrYl19aQeM8fVf4EKQVTy0WSadu6COTUngPl3Nsv3L
|
||||
+nTl5rhvNXqVLN7kILZVbUBkzLeC89VrdwT0i9IoiINFDIOYxi55Ul8d/mS5o2Vla
|
||||
+j3gy9cEOJBX/gfgTTG72nOp0f9B6CI2DmSjNVdA4ClOCfX0VRP+QhvOasEvKp4xg
|
||||
+8b9lTi1lhE5E/axIpCtkc9JsPcp6sqLD4He8xSmNyuqOUowmDcYU2P2WSKSFNS8o
|
||||
+kKL6EPMWk9W8QnirdjzBqNbIZY2qr9Pc9+Lk8kZ7T0JHGxfccaDLlunWOzEPQWtl
|
||||
+AtTmzLVSKs3kCuxM4kiOd8sbMjIUth+G56bECD+lCYtsK8GdkAy+ACRN/7knirEC
|
||||
+pv2eOYDnIaaWyI7kTUrN3fiCrSeQ9PydZ4nonL1VjiY5GS+2+LjmD8XGFJiEnWll
|
||||
+tyvjvio2PjhqwayEOR1dOzsdgDko5fAnfdxA/pPCYB9uyXxE/pjE5sH6m2qIhCSw
|
||||
+UcDIgpWpHnBPjw2sstnSRIdOkN4lb086vorvHph3YuEMa00SIWR2QAOY3cAYeqn0
|
||||
+7RHCUVVdHHo5BlQjU4Fzpsxft8lmdzVsvMDI2fuT4at9UEe0ViTPKIBohVIgp5hz
|
||||
+WQpi9eB/4PJNIWup9hrcVQxNWiid/Zk9IKpSyw==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/486.pem b/repos/system_upgrade/common/files/prod-certs/10.1/486.pem
|
||||
new file mode 100644
|
||||
index 00000000..c66eae07
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/486.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJzCCBA+gAwIBAgIJALDxRLt/tU/iMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDg0NFoXDTQ1MDEy
|
||||
+OTEyNDg0NFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFthYThkMTI0
|
||||
+NS1kODY4LTQwYzYtODg4MS02OWM3MGIyZGI0NmFdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBsDCBrTAJBgNVHRMEAjAAMDoGDCsGAQQBkggJAYNmAQQqDChSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIHg4Nl82NCBCZXRhMBsGDCsGAQQBkggJAYNm
|
||||
+AgQLDAkxMC4xIEJldGEwGAYMKwYBBAGSCAkBg2YDBAgMBng4Nl82NDAtBgwrBgEE
|
||||
+AZIICQGDZgQEHQwbcmhlbC0xMCxyaGVsLTEwLWJldGEteDg2XzY0MA0GCSqGSIb3
|
||||
+DQEBCwUAA4ICAQCWsIqn8Ff5r9SSNzKwMgRHaDjg/RXN9Zhau1DKDwpqp4m40+cK
|
||||
+bdKYcS6WrZ2UGgJ1bQ0xHZf7Fh6FYd8wOH9zs0rtfUYuRQwbUlCmipVhhf5EY2FW
|
||||
+vMTRj8DW1RdOQv7cEo9w4QWFSFQnsTvhR6DZuS8/WK4Z+8i8TV5KoQy6z4nVPdVu
|
||||
+NiclCJNkjGZgYMqWA3yfmrhh1kxTCnvRdRro+tbTEkdC9oLKrGCrACucjHhAyuK5
|
||||
+2xfr0q7rmHvxia2oc/9HjB3HV/xai1b/DiWuOb4mjLj/3SS7Ua07a14TZIlEDUrM
|
||||
+YEzZBFIha+241FVdF434jFr4mAYSbm6yhNahSsPswV2O3vDMGz5tNOc1caWmQXkT
|
||||
+UC/EXzfyrmy6fBQN32lacDr0OOD9LdVz28IT90brVIAVkFyRtGLLGwId/aDxoJJe
|
||||
+M+TLHMGf+LfvP/jiwbpZxa6yfXDp6J0rHofNYLCYkeSa6TH55qYDWbi7DosCjpWj
|
||||
+NnqN8aiDKf3f0OO0tRo1zcGCEMnfG3UzDjp37CWyVYZ/TUq8/ygJrcIxjXg0K1SH
|
||||
+v01NOwphvkXlsNvjapGIgZTuo3/nASIjC92WP14MjdWv/nKhRkJ4ZMJtKSc6FgLC
|
||||
+SXF8MHwPmaIyne4k3+tJ0AlmQenPqBs6GCB5xBd01wxhRTf7qxIF/+yr6A==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/72.pem b/repos/system_upgrade/common/files/prod-certs/10.1/72.pem
|
||||
new file mode 100644
|
||||
index 00000000..fa452aa5
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/72.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGGTCCBAGgAwIBAgIJALDxRLt/tU/0MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDkwM1oXDTQ1MDEy
|
||||
+OTEyNDkwM1owRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFswMjNkYTRj
|
||||
+Zi0xNTgwLTRkYTYtYWFhMy0yMGE1ZDZkMjE1OWNdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBojCBnzAJBgNVHRMEAjAAMDsGCysGAQQBkggJAUgBBCwMKlJlZCBIYXQg
|
||||
+RW50ZXJwcmlzZSBMaW51eCBmb3IgSUJNIHogU3lzdGVtczAVBgsrBgEEAZIICQFI
|
||||
+AgQGDAQxMC4xMBYGCysGAQQBkggJAUgDBAcMBXMzOTB4MCYGCysGAQQBkggJAUgE
|
||||
+BBcMFXJoZWwtMTAscmhlbC0xMC1zMzkweDANBgkqhkiG9w0BAQsFAAOCAgEAM0cP
|
||||
+KmcFfsVzBVVDZVZRLsQcWTnoZ8Hhufc8rNdE/LkoV1xGXIsN9ejsxZyfVhYvF8G9
|
||||
+YP41uvQbR2jnXMAQyB7UNxf6I73hIu3yoJ4s6EqX53o9YfejIFFh0V802WpX4yJ8
|
||||
+1UCKmQVNxnQCwH2Ybxess13F9oKjh7Ni1MMBpQc8i1vEXfkA/vroKS50tvO6vQgT
|
||||
+Xh72DJ2dKjdnnMNHnuSq0sVcpEbmvPLR3PFrHAxTm0jzngN3S4JCcstiiHsKCCrV
|
||||
+muSxW3ydQlC27C3Rdd/gB/fc5rxl9xh9Piq6a9UHDuqrXb83hMXL+nuvDbt+eERX
|
||||
+j2Y7NA0BVgQTwW/zERNgIa8j4X7VtRtoeF7X6BF0gdHAsILzOIAIanZXXld6IiKS
|
||||
+2m6ackoXPUvdUt3jnYTqYyXQmrpvYs13+AhzENdF+AaJGbcxKf4aAbSe5GEbGe9T
|
||||
+jxoM2+FR+8zOIc8nVcEGaCryPc8kmNEYEVlCqD0DREB+LXeAYtI4MbGeezpQyfEu
|
||||
+6jgf1njPd2mGihAlNUVePLdF9W96bc1RjOhiVzbjg9lwIWupTu5fPAeoxPNxSvJc
|
||||
+nijOHvW5tr+ijG32dMSAKVwBSeFAGB+HssPr3hVoebNYniDIlKPIrv/cUkxwQNKL
|
||||
+rifVE8bFrfYMm83IIR9pNy+wKjArX6S1OIW8A+A=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/279.pem b/repos/system_upgrade/common/files/prod-certs/9.7/279.pem
|
||||
new file mode 100644
|
||||
index 00000000..d03c3bb3
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/279.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJTCCBA2gAwIBAgIJALDxRLt/tU/KMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDc1NVoXDTQ1MDEy
|
||||
+OTEyNDc1NVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFtkMjU0NzVk
|
||||
+Ni1kZTI1LTQ1ZWItYjQwOC1kNzQ2ZDJiYjE2NjddMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBrjCBqzAJBgNVHRMEAjAAMEMGDCsGAQQBkggJAYIXAQQzDDFSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIFBvd2VyLCBsaXR0bGUgZW5kaWFuMBUGDCsG
|
||||
+AQQBkggJAYIXAgQFDAM5LjcwGQYMKwYBBAGSCAkBghcDBAkMB3BwYzY0bGUwJwYM
|
||||
+KwYBBAGSCAkBghcEBBcMFXJoZWwtOSxyaGVsLTktcHBjNjRsZTANBgkqhkiG9w0B
|
||||
+AQsFAAOCAgEAdT5r3gd+2xXBetsU7BFxMZBiHkgkR642GW0U1jvhX0nMIo6CYJav
|
||||
+i776Be1aRLprzThI5ZpXZtRgyp9aytmKBKw31WdfccI9jHDpn6HMzWBmO7cyQQ+4
|
||||
+px3Z9kl2N07YXoZrQZpr3/vahoKTyEpsRWK9GcG6oSKeg5//mGXPlWz+cu6Yj6i5
|
||||
+WRD//ppcERv1Qrzzog8xgAn7J77dcl57WArlflZRL4QJDKPMDl5f/VwrLPaZ+9LB
|
||||
+YVUVvn6iYebK9yfM/mkaqXmjTFTmIcblcnC7He0lWCnlPvCDr8T3qXM2xJX42/Dk
|
||||
+PRDY+/E84LrvURx8hbFUgj4YXEPnk/O7nJf3tTHp3l05GAB52gDycQ/AnvhOcwf7
|
||||
+KHjUnTqvSnMbgtlbg4rhutn3Ag/vuVEwd+gTMT6pF2lE8eA4ILttcCH6wHrv4Rs1
|
||||
+dyDkRPxVFPoYCJ8NMU/dRdhZoyfOKYVYGXD80ynjWH+lV4O+wVgRj+cMXzs2Y78l
|
||||
+4WnBcBlTGFk6ZWuFgurZWelhSUXK/hkhxDIX1eMh3HZoUwu8fP6H3q0r2qsCCRhV
|
||||
+g6yzu4uzd5sgNVaOS99573Hvcga+3tZJZbX49xb2lgVlnbyNzINEQxrPqVXi9CsZ
|
||||
+r5vbXJg9DCJ1SVRxTSjUDcjkQ1TmAWzOt0QUN8iJYLyRpy/Y+NEPRZk=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/362.pem b/repos/system_upgrade/common/files/prod-certs/9.7/362.pem
|
||||
new file mode 100644
|
||||
index 00000000..41c163cf
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/362.pem
|
||||
@@ -0,0 +1,36 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGNDCCBBygAwIBAgIJALDxRLt/tU+0MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDczNFoXDTQ1MDEy
|
||||
+OTEyNDczNFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFtjYjlhMGM4
|
||||
+NS05NDliLTRmMTUtYTlhNS03MjNhNmExMzY3NTRdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBvTCBujAJBgNVHRMEAjAAMEgGDCsGAQQBkggJAYJqAQQ4DDZSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIFBvd2VyLCBsaXR0bGUgZW5kaWFuIEJldGEw
|
||||
+GgYMKwYBBAGSCAkBgmoCBAoMCDkuNyBCZXRhMBkGDCsGAQQBkggJAYJqAwQJDAdw
|
||||
+cGM2NGxlMCwGDCsGAQQBkggJAYJqBAQcDBpyaGVsLTkscmhlbC05LWJldGEtcHBj
|
||||
+NjRsZTANBgkqhkiG9w0BAQsFAAOCAgEARIGB5FE60xrKLHZinX4m6eqq5lAFqvus
|
||||
+HM3jS0R5qrg1QcoPuQGoZdOI3BlBDZXkuaR/K34e2+dCB+qu7LAOs5FqrUBGxL1V
|
||||
+gOVeMehWZN5mDAgEtJNE7rIKa6DlPNGqW1WXcnWqCCpduppGDaHKO6jSqlkxJxrQ
|
||||
+SadszgeVPifp7t1xq4vaFUDEGMZJlYov2uL1WQC2tuLaRJMBQv6OyZvEbC/fxYKX
|
||||
+xena2M9FccS8yr8xJ7SRN/2v3uaPBxjHDUbbGDzoeXCIVPyF0cVDeO3MblANVkcf
|
||||
+RNCu2WUkWGM78wBLVdavwp2Cal++J6kSzImuetCoPaJvRpS4mc/nRMOpcz8ly4DF
|
||||
+4HwNieBT8sJmKlcOXYLyUywvpFdLKQgnSPMEUyAqfhiPsSqy7xQOvgOQ/Cjf5Q6p
|
||||
+xVhEhvi86Puxh80kpbHM+LNFXDmcgVgnsbdBriO4mW+9hnelsa4J+7vn5q43Hsbg
|
||||
+z4LlZpS1PqcNRNa8b65FmEWsvjd74vLowL2SWe0xSbyeqvtWZR5KglOHK9ggsGBz
|
||||
+dKb5vvLTeSXCogtDgl2qkaDSXqYu3Af5/0Zwe57c5MC3k5+0jW91ZjzoTunRgHWo
|
||||
+cDgpyvABKiglu/xKlVzE3Te/Cr11zV1jBwFxsASuIWmI4VPYAtWCAxtG6XrJKfPi
|
||||
+iDaGn3oBNKU=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/363.pem b/repos/system_upgrade/common/files/prod-certs/9.7/363.pem
|
||||
new file mode 100644
|
||||
index 00000000..eb822e4d
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/363.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJjCCBA6gAwIBAgIJALDxRLt/tU+zMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDczNFoXDTQ1MDEy
|
||||
+OTEyNDczNFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs3NTU2NjYw
|
||||
+Ny1mNzBiLTRhNjYtYmI3YS1iOWJlYzU1NTAyY2FdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBrzCBrDAJBgNVHRMEAjAAMDoGDCsGAQQBkggJAYJrAQQqDChSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIEFSTSA2NCBCZXRhMBoGDCsGAQQBkggJAYJr
|
||||
+AgQKDAg5LjcgQmV0YTAZBgwrBgEEAZIICQGCawMECQwHYWFyY2g2NDAsBgwrBgEE
|
||||
+AZIICQGCawQEHAwacmhlbC05LHJoZWwtOS1iZXRhLWFhcmNoNjQwDQYJKoZIhvcN
|
||||
+AQELBQADggIBAJrJftJS2xfoJVxLo76MMFZ6F2RBW+IgyFq45GphNNN8nUUixGTN
|
||||
+exzgAI1TgqqhKvFpDHk49PlSq2syzOWqUuAn1dnxU8W5pfWZuBOs/NxdhCKgGUxT
|
||||
+GrkiRi+RUVoUi9+Qx2P/UvNS/URCrOxyB1HC2x7Pl5r3NaQjf3s6JAfIsxPzptZa
|
||||
+4x/RsRGu2Q41VQgX/ItAzFrPfZh6O94OfwXBP+FwEjSCVA00EGXO+m8BfHE4/eEm
|
||||
+E1C4uw54BwlW5SIy2VCiv96MD+u0YlTITQEMqa+6fXXhiWi9FMjvsfPbldP9iScc
|
||||
+6GXf+hbyUrjhilxva0AuxneBkJb3u7maCNPUEpJ9fhm+A3bPtyhDPG+0AwQCW637
|
||||
+mNrjEGowbGehw4wO+T2+CxdAhR2WPpeLKQgwHxiJgH52OeI0wn7+nkI8I1TK/r6q
|
||||
+JVwGEXi/I5wY0z8oYF5MeU+oE0pA06t471/bM0zTVnzVSFd0UUnVe+1nKjehPtDf
|
||||
+1EI8XCbuTK1lyEiYMMx92T39jrXRjt+mkW3OJRzSCTef8wfbyNxaBo6FTyJG5Jvm
|
||||
+EEaiVpsZs7UEx0CHdCbPJ+gb5SZ7nsmPT2GdJyfhO928dwmJzANYcI1mlDWFjjyx
|
||||
+DJYI+otDEDl3TFh6LXMjM7fPvnIoTq9vvxCgMohrgFWLiUOdcdZSdH4I
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/419.pem b/repos/system_upgrade/common/files/prod-certs/9.7/419.pem
|
||||
new file mode 100644
|
||||
index 00000000..43c22d13
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/419.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGFzCCA/+gAwIBAgIJALDxRLt/tU/JMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDc1NVoXDTQ1MDEy
|
||||
+OTEyNDc1NVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs2NjU1MzE5
|
||||
+Zi1kYWE2LTQyZjQtYmVlYS05OGUwNWJkZDJlMjhdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBoDCBnTAJBgNVHRMEAjAAMDUGDCsGAQQBkggJAYMjAQQlDCNSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIEFSTSA2NDAVBgwrBgEEAZIICQGDIwIEBQwD
|
||||
+OS43MBkGDCsGAQQBkggJAYMjAwQJDAdhYXJjaDY0MCcGDCsGAQQBkggJAYMjBAQX
|
||||
+DBVyaGVsLTkscmhlbC05LWFhcmNoNjQwDQYJKoZIhvcNAQELBQADggIBAG1dALly
|
||||
+8sSax1sy31WsbXTtDkiLyzUMOLCWQtEVo77l8MWse76+LEyvUnSCyYB2V3w6IK5P
|
||||
+IfRGqGPksWGnPHoRgAVvAIwa0DDH9UQl/se4J3dOSLfnkRFAthMew9eLBFzCltCl
|
||||
+fZWmBsR84qfOha4m45QMwogysbIxTPBr6JqrpN0qkc87zBkx2SrtjavTf83g7lGE
|
||||
+0XmRqY8Pyr5SSdHDUmxHSxoDvx1+/Rt2b3d3+nwRrhUgXU+4Ev7P0YyS3T22jZ8g
|
||||
+GVZ330tXOhhIhFWmB5hI7eAwU8IIkxhH+TEsHHWbF4yaGveDnpgIpyGThGnsK3pB
|
||||
+M2BTeB0UiY2COFg6Mm4iODJ2GuM2mDPR0ZAhphGV/JSqZE3N9vSm1rO8tZjc8sDv
|
||||
+xIdHSVQupm5Dbbs6iO31vl+PkQ23WpHtNEVkKhhkUNS5g3rO9P3ULZeFigAWtWuw
|
||||
++IClKc/8R2ksGegS69H4wXXVh1Ie3sHEyWlkB8pgzQmvS0VCX+EhaIs6P8QCu90Z
|
||||
+NLscEhCeLT+pBDISXuf58R6W+DOyetwpFBh7Z5glcw8bmCkne5Su06/9+crfULup
|
||||
+i8/1NtQO28KMvuDdHchtZ6arn0xHSkcwW9NyRBnnjAUjDH0nOvkJVJqzubvNj8uW
|
||||
+7+Bph5JIcD945pirT4gt1WAEhLUPqdBoFfKw
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/433.pem b/repos/system_upgrade/common/files/prod-certs/9.7/433.pem
|
||||
new file mode 100644
|
||||
index 00000000..c3309765
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/433.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGKTCCBBGgAwIBAgIJALDxRLt/tU+1MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDczNFoXDTQ1MDEy
|
||||
+OTEyNDczNFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFtmYzhkZWI4
|
||||
+OS0xZTJjLTRhOWEtOTRlZS01MzBmYWRhNDA0YTddMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBsjCBrzAJBgNVHRMEAjAAMEEGDCsGAQQBkggJAYMxAQQxDC9SZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIElCTSB6IFN5c3RlbXMgQmV0YTAaBgwrBgEE
|
||||
+AZIICQGDMQIECgwIOS43IEJldGEwFwYMKwYBBAGSCAkBgzEDBAcMBXMzOTB4MCoG
|
||||
+DCsGAQQBkggJAYMxBAQaDBhyaGVsLTkscmhlbC05LWJldGEtczM5MHgwDQYJKoZI
|
||||
+hvcNAQELBQADggIBALijiB6VwIQ1IscN4cQJATyy4IP2ZqPq4Uu2v2c+bxlmFSIK
|
||||
+7paz9pWmXYmOSmBQgLYkZ1hkAXQdlj7ECmp5Q/rWscu8yw0obwFk1ned/4PnHf+/
|
||||
+gn3osXUqixnj6RiT2SWlBtTnTqomiwpIeKc/JN0zNcsWagNx/B2Uw+kxfGDW4jF/
|
||||
+L9rw9meOiQQwdzxbQJbiaCQQq1xE0Kx1yDoDDV/7Zg3eDfwzAUUwj1aE6xt9rms2
|
||||
+ZhiP/ATlKYbePgIdqaO2sKLoRBugaaUEUSXSyZA6Q+8B7cO66rTtqsGqf83RjIOi
|
||||
+i5nFTYZwALbUtNFvKN2nhP6ovBPYCX4rTHQ18WqoIzJLEGdO66hchPUP7LnwUJ0i
|
||||
+vHgLrmiVwzh/LjtrXFt6+MMsvqfrxfre+U5OhjMwtyajjwvw7uJJ9tZjkXkDJs2J
|
||||
+cZZCSKbj9T/bU7Rnak0eit2Fw75o3eLXaBOeBGUJgCVLlehSaema997V2LeAXtfU
|
||||
+AcGXvS44YawXXbJHPawW5nXHtHVQnR0M0ksJObvji4DXZndp/TIl0paF5TRPwk7k
|
||||
+XdNzVDx+2MDTo+hrs8CisMhdV+vIHtdRkXLpmgPlsHCrhBcqYiW37h37tYK9EuZP
|
||||
+zViezq0rOn/mroAjemIfo1ZdjTDdQn+xQ/W0MCYk5QKf092PKjplsAYoF87H
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/479.pem b/repos/system_upgrade/common/files/prod-certs/9.7/479.pem
|
||||
new file mode 100644
|
||||
index 00000000..e38d2e54
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/479.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGFTCCA/2gAwIBAgIJALDxRLt/tU/MMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDc1NVoXDTQ1MDEy
|
||||
+OTEyNDc1NVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFsxMmVmNTE1
|
||||
+ZC03OWJhLTRkZjAtYmExMC01ZjE4OGJkYWQ5NGFdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBnjCBmzAJBgNVHRMEAjAAMDUGDCsGAQQBkggJAYNfAQQlDCNSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIHg4Nl82NDAVBgwrBgEEAZIICQGDXwIEBQwD
|
||||
+OS43MBgGDCsGAQQBkggJAYNfAwQIDAZ4ODZfNjQwJgYMKwYBBAGSCAkBg18EBBYM
|
||||
+FHJoZWwtOSxyaGVsLTkteDg2XzY0MA0GCSqGSIb3DQEBCwUAA4ICAQDXiXDrVOMw
|
||||
+eIApNOeZcaveYY6XSkeWv5Kb9/yZShZ00gp3thOawaGWz6/1lwV7TOlp6XLe4OiB
|
||||
+NOWpeA6YNfOjQjIkrjzXIzXc/PhahJEddXq7OaGnHYkL8+vbZQurIHxEZVGnloJi
|
||||
+IbvHWgjXkx0CJ4dX5IEpbBTJYVT+XvO4xgTayipG7c38XvIQif91xwoUBjznxhSh
|
||||
+6e0deGAE/+ho5ouOgDCssD+jz2f7ekCOR3ehe5+9U3u/3cfQ/QnkW7LGRAvr7Vcz
|
||||
+RJx1N49AnsJ+I5FdUxIEMgw0xpXA9WyKRUzImgiMboW+Qw6DaQPIyF8eXj6AKFjs
|
||||
+dFHvi24891HjF7vNBrwLS9jMdrwoNo7+MBGN3M4Q8E6q0K+eRccpYEIt5tLqTBiU
|
||||
+LrP/RPfY7wZaiHrXNFtuHFdBMdgG9SXMAVjThBsSB22LIYeIHbtvXoF5NRF7F2x8
|
||||
+f1BuGRkTpWERDeO0iQCm1feSzhnfpmZ4uqrGKINr98SqHaRv7NyWcEAq8BZ8iMsq
|
||||
+iSmpwRnpK3Y3Z7JZaa5qOyhANvdJjhiV42QNZ9B3WESB5Y22uf643RqcquCSnKTd
|
||||
+RmXymDyyO7NNBUWdBceTdomAOEviDl0FNv5nhGs++eEJHMfKL2rFXYvRyqSwVkIm
|
||||
+Y6MmDGFEYYvHybEKh25m3wrwoZai3LGX4g==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/486.pem b/repos/system_upgrade/common/files/prod-certs/9.7/486.pem
|
||||
new file mode 100644
|
||||
index 00000000..a9c3a580
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/486.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJDCCBAygAwIBAgIJALDxRLt/tU+2MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDczNFoXDTQ1MDEy
|
||||
+OTEyNDczNFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFtkMGEzYzRj
|
||||
+Zi01ZDZjLTQ5OWMtYTQ5Zi01OTFhNzg3ZTI2MWVdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBrTCBqjAJBgNVHRMEAjAAMDoGDCsGAQQBkggJAYNmAQQqDChSZWQgSGF0
|
||||
+IEVudGVycHJpc2UgTGludXggZm9yIHg4Nl82NCBCZXRhMBoGDCsGAQQBkggJAYNm
|
||||
+AgQKDAg5LjcgQmV0YTAYBgwrBgEEAZIICQGDZgMECAwGeDg2XzY0MCsGDCsGAQQB
|
||||
+kggJAYNmBAQbDBlyaGVsLTkscmhlbC05LWJldGEteDg2XzY0MA0GCSqGSIb3DQEB
|
||||
+CwUAA4ICAQBTdLKi7NjqPmP+Sy9Bd0xQRQDNS0Tpvs4OR11rYuBRvQl04maKij4X
|
||||
+OiYWp0/PeQdkT2GMRcU4Yvs3oFtnj9jIAUmDAxT4wCrPUGgxRiwve5RJSRpXwaYt
|
||||
+eCXJVa0TkJ9CPy1h1am5r8/tD+5amftuy5ActB5R1yuiUhtao+ii12BscFBa0GxL
|
||||
+xBYD9Kp0+/bgXWY5vLQfcAdRmCGWnWD7DiH6+63o100RdMM7NKiErzC88GEtzbJJ
|
||||
+hEkBB+BkxhKP+LTiJOXQWwstd6u7E0yk9t5vyCuZmWVUdF1ZEP60+GrY7j4wB1uX
|
||||
+hQ62x2aXnTalx2mFiRJWt3enF9Si2fH+2UOwZm9iRLeblhf+C7N6bpxO/mXkPWEq
|
||||
+cInjmpRzJh8w7nqZU7HFdt0v71ZHDr+Ppu61gStbebJyUNU4R93jqXqatEfzmhTB
|
||||
+beuLeTwf5M0gYt19PHFE5ls8qsjCNbppxNTo4FmpTi8XvSSYoe/FjzoChTZWD8La
|
||||
+w5MQrKxqlScRkI2yWMoNJNfS/0mTE7e7DoEnwbbDWQVdb6Kx7bi5HVMW+PLPsX+U
|
||||
+aeDYf2i6Vlqhr8mtLcV+9HUdDP+a13OOKjIqNRMGnq4Ks+h5XbFpUa10ZTdtqbQJ
|
||||
+Xj72H08QzoBwcZfFwWDODjU5co0X7QAhQ6D6b9b1OrGtt1lXurS53w==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/72.pem b/repos/system_upgrade/common/files/prod-certs/9.7/72.pem
|
||||
new file mode 100644
|
||||
index 00000000..4c6e257c
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/72.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGFjCCA/6gAwIBAgIJALDxRLt/tU/LMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDc1NVoXDTQ1MDEy
|
||||
+OTEyNDc1NVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFtlOWQyNzc3
|
||||
+Mi1hMmFlLTQ1YTUtYjYxMS1jZDViZmY3Y2Y4NTNdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
|
||||
+yW3NssPWt1YUHidMBSAJ4KctIf91dyE93aStlxwC/QnyFsZOmcEsBzVCnz9GmWMl
|
||||
+1/6XzBS1yDUqByklx0TLH+z/sK9A+O2rZAy1mByCYwVxvbOZhnqGxAuToIS+A81v
|
||||
+5hCjsCiOScVB+cil30YBu0cH85RZ0ILNkHdKdrLLWW4wjphK2nBn2g2i3+ztf+nQ
|
||||
+ED2pQqZ/rhuW79jcyCZl9kXqe1wOdF0Cwah4N6/3LzIXEEKyEJxNqQwtNc2IVE8C
|
||||
+AwEAAaOBnzCBnDAJBgNVHRMEAjAAMDsGCysGAQQBkggJAUgBBCwMKlJlZCBIYXQg
|
||||
+RW50ZXJwcmlzZSBMaW51eCBmb3IgSUJNIHogU3lzdGVtczAUBgsrBgEEAZIICQFI
|
||||
+AgQFDAM5LjcwFgYLKwYBBAGSCAkBSAMEBwwFczM5MHgwJAYLKwYBBAGSCAkBSAQE
|
||||
+FQwTcmhlbC05LHJoZWwtOS1zMzkweDANBgkqhkiG9w0BAQsFAAOCAgEAdVhrTT0k
|
||||
+0sBZOpLSW3fWCbIdJ0lChyYtPCii6O4vj5hE1oCV0tHmCGcfEp4j49GXwB6zs3F7
|
||||
+cZsJO2aGrMEZkiGPMTPGW0VV+QKJIq7wo23ogWw/fxF3K3QbFTDNbfdv/E8MRkcN
|
||||
+P9bLgTGqcs9VpNKp48+TovpxtjYeF9/XQi+h5wll5gqEfFnq8VaKi6P9eZvbGuue
|
||||
+DhdItkN+RdHMj8AQpMAezKyOb3QURCBUJMtbvZgJk6tRCHnhF3NSig/h9lbrVqmu
|
||||
+Wd7b/+uw/ElzXsLr6ekHuVH5oI9A9F+4SEFBKjCVvwEkd+FK+P2iudF6YR3Ods6t
|
||||
+uXMBcI9e9bXdzzn3XLKHcpgeDURkPgD8xW/ICut1pFeqO/YnR8xodJ7X+8h4JJpn
|
||||
+yNOFlaqEV0t9BTRGX7vfCSFZ8k07RQLmTvRFUC/OniL50hfUw+L2fedpTD2JtTRN
|
||||
+aeMBN2kiAzKn7K28Ejv6BJcDnohXDMWNfmL85i5jvQ/BMxu7pvFiAuPsGeCZ1Yj5
|
||||
+1s3kQxKzQ/nCE/ZBDLG+B7hlRGNYPoYvfxcNjEaKbYny9jkvb8JqPgRBmowsLcxC
|
||||
+jukhm6gp+R/kkp0nQjnYsoan49ai/YTU4pY0uyDAAfM9h6owwKkO/1PWTiXCqVJK
|
||||
+Rm6ezgUGOYAUA/i4p+LLyIArOUqHwRxJ2S4=
|
||||
+-----END CERTIFICATE-----
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,241 +0,0 @@
|
||||
From 8e0aad41201e080482fbc279fd2d58bc11c20e91 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 18:46:16 +0100
|
||||
Subject: [PATCH 25/44] checkdetecteddevicesanddirvers: Respect distro name in
|
||||
reports
|
||||
|
||||
Also add stable keys to all reports, the keys were generated as if on
|
||||
7->8 upgrade (target major version == 8), the exact titles used for
|
||||
computation:
|
||||
- 'Leapp detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed.'
|
||||
- 'Leapp detected devices which are no longer supported in RHEL 8. Upgrade cannot proceed.'
|
||||
- 'Leapp detected a processor which is no longer supported in RHEL 8. Upgrade cannot proceed.'
|
||||
- 'Leapp detected loaded kernel drivers which are no longer maintained in RHEL 8.'
|
||||
- 'Leapp detected devices which are no longer maintained in RHEL 8'
|
||||
- 'Leapp detected a processor which is no longer maintained in RHEL 8.'
|
||||
|
||||
The following report titles and keys are no longer used as they've been
|
||||
unified with the reports above and now also use the respective keys:
|
||||
|
||||
Leapp detected loaded kernel drivers which have been removed in RHEL 9. Upgrade cannot proceed.
|
||||
- 7ae2961239eec9905e2580fa6309a589b1dca953
|
||||
Leapp detected devices which are no longer supported in RHEL 9. Upgrade cannot proceed.
|
||||
- 0e042eba4d14bd1f1ae691db6389621f778f21ad
|
||||
Leapp detected a processor which is no longer supported in RHEL 9. Upgrade cannot proceed.
|
||||
- f79672290945c09de12a14b28906b98d5c8ed68a
|
||||
Leapp detected loaded kernel drivers which are no longer maintained in RHEL 9.
|
||||
- b03c306f274b33b4cf3c7cd3764366c599681481
|
||||
Leapp detected devices which are no longer maintained in RHEL 9
|
||||
- 65ac6710649c928288162900e8df8316ac8e1bda
|
||||
Leapp detected a processor which is no longer maintained in RHEL 9.
|
||||
- 93f6cf039f01095a59ebaf581ced33316e034ef8
|
||||
Leapp detected loaded kernel drivers which have been removed in RHEL 10. Upgrade cannot proceed.
|
||||
- 48e04852631245aa4afee9adcdc7c2375b8cffb8
|
||||
Leapp detected devices which are no longer supported in RHEL 10. Upgrade cannot proceed.
|
||||
- fa9da5bf370c8477eb4f8366b68ffac2aaae6374
|
||||
Leapp detected a processor which is no longer supported in RHEL 10. Upgrade cannot proceed.
|
||||
- f6199d8526ee41c3e89b4ed11b3f8ee90cfc6f9f
|
||||
Leapp detected loaded kernel drivers which are no longer maintained in RHEL 10.
|
||||
- fbb11ae5828d624c4e4c91e73d766c8e27b066d9
|
||||
Leapp detected devices which are no longer maintained in RHEL 10
|
||||
- 93f67baabd93c00625fce5ad47edbf19972e41a0
|
||||
Leapp detected a processor which is no longer maintained in RHEL 10.
|
||||
- 9dde4bcd8b458bd6803462216785df3a1476c1f8
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../libraries/checkdddd.py | 70 +++++++++++--------
|
||||
1 file changed, 41 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py b/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
index 1f01adde..22a39c29 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
@@ -3,6 +3,7 @@ from enum import IntEnum
|
||||
|
||||
from leapp import reporting
|
||||
from leapp.libraries.common.config.version import get_source_major_version, get_target_major_version
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import DetectedDeviceOrDriver
|
||||
|
||||
@@ -22,17 +23,19 @@ def create_inhibitors(inhibiting_entries):
|
||||
if drivers:
|
||||
reporting.create_report([
|
||||
reporting.Title(
|
||||
- 'Leapp detected loaded kernel drivers which have been removed '
|
||||
- 'in RHEL {}. Upgrade cannot proceed.'.format(get_target_major_version())
|
||||
+ 'Leapp detected loaded kernel drivers that have been removed in'
|
||||
+ ' the target OS. Upgrade cannot proceed.'
|
||||
),
|
||||
reporting.Summary(
|
||||
(
|
||||
- 'Support for the following RHEL {source} device drivers has been removed in RHEL {target}:\n'
|
||||
+ 'Support for the following {source_distro} {source_version} device drivers has'
|
||||
+ ' been removed in {target_distro} {target_version}:\n'
|
||||
' - {drivers}\n'
|
||||
).format(
|
||||
drivers='\n - '.join([entry.driver_name for entry in drivers]),
|
||||
- target=get_target_major_version(),
|
||||
- source=get_source_major_version(),
|
||||
+ target_version=get_target_major_version(),
|
||||
+ source_version=get_source_major_version(),
|
||||
+ **DISTRO_REPORT_NAMES
|
||||
)
|
||||
),
|
||||
reporting.ExternalLink(
|
||||
@@ -52,52 +55,57 @@ def create_inhibitors(inhibiting_entries):
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL, reporting.Groups.DRIVERS]),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
+ reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
+ reporting.Key('f08a07da902958defa4f5c2699fae9ec2eb67c5b'),
|
||||
])
|
||||
|
||||
devices = inhibiting_entries.get(MessagingClass.DEVICES)
|
||||
if devices:
|
||||
reporting.create_report([
|
||||
reporting.Title(
|
||||
- 'Leapp detected devices which are no longer supported in RHEL {}. Upgrade cannot proceed.'.format(
|
||||
- get_target_major_version())
|
||||
+ 'Leapp detected devices no longer supported by the target OS.'
|
||||
+ ' Upgrade cannot proceed.'
|
||||
),
|
||||
reporting.Summary(
|
||||
(
|
||||
- 'Support for the following devices has been removed in RHEL {target}:\n'
|
||||
+ 'Support for the following devices has been removed in {target_distro} {version}:\n'
|
||||
' - {devices}\n'
|
||||
).format(
|
||||
devices='\n - '.join(['{name} ({pci})'.format(name=entry.device_name,
|
||||
pci=entry.device_id) for entry in devices]),
|
||||
- target=get_target_major_version(),
|
||||
+ version=get_target_major_version(),
|
||||
+ **DISTRO_REPORT_NAMES
|
||||
)
|
||||
),
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL]),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
+ reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
+ reporting.Key('ccfc28592c82123649fc824c6c1c89cabfceae7c'),
|
||||
])
|
||||
|
||||
cpus = inhibiting_entries.get(MessagingClass.CPUS)
|
||||
if cpus:
|
||||
reporting.create_report([
|
||||
reporting.Title(
|
||||
- 'Leapp detected a processor which is no longer supported in RHEL {}. Upgrade cannot proceed.'.format(
|
||||
- get_target_major_version())
|
||||
+ 'Leapp detected a processor no longer supported by the target OS.'
|
||||
+ ' Upgrade cannot proceed.'
|
||||
),
|
||||
reporting.Summary(
|
||||
(
|
||||
- 'Support for the following processors has been removed in RHEL {target}:\n'
|
||||
+ 'Support for the following processors has been removed in {target_distro} {version}:\n'
|
||||
' - {processors}\n'
|
||||
).format(
|
||||
processors='\n - '.join([entry.device_name for entry in cpus]),
|
||||
- target=get_target_major_version(),
|
||||
+ version=get_target_major_version(),
|
||||
+ **DISTRO_REPORT_NAMES
|
||||
)
|
||||
),
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL, reporting.Groups.BOOT]),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
+ reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
+ reporting.Key('e3e9e4d2566733e2f843db9823c8568b9b6922f9'),
|
||||
])
|
||||
|
||||
|
||||
@@ -109,65 +117,69 @@ def create_warnings(unmaintained_entries):
|
||||
if drivers:
|
||||
reporting.create_report([
|
||||
reporting.Title(
|
||||
- 'Leapp detected loaded kernel drivers which are no longer maintained in RHEL {}.'.format(
|
||||
- get_target_major_version())
|
||||
+ 'Leapp detected loaded kernel drivers no longer maintained in the target OS'
|
||||
),
|
||||
reporting.Summary(
|
||||
(
|
||||
- 'The following RHEL {source} device drivers are no longer maintained RHEL {target}:\n'
|
||||
+ 'The following {source_distro} {source_version} device drivers are no longer'
|
||||
+ ' maintained {target_distro} {target_version}:\n'
|
||||
' - {drivers}\n'
|
||||
).format(
|
||||
drivers='\n - '.join([entry.driver_name for entry in drivers]),
|
||||
- target=get_target_major_version(),
|
||||
- source=get_source_major_version(),
|
||||
+ target_version=get_target_major_version(),
|
||||
+ source_version=get_source_major_version(),
|
||||
+ **DISTRO_REPORT_NAMES
|
||||
)
|
||||
),
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL, reporting.Groups.DRIVERS]),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Key('0ff2413fd3cb0358736bf9be597f4dbdf58f2c4d'),
|
||||
])
|
||||
|
||||
devices = unmaintained_entries.get(MessagingClass.DEVICES)
|
||||
if devices:
|
||||
reporting.create_report([
|
||||
reporting.Title(
|
||||
- 'Leapp detected devices which are no longer maintained in RHEL {}'.format(
|
||||
- get_target_major_version())
|
||||
+ 'Leapp detected devices no longer maintained in the target OS'
|
||||
),
|
||||
reporting.Summary(
|
||||
(
|
||||
- 'The support for the following devices has been removed in RHEL {target} and '
|
||||
+ 'The support for the following devices has been removed in {target_distro} {version} and '
|
||||
'are no longer maintained:\n - {devices}\n'
|
||||
).format(
|
||||
devices='\n - '.join(['{name} ({pci})'.format(name=entry.device_name,
|
||||
pci=entry.device_id) for entry in devices]),
|
||||
- target=get_target_major_version(),
|
||||
+ version=get_target_major_version(),
|
||||
+ **DISTRO_REPORT_NAMES
|
||||
)
|
||||
),
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL]),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Key('261e3e55a3a80346f2fcc2a1e59c64f7a4caa263'),
|
||||
])
|
||||
|
||||
cpus = unmaintained_entries.get(MessagingClass.CPUS)
|
||||
if cpus:
|
||||
reporting.create_report([
|
||||
reporting.Title(
|
||||
- 'Leapp detected a processor which is no longer maintained in RHEL {}.'.format(
|
||||
- get_target_major_version())
|
||||
+ 'Leapp detected a processor no longer maintained in the target OS'
|
||||
),
|
||||
reporting.Summary(
|
||||
(
|
||||
- 'The following processors are no longer maintained in RHEL {target}:\n'
|
||||
+ 'The following processors are no longer maintained in {target_distro} {version}:\n'
|
||||
' - {processors}\n'
|
||||
).format(
|
||||
processors='\n - '.join([entry.device_name for entry in cpus]),
|
||||
- target=get_target_major_version(),
|
||||
+ version=get_target_major_version(),
|
||||
+ **DISTRO_REPORT_NAMES
|
||||
)
|
||||
),
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL, reporting.Groups.BOOT]),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Key('61eb181bbc56328fbe03b5229d25a8ea5ebdc7a2'),
|
||||
])
|
||||
|
||||
|
||||
--
|
||||
2.53.0
|
||||
|
||||
178
SOURCES/0026-Add-handling-of-shorten-PCI-ID-and-lowercases.patch
Normal file
178
SOURCES/0026-Add-handling-of-shorten-PCI-ID-and-lowercases.patch
Normal file
@ -0,0 +1,178 @@
|
||||
From 9c621a91199c093f603ef30ba3daf59010c20e47 Mon Sep 17 00:00:00 2001
|
||||
From: karolinku <kkula@redhat.com>
|
||||
Date: Thu, 10 Apr 2025 09:14:51 +0200
|
||||
Subject: [PATCH 26/37] Add handling of shorten PCI ID and lowercases
|
||||
|
||||
HW data file is inconsistent and sometimes contains both upper/lower
|
||||
cases so this patch is unifying it. Also PCI ID can be passed as full
|
||||
ID: Vendor:Device:SVendor:SDevice, but also in shorten version:
|
||||
Vendor:Device. This patch introduce handling of both cases.
|
||||
|
||||
The data comming from DDDD file was sanitised.
|
||||
|
||||
JIRA: RHEL-72544
|
||||
---
|
||||
.../deviceanddriverdeprecationdataload.py | 9 +++
|
||||
.../libraries/pcidevicesscanner.py | 19 ++++--
|
||||
.../tests/test_pcidevicesscanner.py | 64 +++++++++++++++++--
|
||||
3 files changed, 81 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/loaddevicedriverdeprecationdata/libraries/deviceanddriverdeprecationdataload.py b/repos/system_upgrade/common/actors/loaddevicedriverdeprecationdata/libraries/deviceanddriverdeprecationdataload.py
|
||||
index b12e77c9..acea583d 100644
|
||||
--- a/repos/system_upgrade/common/actors/loaddevicedriverdeprecationdata/libraries/deviceanddriverdeprecationdataload.py
|
||||
+++ b/repos/system_upgrade/common/actors/loaddevicedriverdeprecationdata/libraries/deviceanddriverdeprecationdataload.py
|
||||
@@ -25,6 +25,15 @@ def process():
|
||||
docs_url='',
|
||||
docs_title='')
|
||||
|
||||
+ # Unify all device ids to lowercase
|
||||
+ try:
|
||||
+ for entry in deprecation_data['data']:
|
||||
+ if "device_id" in entry.keys():
|
||||
+ entry["device_id"] = entry.get("device_id").lower()
|
||||
+ except (KeyError, AttributeError, TypeError):
|
||||
+ # this may happen if receiving invalid data
|
||||
+ pass
|
||||
+
|
||||
try:
|
||||
api.produce(
|
||||
DeviceDriverDeprecationData(
|
||||
diff --git a/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py b/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
index eb063abb..285a8a21 100644
|
||||
--- a/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
@@ -60,7 +60,7 @@ def parse_pci_device(textual_block, numeric_block):
|
||||
driver=device['Driver'],
|
||||
modules=device['Module'],
|
||||
numa_node=device['NUMANode'],
|
||||
- pci_id=":".join(PCI_ID_REG.findall(numeric_block))
|
||||
+ pci_id=(":".join(PCI_ID_REG.findall(numeric_block)).lower())
|
||||
)
|
||||
|
||||
|
||||
@@ -78,14 +78,19 @@ def parse_pci_devices(pci_textual, pci_numeric):
|
||||
def produce_detected_devices(devices):
|
||||
prefix_re = re.compile('0x')
|
||||
entry_lookup = {
|
||||
- prefix_re.sub('', entry.device_id): entry
|
||||
+ prefix_re.sub('', entry.device_id.lower()): entry
|
||||
for message in api.consume(DeviceDriverDeprecationData) for entry in message.entries
|
||||
}
|
||||
- api.produce(*[
|
||||
- DetectedDeviceOrDriver(**entry_lookup[device.pci_id].dump())
|
||||
- for device in devices
|
||||
- if device.pci_id in entry_lookup
|
||||
- ])
|
||||
+
|
||||
+ device_list = []
|
||||
+ for device in devices:
|
||||
+ shorten_pci_id = ":".join(device.pci_id.split(':')[:-2])
|
||||
+ if device.pci_id in entry_lookup:
|
||||
+ device_list.append(DetectedDeviceOrDriver(**entry_lookup[device.pci_id].dump()))
|
||||
+ elif shorten_pci_id in entry_lookup:
|
||||
+ device_list.append(DetectedDeviceOrDriver(**entry_lookup[shorten_pci_id].dump()))
|
||||
+
|
||||
+ api.produce(*device_list)
|
||||
|
||||
|
||||
def produce_detected_drivers(devices):
|
||||
diff --git a/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py b/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
index 4bd545ba..2bfde232 100644
|
||||
--- a/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
@@ -2,8 +2,16 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
-from leapp.libraries.actor.pcidevicesscanner import parse_pci_devices, produce_pci_devices
|
||||
-from leapp.models import PCIDevice, PCIDevices
|
||||
+from leapp.libraries.actor.pcidevicesscanner import parse_pci_devices, produce_detected_devices, produce_pci_devices
|
||||
+from leapp.libraries.common.testutils import CurrentActorMocked, produce_mocked
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import (
|
||||
+ DetectedDeviceOrDriver,
|
||||
+ DeviceDriverDeprecationData,
|
||||
+ DeviceDriverDeprecationEntry,
|
||||
+ PCIDevice,
|
||||
+ PCIDevices
|
||||
+)
|
||||
|
||||
|
||||
def test_parse_pci_devices():
|
||||
@@ -37,9 +45,9 @@ Module: ata_generic
|
||||
'''
|
||||
devices_numeric = '''Slot: 00:00.0
|
||||
Class: Host bridge
|
||||
-Vendor: 15b45
|
||||
+Vendor: 15B45
|
||||
Device: 0724
|
||||
-SVendor: 15b46
|
||||
+SVendor: 15B46
|
||||
SDevice: 0725
|
||||
PhySlot: 3
|
||||
Rev: 02
|
||||
@@ -76,6 +84,7 @@ Module: ata_generic
|
||||
assert dev.progif == '80'
|
||||
assert dev.driver == 'ata_piix'
|
||||
assert dev.pci_id == '15b43:0722'
|
||||
+ assert dev.pci_id.islower() is True
|
||||
assert len(dev.modules) == 3
|
||||
assert 'ata_piix' in dev.modules
|
||||
assert 'pata_acpi' in dev.modules
|
||||
@@ -206,6 +215,53 @@ def test_produce_no_devices():
|
||||
assert not output[0].devices
|
||||
|
||||
|
||||
+def test_shorten_id(monkeypatch):
|
||||
+
|
||||
+ input_data = [PCIDevice(
|
||||
+ slot='b765:00:02.0',
|
||||
+ dev_cls='Ethernet controller',
|
||||
+ vendor='Mellanox Technologies',
|
||||
+ name='MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function]',
|
||||
+ subsystem_vendor='Mellanox Technologies',
|
||||
+ subsystem_name='Device 61b0',
|
||||
+ physical_slot='2',
|
||||
+ rev='',
|
||||
+ progif='',
|
||||
+ driver='mlx4_core',
|
||||
+ modules=['mlx4_core'],
|
||||
+ numa_node='0',
|
||||
+ pci_id='15b3:1004:15b3:61b0'
|
||||
+ )]
|
||||
+
|
||||
+ messages = [DeviceDriverDeprecationData(entries=[DeviceDriverDeprecationEntry(
|
||||
+ available_in_rhel=[7, 8, 9],
|
||||
+ deprecation_announced="",
|
||||
+ device_id="0x15B3:0x1004",
|
||||
+ device_name="Mellanox Technologies: MT27500 Family [ConnectX-3 Virtual Function]",
|
||||
+ device_type="pci",
|
||||
+ driver_name="mlx4_core",
|
||||
+ maintained_in_rhel=[7, 8]
|
||||
+ )])]
|
||||
+
|
||||
+ expected_output = DetectedDeviceOrDriver(
|
||||
+ available_in_rhel=[7, 8, 9],
|
||||
+ deprecation_announced="",
|
||||
+ device_id="0x15B3:0x1004",
|
||||
+ device_name="Mellanox Technologies: MT27500 Family [ConnectX-3 Virtual Function]",
|
||||
+ device_type="pci",
|
||||
+ driver_name="mlx4_core",
|
||||
+ maintained_in_rhel=[7, 8]
|
||||
+ )
|
||||
+
|
||||
+ current_actor = CurrentActorMocked(msgs=messages, src_ver='8.10', dst_ver='9.6')
|
||||
+ monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ produce_detected_devices(input_data)
|
||||
+ assert api.produce.model_instances
|
||||
+ assert expected_output == api.produce.model_instances[0]
|
||||
+
|
||||
+
|
||||
# TODO(pstodulk): update the test - drop current_actor_context and use monkeypatch
|
||||
@pytest.mark.skipif(not os.path.exists('/usr/sbin/lspci'), reason='lspci not installed on the system')
|
||||
def test_actor_execution(current_actor_context):
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,140 +0,0 @@
|
||||
From e9fa8aac4b32baaaf171c1cd6cd25f88a78d36a0 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Mon, 2 Mar 2026 19:01:02 +0100
|
||||
Subject: [PATCH 26/44] reportleftoverpackages: Respect distro name in reports
|
||||
|
||||
The actors is also moved from the reportleftoverpackages actor
|
||||
subdirectory to the root actor directory.
|
||||
|
||||
Also add stable report keys to the reports. The keys were computed using
|
||||
titles:
|
||||
- 'Leftover RHEL packages have been removed'
|
||||
- 'Some RHEL packages have not been upgraded'
|
||||
|
||||
Jira: RHEL-130950
|
||||
---
|
||||
.../{reportleftoverpackages => }/actor.py | 8 ++++----
|
||||
.../libraries/reportleftoverpackages.py | 17 +++++++++++------
|
||||
.../tests/test_reportleftoverpackages.py | 9 ++++++---
|
||||
3 files changed, 21 insertions(+), 13 deletions(-)
|
||||
rename repos/system_upgrade/common/actors/reportleftoverpackages/{reportleftoverpackages => }/actor.py (61%)
|
||||
rename repos/system_upgrade/common/actors/reportleftoverpackages/{reportleftoverpackages => }/libraries/reportleftoverpackages.py (73%)
|
||||
rename repos/system_upgrade/common/actors/reportleftoverpackages/{reportleftoverpackages => }/tests/test_reportleftoverpackages.py (86%)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/actor.py b/repos/system_upgrade/common/actors/reportleftoverpackages/actor.py
|
||||
similarity index 61%
|
||||
rename from repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/actor.py
|
||||
rename to repos/system_upgrade/common/actors/reportleftoverpackages/actor.py
|
||||
index 58573451..d0640774 100644
|
||||
--- a/repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/reportleftoverpackages/actor.py
|
||||
@@ -7,11 +7,11 @@ from leapp.tags import IPUWorkflowTag, RPMUpgradePhaseTag
|
||||
|
||||
class ReportLeftoverPackages(Actor):
|
||||
"""
|
||||
- Collect messages about leftover RHEL packages from older major versions and generate a report.
|
||||
+ Generate a report about leftover distribution packages from older major versions.
|
||||
|
||||
- Depending on execution of previous actors,
|
||||
- generated report contains information that there are still old RHEL packages
|
||||
- present on the system, which makes it unsupported or lists packages that have been removed.
|
||||
+ Generated report informs about old distribution packages present on the system,
|
||||
+ which makes it unsupported, and lists packages that have been removed if there
|
||||
+ were any.
|
||||
"""
|
||||
|
||||
name = 'report_leftover_packages'
|
||||
diff --git a/repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/libraries/reportleftoverpackages.py b/repos/system_upgrade/common/actors/reportleftoverpackages/libraries/reportleftoverpackages.py
|
||||
similarity index 73%
|
||||
rename from repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/libraries/reportleftoverpackages.py
|
||||
rename to repos/system_upgrade/common/actors/reportleftoverpackages/libraries/reportleftoverpackages.py
|
||||
index 51bda931..cd45ac87 100644
|
||||
--- a/repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/libraries/reportleftoverpackages.py
|
||||
+++ b/repos/system_upgrade/common/actors/reportleftoverpackages/libraries/reportleftoverpackages.py
|
||||
@@ -1,4 +1,5 @@
|
||||
from leapp import reporting
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import LeftoverPackages, RemovedPackages
|
||||
|
||||
@@ -11,15 +12,16 @@ def process():
|
||||
leftover_pkgs_to_remove = ['-'.join([pkg.name, pkg.version, pkg.release]) for pkg in leftover_packages.items]
|
||||
|
||||
if removed_packages and removed_packages.items:
|
||||
- title = 'Leftover RHEL packages have been removed'
|
||||
+ title = 'Leftover packages from the original OS have been removed'
|
||||
removed = ['-'.join([pkg.name, pkg.version, pkg.release]) for pkg in removed_packages.items]
|
||||
summary = (
|
||||
- 'Following packages have been removed:{sep}{list}\n'
|
||||
+ 'Following {source_distro} packages have been removed:{sep}{list}\n'
|
||||
'Dependent packages may have been removed as well, please check that you are not missing '
|
||||
'any packages.'
|
||||
.format(
|
||||
sep=FMT_LIST_SEPARATOR,
|
||||
- list=FMT_LIST_SEPARATOR.join(removed)
|
||||
+ list=FMT_LIST_SEPARATOR.join(removed),
|
||||
+ **DISTRO_REPORT_NAMES
|
||||
)
|
||||
)
|
||||
reporting.create_report([
|
||||
@@ -27,23 +29,26 @@ def process():
|
||||
reporting.Summary(summary),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.SANITY]),
|
||||
+ reporting.Key('5afbad560709afa4e40a160e40dfd44788ba9c3b'),
|
||||
] + [reporting.RelatedResource('package', pkg.name) for pkg in removed_packages.items])
|
||||
return
|
||||
|
||||
if leftover_packages and leftover_packages.items:
|
||||
summary = (
|
||||
- 'Following RHEL packages have not been upgraded:{sep}{list}\n'
|
||||
+ 'Following {source_distro} packages have not been upgraded:{sep}{list}\n'
|
||||
'Please remove these packages to keep your system in supported state.'
|
||||
.format(
|
||||
sep=FMT_LIST_SEPARATOR,
|
||||
- list=FMT_LIST_SEPARATOR.join(leftover_pkgs_to_remove)
|
||||
+ list=FMT_LIST_SEPARATOR.join(leftover_pkgs_to_remove),
|
||||
+ **DISTRO_REPORT_NAMES
|
||||
)
|
||||
)
|
||||
reporting.create_report([
|
||||
- reporting.Title('Some RHEL packages have not been upgraded'),
|
||||
+ reporting.Title('Some packages from the original OS have not been upgraded'),
|
||||
reporting.Summary(summary),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.SANITY]),
|
||||
+ reporting.Key('d424c3132ed78a8632b5c73d919909e453107c06'),
|
||||
] + [reporting.RelatedResource('package', pkg.name) for pkg in leftover_packages.items])
|
||||
else:
|
||||
api.current_logger().info('No leftover packages, skipping...')
|
||||
diff --git a/repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/tests/test_reportleftoverpackages.py b/repos/system_upgrade/common/actors/reportleftoverpackages/tests/test_reportleftoverpackages.py
|
||||
similarity index 86%
|
||||
rename from repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/tests/test_reportleftoverpackages.py
|
||||
rename to repos/system_upgrade/common/actors/reportleftoverpackages/tests/test_reportleftoverpackages.py
|
||||
index ff493c57..9502bfd2 100644
|
||||
--- a/repos/system_upgrade/common/actors/reportleftoverpackages/reportleftoverpackages/tests/test_reportleftoverpackages.py
|
||||
+++ b/repos/system_upgrade/common/actors/reportleftoverpackages/tests/test_reportleftoverpackages.py
|
||||
@@ -27,7 +27,10 @@ def test_no_removed_packages_leftover_present(monkeypatch):
|
||||
reportleftoverpackages.process()
|
||||
|
||||
assert reporting.create_report.called == 1
|
||||
- assert 'Some RHEL packages have not been upgraded' in reporting.create_report.report_fields['title']
|
||||
+ assert (
|
||||
+ 'Some packages from the original OS have not been upgraded'
|
||||
+ in reporting.create_report.report_fields['title']
|
||||
+ )
|
||||
assert 'Following RHEL packages have not been upgraded' in reporting.create_report.report_fields['summary']
|
||||
summary = 'Please remove these packages to keep your system in supported state.'
|
||||
assert summary in reporting.create_report.report_fields['summary']
|
||||
@@ -44,6 +47,6 @@ def test_removed_packages(monkeypatch):
|
||||
reportleftoverpackages.process()
|
||||
|
||||
assert reporting.create_report.called == 1
|
||||
- assert 'Leftover RHEL packages have been removed' in reporting.create_report.report_fields['title']
|
||||
- assert 'Following packages have been removed' in reporting.create_report.report_fields['summary']
|
||||
+ assert 'Leftover packages from the original OS have been removed' in reporting.create_report.report_fields['title']
|
||||
+ assert 'Following RHEL packages have been removed' in reporting.create_report.report_fields['summary']
|
||||
assert 'rpm-1.0-1.el7' in reporting.create_report.report_fields['summary']
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,125 @@
|
||||
From d7d37caae69e27caec73d35236bedb6e1e70bcd4 Mon Sep 17 00:00:00 2001
|
||||
From: karolinku <kkula@redhat.com>
|
||||
Date: Wed, 7 May 2025 13:35:37 +0200
|
||||
Subject: [PATCH 27/37] Prevent device list from containing incorrent content
|
||||
|
||||
Some PCI devices got from lspci output do not have to neccessarily
|
||||
provide SVendor and SDevice fields. PCI ID of such devices is
|
||||
composed in the pci_device_scanner actor just from:
|
||||
Vendor:Device
|
||||
instead of the full id:
|
||||
Vendor:Device:SVendor:SDevice
|
||||
|
||||
The recent change comparing such devices with bundled DDDD
|
||||
data drops last two fragments from the composed PCI ID,
|
||||
which led to the situation when the `shortened_pci_id`
|
||||
resulted in an empty string and it has been incorrectly
|
||||
matched with one of (consider random) drivers and possibly
|
||||
inhibited the in-place upgrade.
|
||||
|
||||
So let's ensure that we do not match any PCI device with
|
||||
any entry from DDDD undefined PCI ID.
|
||||
|
||||
JIRA: RHEL-72544
|
||||
---
|
||||
.../libraries/pcidevicesscanner.py | 1 +
|
||||
.../tests/test_pcidevicesscanner.py | 71 +++++++++++++++++++
|
||||
2 files changed, 72 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py b/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
index 285a8a21..36e4f7e0 100644
|
||||
--- a/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
@@ -80,6 +80,7 @@ def produce_detected_devices(devices):
|
||||
entry_lookup = {
|
||||
prefix_re.sub('', entry.device_id.lower()): entry
|
||||
for message in api.consume(DeviceDriverDeprecationData) for entry in message.entries
|
||||
+ if entry.device_id
|
||||
}
|
||||
|
||||
device_list = []
|
||||
diff --git a/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py b/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
index 2bfde232..e8e4bb99 100644
|
||||
--- a/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
@@ -262,6 +262,77 @@ def test_shorten_id(monkeypatch):
|
||||
assert expected_output == api.produce.model_instances[0]
|
||||
|
||||
|
||||
+def test_cut_pci_id(monkeypatch):
|
||||
+
|
||||
+ input_data = [
|
||||
+ PCIDevice(
|
||||
+ slot='00:03.0',
|
||||
+ dev_cls='Ethernet controller',
|
||||
+ vendor='Intel Corporation',
|
||||
+ name='82599 Ethernet Controller Virtual Function',
|
||||
+ subsystem_vendor='',
|
||||
+ subsystem_name='',
|
||||
+ physical_slot='3',
|
||||
+ rev='01',
|
||||
+ progif='',
|
||||
+ driver='ixgbevf',
|
||||
+ modules=['ixgbevf'],
|
||||
+ numa_node='',
|
||||
+ pci_id='8086:10ed'
|
||||
+ ),
|
||||
+ PCIDevice(
|
||||
+ slot='b765:00:02.0',
|
||||
+ dev_cls='Ethernet controller',
|
||||
+ vendor='Mellanox Technologies',
|
||||
+ name='MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function]',
|
||||
+ subsystem_vendor='Mellanox Technologies',
|
||||
+ subsystem_name='Device 61b0',
|
||||
+ physical_slot='2',
|
||||
+ rev='',
|
||||
+ progif='',
|
||||
+ driver='mlx4_core',
|
||||
+ modules=['mlx4_core'],
|
||||
+ numa_node='0',
|
||||
+ pci_id='15b3:1004:15b3:61b0'
|
||||
+ )]
|
||||
+
|
||||
+ messages = [DeviceDriverDeprecationData(entries=[DeviceDriverDeprecationEntry(
|
||||
+ available_in_rhel=[7],
|
||||
+ deprecation_announced='',
|
||||
+ device_id='',
|
||||
+ device_name='',
|
||||
+ device_type='pci',
|
||||
+ driver_name='wil6210',
|
||||
+ maintained_in_rhel=[]
|
||||
+ ),
|
||||
+ DeviceDriverDeprecationEntry(
|
||||
+ available_in_rhel=[7, 8, 9],
|
||||
+ deprecation_announced="",
|
||||
+ device_id="0x15B3:0x1004",
|
||||
+ device_name="Mellanox Technologies: MT27500 Family [ConnectX-3 Virtual Function]",
|
||||
+ device_type="pci",
|
||||
+ driver_name="mlx4_core",
|
||||
+ maintained_in_rhel=[7, 8])]
|
||||
+ )]
|
||||
+
|
||||
+ expected_output = DetectedDeviceOrDriver(
|
||||
+ available_in_rhel=[7, 8, 9],
|
||||
+ deprecation_announced="",
|
||||
+ device_id="0x15B3:0x1004",
|
||||
+ device_name="Mellanox Technologies: MT27500 Family [ConnectX-3 Virtual Function]",
|
||||
+ device_type="pci",
|
||||
+ driver_name="mlx4_core",
|
||||
+ maintained_in_rhel=[7, 8]
|
||||
+ )
|
||||
+ current_actor = CurrentActorMocked(msgs=messages, src_ver='8.10', dst_ver='9.6')
|
||||
+ monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ produce_detected_devices(input_data)
|
||||
+ assert api.produce.model_instances
|
||||
+ assert expected_output == api.produce.model_instances[0]
|
||||
+
|
||||
+
|
||||
# TODO(pstodulk): update the test - drop current_actor_context and use monkeypatch
|
||||
@pytest.mark.skipif(not os.path.exists('/usr/sbin/lspci'), reason='lspci not installed on the system')
|
||||
def test_actor_execution(current_actor_context):
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From 9f0cbbcb5a75f77b226cf385b6179f93fbdf9bc0 Mon Sep 17 00:00:00 2001
|
||||
From: Sergii Golovatiuk <sgolovat@redhat.com>
|
||||
Date: Wed, 18 Mar 2026 17:19:38 +0100
|
||||
Subject: [PATCH 27/44] fix(overlaygen): exclude hugetlbfs from overlay mounts
|
||||
|
||||
hugetlbfs should not be mounted in the overlay environment during the
|
||||
upgrade. It's not a regular mount point. This patch adds it to the
|
||||
OVERLAY_DO_NOT_MOUNT exclusion list.
|
||||
|
||||
Resolves: RHEL-156902
|
||||
|
||||
Signed-off-by: Sergii Golovatiuk <sgolovat@redhat.com>
|
||||
---
|
||||
repos/system_upgrade/common/libraries/overlaygen.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/overlaygen.py b/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
index 3091ab5b..9fdaadf9 100644
|
||||
--- a/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
+++ b/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
@@ -10,7 +10,7 @@ from leapp.libraries.common.config import get_env
|
||||
from leapp.libraries.common.config.version import get_target_major_version
|
||||
from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
|
||||
-OVERLAY_DO_NOT_MOUNT = ('tmpfs', 'devtmpfs', 'devpts', 'sysfs', 'proc', 'cramfs', 'sysv', 'vfat')
|
||||
+OVERLAY_DO_NOT_MOUNT = ('tmpfs', 'devtmpfs', 'devpts', 'sysfs', 'proc', 'cramfs', 'sysv', 'vfat', 'hugetlbfs')
|
||||
|
||||
# NOTE(pstodulk): what about using more closer values and than just multiply
|
||||
# the final result by magical constant?... this number is most likely going to
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -1,121 +0,0 @@
|
||||
From 4c303cb3d30f891aa5d5d3ff4b3675deb41c6385 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Mon, 16 Mar 2026 23:10:49 +0100
|
||||
Subject: [PATCH 28/44] biosdevname: Fix check of naming scheme and tests
|
||||
|
||||
The original check matched also NIC names with suffixes that do not
|
||||
correspond to biosdevname naming scheme (e.g. "em0net"). Make the
|
||||
check strict for the whole ^string$ and update tests to cover the
|
||||
scenario.
|
||||
|
||||
Also I made small refactorings in tests
|
||||
* so in case of failure it's visible what input data caused the
|
||||
failure
|
||||
* minimize changes needed to do with planned update of Interface model
|
||||
---
|
||||
.../biosdevname/libraries/biosdevname.py | 4 +-
|
||||
.../biosdevname/tests/test_biosdevname.py | 73 ++++++++-----------
|
||||
2 files changed, 31 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/biosdevname/libraries/biosdevname.py b/repos/system_upgrade/common/actors/biosdevname/libraries/biosdevname.py
|
||||
index a6b4a242..e2f4b1d1 100644
|
||||
--- a/repos/system_upgrade/common/actors/biosdevname/libraries/biosdevname.py
|
||||
+++ b/repos/system_upgrade/common/actors/biosdevname/libraries/biosdevname.py
|
||||
@@ -27,8 +27,8 @@ def is_vendor_dell():
|
||||
|
||||
def all_interfaces_biosdevname(interfaces):
|
||||
# Biosdevname supports two naming schemes
|
||||
- emx = re.compile('em[0-9]+')
|
||||
- pxpy = re.compile('p[0-9]+p[0-9]+')
|
||||
+ emx = re.compile('^em[0-9]+$')
|
||||
+ pxpy = re.compile('^p[0-9]+p[0-9]+$')
|
||||
|
||||
for i in interfaces:
|
||||
if emx.match(i.name) is None and pxpy.match(i.name) is None:
|
||||
diff --git a/repos/system_upgrade/common/actors/biosdevname/tests/test_biosdevname.py b/repos/system_upgrade/common/actors/biosdevname/tests/test_biosdevname.py
|
||||
index 427eea54..3aa8c614 100644
|
||||
--- a/repos/system_upgrade/common/actors/biosdevname/tests/test_biosdevname.py
|
||||
+++ b/repos/system_upgrade/common/actors/biosdevname/tests/test_biosdevname.py
|
||||
@@ -59,50 +59,35 @@ def test_is_vendor_is_not_dell(monkeypatch):
|
||||
assert not biosdevname.is_vendor_dell()
|
||||
|
||||
|
||||
-def test_all_interfaces_biosdevname(monkeypatch):
|
||||
- pci_info = PCIAddress(domain="domain", function="function", bus="bus", device="device")
|
||||
-
|
||||
- interfaces = [
|
||||
- Interface(
|
||||
- name="eth0", mac="mac", vendor="dell", pci_info=pci_info, devpath="path", driver="drv"
|
||||
- )
|
||||
- ]
|
||||
- assert not biosdevname.all_interfaces_biosdevname(interfaces)
|
||||
- interfaces = [
|
||||
- Interface(
|
||||
- name="em0", mac="mac", vendor="dell", pci_info=pci_info, devpath="path", driver="drv"
|
||||
- )
|
||||
- ]
|
||||
- assert biosdevname.all_interfaces_biosdevname(interfaces)
|
||||
- interfaces = [
|
||||
- Interface(
|
||||
- name="p0p22", mac="mac", vendor="dell", pci_info=pci_info, devpath="path", driver="drv"
|
||||
- )
|
||||
- ]
|
||||
- assert biosdevname.all_interfaces_biosdevname(interfaces)
|
||||
-
|
||||
- interfaces = [
|
||||
- Interface(
|
||||
- name="p1p2", mac="mac", vendor="dell", pci_info=pci_info, devpath="path", driver="drv"
|
||||
- ),
|
||||
- Interface(
|
||||
- name="em2", mac="mac", vendor="dell", pci_info=pci_info, devpath="path", driver="drv"
|
||||
- ),
|
||||
- ]
|
||||
- assert biosdevname.all_interfaces_biosdevname(interfaces)
|
||||
-
|
||||
- interfaces = [
|
||||
- Interface(
|
||||
- name="p1p2", mac="mac", vendor="dell", pci_info=pci_info, devpath="path", driver="drv"
|
||||
- ),
|
||||
- Interface(
|
||||
- name="em2", mac="mac", vendor="dell", pci_info=pci_info, devpath="path", driver="drv"
|
||||
- ),
|
||||
- Interface(
|
||||
- name="eth0", mac="mac", vendor="dell", pci_info=pci_info, devpath="path", driver="drv"
|
||||
- ),
|
||||
- ]
|
||||
- assert not biosdevname.all_interfaces_biosdevname(interfaces)
|
||||
+def _gen_ifaces_by_names(names):
|
||||
+ pci = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
+ interfaces = []
|
||||
+ for nic_name in names:
|
||||
+ interfaces.append(Interface(
|
||||
+ name=nic_name,
|
||||
+ devpath="path",
|
||||
+ driver="drv",
|
||||
+ mac="52:54:00:0b:4a:6d",
|
||||
+ pci_info=pci,
|
||||
+ vendor="dell",
|
||||
+ ))
|
||||
+ return interfaces
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(("interface_names", "expected_result"), (
|
||||
+ (["eth0"], False),
|
||||
+ (["preem0"], False),
|
||||
+ (["em0post"], False),
|
||||
+ (["prep0p22"], False),
|
||||
+ (["p0p22post"], False),
|
||||
+ (["em0"], True),
|
||||
+ (["p0p22"], True),
|
||||
+ (["em2", "p1p22"], True),
|
||||
+ (["p1p2", "em2", "eth0"], False)
|
||||
+))
|
||||
+def test_all_interfaces_biosdevname(interface_names, expected_result):
|
||||
+ interfaces = _gen_ifaces_by_names(interface_names)
|
||||
+ assert biosdevname.all_interfaces_biosdevname(interfaces) == expected_result
|
||||
|
||||
|
||||
def test_enable_biosdevname(monkeypatch):
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,206 @@
|
||||
From 097981dd9505d1609b91fbed4e6d28e960161926 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 14 Apr 2025 13:02:40 +0200
|
||||
Subject: [PATCH 28/37] feat(command_utils): allow missing minor/major version
|
||||
for CentOS
|
||||
|
||||
CentOS versioning consists only of the major version number. Therefore,
|
||||
in case we are running on CentOS, we do not want to enforce version to
|
||||
have the format MAJOR.MINOR. Rather, we want to check that the version
|
||||
is of the form MAJOR. This patch introduces the necessary
|
||||
infrastructure, allowing easy extensibility of version format checking
|
||||
for also other distributions. In case we do not know what version
|
||||
format should a distro use, we default to MINOR.MAJOR.
|
||||
|
||||
Jira-ref: RHEL-80334
|
||||
---
|
||||
commands/command_utils.py | 92 ++++++++++++++++++++++++++++++---------
|
||||
commands/upgrade/util.py | 4 +-
|
||||
2 files changed, 74 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/commands/command_utils.py b/commands/command_utils.py
|
||||
index a13ca59b..155bacad 100644
|
||||
--- a/commands/command_utils.py
|
||||
+++ b/commands/command_utils.py
|
||||
@@ -3,6 +3,8 @@ import json
|
||||
import os
|
||||
import re
|
||||
import resource
|
||||
+from collections import namedtuple
|
||||
+from enum import Enum
|
||||
|
||||
from leapp.actors import config as actor_config
|
||||
from leapp.exceptions import CommandError
|
||||
@@ -16,26 +18,52 @@ 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+)$")
|
||||
|
||||
+_VersionFormat = namedtuple('VersionFormat', ('human_readable', 'regex'))
|
||||
|
||||
-def check_version(version):
|
||||
+
|
||||
+class VersionFormats(Enum):
|
||||
+ MAJOR_ONLY = _VersionFormat('MAJOR_VER', re.compile(r'^[1-9]\d*$'))
|
||||
+ MAJOR_MINOR = _VersionFormat('MAJOR_VER.MINOR_VER', re.compile(r"^([1-9]\d*)\.(\d+)$"))
|
||||
+
|
||||
+
|
||||
+class _VersionKind(str, Enum):
|
||||
+ """ Enum encoding information whether the given OS version is source or target. """
|
||||
+ SOURCE = 'source'
|
||||
+ TARGET = 'target'
|
||||
+
|
||||
+
|
||||
+class DistroIDs(str, Enum):
|
||||
+ RHEL = 'rhel'
|
||||
+ CENTOS = 'centos'
|
||||
+
|
||||
+
|
||||
+_DISTRO_VERSION_FORMATS = {
|
||||
+ DistroIDs.RHEL: VersionFormats.MAJOR_MINOR,
|
||||
+ DistroIDs.CENTOS: VersionFormats.MAJOR_ONLY,
|
||||
+}
|
||||
+"""
|
||||
+Maps distro ID to the expected OS version format.
|
||||
+
|
||||
+If a distro is not listed in the dictionary, then VersionFormats.MAJOR_MINOR
|
||||
+is used as a default.
|
||||
+"""
|
||||
+
|
||||
+
|
||||
+def assert_version_format(version_str, desired_format, version_kind):
|
||||
"""
|
||||
- Versioning schema: MAJOR.MINOR
|
||||
- In case version contains an invalid version string, an CommandError will be raised.
|
||||
+ Check whether a given version_str has the given desired format.
|
||||
+
|
||||
+ In case the version does not conform to the desired_format, an CommandError will be raised.
|
||||
|
||||
:raises: CommandError
|
||||
- :return: release tuple
|
||||
"""
|
||||
- if not re.match(VERSION_REGEX, version):
|
||||
- raise CommandError(
|
||||
- "Unexpected format of target version: {}. "
|
||||
- "The required format is 'X.Y' (major and minor version).".format(version)
|
||||
- )
|
||||
- return version.split('.')
|
||||
+ if not re.match(desired_format.regex, version_str):
|
||||
+ error_str = 'Unexpected format of target version: {0}. The required format is \'{1}\'.'
|
||||
+ raise CommandError(error_str.format(version_str, desired_format.human_readable))
|
||||
|
||||
|
||||
-def get_major_version(version):
|
||||
+def get_major_version_from_a_valid_version(version):
|
||||
"""
|
||||
Return the major version from the given version string.
|
||||
|
||||
@@ -45,7 +73,7 @@ def get_major_version(version):
|
||||
:rtype: str
|
||||
:returns: The major version from the given version string.
|
||||
"""
|
||||
- return str(check_version(version)[0])
|
||||
+ return version.split('.')[0]
|
||||
|
||||
|
||||
def detect_sap_hana():
|
||||
@@ -71,7 +99,7 @@ def get_upgrade_flavour():
|
||||
return LEAPP_UPGRADE_FLAVOUR_DEFAULT
|
||||
|
||||
|
||||
-def _retrieve_os_release_contents(_os_release_path='/etc/os-release'):
|
||||
+def _retrieve_os_release_contents(_os_release_path='/etc/os-release', strip_double_quotes=True):
|
||||
"""
|
||||
Retrieve the contents of /etc/os-release
|
||||
|
||||
@@ -79,7 +107,20 @@ def _retrieve_os_release_contents(_os_release_path='/etc/os-release'):
|
||||
"""
|
||||
with open(_os_release_path) as os_release_handle:
|
||||
lines = os_release_handle.readlines()
|
||||
- return dict(line.strip().split('=', 1) for line in lines if '=' in line)
|
||||
+
|
||||
+ os_release_contents = {}
|
||||
+ for line in lines:
|
||||
+ if '=' not in line:
|
||||
+ continue
|
||||
+
|
||||
+ key, value = line.strip().split('=', 1)
|
||||
+
|
||||
+ if strip_double_quotes:
|
||||
+ value = value.strip('"')
|
||||
+
|
||||
+ os_release_contents[key] = value
|
||||
+
|
||||
+ return os_release_contents
|
||||
|
||||
|
||||
def get_os_release_version_id(filepath):
|
||||
@@ -88,7 +129,7 @@ def get_os_release_version_id(filepath):
|
||||
|
||||
:return: `str` version_id
|
||||
"""
|
||||
- return _retrieve_os_release_contents(_os_release_path=filepath).get('VERSION_ID', '').strip('"')
|
||||
+ return _retrieve_os_release_contents(_os_release_path=filepath).get('VERSION_ID', '')
|
||||
|
||||
|
||||
def get_upgrade_paths_config():
|
||||
@@ -117,15 +158,20 @@ def get_supported_target_versions(flavour=get_upgrade_flavour()):
|
||||
"""
|
||||
|
||||
os_release_contents = _retrieve_os_release_contents()
|
||||
- current_version_id = os_release_contents.get('VERSION_ID', '').strip('"')
|
||||
- distro_id = os_release_contents.get('ID', '').strip('"')
|
||||
+ current_version_id = os_release_contents.get('VERSION_ID', '')
|
||||
+ distro_id = os_release_contents.get('ID', '')
|
||||
+
|
||||
+ # We want to guarantee our actors that if they see 'centos'/'rhel'/...
|
||||
+ # then they will always see expected version format
|
||||
+ expected_version_format = _DISTRO_VERSION_FORMATS.get(distro_id, VersionFormats.MAJOR_MINOR).value
|
||||
+ assert_version_format(current_version_id, expected_version_format, _VersionKind.SOURCE)
|
||||
|
||||
target_versions = get_target_versions_from_config(current_version_id, distro_id, flavour)
|
||||
if not target_versions:
|
||||
# If we cannot find a particular major.minor version in the map,
|
||||
# we fallback to pick a target version just based on a major version.
|
||||
# This can happen for example when testing not yet released versions
|
||||
- major_version = get_major_version(current_version_id)
|
||||
+ major_version = get_major_version_from_a_valid_version(current_version_id)
|
||||
target_versions = get_target_versions_from_config(major_version, distro_id, flavour)
|
||||
|
||||
return target_versions
|
||||
@@ -145,9 +191,15 @@ def vet_upgrade_path(args):
|
||||
"""
|
||||
flavor = get_upgrade_flavour()
|
||||
env_version_override = os.getenv('LEAPP_DEVEL_TARGET_RELEASE')
|
||||
+
|
||||
if env_version_override:
|
||||
- check_version(env_version_override)
|
||||
+ os_release_contents = _retrieve_os_release_contents()
|
||||
+ distro_id = os_release_contents.get('ID', '')
|
||||
+ expected_version_format = _DISTRO_VERSION_FORMATS.get(distro_id, VersionFormats.MAJOR_MINOR).value
|
||||
+ assert_version_format(env_version_override, expected_version_format, _VersionKind.TARGET)
|
||||
+
|
||||
return (env_version_override, flavor)
|
||||
+
|
||||
target_release = args.target or get_target_version(flavor)
|
||||
return (target_release, flavor)
|
||||
|
||||
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
||||
index 6cdfa6d8..b54b0b34 100644
|
||||
--- a/commands/upgrade/util.py
|
||||
+++ b/commands/upgrade/util.py
|
||||
@@ -260,8 +260,8 @@ def prepare_configuration(args):
|
||||
|
||||
current_version = command_utils.get_os_release_version_id('/etc/os-release')
|
||||
os.environ['LEAPP_IPU_IN_PROGRESS'] = '{source}to{target}'.format(
|
||||
- source=command_utils.get_major_version(current_version),
|
||||
- target=command_utils.get_major_version(target_version)
|
||||
+ source=command_utils.get_major_version_from_a_valid_version(current_version),
|
||||
+ target=command_utils.get_major_version_from_a_valid_version(target_version)
|
||||
)
|
||||
|
||||
configuration = {
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,340 +0,0 @@
|
||||
From 8d8774c34518a6269d56f100c2fc312ec0bbbde1 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 13 Mar 2026 16:15:20 +0100
|
||||
Subject: [PATCH 29/44] persistentnetnamesdisable: refactoring + fix ethX
|
||||
detection
|
||||
|
||||
The original check of ethX interfaces was buggy as it detected all
|
||||
interfaces with the eth[0-9] substring:
|
||||
* eth0
|
||||
* preeth0
|
||||
* eth0post
|
||||
...
|
||||
The check has been corrected to search just for ethX kernel names,
|
||||
skipping NIC names with additional prefixes or suffixes. Added test
|
||||
for the ethX_count function. Tests have been slightly refactored to
|
||||
minimize planned changes in the Interface model.
|
||||
|
||||
Also the actor has been originally executed in incorrect phase.
|
||||
Moving the actor to CheckPhase where it should be. Also I refactorred
|
||||
the actor a little bit, moving the code to the private library to
|
||||
follow current best practices.
|
||||
|
||||
Jira: RHEL-3370
|
||||
---
|
||||
.../actors/persistentnetnamesdisable/actor.py | 63 +----------
|
||||
.../libraries/persistentnetnamesdisable.py | 75 +++++++++++++
|
||||
.../tests/test_persistentnetnamesdisable.py | 104 ++++++++++++++----
|
||||
3 files changed, 163 insertions(+), 79 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
index b0182982..15c43141 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
@@ -1,11 +1,8 @@
|
||||
-import re
|
||||
-
|
||||
-from leapp import reporting
|
||||
from leapp.actors import Actor
|
||||
-from leapp.libraries.common.config.version import get_target_major_version
|
||||
+from leapp.libraries.actor import persistentnetnamesdisable
|
||||
from leapp.models import KernelCmdlineArg, PersistentNetNamesFacts
|
||||
-from leapp.reporting import create_report, Report
|
||||
-from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
+from leapp.reporting import Report
|
||||
+from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
|
||||
class PersistentNetNamesDisable(Actor):
|
||||
@@ -16,57 +13,7 @@ class PersistentNetNamesDisable(Actor):
|
||||
name = 'persistentnetnamesdisable'
|
||||
consumes = (PersistentNetNamesFacts,)
|
||||
produces = (KernelCmdlineArg, Report)
|
||||
- tags = (FactsPhaseTag, IPUWorkflowTag)
|
||||
-
|
||||
- @staticmethod
|
||||
- def ethX_count(interfaces):
|
||||
- ethX = re.compile('eth[0-9]+')
|
||||
- count = 0
|
||||
-
|
||||
- for i in interfaces:
|
||||
- if ethX.match(i.name):
|
||||
- count = count + 1
|
||||
- return count
|
||||
-
|
||||
- @staticmethod
|
||||
- def single_eth0(interfaces):
|
||||
- return len(interfaces) == 1 and interfaces[0].name == 'eth0'
|
||||
-
|
||||
- def disable_persistent_naming(self):
|
||||
- self.log.info("Single eth0 network interface detected. Appending 'net.ifnames=0' to RHEL-8 kernel commandline")
|
||||
- self.produce(KernelCmdlineArg(**{'key': 'net.ifnames', 'value': '0'}))
|
||||
+ tags = (ChecksPhaseTag, IPUWorkflowTag)
|
||||
|
||||
def process(self):
|
||||
- interfaces = next(self.consume(PersistentNetNamesFacts)).interfaces
|
||||
-
|
||||
- if self.single_eth0(interfaces):
|
||||
- self.disable_persistent_naming()
|
||||
- elif len(interfaces) > 1 and self.ethX_count(interfaces) > 0:
|
||||
- report_entries = [
|
||||
- reporting.Title('Unsupported network configuration'),
|
||||
- reporting.Summary(
|
||||
- 'Detected multiple physical network interfaces where one or more use kernel naming (e.g. eth0). '
|
||||
- 'Upgrade process can not continue because stability of names can not be guaranteed. '
|
||||
- ),
|
||||
- reporting.ExternalLink(
|
||||
- title='How to Perform an In-Place Upgrade when Using Kernel-Assigned NIC Names',
|
||||
- url='https://access.redhat.com/solutions/4067471'
|
||||
- ),
|
||||
- reporting.Remediation(
|
||||
- hint='Rename all ethX network interfaces following the attached KB solution article.'
|
||||
- ),
|
||||
- reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups([reporting.Groups.NETWORK]),
|
||||
- reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
- ]
|
||||
-
|
||||
- if get_target_major_version() == '9':
|
||||
- report_entries.append(
|
||||
- reporting.ExternalLink(
|
||||
- title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
- '"Network configuration for unsupported device types detected"',
|
||||
- url='https://access.redhat.com/solutions/7009239'
|
||||
- )
|
||||
- )
|
||||
-
|
||||
- create_report(report_entries)
|
||||
+ persistentnetnamesdisable.process()
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
new file mode 100644
|
||||
index 00000000..0d1a90e2
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
@@ -0,0 +1,75 @@
|
||||
+import re
|
||||
+
|
||||
+from leapp import reporting
|
||||
+from leapp.libraries.common.config.version import get_target_major_version
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import KernelCmdlineArg, PersistentNetNamesFacts
|
||||
+from leapp.reporting import create_report
|
||||
+
|
||||
+
|
||||
+def ethX_count(interfaces):
|
||||
+ """
|
||||
+ Count how many network interfaces with ethX naming is present.
|
||||
+ """
|
||||
+ ethX = re.compile('^eth[0-9]+$')
|
||||
+ count = 0
|
||||
+
|
||||
+ for i in interfaces:
|
||||
+ if ethX.match(i.name):
|
||||
+ count = count + 1
|
||||
+ return count
|
||||
+
|
||||
+
|
||||
+def single_eth0(interfaces):
|
||||
+ return len(interfaces) == 1 and interfaces[0].name == 'eth0'
|
||||
+
|
||||
+
|
||||
+def disable_persistent_naming():
|
||||
+ api.current_logger().info(
|
||||
+ "Single eth0 network interface detected."
|
||||
+ " Appending 'net.ifnames=0' for the target system kernel commandline"
|
||||
+ )
|
||||
+ api.produce(KernelCmdlineArg(**{'key': 'net.ifnames', 'value': '0'}))
|
||||
+
|
||||
+
|
||||
+def report_ethX_ifaces():
|
||||
+ report_entries = [
|
||||
+ reporting.Title('Unsupported network configuration'),
|
||||
+ reporting.Summary(
|
||||
+ 'Detected multiple physical network interfaces where one or more'
|
||||
+ ' use kernel naming (e.g. eth0). Upgrade process cannot continue'
|
||||
+ ' because stability of names can not be guaranteed.'
|
||||
+ ),
|
||||
+ reporting.ExternalLink(
|
||||
+ title='How to Perform an In-Place Upgrade when Using Kernel-Assigned NIC Names',
|
||||
+ url='https://access.redhat.com/solutions/4067471'
|
||||
+ ),
|
||||
+ reporting.Remediation(
|
||||
+ hint='Rename all ethX network interfaces following the attached KB solution article.'
|
||||
+ ),
|
||||
+ reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Groups([reporting.Groups.NETWORK]),
|
||||
+ reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
+ ]
|
||||
+
|
||||
+ if get_target_major_version() == '9':
|
||||
+ report_entries.append(
|
||||
+ reporting.ExternalLink(
|
||||
+ title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
+ '"Network configuration for unsupported device types detected"',
|
||||
+ url='https://access.redhat.com/solutions/7009239'
|
||||
+ )
|
||||
+ )
|
||||
+
|
||||
+ create_report(report_entries)
|
||||
+
|
||||
+
|
||||
+def process():
|
||||
+ interfaces = next(api.consume(PersistentNetNamesFacts)).interfaces
|
||||
+
|
||||
+ if single_eth0(interfaces):
|
||||
+ disable_persistent_naming()
|
||||
+ return
|
||||
+
|
||||
+ if len(interfaces) > 1 and ethX_count(interfaces):
|
||||
+ report_ethX_ifaces()
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
index 95b695c0..2369e80f 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
@@ -1,17 +1,53 @@
|
||||
import pytest
|
||||
|
||||
-from leapp.libraries.common.config import version
|
||||
+from leapp.libraries.actor import persistentnetnamesdisable
|
||||
from leapp.models import Interface, KernelCmdlineArg, PCIAddress, PersistentNetNamesFacts
|
||||
from leapp.reporting import Report
|
||||
from leapp.snactor.fixture import current_actor_context
|
||||
from leapp.utils.report import is_inhibitor
|
||||
|
||||
|
||||
+def _gen_ifaces_by_names(names):
|
||||
+ pci = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
+ interfaces = []
|
||||
+ for nic_name in names:
|
||||
+ interfaces.append(Interface(
|
||||
+ name=nic_name,
|
||||
+ devpath="/devices/platform/usb/cdc-wdm0",
|
||||
+ driver="pcieport",
|
||||
+ mac="52:54:00:0b:4a:6d",
|
||||
+ pci_info=pci,
|
||||
+ vendor="redhat",
|
||||
+ ))
|
||||
+ return interfaces
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(('interfaces', 'exp_result'), (
|
||||
+ (_gen_ifaces_by_names(['eno1', 'eno2', 'myfoo00', 'nicname']), 0),
|
||||
+ (_gen_ifaces_by_names(['preeth0', 'eth2post', 'preeth0post']), 0),
|
||||
+ (_gen_ifaces_by_names(['eth0']), 1),
|
||||
+ (_gen_ifaces_by_names(['eth0', 'eth1', 'eth01', 'eth4980']), 4),
|
||||
+ (_gen_ifaces_by_names(['myeth0', 'eth0', 'something']), 1),
|
||||
+))
|
||||
+def test_ethX_count(interfaces, exp_result):
|
||||
+ """
|
||||
+ Test the correct detection of ethX interfaces.
|
||||
+
|
||||
+ It tests the bug causing https://issues.redhat.com/browse/RHEL-3370
|
||||
+ """
|
||||
+ assert persistentnetnamesdisable.ethX_count(interfaces) == exp_result
|
||||
+
|
||||
+
|
||||
def test_actor_single_eth0(current_actor_context):
|
||||
pci = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
- interface = [Interface(name="eth0", mac="52:54:00:0b:4a:6d", vendor="redhat",
|
||||
- driver="pcieport", pci_info=pci,
|
||||
- devpath="/devices/platform/usb/cdc-wdm0")]
|
||||
+ interface = [Interface(
|
||||
+ name="eth0",
|
||||
+ mac="52:54:00:0b:4a:6d",
|
||||
+ vendor="redhat",
|
||||
+ driver="pcieport",
|
||||
+ pci_info=pci,
|
||||
+ devpath="/devices/platform/usb/cdc-wdm0"
|
||||
+ )]
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
assert not current_actor_context.consume(Report)
|
||||
@@ -21,15 +57,25 @@ def test_actor_single_eth0(current_actor_context):
|
||||
'target_version', ['9', '10']
|
||||
)
|
||||
def test_actor_more_ethX(monkeypatch, current_actor_context, target_version):
|
||||
- monkeypatch.setattr(version, 'get_target_major_version', lambda: target_version)
|
||||
+ monkeypatch.setattr(persistentnetnamesdisable, 'get_target_major_version', lambda: target_version)
|
||||
pci1 = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
pci2 = PCIAddress(domain="0000", bus="3d", function="00", device="Serial controller")
|
||||
- interface = [Interface(name="eth0", mac="52:54:00:0b:4a:6d", vendor="redhat",
|
||||
- driver="pcieport", pci_info=pci1,
|
||||
- devpath="/devices/platform/usb/cdc-wdm0"),
|
||||
- Interface(name="eth1", mac="52:54:00:0b:4a:6a", vendor="redhat",
|
||||
- driver="serial", pci_info=pci2,
|
||||
- devpath="/devices/hidraw/hidraw0")]
|
||||
+ interface = [
|
||||
+ Interface(
|
||||
+ name="eth0",
|
||||
+ mac="52:54:00:0b:4a:6d",
|
||||
+ vendor="redhat",
|
||||
+ driver="pcieport",
|
||||
+ pci_info=pci1,
|
||||
+ devpath="/devices/platform/usb/cdc-wdm0"),
|
||||
+ Interface(
|
||||
+ name="eth1",
|
||||
+ mac="52:54:00:0b:4a:6a",
|
||||
+ vendor="redhat",
|
||||
+ driver="serial",
|
||||
+ pci_info=pci2,
|
||||
+ devpath="/devices/hidraw/hidraw0")
|
||||
+ ]
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
|
||||
@@ -50,9 +96,15 @@ def test_actor_more_ethX(monkeypatch, current_actor_context, target_version):
|
||||
|
||||
def test_actor_single_int_not_ethX(current_actor_context):
|
||||
pci = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
- interface = [Interface(name="tap0", mac="52:54:00:0b:4a:60", vendor="redhat",
|
||||
- driver="pcieport", pci_info=pci,
|
||||
- devpath="/devices/platform/usb/cdc-wdm0")]
|
||||
+ interface = [
|
||||
+ Interface(
|
||||
+ name="tap0",
|
||||
+ mac="52:54:00:0b:4a:60",
|
||||
+ vendor="redhat",
|
||||
+ driver="pcieport",
|
||||
+ pci_info=pci,
|
||||
+ devpath="/devices/platform/usb/cdc-wdm0")
|
||||
+ ]
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
assert not current_actor_context.consume(Report)
|
||||
@@ -62,15 +114,25 @@ def test_actor_single_int_not_ethX(current_actor_context):
|
||||
'target_version', ['9', '10']
|
||||
)
|
||||
def test_actor_ethX_and_not_ethX(monkeypatch, current_actor_context, target_version):
|
||||
- monkeypatch.setattr(version, 'get_target_major_version', lambda: target_version)
|
||||
+ monkeypatch.setattr(persistentnetnamesdisable, 'get_target_major_version', lambda: target_version)
|
||||
pci1 = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
pci2 = PCIAddress(domain="0000", bus="3d", function="00", device="Serial controller")
|
||||
- interface = [Interface(name="virbr0", mac="52:54:00:0b:4a:6d", vendor="redhat",
|
||||
- driver="pcieport", pci_info=pci1,
|
||||
- devpath="/devices/platform/usb/cdc-wdm0"),
|
||||
- Interface(name="eth0", mac="52:54:00:0b:4a:6a", vendor="redhat",
|
||||
- driver="serial", pci_info=pci2,
|
||||
- devpath="/devices/hidraw/hidraw0")]
|
||||
+ interface = [
|
||||
+ Interface(
|
||||
+ name="virbr0",
|
||||
+ mac="52:54:00:0b:4a:6d",
|
||||
+ vendor="redhat",
|
||||
+ driver="pcieport",
|
||||
+ pci_info=pci1,
|
||||
+ devpath="/devices/platform/usb/cdc-wdm0"),
|
||||
+ Interface(
|
||||
+ name="eth0",
|
||||
+ mac="52:54:00:0b:4a:6a",
|
||||
+ vendor="redhat",
|
||||
+ driver="serial",
|
||||
+ pci_info=pci2,
|
||||
+ devpath="/devices/hidraw/hidraw0")
|
||||
+ ]
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
assert current_actor_context.consume(Report)
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
From d450430eb06a9649ea924fa8b0ba4f123197dd27 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 21 Apr 2025 20:15:34 +0200
|
||||
Subject: [PATCH 29/37] refactor(versions/config): rename _simple_versions
|
||||
|
||||
Rename the function _simple_versions to _are_comparison_operators_used
|
||||
with **negated semantics**. The new name should make it clear what is
|
||||
being checked in the version list.
|
||||
---
|
||||
.../common/libraries/config/tests/test_version.py | 6 +++---
|
||||
repos/system_upgrade/common/libraries/config/version.py | 7 ++++---
|
||||
2 files changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index 37a91c00..3cb6479c 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -17,9 +17,9 @@ def test_validate_versions():
|
||||
assert version._validate_versions(['7.6', 'z.z'])
|
||||
|
||||
|
||||
-def test_simple_versions():
|
||||
- assert version._simple_versions(['7.6', '7.7'])
|
||||
- assert not version._simple_versions(['7.6', '< 7.7'])
|
||||
+def test_comparison_operator_detection():
|
||||
+ assert not version._are_comparison_operators_used(['7.6', '7.7'])
|
||||
+ assert version._are_comparison_operators_used(['7.6', '< 7.7'])
|
||||
|
||||
|
||||
def test_cmp_versions():
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index b8fc550b..24bb7729 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -149,9 +149,9 @@ def _validate_versions(versions):
|
||||
"but provided was '{}'".format(versions))
|
||||
|
||||
|
||||
-def _simple_versions(versions):
|
||||
+def _are_comparison_operators_used(versions):
|
||||
"""Return ``True`` if provided versions are list of strings without comparison operators."""
|
||||
- return all(len(v.split()) == 1 for v in versions)
|
||||
+ return not all(len(v.split()) == 1 for v in versions)
|
||||
|
||||
|
||||
def _cmp_versions(versions):
|
||||
@@ -190,10 +190,11 @@ def matches_version(match_list, detected):
|
||||
"but provided was {}: '{}'".format(type(detected), detected))
|
||||
_validate_versions([detected])
|
||||
|
||||
- if _simple_versions(match_list):
|
||||
+ if not _are_comparison_operators_used(match_list):
|
||||
# match_list = ['7.6', '7.7', '7.8', '7.9']
|
||||
_validate_versions(match_list)
|
||||
return detected in match_list
|
||||
+
|
||||
if _cmp_versions(match_list):
|
||||
detected = _version_to_tuple(detected)
|
||||
# match_list = ['>= 7.6', '< 7.10']
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,518 +0,0 @@
|
||||
From cdbb91156d1b87883523eed476c9a5d16b4b4e20 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 21 Feb 2024 20:55:54 +0100
|
||||
Subject: [PATCH 30/44] Fix scan of net interfaces: non-PCI, conflicting,
|
||||
broken
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Non-PCI network devices (present usually on IBM Z architecture)
|
||||
does not have ID_VENDOR_ID attribute and also there is nothing
|
||||
we could put into Interface.pci_info about them.
|
||||
For such devices:
|
||||
* set empty string for Interface.vendor field
|
||||
* and None value for pci_info.
|
||||
The Interface model has been updated, allowing None value for
|
||||
pci_info field.
|
||||
|
||||
Also some interfaces do not have to be "managed" by udev or can
|
||||
provide incomplete data. This can happen e.g. in situations when
|
||||
udev want to assign a NIC name that is already used by another
|
||||
network interface. Such an interface stays with kernel name (ethX)
|
||||
and udev DB contains only elementary information about it. This
|
||||
led originally to a skip of the interface during system scanning
|
||||
by leapp actors and such systems bypassed checks for presence of
|
||||
ethX NIC names later. Usually such interfaces have been renamed after
|
||||
the upgrade (either to a new non-ethX name, or they had a different
|
||||
ethX value) which led to another issues.
|
||||
|
||||
The new solution requires just bare-minimum details to be always
|
||||
present (like NIC name and device path; if missing, the skip is used
|
||||
again). For other values we set an empty strings if missing.
|
||||
|
||||
Tests have been updated and extended to cover new changes, using
|
||||
mainly real input data collected from affected systems.
|
||||
|
||||
Jira: RHEL-22371, RHEL-72140
|
||||
|
||||
Co-authored-by: Michal Hečko <michal.sk.com@gmail.com>
|
||||
---
|
||||
.../tests/test_persistentnetnames.py | 5 +
|
||||
.../tests/test_persistentnetnamesinitramfs.py | 6 +
|
||||
.../common/libraries/persistentnetnames.py | 35 ++-
|
||||
.../tests/test_persistentnetnames_library.py | 243 ++++++++++++++++--
|
||||
.../common/models/persistentnetnamesfacts.py | 57 +++-
|
||||
5 files changed, 314 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnames/tests/test_persistentnetnames.py b/repos/system_upgrade/common/actors/persistentnetnames/tests/test_persistentnetnames.py
|
||||
index ffea5983..a47eeabe 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnames/tests/test_persistentnetnames.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnames/tests/test_persistentnetnames.py
|
||||
@@ -32,6 +32,11 @@ class interfaces_mocked:
|
||||
|
||||
@pytest.mark.parametrize('count', [0, 1, 8, 256])
|
||||
def test_run(monkeypatch, current_actor_context, count):
|
||||
+ """
|
||||
+ Basic test of interface scanner actor
|
||||
+
|
||||
+ Full testing of underlying function is covered in tests of common library.
|
||||
+ """
|
||||
monkeypatch.setattr(persistentnetnames, 'interfaces', interfaces_mocked(count))
|
||||
current_actor_context.run()
|
||||
assert len(current_actor_context.consume(PersistentNetNamesFacts)[0].interfaces) == count
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesinitramfs/tests/test_persistentnetnamesinitramfs.py b/repos/system_upgrade/common/actors/persistentnetnamesinitramfs/tests/test_persistentnetnamesinitramfs.py
|
||||
index f149502b..5605af4b 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesinitramfs/tests/test_persistentnetnamesinitramfs.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesinitramfs/tests/test_persistentnetnamesinitramfs.py
|
||||
@@ -32,6 +32,12 @@ class interfaces_mocked:
|
||||
|
||||
@pytest.mark.parametrize('count', [0, 1, 8, 256])
|
||||
def test_run(monkeypatch, current_actor_context, count):
|
||||
+ """
|
||||
+ Basic functionality test.
|
||||
+
|
||||
+ The full testing of the underlying scanner function is covered by the common
|
||||
+ library.
|
||||
+ """
|
||||
monkeypatch.setattr(persistentnetnames, 'interfaces', interfaces_mocked(count))
|
||||
current_actor_context.run()
|
||||
assert len(current_actor_context.consume(PersistentNetNamesFactsInitramfs)[0].interfaces) == count
|
||||
diff --git a/repos/system_upgrade/common/libraries/persistentnetnames.py b/repos/system_upgrade/common/libraries/persistentnetnames.py
|
||||
index 7fdf7eaa..48dee5f8 100644
|
||||
--- a/repos/system_upgrade/common/libraries/persistentnetnames.py
|
||||
+++ b/repos/system_upgrade/common/libraries/persistentnetnames.py
|
||||
@@ -41,16 +41,41 @@ def interfaces():
|
||||
try:
|
||||
attrs['name'] = dev.sys_name
|
||||
attrs['devpath'] = dev.device_path
|
||||
- attrs['driver'] = dev['ID_NET_DRIVER']
|
||||
- attrs['vendor'] = dev['ID_VENDOR_ID']
|
||||
- attrs['pci_info'] = PCIAddress(**pci_info(dev['ID_PATH']))
|
||||
- attrs['mac'] = dev.attributes.get('address')
|
||||
+
|
||||
+ # can be missing when the interface is not "managed" by udev
|
||||
+ # TODO(pstodulk): check the MAC, I think that that one should be
|
||||
+ # actually always in DB.
|
||||
+ attrs['driver'] = dev.get('ID_NET_DRIVER', '')
|
||||
+ attrs['mac'] = dev.attributes.get('address', '')
|
||||
if isinstance(attrs['mac'], bytes):
|
||||
attrs['mac'] = attrs['mac'].decode()
|
||||
+
|
||||
+ # pci info is not provided for cards that do not use PCI bus,
|
||||
+ # also it can be missing if the interface is not "managed" by udev.
|
||||
+ # Also vendor can be provided only for cards on PCI bus.
|
||||
+ attrs['vendor'] = dev.get('ID_VENDOR_ID', '')
|
||||
+ attrs['pci_info'] = None # default for non-PCI card
|
||||
+ if dev.get('ID_PATH', '').startswith('pci-'):
|
||||
+ attrs['pci_info'] = PCIAddress(**pci_info(dev['ID_PATH']))
|
||||
except Exception as e: # pylint: disable=broad-except
|
||||
# FIXME(msekleta): We should probably handle errors more granularly
|
||||
# Maybe we should inhibit upgrade process at this point
|
||||
- api.current_logger().warning('Failed to gather information about network interface: %s', e)
|
||||
+ net_name = attrs.get('name', 'unknown-interface')
|
||||
+ api.current_logger().warning(
|
||||
+ 'Failed to gather information about network interface %s: "%s"',
|
||||
+ net_name, str(e)
|
||||
+ )
|
||||
+ # NOTE(pstodulk): skipping the interface as it's really broken
|
||||
+ # or unknown from the code in leapp-repository pov and another
|
||||
+ # processing would lead now to a broken upgrades.
|
||||
+ # Other values that are usually expected but can be missing
|
||||
+ # in some situations are covered and do not raise this exception.
|
||||
continue
|
||||
|
||||
+ if not all([attrs['driver'], attrs['mac']]):
|
||||
+ api.current_logger().warning(
|
||||
+ 'Information in udev about %s network interface is incomplete.',
|
||||
+ attrs['name']
|
||||
+ )
|
||||
+
|
||||
yield Interface(**attrs)
|
||||
diff --git a/repos/system_upgrade/common/libraries/tests/test_persistentnetnames_library.py b/repos/system_upgrade/common/libraries/tests/test_persistentnetnames_library.py
|
||||
index 74aa08fa..b45863d9 100644
|
||||
--- a/repos/system_upgrade/common/libraries/tests/test_persistentnetnames_library.py
|
||||
+++ b/repos/system_upgrade/common/libraries/tests/test_persistentnetnames_library.py
|
||||
@@ -1,57 +1,252 @@
|
||||
+import pytest
|
||||
+
|
||||
from leapp.libraries.common import persistentnetnames
|
||||
from leapp.libraries.common.testutils import produce_mocked
|
||||
from leapp.libraries.stdlib import api
|
||||
+from leapp.models import PCIAddress
|
||||
|
||||
|
||||
-class AttributesTest:
|
||||
- def __init__(self):
|
||||
- self.attributes = {
|
||||
- 'address': b'fa:16:3e:cd:26:5a'
|
||||
- }
|
||||
+class AttributesMocked:
|
||||
+ def __init__(self, attributes):
|
||||
+ self._attributes = attributes
|
||||
|
||||
- def get(self, attribute):
|
||||
- if attribute in self.attributes:
|
||||
- return self.attributes[attribute]
|
||||
- raise KeyError
|
||||
+ def get(self, key, default=None):
|
||||
+ return self._attributes.get(key, default)
|
||||
|
||||
|
||||
-class DeviceTest:
|
||||
- def __init__(self):
|
||||
- self.dict_data = {
|
||||
- 'ID_NET_DRIVER': 'virtio_net',
|
||||
- 'ID_VENDOR_ID': '0x1af4',
|
||||
- 'ID_PATH': 'pci-0000:00:03.0',
|
||||
- }
|
||||
+class DeviceMocked:
|
||||
+ def __init__(self, properties, attributes):
|
||||
+ self.dict_data = properties
|
||||
+ self._attributes = attributes
|
||||
|
||||
def __getitem__(self, key):
|
||||
+ return self.dict_data[key]
|
||||
+
|
||||
+ def get(self, key, default=None):
|
||||
if key in self.dict_data:
|
||||
return self.dict_data[key]
|
||||
- raise KeyError
|
||||
+ return default
|
||||
|
||||
@property
|
||||
def sys_name(self):
|
||||
- return 'eth'
|
||||
+ return self.dict_data['INTERFACE']
|
||||
|
||||
@property
|
||||
def device_path(self):
|
||||
- return '/devices/pci0000:00/0000:00:03.0/virtio0/net/eth0'
|
||||
+ return self.dict_data['DEVPATH']
|
||||
|
||||
@property
|
||||
def attributes(self):
|
||||
- return AttributesTest()
|
||||
+ return AttributesMocked(self._attributes)
|
||||
+
|
||||
|
||||
+@pytest.mark.parametrize('input_mac', ('fa:16:3e:cd:26:5a', b'fa:16:3e:cd:26:5a'))
|
||||
+def test_getting_interfaces_complete_good(monkeypatch, input_mac):
|
||||
+ """
|
||||
+ Detailed parsing of physical net interface with complete data
|
||||
+ """
|
||||
+ def mocked_physical_interfaces():
|
||||
+ properties = {
|
||||
+ 'CURRENT_TAGS': ':systemd:',
|
||||
+ 'DEVPATH': '/devices/pci0000:17/0000:17:02.0/0000:19:00.0/net/eno3',
|
||||
+ 'ID_BUS': 'pci',
|
||||
+ 'ID_MM_CANDIDATE': '1',
|
||||
+ 'ID_MODEL_FROM_DATABASE': 'NetXtreme BCM5720 Gigabit Ethernet PCIe',
|
||||
+ 'ID_MODEL_ID': '0x165f',
|
||||
+ 'ID_NET_DRIVER': 'tg3',
|
||||
+ 'ID_NET_LABEL_ONBOARD': 'NIC3',
|
||||
+ 'ID_NET_LINK_FILE': '/usr/lib/systemd/network/99-default.link',
|
||||
+ 'ID_NET_NAME': 'eno3',
|
||||
+ 'ID_NET_NAME_MAC': 'enx34735a9920fe',
|
||||
+ 'ID_NET_NAME_ONBOARD': 'eno3',
|
||||
+ 'ID_NET_NAME_PATH': 'enp25s0f0',
|
||||
+ 'ID_NET_NAMING_SCHEME': 'rhel-9.0',
|
||||
+ 'ID_OUI_FROM_DATABASE': 'Dell Inc.',
|
||||
+ 'ID_PATH': 'pci-0000:19:00.0',
|
||||
+ 'ID_PATH_TAG': 'pci-0000_19_00_0',
|
||||
+ 'ID_PCI_CLASS_FROM_DATABASE': 'Network controller',
|
||||
+ 'ID_PCI_SUBCLASS_FROM_DATABASE': 'Ethernet controller',
|
||||
+ 'ID_VENDOR_FROM_DATABASE': 'Broadcom Inc. and subsidiaries',
|
||||
+ 'ID_VENDOR_ID': '0x14e4',
|
||||
+ 'IFINDEX': '4',
|
||||
+ 'INTERFACE': 'eno3',
|
||||
+ 'SUBSYSTEM': 'net',
|
||||
+ 'SYSTEMD_ALIAS': '/sys/subsystem/net/devices/eno3',
|
||||
+ 'TAGS': ':systemd:',
|
||||
+ 'USEC_INITIALIZED': '16690226'
|
||||
+ }
|
||||
+ attributes = {
|
||||
+ 'address': input_mac
|
||||
+ }
|
||||
+ return [DeviceMocked(properties, attributes)]
|
||||
+
|
||||
+ monkeypatch.setattr(persistentnetnames, 'physical_interfaces', mocked_physical_interfaces)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ interface = next(persistentnetnames.interfaces())
|
||||
|
||||
-def provide_test_interfaces():
|
||||
- return [DeviceTest()]
|
||||
+ assert interface.name == 'eno3'
|
||||
+ assert interface.devpath == '/devices/pci0000:17/0000:17:02.0/0000:19:00.0/net/eno3'
|
||||
+ assert interface.driver == 'tg3'
|
||||
+ assert interface.vendor == '0x14e4'
|
||||
+ assert interface.mac == 'fa:16:3e:cd:26:5a'
|
||||
+ assert interface.pci_info == PCIAddress(
|
||||
+ domain='0000',
|
||||
+ bus='19',
|
||||
+ device='00',
|
||||
+ function='0'
|
||||
+ )
|
||||
|
||||
|
||||
-def test_getting_interfaces(monkeypatch):
|
||||
- monkeypatch.setattr(persistentnetnames, 'physical_interfaces', provide_test_interfaces)
|
||||
+def test_getting_interfaces_complete_good_roce(monkeypatch):
|
||||
+ """
|
||||
+ ROCE net interface parsing
|
||||
+ """
|
||||
+ def mocked_physical_interfaces():
|
||||
+ properties = {
|
||||
+ 'CURRENT_TAGS': ':systemd:',
|
||||
+ 'DEVPATH': '/devices/pci0201:00/0201:00:00.0/net/eno513',
|
||||
+ 'ID_BUS': 'pci',
|
||||
+ 'ID_MODEL_FROM_DATABASE': 'ConnectX Family mlx5Gen Virtual Function',
|
||||
+ 'ID_MODEL_ID': '0x101e',
|
||||
+ 'ID_NET_DRIVER': 'mlx5_core',
|
||||
+ 'ID_NET_LINK_FILE': '/etc/systemd/network/10-anaconda-ifname-eno513.link',
|
||||
+ 'ID_NET_NAME': 'eno513',
|
||||
+ 'ID_NET_NAME_MAC': 'enx2219aef66069',
|
||||
+ 'ID_NET_NAME_ONBOARD': 'eno513',
|
||||
+ 'ID_NET_NAME_PATH': 'enP513p0s0',
|
||||
+ 'ID_NET_NAME_SLOT': 'ens5912',
|
||||
+ 'ID_NET_NAMING_SCHEME': 'rhel-9.0',
|
||||
+ 'ID_PATH': 'pci-0201:00:00.0',
|
||||
+ 'ID_PATH_TAG': 'pci-0201_00_00_0',
|
||||
+ 'ID_PCI_CLASS_FROM_DATABASE': 'Network controller',
|
||||
+ 'ID_PCI_SUBCLASS_FROM_DATABASE': 'Ethernet controller',
|
||||
+ 'ID_VENDOR_FROM_DATABASE': 'Mellanox Technologies',
|
||||
+ 'ID_VENDOR_ID': '0x15b3',
|
||||
+ 'IFINDEX': '2',
|
||||
+ 'INTERFACE': 'eno513',
|
||||
+ 'SUBSYSTEM': 'net',
|
||||
+ 'SYSTEMD_ALIAS': '/sys/subsystem/net/devices/eno513',
|
||||
+ 'TAGS': ':systemd:',
|
||||
+ 'USEC_INITIALIZED': '26747014'
|
||||
+ }
|
||||
+ attributes = {
|
||||
+ 'address': b'22:19:ae:f6:60:69'
|
||||
+ }
|
||||
+
|
||||
+ return [DeviceMocked(properties, attributes)]
|
||||
+
|
||||
+ monkeypatch.setattr(persistentnetnames, 'physical_interfaces', mocked_physical_interfaces)
|
||||
monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
interface = next(persistentnetnames.interfaces())
|
||||
+
|
||||
assert interface.name
|
||||
assert interface.devpath
|
||||
assert interface.driver
|
||||
assert interface.vendor
|
||||
+ assert interface.mac
|
||||
assert interface.pci_info
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(('properties', 'attributes'), (
|
||||
+ (
|
||||
+ {
|
||||
+ # artificial data
|
||||
+ 'CURRENT_TAGS': ':systemd:',
|
||||
+ 'DEVPATH': '/devices/whatever/net/eno3',
|
||||
+ 'ID_MM_CANDIDATE': '1',
|
||||
+ 'ID_MODEL_FROM_DATABASE': 'Foo',
|
||||
+ 'ID_MODEL_ID': '0x0000',
|
||||
+ 'ID_NET_DRIVER': 'tg3',
|
||||
+ 'ID_NET_LABEL_ONBOARD': 'NIC3',
|
||||
+ 'ID_NET_LINK_FILE': '/usr/lib/systemd/network/99-default.link',
|
||||
+ 'ID_NET_NAME': 'eno3',
|
||||
+ 'ID_NET_NAME_MAC': 'enx34735a9920fe',
|
||||
+ 'ID_NET_NAME_ONBOARD': 'eno3',
|
||||
+ 'ID_NET_NAME_PATH': 'enp25s0f0',
|
||||
+ 'ID_NET_NAMING_SCHEME': 'rhel-9.0',
|
||||
+ 'ID_OUI_FROM_DATABASE': 'Dell Inc.',
|
||||
+ 'IFINDEX': '4',
|
||||
+ 'INTERFACE': 'eno3',
|
||||
+ 'SUBSYSTEM': 'net',
|
||||
+ 'SYSTEMD_ALIAS': '/sys/subsystem/net/devices/eno3',
|
||||
+ 'TAGS': ':systemd:',
|
||||
+ 'USEC_INITIALIZED': '16690226'
|
||||
+ }, {
|
||||
+ 'address': b'fa:16:3e:cd:26:5a'
|
||||
+ }
|
||||
+ ), (
|
||||
+ {
|
||||
+ 'CURRENT_TAGS': ':systemd:',
|
||||
+ 'DEVPATH': '/devices/css0/0.0.0001/0.0.0001/virtio1/net/enc1',
|
||||
+ 'ID_NET_DRIVER': 'virtio_net',
|
||||
+ 'ID_NET_LINK_FILE': '/usr/lib/systemd/network/99-default.link',
|
||||
+ 'ID_NET_NAME': 'enc1',
|
||||
+ 'ID_NET_NAME_MAC': 'enx001738010124',
|
||||
+ 'ID_NET_NAME_PATH': 'enc1',
|
||||
+ 'ID_NET_NAMING_SCHEME': 'rhel-9.0',
|
||||
+ 'ID_OUI_FROM_DATABASE': 'International Business Machines',
|
||||
+ 'ID_PATH': 'ccw-0.0.0001',
|
||||
+ 'ID_PATH_TAG': 'ccw-0_0_0001',
|
||||
+ 'IFINDEX': '2',
|
||||
+ 'INTERFACE': 'enc1',
|
||||
+ 'SUBSYSTEM': 'net',
|
||||
+ 'SYSTEMD_ALIAS': '/sys/subsystem/net/devices/enc1',
|
||||
+ 'TAGS': ':systemd:',
|
||||
+ 'USEC_INITIALIZED': '3423981'
|
||||
+ }, {
|
||||
+ 'address': b'00:17:38:01:01:24'
|
||||
+ }
|
||||
+ )
|
||||
+))
|
||||
+def test_getting_interfaces_nonpci_good(monkeypatch, properties, attributes):
|
||||
+ """
|
||||
+ Processing of net interface with incomplete data
|
||||
+ """
|
||||
+ def mocked_physical_interfaces():
|
||||
+ return [DeviceMocked(properties, attributes)]
|
||||
+
|
||||
+ monkeypatch.setattr(persistentnetnames, 'physical_interfaces', mocked_physical_interfaces)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ interface = next(persistentnetnames.interfaces())
|
||||
+
|
||||
+ assert interface.name
|
||||
+ assert interface.devpath
|
||||
+ assert interface.driver
|
||||
+ assert not interface.vendor
|
||||
+ assert interface.mac
|
||||
+ assert not interface.pci_info
|
||||
+
|
||||
+
|
||||
+def test_getting_interfaces_incomplete_udev_conflict(monkeypatch):
|
||||
+ """
|
||||
+ Test parsing of conflicting interface.
|
||||
+
|
||||
+ Such interface is not managed by udev and the information we could get
|
||||
+ about it is limited.
|
||||
+ """
|
||||
+ def mocked_physical_interfaces():
|
||||
+ properties = {
|
||||
+ 'DEVPATH': '/devices/pci0000:ae/0000:ae:00.0/0000:af:00.0/0000:b0:04.0/0000:b2:00.1/net/eth3',
|
||||
+ 'IFINDEX': '9',
|
||||
+ 'INTERFACE': 'eth3',
|
||||
+ 'SUBSYSTEM': 'net'
|
||||
+ }
|
||||
+ attributes = {
|
||||
+ 'address': b'fa:16:3e:cd:26:5a'
|
||||
+ }
|
||||
+ return [DeviceMocked(properties, attributes)]
|
||||
+
|
||||
+ monkeypatch.setattr(persistentnetnames, 'physical_interfaces', mocked_physical_interfaces)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ interface = next(persistentnetnames.interfaces())
|
||||
+
|
||||
+ assert interface.name
|
||||
+ assert interface.devpath
|
||||
+ assert not interface.driver
|
||||
+ assert not interface.vendor
|
||||
assert interface.mac
|
||||
+ assert not interface.pci_info
|
||||
diff --git a/repos/system_upgrade/common/models/persistentnetnamesfacts.py b/repos/system_upgrade/common/models/persistentnetnamesfacts.py
|
||||
index 395b26f0..3c71cdcd 100644
|
||||
--- a/repos/system_upgrade/common/models/persistentnetnamesfacts.py
|
||||
+++ b/repos/system_upgrade/common/models/persistentnetnamesfacts.py
|
||||
@@ -4,7 +4,10 @@ from leapp.topics import SystemInfoTopic
|
||||
|
||||
class PCIAddress(Model):
|
||||
"""
|
||||
- TODO: tbd
|
||||
+ Network Interface PCI address.
|
||||
+
|
||||
+ This model should not be produced nor consumed by actors directly.
|
||||
+ It's part of the Interface model.
|
||||
"""
|
||||
topic = SystemInfoTopic
|
||||
|
||||
@@ -16,16 +19,49 @@ class PCIAddress(Model):
|
||||
|
||||
class Interface(Model):
|
||||
"""
|
||||
- TODO: tbd - Interface or NetworkInterface?
|
||||
+ Physical network interface
|
||||
+
|
||||
+ Contains information about a network interface collected from udev.
|
||||
+ Data can be incomplete in case of issues or when the interface is not
|
||||
+ managed by udev.
|
||||
+
|
||||
+ This model should not be produced or consumed by actors directly.
|
||||
+ See PersistentNetNamesFacts or PersistentNetNamesFactsInitramfs.
|
||||
"""
|
||||
topic = SystemInfoTopic
|
||||
|
||||
name = fields.String()
|
||||
+ """
|
||||
+ Name of the interface.
|
||||
+ """
|
||||
+
|
||||
devpath = fields.String()
|
||||
+ """
|
||||
+ Path to the device.
|
||||
+ """
|
||||
+
|
||||
driver = fields.String()
|
||||
+ """
|
||||
+ Network interface driver identifier.
|
||||
+ """
|
||||
+
|
||||
vendor = fields.String()
|
||||
- pci_info = fields.Model(PCIAddress)
|
||||
+ """
|
||||
+ Numeric identifier of the hardware vendor on PCI bus.
|
||||
+ """
|
||||
+
|
||||
+ pci_info = fields.Nullable(fields.Model(PCIAddress))
|
||||
+ """
|
||||
+ Parsed PCI address of the network interface.
|
||||
+
|
||||
+ The value is None if the network interface is not connected via PCI or it is not managed
|
||||
+ by udev.
|
||||
+ """
|
||||
+
|
||||
mac = fields.String()
|
||||
+ """
|
||||
+ MAC address of the network interface.
|
||||
+ """
|
||||
|
||||
|
||||
class PersistentNetNamesFacts(Model):
|
||||
@@ -34,6 +70,9 @@ class PersistentNetNamesFacts(Model):
|
||||
"""
|
||||
topic = SystemInfoTopic
|
||||
interfaces = fields.List(fields.Model(Interface))
|
||||
+ """
|
||||
+ List of network interfaces with information collected from udev.
|
||||
+ """
|
||||
|
||||
|
||||
class PersistentNetNamesFactsInitramfs(PersistentNetNamesFacts):
|
||||
@@ -49,8 +88,17 @@ class RenamedInterface(Model):
|
||||
"""
|
||||
topic = SystemInfoTopic
|
||||
|
||||
+ # TODO(pstodulk) deprecate these fields and replace them by new ones
|
||||
+ # or deprecate the model completely.
|
||||
rhel7_name = fields.String()
|
||||
+ """
|
||||
+ Original interface name.
|
||||
+ """
|
||||
+
|
||||
rhel8_name = fields.String()
|
||||
+ """
|
||||
+ New interface name.
|
||||
+ """
|
||||
|
||||
|
||||
class RenamedInterfaces(Model):
|
||||
@@ -63,3 +111,6 @@ class RenamedInterfaces(Model):
|
||||
topic = SystemInfoTopic
|
||||
|
||||
renamed = fields.List(fields.Model(RenamedInterface))
|
||||
+ """
|
||||
+ The list of renamed interfaces.
|
||||
+ """
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
From 70557869df83660a1a0c31808cf9c97a2704aa9a Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 21 Apr 2025 20:40:11 +0200
|
||||
Subject: [PATCH 30/37] fix(lib/version): broken _validate_version on RHEL 10
|
||||
|
||||
The validate version used to split a given version on `.` and then
|
||||
check that every fragment is a digit, which is false for RHEL 10
|
||||
since `10` is not a digit.
|
||||
---
|
||||
repos/system_upgrade/common/libraries/config/version.py | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index 24bb7729..2e837a61 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -1,4 +1,5 @@
|
||||
import operator
|
||||
+import re
|
||||
|
||||
import six
|
||||
|
||||
@@ -141,10 +142,10 @@ def _version_to_tuple(version):
|
||||
|
||||
|
||||
def _validate_versions(versions):
|
||||
- """Raise ``TypeError`` if provided versions are not strings in the form ``<integer>.<integer>``."""
|
||||
- for ver in versions:
|
||||
- split = ver.split('.')
|
||||
- if not len(split) == 2 or not all(x.isdigit() for x in split):
|
||||
+ """Raise ``ValueError`` if provided versions are not strings in the form ``<integer>.<integer>``."""
|
||||
+ version_format_regex = re.compile(r'^([1-9]\d*)\.(\d+)$')
|
||||
+ for version in versions:
|
||||
+ if not re.match(version_format_regex, version):
|
||||
raise ValueError("Versions have to be in the form of '<integer>.<integer>' "
|
||||
"but provided was '{}'".format(versions))
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,398 +0,0 @@
|
||||
From c60f657713f130d3accee7ceb303d7286b6180d5 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 18 Mar 2026 17:57:56 +0100
|
||||
Subject: [PATCH 31/44] persistentnetnamesconfig: Deprecate legacy
|
||||
functionality
|
||||
|
||||
The legacy solution to make NIC names persistent during the upgrade
|
||||
is buggy and usually it's not used nowadays. Creation of link files
|
||||
in the legacy solution breaks bonding configuration and also does not
|
||||
handle interfaces in case of InfiniBand and RDMA.
|
||||
|
||||
At this point, we plan to use of net naming scheme mandatory during
|
||||
the upgrade (or at least the only solution for persistent NIC names).
|
||||
Mark following symbols as deprecated:
|
||||
* LEAPP_DISABLE_NET_NAMING_SCHEMES (envar)
|
||||
* LEAPP_NO_NETWORK_RENAMING (envar)
|
||||
* RenamedInterfaces (model)
|
||||
* RenamedInterface (model)
|
||||
|
||||
Also the RenamedInterface model had fields `rhel7_name` & `rhel8_name`,
|
||||
which has not actually correspond to the real state. So the fields
|
||||
have been renamed instantly to `original_name` & `new_name`.
|
||||
|
||||
Also dropping the produce of InitrdInclude message in the actor as
|
||||
the model is deprecated for a long time.
|
||||
|
||||
We could possibly still think about reporting changed interface names,
|
||||
but such a report should happen in the last (FirstBoot) phase when
|
||||
the networking should be already fully initialized. Such a report
|
||||
would be just a check whether net naming scheme works as expected.
|
||||
But it's not considered at this very moment.
|
||||
---
|
||||
docs/source/configuring-ipu/envars.md | 20 +++++++-
|
||||
.../libraries-and-api/deprecations-list.md | 6 ++-
|
||||
.../actors/persistentnetnamesconfig/actor.py | 19 ++++---
|
||||
.../libraries/persistentnetnamesconfig.py | 27 +++++-----
|
||||
.../tests/test_persistentnetnamesconfig.py | 50 ++++++++++---------
|
||||
.../common/models/persistentnetnamesfacts.py | 21 ++++++--
|
||||
6 files changed, 93 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git a/docs/source/configuring-ipu/envars.md b/docs/source/configuring-ipu/envars.md
|
||||
index 72d00634..9fa37f4f 100644
|
||||
--- a/docs/source/configuring-ipu/envars.md
|
||||
+++ b/docs/source/configuring-ipu/envars.md
|
||||
@@ -6,11 +6,21 @@ Below is a list of the general and development variables available.
|
||||
### General variables
|
||||
|
||||
#### LEAPP_DISABLE_NET_NAMING_SCHEMES
|
||||
-On RHEL 8 to 9 upgrades, by default, net.naming-scheme is used to make network interface names immutable during the upgrade. In this case an extra RPM named `rhel-net-naming-sysattrs` is installed to the target system and target userspace container, providing the definitions of the "profiles" for net.naming-scheme.
|
||||
+The `net.naming-scheme` kernel command line option is used by default to make
|
||||
+network interface names immutable during the upgrade.
|
||||
+In this case an extra RPM named `rhel-net-naming-sysattrs` (or `net-naming-sysattrs`)
|
||||
+is installed to the target system and target userspace container, providing
|
||||
+the definitions of the "profiles" for `net.naming-scheme`.
|
||||
|
||||
-If set to `0`, the "legacy" mechanism is used where leapp writes .link files to prevent interfaces being renamed
|
||||
+If set to `0`, the legacy mechanism is used where leapp writes .link files to prevent interfaces being renamed
|
||||
after booting to post-upgrade system.
|
||||
|
||||
+```{warning}
|
||||
+The variable is deprecated as it is a part of the legacy solution for handling
|
||||
+NIC names during the upgrade. Current supported solution allows only using
|
||||
+the `net.naming-scheme`.
|
||||
+```
|
||||
+
|
||||
#### LEAPP_ENABLE_REPOS
|
||||
Specify repositories (repoids) split by comma, that should be used during the in-place upgrade to the target system. It‘s overwritten automatically in case the --enablerepo option is used. It‘s recommended to use the --enablerepo option instead of the envar.
|
||||
|
||||
@@ -26,6 +36,12 @@ If set to `1`, Leapp does not register the system into Red Hat Lightspeed automa
|
||||
#### LEAPP_NO_NETWORK_RENAMING
|
||||
If set to `1`, the actor responsible to handle NICs names ends without doing anything. The actor usually creates UDEV rules to preserve original NICs in case they are changed. However, in some cases it‘s not wanted and it leads in malfunction network configuration (e.g. in case the bonding is configured on the system). It‘s expected that NICs have to be handled manually if needed.
|
||||
|
||||
+```{warning}
|
||||
+The variable is deprecated as it is a part of the legacy solution for
|
||||
+handling NIC names during the upgrade. Current supported solution allows only
|
||||
+using of the `net.naming-scheme`.
|
||||
+```
|
||||
+
|
||||
##### LEAPP_NO_RHSM
|
||||
If set to `1`, Leapp does not use Red Hat Subscription Management for the upgrade. It‘s equivalent to the --no-rhsm leapp option.
|
||||
|
||||
diff --git a/docs/source/libraries-and-api/deprecations-list.md b/docs/source/libraries-and-api/deprecations-list.md
|
||||
index 679bf489..a074ebc1 100644
|
||||
--- a/docs/source/libraries-and-api/deprecations-list.md
|
||||
+++ b/docs/source/libraries-and-api/deprecations-list.md
|
||||
@@ -13,7 +13,11 @@ framework, see {ref}`deprecation:list of the deprecated functionality in leapp`.
|
||||
Only the versions in which a deprecation has been made are listed.
|
||||
|
||||
## Next release <span style="font-size:0.5em; font-weight:normal">(till TODO date)</span>
|
||||
-- Note: nothing new deprecated yet
|
||||
+- Environment variables
|
||||
+ - **`LEAPP_DISABLE_NET_NAMING_SCHEMES`** - The `net.naming-scheme` kernel argument provides much better alternative to the legacy solution enabled using this variable. Hence the legacy solution is deprecated together with this environment variable.
|
||||
+ - **`LEAPP_NO_NETWORK_RENAMING`** - It becomes obsoleted by the solution based on `net.naming-scheme` which replaces the legacy solution based on created udev link files correcting NIC names during the upgrade.
|
||||
+- Models:
|
||||
+ - **`RenamedInterfaces`** - Information provided in this message is not always complete and it's not used since the `net.naming-scheme` kernel command line argument is set during the upgrade.
|
||||
|
||||
## v0.24.0 <span style="font-size:0.5em; font-weight:normal">(till September 2026)</span>
|
||||
- Shared libraries
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesconfig/actor.py b/repos/system_upgrade/common/actors/persistentnetnamesconfig/actor.py
|
||||
index 2689d837..7a21b43a 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesconfig/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesconfig/actor.py
|
||||
@@ -1,7 +1,6 @@
|
||||
from leapp.actors import Actor
|
||||
from leapp.libraries.actor import persistentnetnamesconfig
|
||||
from leapp.models import (
|
||||
- InitrdIncludes,
|
||||
PersistentNetNamesFacts,
|
||||
PersistentNetNamesFactsInitramfs,
|
||||
RenamedInterfaces,
|
||||
@@ -11,21 +10,27 @@ from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag
|
||||
from leapp.utils.deprecation import suppress_deprecation
|
||||
|
||||
|
||||
-@suppress_deprecation(InitrdIncludes)
|
||||
+@suppress_deprecation(RenamedInterfaces)
|
||||
class PersistentNetNamesConfig(Actor):
|
||||
"""
|
||||
Generate udev persistent network naming configuration
|
||||
|
||||
- This actor generates systemd-udevd link files for each physical ethernet interface present on RHEL-7
|
||||
- in case we notice that interface name differs on RHEL-8. Link file configuration will assign RHEL-7 version of
|
||||
- a name. Actors produces list of interfaces which changed name between RHEL-7 and RHEL-8.
|
||||
+ NOTE: This actor is deprecated and currently performs described actions
|
||||
+ only if LEAPP_NO_NETWORK_RENAMING != 1 and LEAPP_DISABLE_NET_NAMING_SCHEMES == 1.
|
||||
+
|
||||
+ This actor generates systemd-udevd link files for each physical network
|
||||
+ interface present on the original system if the interface name differs
|
||||
+ on the target OS. Link file configuration will assign original name that has
|
||||
+ been detected on the source OS.
|
||||
+
|
||||
+ Also produce list of interfaces which changed names during the upgrade
|
||||
+ process.
|
||||
"""
|
||||
|
||||
name = 'persistentnetnamesconfig'
|
||||
consumes = (PersistentNetNamesFacts, PersistentNetNamesFactsInitramfs)
|
||||
- produces = (RenamedInterfaces, InitrdIncludes, TargetInitramfsTasks)
|
||||
+ produces = (RenamedInterfaces, TargetInitramfsTasks)
|
||||
tags = (ApplicationsPhaseTag, IPUWorkflowTag)
|
||||
- initrd_files = []
|
||||
|
||||
def process(self):
|
||||
persistentnetnamesconfig.process()
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesconfig/libraries/persistentnetnamesconfig.py b/repos/system_upgrade/common/actors/persistentnetnamesconfig/libraries/persistentnetnamesconfig.py
|
||||
index 189cd4d0..0618f090 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesconfig/libraries/persistentnetnamesconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesconfig/libraries/persistentnetnamesconfig.py
|
||||
@@ -2,10 +2,9 @@ import errno
|
||||
import os
|
||||
import re
|
||||
|
||||
-from leapp.libraries.common.config import get_env, version
|
||||
+from leapp.libraries.common.config import get_env
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import (
|
||||
- InitrdIncludes,
|
||||
PersistentNetNamesFacts,
|
||||
PersistentNetNamesFactsInitramfs,
|
||||
RenamedInterface,
|
||||
@@ -37,18 +36,21 @@ def generate_link_file(interface):
|
||||
return link_file
|
||||
|
||||
|
||||
-@suppress_deprecation(InitrdIncludes)
|
||||
+@suppress_deprecation(RenamedInterfaces, RenamedInterface)
|
||||
def process():
|
||||
are_net_schemes_enabled = get_env('LEAPP_DISABLE_NET_NAMING_SCHEMES', '0') != '1'
|
||||
- is_upgrade_8to9 = version.get_target_major_version() == '9'
|
||||
|
||||
- if are_net_schemes_enabled and is_upgrade_8to9:
|
||||
- # For 8>9 we are using net.naming_scheme kernel arg by default - do not generate link files
|
||||
+ if are_net_schemes_enabled:
|
||||
msg = ('Skipping generation of .link files renaming NICs as net.naming-scheme '
|
||||
- '{LEAPP_DISABLE_NET_NAMING_SCHEMES != 1} is enabled and upgrade is 8>9')
|
||||
- api.current_logger().info(msg)
|
||||
+ '{LEAPP_DISABLE_NET_NAMING_SCHEMES != 1} is enabled.')
|
||||
+ api.current_logger().debug(msg)
|
||||
return
|
||||
|
||||
+ api.current_logger().warning(
|
||||
+ 'LEAPP_DISABLE_NET_NAMING_SCHEMES=1 - Using deprecated handling'
|
||||
+ ' of network interface names by creating link files.'
|
||||
+ )
|
||||
+
|
||||
if get_env('LEAPP_NO_NETWORK_RENAMING', '0') == '1':
|
||||
api.current_logger().info(
|
||||
'Skipping handling of possibly renamed network interfaces: leapp executed with LEAPP_NO_NETWORK_RENAMING=1'
|
||||
@@ -80,13 +82,13 @@ def process():
|
||||
)
|
||||
continue
|
||||
|
||||
- if source_name != target_name and get_env('LEAPP_NO_NETWORK_RENAMING', '0') != '1':
|
||||
+ if source_name != target_name:
|
||||
api.current_logger().warning('Detected interface rename {} -> {}.'.format(source_name, target_name))
|
||||
|
||||
- if re.search('eth[0-9]+', iface.name) is not None:
|
||||
+ if re.search('^eth[0-9]+$', iface.name) is not None:
|
||||
api.current_logger().warning('Interface named using eth prefix, refusing to generate link file')
|
||||
- renamed_interfaces.append(RenamedInterface(**{'rhel7_name': source_name,
|
||||
- 'rhel8_name': target_name}))
|
||||
+ renamed_interfaces.append(RenamedInterface(**{'original_name': source_name,
|
||||
+ 'new_name': target_name}))
|
||||
continue
|
||||
|
||||
initrd_files.append(generate_link_file(iface))
|
||||
@@ -108,7 +110,6 @@ def process():
|
||||
api.current_logger().warning(msg)
|
||||
|
||||
api.produce(RenamedInterfaces(renamed=renamed_interfaces))
|
||||
- api.produce(InitrdIncludes(files=initrd_files))
|
||||
# TODO: cover actor by tests in future. I am skipping writing of tests
|
||||
# now as some refactoring and bugfixing related to this actor
|
||||
# is planned already.
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesconfig/tests/test_persistentnetnamesconfig.py b/repos/system_upgrade/common/actors/persistentnetnamesconfig/tests/test_persistentnetnamesconfig.py
|
||||
index c584c7ea..b107612b 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesconfig/tests/test_persistentnetnamesconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesconfig/tests/test_persistentnetnamesconfig.py
|
||||
@@ -7,7 +7,8 @@ from leapp.libraries.actor import persistentnetnamesconfig
|
||||
from leapp.libraries.common.config import mock_configs
|
||||
from leapp.libraries.common.testutils import CurrentActorMocked, logger_mocked, produce_mocked
|
||||
from leapp.models import (
|
||||
- InitrdIncludes,
|
||||
+ EnvVar,
|
||||
+ IPUConfig,
|
||||
Interface,
|
||||
PCIAddress,
|
||||
PersistentNetNamesFacts,
|
||||
@@ -19,6 +20,19 @@ from leapp.models import (
|
||||
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
CUR_DIR = ""
|
||||
|
||||
+CONFIG_DISABLED_NAMING_SCHEMES = IPUConfig(
|
||||
+ leapp_env_vars=[
|
||||
+ EnvVar(name='LEAPP_DEVEL', value='0'),
|
||||
+ EnvVar(name='LEAPP_DISABLE_NET_NAMING_SCHEMES', value='1'),
|
||||
+ ],
|
||||
+ os_release=mock_configs.CONFIG.os_release,
|
||||
+ version=mock_configs.CONFIG.version,
|
||||
+ architecture=mock_configs.CONFIG.architecture,
|
||||
+ kernel=mock_configs.CONFIG.kernel,
|
||||
+ supported_upgrade_paths=mock_configs.CONFIG.supported_upgrade_paths,
|
||||
+ distro=mock_configs.CONFIG.distro
|
||||
+)
|
||||
+
|
||||
|
||||
@pytest.fixture
|
||||
def adjust_cwd():
|
||||
@@ -56,12 +70,10 @@ def test_identical(current_actor_context):
|
||||
interfaces = generate_interfaces(4)
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interfaces))
|
||||
current_actor_context.feed(PersistentNetNamesFactsInitramfs(interfaces=interfaces))
|
||||
- current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ current_actor_context.run(config_model=CONFIG_DISABLED_NAMING_SCHEMES)
|
||||
|
||||
renamed_interfaces = current_actor_context.consume(RenamedInterfaces)[0]
|
||||
- initrd_files = current_actor_context.consume(InitrdIncludes)[0]
|
||||
t_initrafms_tasks = current_actor_context.consume(TargetInitramfsTasks)[0]
|
||||
- assert initrd_files.files == t_initrafms_tasks.include_files
|
||||
assert not renamed_interfaces.renamed
|
||||
assert not t_initrafms_tasks.include_files
|
||||
|
||||
@@ -73,12 +85,10 @@ def test_renamed_single_noneth(monkeypatch, current_actor_context):
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interfaces))
|
||||
interfaces[0].name = 'n4'
|
||||
current_actor_context.feed(PersistentNetNamesFactsInitramfs(interfaces=interfaces))
|
||||
- current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ current_actor_context.run(config_model=CONFIG_DISABLED_NAMING_SCHEMES)
|
||||
|
||||
renamed_interfaces = current_actor_context.consume(RenamedInterfaces)[0]
|
||||
- initrd_files = current_actor_context.consume(InitrdIncludes)[0]
|
||||
t_initrafms_tasks = current_actor_context.consume(TargetInitramfsTasks)[0]
|
||||
- assert initrd_files.files == t_initrafms_tasks.include_files
|
||||
assert not renamed_interfaces.renamed
|
||||
assert len(t_initrafms_tasks.include_files) == 1
|
||||
assert '/etc/systemd/network/10-leapp-n0.link' in t_initrafms_tasks.include_files
|
||||
@@ -92,12 +102,10 @@ def test_renamed_swap_noneth(monkeypatch, current_actor_context):
|
||||
interfaces[0].name = 'n3'
|
||||
interfaces[3].name = 'n0'
|
||||
current_actor_context.feed(PersistentNetNamesFactsInitramfs(interfaces=interfaces))
|
||||
- current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ current_actor_context.run(config_model=CONFIG_DISABLED_NAMING_SCHEMES)
|
||||
|
||||
renamed_interfaces = current_actor_context.consume(RenamedInterfaces)[0]
|
||||
- initrd_files = current_actor_context.consume(InitrdIncludes)[0]
|
||||
t_initrafms_tasks = current_actor_context.consume(TargetInitramfsTasks)[0]
|
||||
- assert initrd_files.files == t_initrafms_tasks.include_files
|
||||
assert not renamed_interfaces.renamed
|
||||
assert len(t_initrafms_tasks.include_files) == 2
|
||||
assert '/etc/systemd/network/10-leapp-n0.link' in t_initrafms_tasks.include_files
|
||||
@@ -113,15 +121,13 @@ def test_renamed_single_eth(monkeypatch, current_actor_context):
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interfaces))
|
||||
interfaces[0].name = 'eth4'
|
||||
current_actor_context.feed(PersistentNetNamesFactsInitramfs(interfaces=interfaces))
|
||||
- current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ current_actor_context.run(config_model=CONFIG_DISABLED_NAMING_SCHEMES)
|
||||
|
||||
renamed_interfaces = current_actor_context.consume(RenamedInterfaces)[0]
|
||||
- initrd_files = current_actor_context.consume(InitrdIncludes)[0]
|
||||
t_initrafms_tasks = current_actor_context.consume(TargetInitramfsTasks)[0]
|
||||
- assert initrd_files.files == t_initrafms_tasks.include_files
|
||||
assert len(renamed_interfaces.renamed) == 1
|
||||
- assert renamed_interfaces.renamed[0].rhel7_name == 'eth0'
|
||||
- assert renamed_interfaces.renamed[0].rhel8_name == 'eth4'
|
||||
+ assert renamed_interfaces.renamed[0].original_name == 'eth0'
|
||||
+ assert renamed_interfaces.renamed[0].new_name == 'eth4'
|
||||
assert not t_initrafms_tasks.include_files
|
||||
|
||||
|
||||
@@ -135,18 +141,16 @@ def test_renamed_swap_eth(monkeypatch, current_actor_context):
|
||||
interfaces[0].name = 'eth3'
|
||||
interfaces[3].name = 'eth0'
|
||||
current_actor_context.feed(PersistentNetNamesFactsInitramfs(interfaces=interfaces))
|
||||
- current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ current_actor_context.run(config_model=CONFIG_DISABLED_NAMING_SCHEMES)
|
||||
|
||||
renamed_interfaces = current_actor_context.consume(RenamedInterfaces)[0]
|
||||
- initrd_files = current_actor_context.consume(InitrdIncludes)[0]
|
||||
t_initrafms_tasks = current_actor_context.consume(TargetInitramfsTasks)[0]
|
||||
- assert initrd_files.files == t_initrafms_tasks.include_files
|
||||
assert len(renamed_interfaces.renamed) == 2
|
||||
for interface in renamed_interfaces.renamed:
|
||||
- if interface.rhel7_name == 'eth0':
|
||||
- assert interface.rhel8_name == 'eth3'
|
||||
- elif interface.rhel7_name == 'eth3':
|
||||
- assert interface.rhel8_name == 'eth0'
|
||||
+ if interface.original_name == 'eth0':
|
||||
+ assert interface.new_name == 'eth3'
|
||||
+ elif interface.original_name == 'eth3':
|
||||
+ assert interface.new_name == 'eth0'
|
||||
assert not t_initrafms_tasks.include_files
|
||||
|
||||
|
||||
@@ -179,7 +183,7 @@ def test_bz_1899455_crash_iface(monkeypatch, adjust_cwd):
|
||||
monkeypatch.setattr(persistentnetnamesconfig.api, 'produce', produce_mocked())
|
||||
persistentnetnamesconfig.process()
|
||||
|
||||
- for prod_models in [RenamedInterfaces, InitrdIncludes, TargetInitramfsTasks]:
|
||||
+ for prod_models in [RenamedInterfaces, TargetInitramfsTasks]:
|
||||
any(isinstance(i, prod_models) for i in persistentnetnamesconfig.api.produce.model_instances)
|
||||
assert any('Some network devices' in x for x in persistentnetnamesconfig.api.current_logger.warnmsg)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/models/persistentnetnamesfacts.py b/repos/system_upgrade/common/models/persistentnetnamesfacts.py
|
||||
index 3c71cdcd..e5cf979b 100644
|
||||
--- a/repos/system_upgrade/common/models/persistentnetnamesfacts.py
|
||||
+++ b/repos/system_upgrade/common/models/persistentnetnamesfacts.py
|
||||
@@ -1,5 +1,6 @@
|
||||
from leapp.models import fields, Model
|
||||
from leapp.topics import SystemInfoTopic
|
||||
+from leapp.utils.deprecation import deprecated
|
||||
|
||||
|
||||
class PCIAddress(Model):
|
||||
@@ -82,25 +83,37 @@ class PersistentNetNamesFactsInitramfs(PersistentNetNamesFacts):
|
||||
pass
|
||||
|
||||
|
||||
+@deprecated(
|
||||
+ since="2026-03-18",
|
||||
+ message=(
|
||||
+ "Information provided in this message is not always complete and it's"
|
||||
+ " not used nowadays when net naming scheme is set during the upgrade."
|
||||
+ )
|
||||
+)
|
||||
class RenamedInterface(Model):
|
||||
"""
|
||||
Provide original and new name of the network interface when renamed
|
||||
"""
|
||||
topic = SystemInfoTopic
|
||||
|
||||
- # TODO(pstodulk) deprecate these fields and replace them by new ones
|
||||
- # or deprecate the model completely.
|
||||
- rhel7_name = fields.String()
|
||||
+ original_name = fields.String()
|
||||
"""
|
||||
Original interface name.
|
||||
"""
|
||||
|
||||
- rhel8_name = fields.String()
|
||||
+ new_name = fields.String()
|
||||
"""
|
||||
New interface name.
|
||||
"""
|
||||
|
||||
|
||||
+@deprecated(
|
||||
+ since="2026-03-18",
|
||||
+ message=(
|
||||
+ "Information provided in this message is not always complete and it's"
|
||||
+ " not used nowadays when net naming scheme is set during the upgrade."
|
||||
+ )
|
||||
+)
|
||||
class RenamedInterfaces(Model):
|
||||
"""
|
||||
Provide list of renamed network interfaces
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
From a633641884f50fc917668cf1c8bd80d6c88297c7 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 2 May 2025 16:29:10 +0200
|
||||
Subject: [PATCH 31/37] upgrade_paths: add information about centos virtual
|
||||
versions
|
||||
|
||||
Add additional field to upgrade paths for CentOS that maps CentOS
|
||||
versions consisting only of a major version number to corresponding
|
||||
RHEL versions of the form MAJOR.MINOR ("virtual version"). This
|
||||
information is inteded to be used by leapp to in version checks
|
||||
to obtain a MAJOR.MINOR version so that code written for RHEL can work
|
||||
as expected also on CentOS.
|
||||
|
||||
Jira-ref: RHEL-80334
|
||||
---
|
||||
repos/system_upgrade/common/files/upgrade_paths.json | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
index 7ace7943..279e6eaa 100644
|
||||
--- a/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
+++ b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
@@ -21,6 +21,11 @@
|
||||
"default": {
|
||||
"8": ["9"],
|
||||
"9": ["10"]
|
||||
+ },
|
||||
+ "_virtual_versions": {
|
||||
+ "8": "8.10",
|
||||
+ "9": "9.6",
|
||||
+ "10": "10.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -0,0 +1,334 @@
|
||||
From 5f569408469d4e43ff559c5b90c3cc068d59d3a4 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 2 May 2025 16:35:18 +0200
|
||||
Subject: [PATCH 32/37] models(ipuconfig): extend Version class to contain
|
||||
virtual versions
|
||||
|
||||
Add virtual_{source,target}_version fields to the Version model. These
|
||||
fields store a virtual MAJOR.MINOR CentOS version so that
|
||||
version-specific checks originally written for RHEL can work as expected
|
||||
also on CentOS. On non-CentOS system, the value of these fields should
|
||||
be the same as source/target versions. The ipuworkflowconfig actor is
|
||||
modified accordingly to populate the newly added fields.
|
||||
|
||||
Jira-ref: RHEL-80334
|
||||
---
|
||||
.../checksaphana/tests/test_checksaphana.py | 4 ++
|
||||
.../libraries/ipuworkflowconfig.py | 51 +++++++++++++++++--
|
||||
.../tests/test_ipuworkflowconfig.py | 41 ++++++++++++++-
|
||||
.../common/libraries/config/mock_configs.py | 16 ++++--
|
||||
.../libraries/config/tests/test_version.py | 12 +++--
|
||||
.../common/libraries/testutils.py | 13 ++++-
|
||||
.../system_upgrade/common/models/ipuconfig.py | 15 ++++++
|
||||
7 files changed, 137 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py b/repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py
|
||||
index 1417b00a..1e43f403 100644
|
||||
--- a/repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py
|
||||
+++ b/repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py
|
||||
@@ -181,6 +181,8 @@ class MockSAPHanaVersionInstance(object):
|
||||
)
|
||||
)
|
||||
def test_checksaphana__fullfills_rhel86_hana_min_version(monkeypatch, major, rev, patchlevel, result):
|
||||
+ monkeypatch.setattr(checksaphana.api, 'current_actor', testutils.CurrentActorMocked())
|
||||
+
|
||||
monkeypatch.setattr(version, 'get_target_major_version', lambda: '8')
|
||||
monkeypatch.setattr(version, 'get_target_version', lambda: '8.6')
|
||||
monkeypatch.setattr(checksaphana, 'SAP_HANA_RHEL86_REQUIRED_PATCH_LEVELS', ((4, 48, 2), (5, 52, 0)))
|
||||
@@ -213,6 +215,8 @@ def test_checksaphana__fullfills_rhel86_hana_min_version(monkeypatch, major, rev
|
||||
)
|
||||
)
|
||||
def test_checksaphana__fullfills_hana_rhel90_min_version(monkeypatch, major, rev, patchlevel, result):
|
||||
+ monkeypatch.setattr(checksaphana.api, 'current_actor', testutils.CurrentActorMocked())
|
||||
+
|
||||
monkeypatch.setattr(version, 'get_target_major_version', lambda: '9')
|
||||
monkeypatch.setattr(version, 'get_target_version', lambda: '9.0')
|
||||
monkeypatch.setattr(checksaphana, 'SAP_HANA_RHEL90_REQUIRED_PATCH_LEVELS', ((5, 59, 4), (6, 63, 0)))
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
index 35f61669..f76677fd 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
@@ -10,6 +10,7 @@ ENV_IGNORE = ('LEAPP_CURRENT_PHASE', 'LEAPP_CURRENT_ACTOR', 'LEAPP_VERBOSE',
|
||||
'LEAPP_DEBUG')
|
||||
|
||||
ENV_MAPPING = {'LEAPP_DEVEL_DM_DISABLE_UDEV': 'DM_DISABLE_UDEV'}
|
||||
+CENTOS_VIRTUAL_VERSIONS_KEY = '_virtual_versions'
|
||||
|
||||
|
||||
def get_env_vars():
|
||||
@@ -92,8 +93,7 @@ def load_upgrade_paths_definitions(paths_definition_file):
|
||||
return definitions
|
||||
|
||||
|
||||
-def load_raw_upgrade_paths_for_distro_and_flavour(distro_id, flavour, paths_definition_file='upgrade_paths.json'):
|
||||
- all_definitions = load_upgrade_paths_definitions(paths_definition_file)
|
||||
+def extract_upgrade_paths_for_distro_and_flavour(all_definitions, distro_id, flavour):
|
||||
raw_upgrade_paths_for_distro = all_definitions.get(distro_id, {})
|
||||
|
||||
if not raw_upgrade_paths_for_distro:
|
||||
@@ -117,6 +117,39 @@ def construct_models_for_paths_matching_source_major(raw_paths, src_major_versio
|
||||
return multipaths_matching_source
|
||||
|
||||
|
||||
+def construct_virtual_versions(all_upgrade_path_defs, distro_id, source_version, target_version):
|
||||
+ if distro_id.lower() != 'centos':
|
||||
+ return (source_version, target_version)
|
||||
+
|
||||
+ centos_upgrade_paths = all_upgrade_path_defs.get('centos', {})
|
||||
+ if not centos_upgrade_paths:
|
||||
+ raise StopActorExecutionError('There are no upgrade paths defined for CentOS.')
|
||||
+
|
||||
+ virtual_versions = centos_upgrade_paths.get(CENTOS_VIRTUAL_VERSIONS_KEY, {})
|
||||
+ if not virtual_versions: # Unlikely, only if using old upgrade_paths.json, but the user should not touch the file
|
||||
+ details = {'details': 'The file does not contain any information about virtual versions of CentOS'}
|
||||
+ raise StopActorExecutionError('The internal upgrade_paths.json file is malformed.')
|
||||
+
|
||||
+ source_virtual_version = virtual_versions.get(source_version)
|
||||
+ target_virtual_version = virtual_versions.get(target_version)
|
||||
+
|
||||
+ if not source_virtual_version or not target_virtual_version:
|
||||
+ if not source_virtual_version and not target_virtual_version:
|
||||
+ what_is_missing = 'CentOS {} (source) and CentOS {} (target)'.format(source_virtual_version,
|
||||
+ target_virtual_version)
|
||||
+ elif not source_virtual_version:
|
||||
+ what_is_missing = 'CentOS {} (source)'.format(source_virtual_version)
|
||||
+ else:
|
||||
+ what_is_missing = 'CentOS {} (target)'.format(target_virtual_version)
|
||||
+
|
||||
+ details_msg = 'The {} field in upgrade path definitions does not provide any information for {}'
|
||||
+ details = {'details': details_msg.format(CENTOS_VIRTUAL_VERSIONS_KEY, what_is_missing)}
|
||||
+ raise StopActorExecutionError('Failed to identify virtual minor version number for the system.',
|
||||
+ details=details)
|
||||
+
|
||||
+ return (source_virtual_version, target_virtual_version)
|
||||
+
|
||||
+
|
||||
def produce_ipu_config(actor):
|
||||
flavour = os.environ.get('LEAPP_UPGRADE_PATH_FLAVOUR')
|
||||
target_version = os.environ.get('LEAPP_UPGRADE_PATH_TARGET_RELEASE')
|
||||
@@ -125,17 +158,27 @@ def produce_ipu_config(actor):
|
||||
|
||||
check_target_major_version(source_version, target_version)
|
||||
|
||||
- raw_upgrade_paths = load_raw_upgrade_paths_for_distro_and_flavour(os_release.release_id, flavour)
|
||||
+ all_upgrade_path_defs = load_upgrade_paths_definitions('upgrade_paths.json')
|
||||
+ raw_upgrade_paths = extract_upgrade_paths_for_distro_and_flavour(all_upgrade_path_defs,
|
||||
+ os_release.release_id,
|
||||
+ flavour)
|
||||
source_major_version = source_version.split('.')[0]
|
||||
exposed_supported_paths = construct_models_for_paths_matching_source_major(raw_upgrade_paths, source_major_version)
|
||||
|
||||
+ virtual_source_version, virtual_target_version = construct_virtual_versions(all_upgrade_path_defs,
|
||||
+ os_release.release_id,
|
||||
+ source_version,
|
||||
+ target_version)
|
||||
+
|
||||
actor.produce(IPUConfig(
|
||||
leapp_env_vars=get_env_vars(),
|
||||
os_release=os_release,
|
||||
architecture=platform.machine(),
|
||||
version=Version(
|
||||
source=source_version,
|
||||
- target=target_version
|
||||
+ target=target_version,
|
||||
+ virtual_source_version=virtual_source_version,
|
||||
+ virtual_target_version=virtual_target_version,
|
||||
),
|
||||
kernel=get_booted_kernel(),
|
||||
flavour=flavour,
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
index d88424ce..6184121b 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
@@ -149,7 +149,44 @@ def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flav
|
||||
}
|
||||
}
|
||||
}
|
||||
- monkeypatch.setattr(ipuworkflowconfig, 'load_upgrade_paths_definitions', lambda *args: defined_upgrade_paths)
|
||||
|
||||
- result = ipuworkflowconfig.load_raw_upgrade_paths_for_distro_and_flavour(distro, flavour)
|
||||
+ result = ipuworkflowconfig.extract_upgrade_paths_for_distro_and_flavour(defined_upgrade_paths,
|
||||
+ distro, flavour)
|
||||
assert result == expected_result
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('construction_params', 'expected_versions'),
|
||||
+ [
|
||||
+ (('centos', '8', '9'), ('8.10', '9.5')),
|
||||
+ (('rhel', '8.10', '9.4'), ('8.10', '9.4')),
|
||||
+ ]
|
||||
+)
|
||||
+def test_virtual_version_construction(construction_params, expected_versions):
|
||||
+ defined_upgrade_paths = {
|
||||
+ 'rhel': {
|
||||
+ 'default': {
|
||||
+ '8.10': ['9.4', '9.5', '9.6'],
|
||||
+ '8.4': ['9.2'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '8': ['9.4', '9.5', '9.6'],
|
||||
+ '9': ['10.0']
|
||||
+ },
|
||||
+ 'saphana': {
|
||||
+ '8.10': ['9.6', '9.4'],
|
||||
+ '8': ['9.6', '9.4'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '9': ['10.0']
|
||||
+ }
|
||||
+ },
|
||||
+ 'centos': {
|
||||
+ '8': ['9'],
|
||||
+ '_virtual_versions': {
|
||||
+ '8': '8.10',
|
||||
+ '9': '9.5',
|
||||
+ }
|
||||
+ },
|
||||
+ }
|
||||
+
|
||||
+ result = ipuworkflowconfig.construct_virtual_versions(defined_upgrade_paths, *construction_params)
|
||||
+ assert result == expected_versions
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/mock_configs.py b/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
index a1c9c0fd..a7ee0000 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
@@ -19,7 +19,9 @@ CONFIG = IPUConfig(
|
||||
),
|
||||
version=Version(
|
||||
source='7.6',
|
||||
- target='8.0'
|
||||
+ target='8.0',
|
||||
+ virtual_source_version='7.6',
|
||||
+ virtual_target_version='8.0'
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
@@ -39,7 +41,9 @@ CONFIG_NO_NETWORK_RENAMING = IPUConfig(
|
||||
),
|
||||
version=Version(
|
||||
source='7.6',
|
||||
- target='8.0'
|
||||
+ target='8.0',
|
||||
+ virtual_source_version='7.6',
|
||||
+ virtual_target_version='8.0'
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
@@ -59,7 +63,9 @@ CONFIG_ALL_SIGNED = IPUConfig(
|
||||
),
|
||||
version=Version(
|
||||
source='7.6',
|
||||
- target='8.0'
|
||||
+ target='8.0',
|
||||
+ virtual_source_version='7.6',
|
||||
+ virtual_target_version='8.0'
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
@@ -78,7 +84,9 @@ CONFIG_S390X = IPUConfig(
|
||||
),
|
||||
version=Version(
|
||||
source='7.6',
|
||||
- target='8.0'
|
||||
+ target='8.0',
|
||||
+ virtual_source_version='7.6',
|
||||
+ virtual_target_version='8.0'
|
||||
),
|
||||
architecture='s390x',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index 3cb6479c..a8a1023e 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -27,7 +27,9 @@ def test_cmp_versions():
|
||||
assert not version._cmp_versions(['>= 7.6', '& 7.7'])
|
||||
|
||||
|
||||
-def test_matches_version_wrong_args():
|
||||
+def test_matches_version_wrong_args(monkeypatch):
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
+
|
||||
with pytest.raises(TypeError):
|
||||
version.matches_version('>= 7.6', '7.7')
|
||||
with pytest.raises(TypeError):
|
||||
@@ -42,7 +44,9 @@ def test_matches_version_wrong_args():
|
||||
version.matches_version(['>= 7.6', '& 7.7'], '7.7')
|
||||
|
||||
|
||||
-def test_matches_version_fail():
|
||||
+def test_matches_version_fail(monkeypatch):
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
+
|
||||
assert not version.matches_version(['> 7.6', '< 7.7'], '7.6')
|
||||
assert not version.matches_version(['> 7.6', '< 7.7'], '7.7')
|
||||
assert not version.matches_version(['> 7.6', '< 7.10'], '7.6')
|
||||
@@ -50,7 +54,9 @@ def test_matches_version_fail():
|
||||
assert not version.matches_version(['7.6', '7.7', '7.10'], '7.8')
|
||||
|
||||
|
||||
-def test_matches_version_pass():
|
||||
+def test_matches_version_pass(monkeypatch):
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
+
|
||||
assert version.matches_version(['7.6', '7.7', '7.10'], '7.7')
|
||||
assert version.matches_version(['> 7.6', '< 7.10'], '7.7')
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/testutils.py b/repos/system_upgrade/common/libraries/testutils.py
|
||||
index 1b3c3683..3e145d91 100644
|
||||
--- a/repos/system_upgrade/common/libraries/testutils.py
|
||||
+++ b/repos/system_upgrade/common/libraries/testutils.py
|
||||
@@ -74,15 +74,24 @@ def _make_default_config(actor_config_schema):
|
||||
return _normalize_config({}, merged_schema) # Will fill default values during normalization
|
||||
|
||||
|
||||
+# Note: The constructor of the following class takes in too many arguments (R0913). A builder-like
|
||||
+# pattern would be nice here. Ideally, the builder should actively prevent the developer from setting fields
|
||||
+# that do not affect actor's behavior in __setattr__.
|
||||
class CurrentActorMocked(object): # pylint:disable=R0904
|
||||
- def __init__(self, arch=architecture.ARCH_X86_64, envars=None, kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ def __init__(self, arch=architecture.ARCH_X86_64, envars=None, # pylint:disable=R0913
|
||||
+ kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
release_id='rhel', src_ver='7.8', dst_ver='8.1', msgs=None, flavour='default', config=None,
|
||||
+ virtual_source_version=None, virtual_target_version=None,
|
||||
supported_upgrade_paths=None):
|
||||
"""
|
||||
:param List[IPUSourceToPossibleTargets] supported_upgrade_paths: List of supported upgrade paths.
|
||||
"""
|
||||
envarsList = [EnvVar(name=k, value=v) for k, v in envars.items()] if envars else []
|
||||
- version = namedtuple('Version', ['source', 'target'])(src_ver, dst_ver)
|
||||
+
|
||||
+ version_fields = ['source', 'target', 'virtual_source_version', 'virtual_target_version']
|
||||
+ version_values = [src_ver, dst_ver, virtual_source_version or src_ver, virtual_target_version or dst_ver]
|
||||
+ version = namedtuple('Version', version_fields)(*version_values)
|
||||
+
|
||||
release = namedtuple('OS_release', ['release_id', 'version_id'])(release_id, src_ver)
|
||||
|
||||
self._common_folder = '../../files'
|
||||
diff --git a/repos/system_upgrade/common/models/ipuconfig.py b/repos/system_upgrade/common/models/ipuconfig.py
|
||||
index 0a16b603..379ac13f 100644
|
||||
--- a/repos/system_upgrade/common/models/ipuconfig.py
|
||||
+++ b/repos/system_upgrade/common/models/ipuconfig.py
|
||||
@@ -33,6 +33,21 @@ class Version(Model):
|
||||
target = fields.String()
|
||||
"""Version of the target system. E.g. '8.2.'."""
|
||||
|
||||
+ virtual_source_version = fields.String()
|
||||
+ """
|
||||
+ Source OS version used when checking whether to execute version-dependent code.
|
||||
+
|
||||
+ On RHEL and other systems that have version of the form MINOR.MAJOR, `virtual_source_version`
|
||||
+ matches `source_version`.
|
||||
+
|
||||
+ CentOS has version of the form MAJOR, lacking the minor version number. The
|
||||
+ `virtual_source_version` value is obtained by combining CentOS major
|
||||
+ version number with a minor version number stored internally in the upgrade_paths.json file.
|
||||
+ """
|
||||
+
|
||||
+ virtual_target_version = fields.String()
|
||||
+ """ See :py:attr:`virtual_source_version` """
|
||||
+
|
||||
|
||||
class IPUSourceToPossibleTargets(Model):
|
||||
"""
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,124 +0,0 @@
|
||||
From 0872576049715c7a909379d5de5cc53bab3a408a Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 20 Mar 2026 17:19:20 +0100
|
||||
Subject: [PATCH 32/44] persistentnetnamesdisable: Disable net.ifnames
|
||||
correctly for single eth
|
||||
|
||||
Original solution disabled net.ifnames only for the target kernel
|
||||
bootloader entry. But the upgrade initramfs stayed unhandled.
|
||||
So it could happen that a "false positive" detection of changed
|
||||
network interface names could been detected during the upgrade process
|
||||
even when the target system booted again with "eth0" net interface
|
||||
(because of net.ifnames=0). Set the parameter also for the upgrade
|
||||
environment to behave same as on the target system.
|
||||
|
||||
Also, actor originally produced just the KernelCmdlineArg msg,
|
||||
which is nowadays considered kind of obsoleted for this purpose
|
||||
- still valid, but obsoleted. So produce UpgradeKernelCmdlineArgTasks
|
||||
and TargetKernelCmdlineArgTasks msgs instead.
|
||||
---
|
||||
.../tests/test_persistentnetnamesconfig.py | 2 +-
|
||||
.../common/actors/persistentnetnamesdisable/actor.py | 8 ++++++--
|
||||
.../libraries/persistentnetnamesdisable.py | 11 +++++++++--
|
||||
.../tests/test_persistentnetnamesdisable.py | 10 +++++++++-
|
||||
4 files changed, 25 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesconfig/tests/test_persistentnetnamesconfig.py b/repos/system_upgrade/common/actors/persistentnetnamesconfig/tests/test_persistentnetnamesconfig.py
|
||||
index b107612b..f2519d77 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesconfig/tests/test_persistentnetnamesconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesconfig/tests/test_persistentnetnamesconfig.py
|
||||
@@ -8,8 +8,8 @@ from leapp.libraries.common.config import mock_configs
|
||||
from leapp.libraries.common.testutils import CurrentActorMocked, logger_mocked, produce_mocked
|
||||
from leapp.models import (
|
||||
EnvVar,
|
||||
- IPUConfig,
|
||||
Interface,
|
||||
+ IPUConfig,
|
||||
PCIAddress,
|
||||
PersistentNetNamesFacts,
|
||||
PersistentNetNamesFactsInitramfs,
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
index 15c43141..741e2c86 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
@@ -1,6 +1,10 @@
|
||||
from leapp.actors import Actor
|
||||
from leapp.libraries.actor import persistentnetnamesdisable
|
||||
-from leapp.models import KernelCmdlineArg, PersistentNetNamesFacts
|
||||
+from leapp.models import (
|
||||
+ PersistentNetNamesFacts,
|
||||
+ TargetKernelCmdlineArgTasks,
|
||||
+ UpgradeKernelCmdlineArgTasks
|
||||
+)
|
||||
from leapp.reporting import Report
|
||||
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
@@ -12,7 +16,7 @@ class PersistentNetNamesDisable(Actor):
|
||||
|
||||
name = 'persistentnetnamesdisable'
|
||||
consumes = (PersistentNetNamesFacts,)
|
||||
- produces = (KernelCmdlineArg, Report)
|
||||
+ produces = (Report, TargetKernelCmdlineArgTasks, UpgradeKernelCmdlineArgTasks)
|
||||
tags = (ChecksPhaseTag, IPUWorkflowTag)
|
||||
|
||||
def process(self):
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
index 0d1a90e2..38eef133 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
@@ -3,7 +3,12 @@ import re
|
||||
from leapp import reporting
|
||||
from leapp.libraries.common.config.version import get_target_major_version
|
||||
from leapp.libraries.stdlib import api
|
||||
-from leapp.models import KernelCmdlineArg, PersistentNetNamesFacts
|
||||
+from leapp.models import (
|
||||
+ KernelCmdlineArg,
|
||||
+ PersistentNetNamesFacts,
|
||||
+ TargetKernelCmdlineArgTasks,
|
||||
+ UpgradeKernelCmdlineArgTasks
|
||||
+)
|
||||
from leapp.reporting import create_report
|
||||
|
||||
|
||||
@@ -29,7 +34,9 @@ def disable_persistent_naming():
|
||||
"Single eth0 network interface detected."
|
||||
" Appending 'net.ifnames=0' for the target system kernel commandline"
|
||||
)
|
||||
- api.produce(KernelCmdlineArg(**{'key': 'net.ifnames', 'value': '0'}))
|
||||
+ k_arg = KernelCmdlineArg(key='net.ifnames', value='0')
|
||||
+ api.produce(UpgradeKernelCmdlineArgTasks(to_add=[k_arg]))
|
||||
+ api.produce(TargetKernelCmdlineArgTasks(to_add=[k_arg]))
|
||||
|
||||
|
||||
def report_ethX_ifaces():
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
index 2369e80f..81b5a28c 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
@@ -1,7 +1,13 @@
|
||||
import pytest
|
||||
|
||||
from leapp.libraries.actor import persistentnetnamesdisable
|
||||
-from leapp.models import Interface, KernelCmdlineArg, PCIAddress, PersistentNetNamesFacts
|
||||
+from leapp.models import (
|
||||
+ Interface,
|
||||
+ PCIAddress,
|
||||
+ PersistentNetNamesFacts,
|
||||
+ TargetKernelCmdlineArgTasks,
|
||||
+ UpgradeKernelCmdlineArgTasks
|
||||
+)
|
||||
from leapp.reporting import Report
|
||||
from leapp.snactor.fixture import current_actor_context
|
||||
from leapp.utils.report import is_inhibitor
|
||||
@@ -51,6 +57,8 @@ def test_actor_single_eth0(current_actor_context):
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
assert not current_actor_context.consume(Report)
|
||||
+ assert current_actor_context.consume(UpgradeKernelCmdlineArgTasks)
|
||||
+ assert current_actor_context.consume(TargetKernelCmdlineArgTasks)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,101 @@
|
||||
From 9a48ac590bf9594ea7e9eefdaa668af5f7c75976 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 2 May 2025 17:12:55 +0200
|
||||
Subject: [PATCH 33/37] libs(common, version): autocorrect centos versions into
|
||||
MAJOR.MINOR
|
||||
|
||||
When executing version.matches_version on CentOS, autocorrect versions
|
||||
of the form MAJOR into MAJOR.MINOR using virtual versions available in
|
||||
IPU configuration. Autocorrection is implemented only if a used version
|
||||
matches source/target version. For example, if match_list contains '8'
|
||||
on a CentOS 8 system, the version will be autocorrected to '8.10'.
|
||||
However, if a version that does not match the source/target version is
|
||||
present, it will be left untouched.
|
||||
|
||||
Jira-ref: RHEL-80334
|
||||
---
|
||||
.../libraries/config/tests/test_version.py | 15 ++++++++
|
||||
.../common/libraries/config/version.py | 34 +++++++++++++++++++
|
||||
2 files changed, 49 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index a8a1023e..420571c0 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -61,6 +61,21 @@ def test_matches_version_pass(monkeypatch):
|
||||
assert version.matches_version(['> 7.6', '< 7.10'], '7.7')
|
||||
|
||||
|
||||
+def test_matches_version_centos_autocorrect(monkeypatch):
|
||||
+ actor_mock = CurrentActorMocked(release_id='centos',
|
||||
+ src_ver='8', dst_ver='9',
|
||||
+ virtual_source_version='8.10', virtual_target_version='9.5')
|
||||
+ monkeypatch.setattr(api, 'current_actor', actor_mock)
|
||||
+
|
||||
+ assert version.matches_version(['8'], '8.10')
|
||||
+ assert version.matches_version(['9'], '9.5')
|
||||
+ assert not version.matches_version(['8'], '9.5')
|
||||
+
|
||||
+ assert version.matches_version(['> 8', '<= 9'], '9.5')
|
||||
+
|
||||
+ assert version.matches_version(['> 8.10', '<= 9.7'], '9')
|
||||
+
|
||||
+
|
||||
@pytest.mark.parametrize('result,version_list', [
|
||||
(True, ['7.6', '7.7']),
|
||||
(True, ['7.6']),
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index 2e837a61..4b6e616c 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -164,6 +164,15 @@ def _cmp_versions(versions):
|
||||
return all(s[0] in OP_MAP for s in split)
|
||||
|
||||
|
||||
+def _autocorrect_centos_version(version_to_correct):
|
||||
+ version_cfg = api.current_actor().configuration.version
|
||||
+ if version_to_correct == version_cfg.source:
|
||||
+ version_to_correct = version_cfg.virtual_source_version
|
||||
+ elif version_to_correct == version_cfg.target:
|
||||
+ version_to_correct = version_cfg.virtual_target_version
|
||||
+ return version_to_correct
|
||||
+
|
||||
+
|
||||
def matches_version(match_list, detected):
|
||||
"""
|
||||
Check if the `detected` version meets the criteria specified in `match_list`.
|
||||
@@ -189,6 +198,31 @@ def matches_version(match_list, detected):
|
||||
if not isinstance(detected, six.string_types):
|
||||
raise TypeError("Detected version has to be a string "
|
||||
"but provided was {}: '{}'".format(type(detected), detected))
|
||||
+
|
||||
+ # If we are on CentOS, and we are provided with a version of the form MAJOR, try to correct
|
||||
+ # the version into MAJOR.MINOR using virtual versions
|
||||
+ if api.current_actor().configuration.os_release.release_id == 'centos':
|
||||
+ new_detected = _autocorrect_centos_version(detected)
|
||||
+ # We might have a matchlist ['> 8', '<= 9'] that, e.g., results from blindly using source/target versions
|
||||
+ # to make a matchlist. Our `detected` version might be some fixed string, e.g., `9.1`. So we need to
|
||||
+ # also autocorrect the matchlist. Due to how autocorrection works, no changes are done to matchlist
|
||||
+ # parts that contain full versions.
|
||||
+ new_matchlist = []
|
||||
+ for predicate in match_list:
|
||||
+ if ' ' in predicate:
|
||||
+ op, version = predicate.split(' ', 1)
|
||||
+ version = _autocorrect_centos_version(version)
|
||||
+ new_matchlist.append('{} {}'.format(op, version))
|
||||
+ else:
|
||||
+ version = _autocorrect_centos_version(predicate)
|
||||
+ new_matchlist.append(version)
|
||||
+
|
||||
+ msg = 'Performed autocorrection from matches_version(%s, %s) to matches_version(%s, %s)'
|
||||
+ api.current_logger().debug(msg, match_list, detected, new_matchlist, new_detected)
|
||||
+
|
||||
+ match_list = new_matchlist
|
||||
+ detected = new_detected
|
||||
+
|
||||
_validate_versions([detected])
|
||||
|
||||
if not _are_comparison_operators_used(match_list):
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,303 +0,0 @@
|
||||
From 806e65d67cac9e16c0341f366133ae3c14844fcd Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 25 Mar 2026 15:57:37 +0100
|
||||
Subject: [PATCH 33/44] persistentnetnamesdisable: Mention net.naming-scheme in
|
||||
report
|
||||
|
||||
Since RHEL 8 it's possible to specifcy net.naming-scheme to have
|
||||
a consistent NIC names across RHEL major releases. When a specific
|
||||
net.naming-scheme is not specified in kernel cmdline, suggest people
|
||||
this option as well.
|
||||
---
|
||||
.../actors/persistentnetnamesdisable/actor.py | 15 +++-
|
||||
.../libraries/persistentnetnamesdisable.py | 86 +++++++++++++++----
|
||||
.../tests/test_persistentnetnamesdisable.py | 78 ++++++++++++++++-
|
||||
3 files changed, 158 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
index 741e2c86..0bcc3827 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
@@ -1,6 +1,7 @@
|
||||
from leapp.actors import Actor
|
||||
from leapp.libraries.actor import persistentnetnamesdisable
|
||||
from leapp.models import (
|
||||
+ KernelCmdline,
|
||||
PersistentNetNamesFacts,
|
||||
TargetKernelCmdlineArgTasks,
|
||||
UpgradeKernelCmdlineArgTasks
|
||||
@@ -11,11 +12,21 @@ from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
class PersistentNetNamesDisable(Actor):
|
||||
"""
|
||||
- Disable systemd-udevd persistent network naming on machine with single eth0 NIC
|
||||
+ Check whether the system has any (physical) NICs with kernel naming (ethX)
|
||||
+
|
||||
+ The kernel naming is in general unstable - there is no guarantee of persistent
|
||||
+ NIC names between reboots, so eth0 can becaome eth3 and vice versa. If the
|
||||
+ system has more than one physical network interface, the kernel naming must
|
||||
+ not be used otherwise the upgrade is inhibited. The report contains remediation
|
||||
+ hints for user to resolve the problem before the upgrade.
|
||||
+
|
||||
+ On systems with only one physical network interface with eth0 NIC, register
|
||||
+ task to disable systemd-udevd persistent network naming (set `net.ifnames=0`
|
||||
+ on kernel cmdline for the upgrade environment and the upgraded system.
|
||||
"""
|
||||
|
||||
name = 'persistentnetnamesdisable'
|
||||
- consumes = (PersistentNetNamesFacts,)
|
||||
+ consumes = (PersistentNetNamesFacts, KernelCmdline)
|
||||
produces = (Report, TargetKernelCmdlineArgTasks, UpgradeKernelCmdlineArgTasks)
|
||||
tags = (ChecksPhaseTag, IPUWorkflowTag)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
index 38eef133..0a4209b8 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/libraries/persistentnetnamesdisable.py
|
||||
@@ -1,9 +1,11 @@
|
||||
import re
|
||||
|
||||
from leapp import reporting
|
||||
-from leapp.libraries.common.config.version import get_target_major_version
|
||||
+from leapp.exceptions import StopActorExecutionError
|
||||
+from leapp.libraries.common.config.version import get_source_major_version, get_target_major_version
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import (
|
||||
+ KernelCmdline,
|
||||
KernelCmdlineArg,
|
||||
PersistentNetNamesFacts,
|
||||
TargetKernelCmdlineArgTasks,
|
||||
@@ -29,6 +31,40 @@ def single_eth0(interfaces):
|
||||
return len(interfaces) == 1 and interfaces[0].name == 'eth0'
|
||||
|
||||
|
||||
+def is_kernel_arg_present(key, value=None):
|
||||
+ """
|
||||
+ Return True if requested argument is set in kernel cmdline. Return False otherwise.
|
||||
+
|
||||
+ If the `value` is specified, check also whether the specific value is set.
|
||||
+ The function consumes :class:`KernelCmdline`.
|
||||
+
|
||||
+ :param key: The kernel argument to search for
|
||||
+ :type key: str
|
||||
+ :param value: If string is specified, check for a specific string as well.
|
||||
+ :type value: str|None
|
||||
+ :rtype: bool
|
||||
+ """
|
||||
+ # NOTE(pstodulk): with small update a possible candidate to move into the
|
||||
+ # kernel shared library. For now, keeping it just in this actor.
|
||||
+ k_cmdline = next(api.consume(KernelCmdline), None)
|
||||
+ if not k_cmdline:
|
||||
+ # NOTE(pstodulk): this hypothetical situation, skipping coverage by
|
||||
+ # unit tests
|
||||
+ raise StopActorExecutionError(
|
||||
+ message='Missing information about current kernel command line.',
|
||||
+ details={
|
||||
+ 'details': 'Missing the KernelCmdline message.'
|
||||
+ }
|
||||
+ )
|
||||
+
|
||||
+ for k_arg in k_cmdline.parameters:
|
||||
+ if k_arg.key != key:
|
||||
+ continue
|
||||
+ if value is None or k_arg.value == value:
|
||||
+ return True
|
||||
+ return False
|
||||
+
|
||||
+
|
||||
def disable_persistent_naming():
|
||||
api.current_logger().info(
|
||||
"Single eth0 network interface detected."
|
||||
@@ -40,27 +76,30 @@ def disable_persistent_naming():
|
||||
|
||||
|
||||
def report_ethX_ifaces():
|
||||
- report_entries = [
|
||||
- reporting.Title('Unsupported network configuration'),
|
||||
- reporting.Summary(
|
||||
- 'Detected multiple physical network interfaces where one or more'
|
||||
- ' use kernel naming (e.g. eth0). Upgrade process cannot continue'
|
||||
- ' because stability of names can not be guaranteed.'
|
||||
- ),
|
||||
+ url_title_kb = 'How to Perform an In-Place Upgrade when Using Kernel-Assigned NIC Names'
|
||||
+ hint_text = f'Rename all ethX network interfaces following the "{url_title_kb}" solution article.'
|
||||
+ report_external_links = [
|
||||
reporting.ExternalLink(
|
||||
- title='How to Perform an In-Place Upgrade when Using Kernel-Assigned NIC Names',
|
||||
+ title=url_title_kb,
|
||||
url='https://access.redhat.com/solutions/4067471'
|
||||
- ),
|
||||
- reporting.Remediation(
|
||||
- hint='Rename all ethX network interfaces following the attached KB solution article.'
|
||||
- ),
|
||||
- reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups([reporting.Groups.NETWORK]),
|
||||
- reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
+ )
|
||||
]
|
||||
+ if not is_kernel_arg_present('net.naming-scheme') and not is_kernel_arg_present('net.ifnames', '0'):
|
||||
+ hint_text += (
|
||||
+ ' If the detected ethX interfaces are not manually configured, it is'
|
||||
+ ' possible that new names were not assigned due to a naming conflict'
|
||||
+ ' in the current `net.naming-scheme`. This can be resolved by'
|
||||
+ ' configuring a newer naming scheme via the kernel argument.'
|
||||
+ ' For more information, see "Implementing consistent network interface naming".'
|
||||
+ )
|
||||
|
||||
+ # NOTE(pstodulk): the link is covered for RHEL 8, 9, 10
|
||||
+ report_external_links.append(reporting.ExternalLink(
|
||||
+ title='Implementing consistent network interface naming',
|
||||
+ url='https://red.ht/rhel-{}-consistent-nic-naming'.format(get_source_major_version())
|
||||
+ ))
|
||||
if get_target_major_version() == '9':
|
||||
- report_entries.append(
|
||||
+ report_external_links.append(
|
||||
reporting.ExternalLink(
|
||||
title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
'"Network configuration for unsupported device types detected"',
|
||||
@@ -68,6 +107,19 @@ def report_ethX_ifaces():
|
||||
)
|
||||
)
|
||||
|
||||
+ report_entries = [
|
||||
+ reporting.Title('Unsupported network configuration'),
|
||||
+ reporting.Summary(
|
||||
+ 'Detected multiple physical network interfaces where one or more'
|
||||
+ ' use kernel naming (e.g. eth0). Upgrade process cannot continue'
|
||||
+ ' because stability of names can not be guaranteed.'
|
||||
+ ),
|
||||
+ reporting.Remediation(hint=hint_text),
|
||||
+ reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Groups([reporting.Groups.NETWORK]),
|
||||
+ reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
+ ] + report_external_links
|
||||
+
|
||||
create_report(report_entries)
|
||||
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
index 81b5a28c..4b8669bb 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
@@ -1,8 +1,11 @@
|
||||
import pytest
|
||||
|
||||
from leapp.libraries.actor import persistentnetnamesdisable
|
||||
+from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked
|
||||
from leapp.models import (
|
||||
Interface,
|
||||
+ KernelCmdline,
|
||||
+ KernelCmdlineArg,
|
||||
PCIAddress,
|
||||
PersistentNetNamesFacts,
|
||||
TargetKernelCmdlineArgTasks,
|
||||
@@ -65,6 +68,7 @@ def test_actor_single_eth0(current_actor_context):
|
||||
'target_version', ['9', '10']
|
||||
)
|
||||
def test_actor_more_ethX(monkeypatch, current_actor_context, target_version):
|
||||
+ monkeypatch.setattr(persistentnetnamesdisable, 'get_source_major_version', lambda: str(int(target_version) - 1))
|
||||
monkeypatch.setattr(persistentnetnamesdisable, 'get_target_major_version', lambda: target_version)
|
||||
pci1 = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
pci2 = PCIAddress(domain="0000", bus="3d", function="00", device="Serial controller")
|
||||
@@ -84,7 +88,10 @@ def test_actor_more_ethX(monkeypatch, current_actor_context, target_version):
|
||||
pci_info=pci2,
|
||||
devpath="/devices/hidraw/hidraw0")
|
||||
]
|
||||
- current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
+ current_actor_context.feed(
|
||||
+ PersistentNetNamesFacts(interfaces=interface),
|
||||
+ KernelCmdline(parameters=[KernelCmdlineArg(key='what', value='ever')])
|
||||
+ )
|
||||
current_actor_context.run()
|
||||
|
||||
report_fields = current_actor_context.consume(Report)[0].report
|
||||
@@ -122,6 +129,7 @@ def test_actor_single_int_not_ethX(current_actor_context):
|
||||
'target_version', ['9', '10']
|
||||
)
|
||||
def test_actor_ethX_and_not_ethX(monkeypatch, current_actor_context, target_version):
|
||||
+ monkeypatch.setattr(persistentnetnamesdisable, 'get_source_major_version', lambda: str(int(target_version) - 1))
|
||||
monkeypatch.setattr(persistentnetnamesdisable, 'get_target_major_version', lambda: target_version)
|
||||
pci1 = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
pci2 = PCIAddress(domain="0000", bus="3d", function="00", device="Serial controller")
|
||||
@@ -141,7 +149,10 @@ def test_actor_ethX_and_not_ethX(monkeypatch, current_actor_context, target_vers
|
||||
pci_info=pci2,
|
||||
devpath="/devices/hidraw/hidraw0")
|
||||
]
|
||||
- current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
+ current_actor_context.feed(
|
||||
+ PersistentNetNamesFacts(interfaces=interface),
|
||||
+ KernelCmdline(parameters=[KernelCmdlineArg(key='what', value='ever')])
|
||||
+ )
|
||||
current_actor_context.run()
|
||||
assert current_actor_context.consume(Report)
|
||||
|
||||
@@ -158,3 +169,66 @@ def test_actor_ethX_and_not_ethX(monkeypatch, current_actor_context, target_vers
|
||||
assert rhel8to9_present
|
||||
else:
|
||||
assert not rhel8to9_present
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(('result_expected', 'key', 'value'), (
|
||||
+ (True, 'net.ifnames', None),
|
||||
+ (True, 'net.ifnames', '0'),
|
||||
+ (False, 'net.ifname', None),
|
||||
+ (False, 'inet.ifnames', None),
|
||||
+ (False, 'missing', None),
|
||||
+ (False, 'missing', 'whatever'),
|
||||
+ (False, 'net.ifnames', '1'),
|
||||
+))
|
||||
+def test_is_kernel_arg_present(monkeypatch, result_expected, key, value):
|
||||
+ k_args = [
|
||||
+ KernelCmdlineArg(key='Foo', value='0'),
|
||||
+ KernelCmdlineArg(key='net.ifnames', value='0'),
|
||||
+ KernelCmdlineArg(key='Something', value='None'),
|
||||
+ ]
|
||||
+ curr_actor_mocked = CurrentActorMocked(
|
||||
+ msgs=[KernelCmdline(parameters=k_args)]
|
||||
+ )
|
||||
+ monkeypatch.setattr(persistentnetnamesdisable.api, 'current_actor', curr_actor_mocked)
|
||||
+ assert result_expected is persistentnetnamesdisable.is_kernel_arg_present(key, value)
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(('naming_expected', 'k_args'), (
|
||||
+ (False, [KernelCmdlineArg(key='net.ifnames', value='0')]),
|
||||
+ (True, [KernelCmdlineArg(key='net.ifnames', value='1')]),
|
||||
+ (True, [KernelCmdlineArg(key='net.naming-scheme-foo', value='rhel-8.10')]),
|
||||
+ (
|
||||
+ # NOTE(pstodulk): this is kind of nonsense, but let's test it
|
||||
+ False,
|
||||
+ [
|
||||
+ KernelCmdlineArg(key='net.naming-scheme', value='rhel-8.10'),
|
||||
+ KernelCmdlineArg(key='net.ifnames', value='0'),
|
||||
+ ]
|
||||
+ ),
|
||||
+ (False, [KernelCmdlineArg(key='net.naming-scheme', value='rhel-8.10')]),
|
||||
+ (False, [KernelCmdlineArg(key='net.naming-scheme', value='rhel-9.10')]),
|
||||
+))
|
||||
+@pytest.mark.parametrize('src_ver', ('8.10', '9.8', '10.6'))
|
||||
+def test_report_ethx_ifaces_scheme(monkeypatch, naming_expected, src_ver, k_args):
|
||||
+ _v_split = src_ver.split('.')
|
||||
+ dst_ver = '{}.{}'.format(int(_v_split[0]) + 1, _v_split[1])
|
||||
+ curr_actor_mocked = CurrentActorMocked(
|
||||
+ msgs=[KernelCmdline(parameters=k_args)],
|
||||
+ src_ver=src_ver,
|
||||
+ dst_ver=dst_ver
|
||||
+ )
|
||||
+ monkeypatch.setattr(persistentnetnamesdisable, 'create_report', create_report_mocked())
|
||||
+ monkeypatch.setattr(persistentnetnamesdisable.api, 'current_actor', curr_actor_mocked)
|
||||
+
|
||||
+ persistentnetnamesdisable.report_ethX_ifaces()
|
||||
+ assert persistentnetnamesdisable.create_report.called
|
||||
+ report = persistentnetnamesdisable.create_report.reports[0]
|
||||
+
|
||||
+ if naming_expected:
|
||||
+ url = 'https://red.ht/rhel-{}-consistent-nic-naming'.format(_v_split[0])
|
||||
+ assert any(url == link['url'] for link in report['detail']['external'])
|
||||
+ assert 'net.naming-scheme' in report['detail']['remediations'][0]['context']
|
||||
+ else:
|
||||
+ url_str = 'consistent-nic-naming'
|
||||
+ assert not any(url_str in link['url'] for link in report['detail']['external'])
|
||||
+ assert 'net.naming-scheme' not in report['detail']['remediations'][0]['context']
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,127 @@
|
||||
From c82153f14d9391c72d914c80d764de0d7ef7ff1e Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 7 May 2025 22:23:21 +0200
|
||||
Subject: [PATCH 34/37] Introduce distro-based rpm-gpg trusted directory
|
||||
|
||||
The original trusted rpm-gpg directories under
|
||||
files/rpm-gpg/
|
||||
is not flexible when considering other distributions as well.
|
||||
The new path pattern will be:
|
||||
files/distro/<DISTRO>/rpm-gpg/
|
||||
|
||||
Removing files/rpm-gpg directory with the included RHEL GPG keys
|
||||
in favor of the new distro based directory.
|
||||
|
||||
jira: RHEL-80335
|
||||
|
||||
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
||||
---
|
||||
.../rpm-gpg/10/RPM-GPG-KEY-redhat-release | 0
|
||||
.../rpm-gpg/10beta/RPM-GPG-KEY-redhat-release | 0
|
||||
.../rpm-gpg/8/RPM-GPG-KEY-redhat-release | 0
|
||||
.../rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta | 0
|
||||
.../rpm-gpg/9/RPM-GPG-KEY-redhat-release | 0
|
||||
.../rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta | 0
|
||||
repos/system_upgrade/common/libraries/gpg.py | 8 ++++++-
|
||||
.../common/libraries/tests/test_gpg.py | 21 +++++++++++--------
|
||||
8 files changed, 19 insertions(+), 10 deletions(-)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/10/RPM-GPG-KEY-redhat-release (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/8/RPM-GPG-KEY-redhat-release (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/9/RPM-GPG-KEY-redhat-release (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta (100%)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/10/RPM-GPG-KEY-redhat-release b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/10/RPM-GPG-KEY-redhat-release
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/10/RPM-GPG-KEY-redhat-release
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/10/RPM-GPG-KEY-redhat-release
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/8/RPM-GPG-KEY-redhat-release b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/8/RPM-GPG-KEY-redhat-release
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/8/RPM-GPG-KEY-redhat-release
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/8/RPM-GPG-KEY-redhat-release
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/9/RPM-GPG-KEY-redhat-release b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/9/RPM-GPG-KEY-redhat-release
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/9/RPM-GPG-KEY-redhat-release
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/9/RPM-GPG-KEY-redhat-release
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta
|
||||
diff --git a/repos/system_upgrade/common/libraries/gpg.py b/repos/system_upgrade/common/libraries/gpg.py
|
||||
index a8071329..c9c3f1fc 100644
|
||||
--- a/repos/system_upgrade/common/libraries/gpg.py
|
||||
+++ b/repos/system_upgrade/common/libraries/gpg.py
|
||||
@@ -121,7 +121,13 @@ def get_path_to_gpg_certs():
|
||||
# only beta is special in regards to the GPG signing keys
|
||||
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
|
||||
+ )
|
||||
|
||||
|
||||
def is_nogpgcheck_set():
|
||||
diff --git a/repos/system_upgrade/common/libraries/tests/test_gpg.py b/repos/system_upgrade/common/libraries/tests/test_gpg.py
|
||||
index 7cf37fa2..82b51abb 100644
|
||||
--- a/repos/system_upgrade/common/libraries/tests/test_gpg.py
|
||||
+++ b/repos/system_upgrade/common/libraries/tests/test_gpg.py
|
||||
@@ -11,14 +11,16 @@ from leapp.libraries.stdlib import api
|
||||
from leapp.models import GpgKey, InstalledRPM, RPM
|
||||
|
||||
|
||||
-@pytest.mark.parametrize('target, product_type, exp', [
|
||||
- ('8.6', 'beta', '../../files/rpm-gpg/8beta'),
|
||||
- ('8.8', 'htb', '../../files/rpm-gpg/8'),
|
||||
- ('9.0', 'beta', '../../files/rpm-gpg/9beta'),
|
||||
- ('9.2', 'ga', '../../files/rpm-gpg/9'),
|
||||
+@pytest.mark.parametrize('target, product_type, distro, exp', [
|
||||
+ ('8.6', 'beta', 'rhel', '../../files/distro/rhel/rpm-gpg/8beta'),
|
||||
+ ('8.8', 'htb', 'rhel', '../../files/distro/rhel/rpm-gpg/8'),
|
||||
+ ('9.0', 'beta', 'rhel', '../../files/distro/rhel/rpm-gpg/9beta'),
|
||||
+ ('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'),
|
||||
])
|
||||
-def test_get_path_to_gpg_certs(monkeypatch, target, product_type, exp):
|
||||
- current_actor = CurrentActorMocked(dst_ver=target,
|
||||
+def test_get_path_to_gpg_certs(monkeypatch, target, product_type, distro, exp):
|
||||
+ current_actor = CurrentActorMocked(dst_ver=target, release_id=distro,
|
||||
envars={'LEAPP_DEVEL_TARGET_PRODUCT_TYPE': product_type})
|
||||
monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
|
||||
@@ -33,7 +35,7 @@ def is_rhel7():
|
||||
@pytest.mark.skipif(distro.id() not in ("rhel", "centos"), reason="Requires RHEL or CentOS for valid results.")
|
||||
def test_gpg_show_keys(loaded_leapp_repository, monkeypatch):
|
||||
src = '7.9' if is_rhel7() else '8.6'
|
||||
- current_actor = CurrentActorMocked(src_ver=src)
|
||||
+ current_actor = CurrentActorMocked(src_ver=src, release_id='rhel')
|
||||
monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
|
||||
# python2 compatibility :/
|
||||
@@ -78,7 +80,8 @@ def test_gpg_show_keys(loaded_leapp_repository, monkeypatch):
|
||||
# with some test data now -- rhel9 release key
|
||||
# rhel9_key_path = os.path.join(api.get_common_folder_path('rpm-gpg'), '9')
|
||||
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
- rhel9_key_path = os.path.join(cur_dir, '..', '..', 'files', 'rpm-gpg', '9',
|
||||
+ rhel9_key_path = os.path.join(cur_dir, '..', '..', 'files',
|
||||
+ 'distro', 'rhel', 'rpm-gpg', '9',
|
||||
'RPM-GPG-KEY-redhat-release')
|
||||
res = gpg._gpg_show_keys(rhel9_key_path)
|
||||
finally:
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
From 0706cb54f4d1ba953de5e348cb03f9553b952669 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Tue, 17 Mar 2026 13:01:17 +0100
|
||||
Subject: [PATCH 34/44] fix quoting in list representation of commands
|
||||
|
||||
Removed redundant quotes included due to incorrect handling of command
|
||||
conversion to string representation in leapp framework's reporting
|
||||
module. The reporting module is fixed by RHEL-156521 and this patch is a
|
||||
followup that fixes usage of the module so that the commands are
|
||||
propagated to the leapp-report.txt correctly.
|
||||
|
||||
Jira: RHEL-155517, RHEL-155515
|
||||
---
|
||||
.../actors/checkdnfpluginpath/libraries/checkdnfpluginpath.py | 2 +-
|
||||
repos/system_upgrade/common/actors/checkrootsymlinks/actor.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkdnfpluginpath/libraries/checkdnfpluginpath.py b/repos/system_upgrade/common/actors/checkdnfpluginpath/libraries/checkdnfpluginpath.py
|
||||
index ce705361..be169e7e 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkdnfpluginpath/libraries/checkdnfpluginpath.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkdnfpluginpath/libraries/checkdnfpluginpath.py
|
||||
@@ -21,7 +21,7 @@ def check_dnf_pluginpath(dnf_pluginpath_detected):
|
||||
reporting.Remediation(
|
||||
hint='Remove or comment out the pluginpath option in the DNF '
|
||||
'configuration file to be able to upgrade the system',
|
||||
- commands=[['sed', '-i', '\'s/^pluginpath[[:space:]]*=/#pluginpath=/\'', DNF_CONFIG_PATH]],
|
||||
+ commands=[['sed', '-i', 's/^pluginpath[[:space:]]*=/#pluginpath=/', DNF_CONFIG_PATH]],
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
diff --git a/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py b/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
index 7b89bf7a..bee672bf 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
@@ -55,7 +55,7 @@ class CheckRootSymlinks(Actor):
|
||||
os.path.relpath(item.target, '/'),
|
||||
os.path.join('/', item.name)])
|
||||
commands.append(command)
|
||||
- rem_commands = [['sh', '-c', '"{}"'.format(' && '.join(commands))]]
|
||||
+ rem_commands = [['sh', '-c', '{}'.format(' && '.join(commands))]]
|
||||
# Generate reports about non-utf8 absolute links presence
|
||||
nonutf_count = len(absolute_links_nonutf)
|
||||
if nonutf_count > 0:
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,227 @@
|
||||
From cacee2edb7d93fa4418e9795ab3462a707868937 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 7 May 2025 22:31:35 +0200
|
||||
Subject: [PATCH 35/37] Add official Centos Stream 9 and 10 RPM GPG keys
|
||||
|
||||
These keys are obtained from centos-gpg-keys packages on 7th May
|
||||
|
||||
jira: RHEL-80335
|
||||
|
||||
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
||||
---
|
||||
.../10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 | 37 +++++++++++++++++++
|
||||
.../10/RPM-GPG-KEY-centosofficial-SHA256 | 30 +++++++++++++++
|
||||
.../rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras | 37 +++++++++++++++++++
|
||||
.../9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 | 37 +++++++++++++++++++
|
||||
.../rpm-gpg/9/RPM-GPG-KEY-centosofficial | 30 +++++++++++++++
|
||||
5 files changed, 171 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-centosofficial-SHA256
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-centosofficial
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
new file mode 100644
|
||||
index 00000000..e15f9a82
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
@@ -0,0 +1,37 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQENBGG65jsBCADef7Fspss6f2PKrlrxufWlBaQI+kcdSDbY7o/dyyjpT7dcX8t8
|
||||
+Ou73irjiShK3q0pdrh1Wy/mXc7RIJwAbCt9OVgyx4PV6AW5LfU7P7xyEAbTgLhz9
|
||||
+lLPjBGhBvfRpW+7naPqkTcIKxpVR8Khq6fsvThGCNzNkGa46F1srE3mf1zC9wdVR
|
||||
+VtXO7gHEZ2LrNcl195jZkBQOLcXANcSOFh5eRfhumULmk4XgCGmZQT5UNFofqOmn
|
||||
+aWQGBq3XaU7RWjl7RH+IS2EW0rAtz9Le+cH+j0aFhzo7jBMOxGYG62rUaHdxssjV
|
||||
+S1CrfpYT6NeG5i/1hiP4hO9suezJw4yuXNZ3ABEBAAG0VkNlbnRPUyBFeHRyYXMg
|
||||
+U0lHIChodHRwczovL3dpa2kuY2VudG9zLm9yZy9TcGVjaWFsSW50ZXJlc3RHcm91
|
||||
+cCkgPHNlY3VyaXR5QGNlbnRvcy5vcmc+iQE5BBMBCgAjAhsvBwsJCAcDAgEGFQgC
|
||||
+CQoLBBYCAwECHgECF4AFAmIePKwACgkQH/aiFx2ZdmgUpAgAt1Y139EUQOLd013m
|
||||
+jZx3shUVHRWCU0SaWLuXLupdxqhe/Iygen48aiDWfAtWr9neAJKKZFboDXXPyxDy
|
||||
+9529aDgJnjwGRSFAcmvsuMaEMse6PZepTFtwhg2A/N0sDLVJSWagbQmTHdpkgEwn
|
||||
+rrwO/TEaqjJ2+vZG67IIvw2rgtF3sQC28I1z7c1cPH5/NNf7dOZ29vtn44juMFFs
|
||||
+o2Kd2FjZ0WP4wRmFF646nS5S1WHGS32K0xvDJMXO3MBXhaATVg+5i5ICA6fx6F3Y
|
||||
+FFLJrXjx/LBtsY3EbJ0OddeZQtaAHFM1Xm6e0UHpnfjG9EGl9QrC5qzLSng0YMrG
|
||||
+emhIy7kBDQRhuuY7AQgAs+enJDbwE/Iln3BnxodDQ3/1t9ULlMLJLiV+FgS7yREZ
|
||||
+QvhVQxFWaJqbiPV6EJVxEP5lUHND2DAE2ZTr60y0rI3ZAY52go+QYHXb+M5HC12H
|
||||
+HbhIDTWaETNo5heq/qyVSRT1u0g/yKCxQdyqnVsL86bro0wgrpj7XuApQifFhy16
|
||||
+AkDjhcB0C0dXkfvEnHJylWiHpp7upfSgOcGwQ+yRHOZWJnyF+OMrFfNiwD74/zEN
|
||||
+4RoNFgpqJZ81TF0qCdllTYGAXXUdYsJlg64dH0u84naTOFIuInywCmNyPmC8e8/0
|
||||
+g56hCV2L7bRJGjBCa6VH+TgvVGnkFsoMM9ijhuTIIQARAQABiQI+BBgBCgAJAhsu
|
||||
+BQJiHjnNASnAXSAEGQECAAYFAmG65jsACgkQi1yBEfyl0P9m/QgAh2KmBA4h/slx
|
||||
+aZeWLb2cV53B1jVElsrEAE/a8yKhhcNeNOQsEWwT2/i6mdWchnIQzojKs3ypoRUY
|
||||
+xsICIb4b4AFzc//aYhaOWThNRHh0UwaueNu0YBqVF3URUlf/Hw1Wv16v4QwkNhHQ
|
||||
++EohCRltR2PBjAHRHXDImy9OxV/uTnZjTXegj2Jl3ueQ5nF4pleqUctt/V9JjqzO
|
||||
+YcQZW78s1jyBRzefbPxQHKKp4na6etTmIvgVDjkMChRZPRjZYEVZNi8kJM0aaK4q
|
||||
+ugGoL6cWBR6RYka+/eEFMd3kSrng9ahbNX0F4ztdZ2alPrrE6BvJ7n/Mt6tZKgL7
|
||||
+x9V0GpbstAkQH/aiFx2ZdmgN/gf+PEUa1LT98RS28fyNPaXYGx5vLWYxUtAdeN9a
|
||||
+TfugGHCVhVsowbIEnuFUHE1JmTJ1hDaFYXqkgG9zDo81JVz/yCHpNIQO0YF2h+qX
|
||||
+BXiKP7PQ+iT/PjQHidlYUuz73hjDwRl3AhLafcwVHeD3cCgo/ZP/Vi9Y9iBFVZDl
|
||||
+jGHxAIe0PWbEAUuqNJOgrlVmmCtSqVkN1Neihx1zjpw3rqfUQzwvhvcsOfkKfnBs
|
||||
+Boc66IZ0J5pmSzgJnSbLrr2dv1/jYHaolA24vkMqMxKzJbz+GeQ/SqBZ5/rA37VL
|
||||
+x90Tu9UVSfbyEbwS9Zj1sVmc3mdm1kn6dmTlOfTDIqehfHBlnQ==
|
||||
+=jx2B
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-centosofficial-SHA256 b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-centosofficial-SHA256
|
||||
new file mode 100644
|
||||
index 00000000..ceee67dd
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-centosofficial-SHA256
|
||||
@@ -0,0 +1,30 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQINBFzMWxkBEADHrskpBgN9OphmhRkc7P/YrsAGSvvl7kfu+e9KAaU6f5MeAVyn
|
||||
+rIoM43syyGkgFyWgjZM8/rur7EMPY2yt+2q/1ZfLVCRn9856JqTIq0XRpDUe4nKQ
|
||||
+8BlA7wDVZoSDxUZkSuTIyExbDf0cpw89Tcf62Mxmi8jh74vRlPy1PgjWL5494b3X
|
||||
+5fxDidH4bqPZyxTBqPrUFuo+EfUVEqiGF94Ppq6ZUvrBGOVo1V1+Ifm9CGEK597c
|
||||
+aevcGc1RFlgxIgN84UpuDjPR9/zSndwJ7XsXYvZ6HXcKGagRKsfYDWGPkA5cOL/e
|
||||
+f+yObOnC43yPUvpggQ4KaNJ6+SMTZOKikM8yciyBwLqwrjo8FlJgkv8Vfag/2UR7
|
||||
+JINbyqHHoLUhQ2m6HXSwK4YjtwidF9EUkaBZWrrskYR3IRZLXlWqeOi/+ezYOW0m
|
||||
+vufrkcvsh+TKlVVnuwmEPjJ8mwUSpsLdfPJo1DHsd8FS03SCKPaXFdD7ePfEjiYk
|
||||
+nHpQaKE01aWVSLUiygn7F7rYemGqV9Vt7tBw5pz0vqSC72a5E3zFzIIuHx6aANry
|
||||
+Gat3aqU3qtBXOrA/dPkX9cWE+UR5wo/A2UdKJZLlGhM2WRJ3ltmGT48V9CeS6N9Y
|
||||
+m4CKdzvg7EWjlTlFrd/8WJ2KoqOE9leDPeXRPncubJfJ6LLIHyG09h9kKQARAQAB
|
||||
+tDpDZW50T1MgKENlbnRPUyBPZmZpY2lhbCBTaWduaW5nIEtleSkgPHNlY3VyaXR5
|
||||
+QGNlbnRvcy5vcmc+iQI3BBMBCAAhAhsDBgsJCAcDAgYVCAIJCgsDFgIBAh4BAheA
|
||||
+BQJczFsaAAoJEAW1VbOEg8ZdvOgQAMFTGIQokADy5+CynFKjfO7R0VVpJxmYGVr1
|
||||
+TjnKaHmjxnJaYqoha9ukGgmLu0r+lJ42Kk6nREk1vlxfRAfiWd00Zkm+K3IMq1/D
|
||||
+E0heC2vX8qqjsLJs3jzq0hgNvo9X0uHDaA4J1BHsD8sE5in/f4SivjbngvFovRGU
|
||||
+1XLNCgoqpFNcROP18LqKUw8WtqgWdnYBa5i6D5qx+WMRX0NHNwcCMy1lz+sTFxIU
|
||||
+9mW6cLsMaacPGD8pUXIVli8P9Vlv3jBk1wFIqRgQPW01ph/3bM7pf9hyM9FAfU4X
|
||||
+AFcyb1oYI4/82EkICUe6jeuZrz67dPeLVAlYrGW4hp/825g0fqJHxPDp25GS4rAa
|
||||
+4RqyibLzNjSGdXYeLj2NcB/8OqaP+T1hv3JDaqe70QoYa/GIC4rh15NyXVbUP+LG
|
||||
+V4vUiL7mb9ynzvF5zYHJbcg4R7dOsiZHrMFwy7FZesQaVrXeJlxRcEj65rpm1ZtZ
|
||||
+mwAE1k2LsRkvLyr9hpZkXnMeOKYIPwpdmBjXNVNVbq7097OxZOYPPos+iZKMWfl4
|
||||
+UQnMsCVxonZtamdI4qEc3jMkSZPJKgOplGOms5jdY+EdSvsFWEQ0Snd3dChfU7DV
|
||||
+o4Rbcy5klwHrvuZIOLaovhyxuRPhP6gV9+gzpTK/7vrvDlFbbZE6s212mDZ13RWB
|
||||
+mTfAxz4h
|
||||
+=agO/
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras
|
||||
new file mode 100644
|
||||
index 00000000..5ea1515a
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras
|
||||
@@ -0,0 +1,37 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQENBGG65jsBCADef7Fspss6f2PKrlrxufWlBaQI+kcdSDbY7o/dyyjpT7dcX8t8
|
||||
+Ou73irjiShK3q0pdrh1Wy/mXc7RIJwAbCt9OVgyx4PV6AW5LfU7P7xyEAbTgLhz9
|
||||
+lLPjBGhBvfRpW+7naPqkTcIKxpVR8Khq6fsvThGCNzNkGa46F1srE3mf1zC9wdVR
|
||||
+VtXO7gHEZ2LrNcl195jZkBQOLcXANcSOFh5eRfhumULmk4XgCGmZQT5UNFofqOmn
|
||||
+aWQGBq3XaU7RWjl7RH+IS2EW0rAtz9Le+cH+j0aFhzo7jBMOxGYG62rUaHdxssjV
|
||||
+S1CrfpYT6NeG5i/1hiP4hO9suezJw4yuXNZ3ABEBAAG0VkNlbnRPUyBFeHRyYXMg
|
||||
+U0lHIChodHRwczovL3dpa2kuY2VudG9zLm9yZy9TcGVjaWFsSW50ZXJlc3RHcm91
|
||||
+cCkgPHNlY3VyaXR5QGNlbnRvcy5vcmc+iQE5BBMBAgAjBQJhuuY7AhsvBwsJCAcD
|
||||
+AgEGFQgCCQoLBBYCAwECHgECF4AACgkQH/aiFx2ZdmjUtwf9GX3exQy6bC/A7miq
|
||||
+I0yfoBR+jvZQKy7+U8vexbr0cgkYDTJ2zN3y+JL1391Y9CS0oDNqYLIv1BwHXAmX
|
||||
+EarpQV/YyEocnYXwcVLugKCnbIN92vMTiyb/NESx1vHbduK+B8wWo3bp3sPK+Ha/
|
||||
+zXrHXWSEgUeCBY/b7Tbl3GW8NX9Pr+yY0zHcvTfLByVH0KpNNLsyOsrCdk4MSKMl
|
||||
+IBZWDaUYVAbyHXB92wZlQOKp+HqRxNhceGHTzeXBymK1LadntlCYTaqsg3ErRq8p
|
||||
+ZwkpeyAi/avjIPYc53QE3dKGw2cUjZxkMOe6BoMbeLlO3+INdJBc/gcW4xUsQ28Y
|
||||
+QtY8jLkBDQRhuuY7AQgAs+enJDbwE/Iln3BnxodDQ3/1t9ULlMLJLiV+FgS7yREZ
|
||||
+QvhVQxFWaJqbiPV6EJVxEP5lUHND2DAE2ZTr60y0rI3ZAY52go+QYHXb+M5HC12H
|
||||
+HbhIDTWaETNo5heq/qyVSRT1u0g/yKCxQdyqnVsL86bro0wgrpj7XuApQifFhy16
|
||||
+AkDjhcB0C0dXkfvEnHJylWiHpp7upfSgOcGwQ+yRHOZWJnyF+OMrFfNiwD74/zEN
|
||||
+4RoNFgpqJZ81TF0qCdllTYGAXXUdYsJlg64dH0u84naTOFIuInywCmNyPmC8e8/0
|
||||
+g56hCV2L7bRJGjBCa6VH+TgvVGnkFsoMM9ijhuTIIQARAQABiQI+BBgBAgAJBQJh
|
||||
+uuY7AhsuASkJEB/2ohcdmXZowF0gBBkBAgAGBQJhuuY7AAoJEItcgRH8pdD/Zv0I
|
||||
+AIdipgQOIf7JcWmXli29nFedwdY1RJbKxABP2vMioYXDXjTkLBFsE9v4upnVnIZy
|
||||
+EM6IyrN8qaEVGMbCAiG+G+ABc3P/2mIWjlk4TUR4dFMGrnjbtGAalRd1EVJX/x8N
|
||||
+Vr9er+EMJDYR0PhKIQkZbUdjwYwB0R1wyJsvTsVf7k52Y013oI9iZd7nkOZxeKZX
|
||||
+qlHLbf1fSY6szmHEGVu/LNY8gUc3n2z8UByiqeJ2unrU5iL4FQ45DAoUWT0Y2WBF
|
||||
+WTYvJCTNGmiuKroBqC+nFgUekWJGvv3hBTHd5Eq54PWoWzV9BeM7XWdmpT66xOgb
|
||||
+ye5/zLerWSoC+8fVdBqW7LSEqggAzRaID+mLFPTe2LbQkaBkmIpqeoDOy700Xy6K
|
||||
+VW05GndH0E0t86DbQClFyzucYLzX2dXyV2DWjoWDIevQnS51zzsd+lWyuKPICKte
|
||||
++K+yk5QEiwgaDf5oPmI8WL2zIAfiwVHlU0epMLU1pZLAQYotsQ6m5qPPMVXcfIqF
|
||||
+3UJwZEnZRccfOKq1hHSS2/Ns4ihAfkrfes1IFLSzbyvinXQUqFVrY8oZCKhNPSRd
|
||||
+IXXPIx0KvnlI9e0EittvsrQxebAa2MwLXOVYL8WVvOLY7oNTrOxe45jOdzMz2+rK
|
||||
+dodVWwuBwNKuwSE6b5A0dwUj8ZEo/5L4noufZF6aGOLdbVcoUg==
|
||||
+=RGYd
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
new file mode 100644
|
||||
index 00000000..e15f9a82
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
@@ -0,0 +1,37 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQENBGG65jsBCADef7Fspss6f2PKrlrxufWlBaQI+kcdSDbY7o/dyyjpT7dcX8t8
|
||||
+Ou73irjiShK3q0pdrh1Wy/mXc7RIJwAbCt9OVgyx4PV6AW5LfU7P7xyEAbTgLhz9
|
||||
+lLPjBGhBvfRpW+7naPqkTcIKxpVR8Khq6fsvThGCNzNkGa46F1srE3mf1zC9wdVR
|
||||
+VtXO7gHEZ2LrNcl195jZkBQOLcXANcSOFh5eRfhumULmk4XgCGmZQT5UNFofqOmn
|
||||
+aWQGBq3XaU7RWjl7RH+IS2EW0rAtz9Le+cH+j0aFhzo7jBMOxGYG62rUaHdxssjV
|
||||
+S1CrfpYT6NeG5i/1hiP4hO9suezJw4yuXNZ3ABEBAAG0VkNlbnRPUyBFeHRyYXMg
|
||||
+U0lHIChodHRwczovL3dpa2kuY2VudG9zLm9yZy9TcGVjaWFsSW50ZXJlc3RHcm91
|
||||
+cCkgPHNlY3VyaXR5QGNlbnRvcy5vcmc+iQE5BBMBCgAjAhsvBwsJCAcDAgEGFQgC
|
||||
+CQoLBBYCAwECHgECF4AFAmIePKwACgkQH/aiFx2ZdmgUpAgAt1Y139EUQOLd013m
|
||||
+jZx3shUVHRWCU0SaWLuXLupdxqhe/Iygen48aiDWfAtWr9neAJKKZFboDXXPyxDy
|
||||
+9529aDgJnjwGRSFAcmvsuMaEMse6PZepTFtwhg2A/N0sDLVJSWagbQmTHdpkgEwn
|
||||
+rrwO/TEaqjJ2+vZG67IIvw2rgtF3sQC28I1z7c1cPH5/NNf7dOZ29vtn44juMFFs
|
||||
+o2Kd2FjZ0WP4wRmFF646nS5S1WHGS32K0xvDJMXO3MBXhaATVg+5i5ICA6fx6F3Y
|
||||
+FFLJrXjx/LBtsY3EbJ0OddeZQtaAHFM1Xm6e0UHpnfjG9EGl9QrC5qzLSng0YMrG
|
||||
+emhIy7kBDQRhuuY7AQgAs+enJDbwE/Iln3BnxodDQ3/1t9ULlMLJLiV+FgS7yREZ
|
||||
+QvhVQxFWaJqbiPV6EJVxEP5lUHND2DAE2ZTr60y0rI3ZAY52go+QYHXb+M5HC12H
|
||||
+HbhIDTWaETNo5heq/qyVSRT1u0g/yKCxQdyqnVsL86bro0wgrpj7XuApQifFhy16
|
||||
+AkDjhcB0C0dXkfvEnHJylWiHpp7upfSgOcGwQ+yRHOZWJnyF+OMrFfNiwD74/zEN
|
||||
+4RoNFgpqJZ81TF0qCdllTYGAXXUdYsJlg64dH0u84naTOFIuInywCmNyPmC8e8/0
|
||||
+g56hCV2L7bRJGjBCa6VH+TgvVGnkFsoMM9ijhuTIIQARAQABiQI+BBgBCgAJAhsu
|
||||
+BQJiHjnNASnAXSAEGQECAAYFAmG65jsACgkQi1yBEfyl0P9m/QgAh2KmBA4h/slx
|
||||
+aZeWLb2cV53B1jVElsrEAE/a8yKhhcNeNOQsEWwT2/i6mdWchnIQzojKs3ypoRUY
|
||||
+xsICIb4b4AFzc//aYhaOWThNRHh0UwaueNu0YBqVF3URUlf/Hw1Wv16v4QwkNhHQ
|
||||
++EohCRltR2PBjAHRHXDImy9OxV/uTnZjTXegj2Jl3ueQ5nF4pleqUctt/V9JjqzO
|
||||
+YcQZW78s1jyBRzefbPxQHKKp4na6etTmIvgVDjkMChRZPRjZYEVZNi8kJM0aaK4q
|
||||
+ugGoL6cWBR6RYka+/eEFMd3kSrng9ahbNX0F4ztdZ2alPrrE6BvJ7n/Mt6tZKgL7
|
||||
+x9V0GpbstAkQH/aiFx2ZdmgN/gf+PEUa1LT98RS28fyNPaXYGx5vLWYxUtAdeN9a
|
||||
+TfugGHCVhVsowbIEnuFUHE1JmTJ1hDaFYXqkgG9zDo81JVz/yCHpNIQO0YF2h+qX
|
||||
+BXiKP7PQ+iT/PjQHidlYUuz73hjDwRl3AhLafcwVHeD3cCgo/ZP/Vi9Y9iBFVZDl
|
||||
+jGHxAIe0PWbEAUuqNJOgrlVmmCtSqVkN1Neihx1zjpw3rqfUQzwvhvcsOfkKfnBs
|
||||
+Boc66IZ0J5pmSzgJnSbLrr2dv1/jYHaolA24vkMqMxKzJbz+GeQ/SqBZ5/rA37VL
|
||||
+x90Tu9UVSfbyEbwS9Zj1sVmc3mdm1kn6dmTlOfTDIqehfHBlnQ==
|
||||
+=jx2B
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-centosofficial b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-centosofficial
|
||||
new file mode 100644
|
||||
index 00000000..30235a86
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-centosofficial
|
||||
@@ -0,0 +1,30 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQINBFzMWxkBEADHrskpBgN9OphmhRkc7P/YrsAGSvvl7kfu+e9KAaU6f5MeAVyn
|
||||
+rIoM43syyGkgFyWgjZM8/rur7EMPY2yt+2q/1ZfLVCRn9856JqTIq0XRpDUe4nKQ
|
||||
+8BlA7wDVZoSDxUZkSuTIyExbDf0cpw89Tcf62Mxmi8jh74vRlPy1PgjWL5494b3X
|
||||
+5fxDidH4bqPZyxTBqPrUFuo+EfUVEqiGF94Ppq6ZUvrBGOVo1V1+Ifm9CGEK597c
|
||||
+aevcGc1RFlgxIgN84UpuDjPR9/zSndwJ7XsXYvZ6HXcKGagRKsfYDWGPkA5cOL/e
|
||||
+f+yObOnC43yPUvpggQ4KaNJ6+SMTZOKikM8yciyBwLqwrjo8FlJgkv8Vfag/2UR7
|
||||
+JINbyqHHoLUhQ2m6HXSwK4YjtwidF9EUkaBZWrrskYR3IRZLXlWqeOi/+ezYOW0m
|
||||
+vufrkcvsh+TKlVVnuwmEPjJ8mwUSpsLdfPJo1DHsd8FS03SCKPaXFdD7ePfEjiYk
|
||||
+nHpQaKE01aWVSLUiygn7F7rYemGqV9Vt7tBw5pz0vqSC72a5E3zFzIIuHx6aANry
|
||||
+Gat3aqU3qtBXOrA/dPkX9cWE+UR5wo/A2UdKJZLlGhM2WRJ3ltmGT48V9CeS6N9Y
|
||||
+m4CKdzvg7EWjlTlFrd/8WJ2KoqOE9leDPeXRPncubJfJ6LLIHyG09h9kKQARAQAB
|
||||
+tDpDZW50T1MgKENlbnRPUyBPZmZpY2lhbCBTaWduaW5nIEtleSkgPHNlY3VyaXR5
|
||||
+QGNlbnRvcy5vcmc+iQI3BBMBAgAhBQJczFsZAhsDBgsJCAcDAgYVCAIJCgsDFgIB
|
||||
+Ah4BAheAAAoJEAW1VbOEg8ZdjOsP/2ygSxH9jqffOU9SKyJDlraL2gIutqZ3B8pl
|
||||
+Gy/Qnb9QD1EJVb4ZxOEhcY2W9VJfIpnf3yBuAto7zvKe/G1nxH4Bt6WTJQCkUjcs
|
||||
+N3qPWsx1VslsAEz7bXGiHym6Ay4xF28bQ9XYIokIQXd0T2rD3/lNGxNtORZ2bKjD
|
||||
+vOzYzvh2idUIY1DgGWJ11gtHFIA9CvHcW+SMPEhkcKZJAO51ayFBqTSSpiorVwTq
|
||||
+a0cB+cgmCQOI4/MY+kIvzoexfG7xhkUqe0wxmph9RQQxlTbNQDCdaxSgwbF2T+gw
|
||||
+byaDvkS4xtR6Soj7BKjKAmcnf5fn4C5Or0KLUqMzBtDMbfQQihn62iZJN6ZZ/4dg
|
||||
+q4HTqyVpyuzMXsFpJ9L/FqH2DJ4exGGpBv00ba/Zauy7GsqOc5PnNBsYaHCply0X
|
||||
+407DRx51t9YwYI/ttValuehq9+gRJpOTTKp6AjZn/a5Yt3h6jDgpNfM/EyLFIY9z
|
||||
+V6CXqQQ/8JRvaik/JsGCf+eeLZOw4koIjZGEAg04iuyNTjhx0e/QHEVcYAqNLhXG
|
||||
+rCTTbCn3NSUO9qxEXC+K/1m1kaXoCGA0UWlVGZ1JSifbbMx0yxq/brpEZPUYm+32
|
||||
+o8XfbocBWljFUJ+6aljTvZ3LQLKTSPW7TFO+GXycAOmCGhlXh2tlc6iTc41PACqy
|
||||
+yy+mHmSv
|
||||
+=kkH7
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,116 +0,0 @@
|
||||
From a71fb36ca529b323a904adc2e9048a93074bf723 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Wed, 25 Mar 2026 18:01:42 +0100
|
||||
Subject: [PATCH 35/44] fixup! fix quoting in list representation of commands
|
||||
|
||||
---
|
||||
packaging/leapp-repository.spec | 2 +-
|
||||
.../common/actors/checkrootsymlinks/actor.py | 6 +++---
|
||||
.../libraries/checkyumpluginsenabled.py | 2 +-
|
||||
.../common/actors/verifydialogs/libraries/verifydialogs.py | 7 ++++---
|
||||
.../actors/inhibitcgroupsv1/libraries/inhibitcgroupsv1.py | 6 +++---
|
||||
.../actors/inhibitcgroupsv1/tests/test_inhibitcgroupsv1.py | 4 ++--
|
||||
6 files changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/packaging/leapp-repository.spec b/packaging/leapp-repository.spec
|
||||
index 97bc261a..3ffafafa 100644
|
||||
--- a/packaging/leapp-repository.spec
|
||||
+++ b/packaging/leapp-repository.spec
|
||||
@@ -120,7 +120,7 @@ Requires: leapp-repository-dependencies = %{leapp_repo_deps}
|
||||
|
||||
# IMPORTANT: this is capability provided by the leapp framework rpm.
|
||||
# Check that 'version' instead of the real framework rpm version.
|
||||
-Requires: leapp-framework >= 6.2, leapp-framework < 7
|
||||
+Requires: leapp-framework >= 6.4, leapp-framework < 7
|
||||
|
||||
# Since we provide sub-commands for the leapp utility, we expect the leapp
|
||||
# tool to be installed as well.
|
||||
diff --git a/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py b/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
index bee672bf..2e805542 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
@@ -52,10 +52,10 @@ class CheckRootSymlinks(Actor):
|
||||
for item in absolute_links:
|
||||
command = ' '.join(['ln',
|
||||
'-snf',
|
||||
- os.path.relpath(item.target, '/'),
|
||||
- os.path.join('/', item.name)])
|
||||
+ f"'{os.path.relpath(item.target, '/')}'",
|
||||
+ f"'{os.path.join('/', item.name)}'"])
|
||||
commands.append(command)
|
||||
- rem_commands = [['sh', '-c', '{}'.format(' && '.join(commands))]]
|
||||
+ rem_commands = [['bash', '-c', '{}'.format(' && '.join(commands))]]
|
||||
# Generate reports about non-utf8 absolute links presence
|
||||
nonutf_count = len(absolute_links_nonutf)
|
||||
if nonutf_count > 0:
|
||||
diff --git a/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py b/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
index 87ff6511..9afa51ac 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
@@ -53,7 +53,7 @@ def check_required_dnf_plugins_enabled(pkg_manager_info):
|
||||
.format(dnf_conf_path, plugin_configs_dir)
|
||||
),
|
||||
# Provide all commands as one due to problems with satellites
|
||||
- commands=[['bash', '-c', '"{0}"'.format('; '.join(remediation_commands))]]
|
||||
+ commands=[['bash', '-c', '{0}'.format('; '.join(remediation_commands))]]
|
||||
),
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/solutions/7028063',
|
||||
diff --git a/repos/system_upgrade/common/actors/verifydialogs/libraries/verifydialogs.py b/repos/system_upgrade/common/actors/verifydialogs/libraries/verifydialogs.py
|
||||
index a79079b1..84b745ca 100644
|
||||
--- a/repos/system_upgrade/common/actors/verifydialogs/libraries/verifydialogs.py
|
||||
+++ b/repos/system_upgrade/common/actors/verifydialogs/libraries/verifydialogs.py
|
||||
@@ -13,13 +13,14 @@ def check_dialogs(inhibit_if_no_userchoice=True):
|
||||
dialogs_remediation = ('Please register user choices with leapp answer cli command or by manually editing '
|
||||
'the answerfile.')
|
||||
# FIXME: Enable more choices once we can do multi-command remediations
|
||||
- cmd_remediation = [['leapp', 'answer', '--section', "{}={}".format(s, choice)]
|
||||
- for s, choices in dialog.answerfile_sections.items() for choice in choices[:1]]
|
||||
+ cmd_remediations = [['leapp', 'answer', '--section', '{}={}'.format(s, choice)]
|
||||
+ for s, choices in dialog.answerfile_sections.items()
|
||||
+ for choice in choices[:1]]
|
||||
report_data = [reporting.Title('Missing required answers in the answer file'),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Summary(summary.format('\n'.join(sections))),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR] if inhibit_if_no_userchoice else []),
|
||||
- reporting.Remediation(hint=dialogs_remediation, commands=cmd_remediation),
|
||||
+ reporting.Remediation(hint=dialogs_remediation, commands=cmd_remediations),
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/solutions/7035321',
|
||||
title='Leapp upgrade fail with error "Inhibitor: Missing required answers '
|
||||
diff --git a/repos/system_upgrade/el9toel10/actors/inhibitcgroupsv1/libraries/inhibitcgroupsv1.py b/repos/system_upgrade/el9toel10/actors/inhibitcgroupsv1/libraries/inhibitcgroupsv1.py
|
||||
index 6ae41be2..a54883b2 100644
|
||||
--- a/repos/system_upgrade/el9toel10/actors/inhibitcgroupsv1/libraries/inhibitcgroupsv1.py
|
||||
+++ b/repos/system_upgrade/el9toel10/actors/inhibitcgroupsv1/libraries/inhibitcgroupsv1.py
|
||||
@@ -49,9 +49,9 @@ def process():
|
||||
# remove the args from commandline, the defaults are the desired values
|
||||
commands=[
|
||||
[
|
||||
- "grubby",
|
||||
- "--update-kernel=ALL",
|
||||
- '--remove-args="{}"'.format(" ".join(remediation_cmd_args)),
|
||||
+ 'grubby',
|
||||
+ '--update-kernel', 'ALL',
|
||||
+ '--remove-args', '{}'.format(' '.join(remediation_cmd_args))
|
||||
],
|
||||
],
|
||||
),
|
||||
diff --git a/repos/system_upgrade/el9toel10/actors/inhibitcgroupsv1/tests/test_inhibitcgroupsv1.py b/repos/system_upgrade/el9toel10/actors/inhibitcgroupsv1/tests/test_inhibitcgroupsv1.py
|
||||
index 9b3ec96f..629e8798 100644
|
||||
--- a/repos/system_upgrade/el9toel10/actors/inhibitcgroupsv1/tests/test_inhibitcgroupsv1.py
|
||||
+++ b/repos/system_upgrade/el9toel10/actors/inhibitcgroupsv1/tests/test_inhibitcgroupsv1.py
|
||||
@@ -39,9 +39,9 @@ def test_inhibit_should_inhibit(monkeypatch, cmdline_params):
|
||||
assert reporting.Groups.INHIBITOR in report["groups"]
|
||||
|
||||
command = [r for r in report["detail"]["remediations"] if r["type"] == "command"][0]
|
||||
- assert "systemd.unified_cgroup_hierarchy" in command['context'][2]
|
||||
+ assert "systemd.unified_cgroup_hierarchy" in command['context'][4]
|
||||
if len(cmdline_params) == 2:
|
||||
- assert "systemd.legacy_systemd_cgroup_controller" in command['context'][2]
|
||||
+ assert "systemd.legacy_systemd_cgroup_controller" in command['context'][4]
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
From fe6d00b01d667a23964fe273a15ee9e457f85bf7 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 7 May 2025 21:13:04 +0200
|
||||
Subject: [PATCH 36/37] Deprecate is_rhel_alt from share libraries
|
||||
|
||||
The function has no value anymore as RHEL-ALT 7 is EOL for years
|
||||
and RHEL 7 is not longer maintained in this project neither.
|
||||
I have considered the direct removal as this function is really
|
||||
old (it's not even used anywhere in the project anymore).
|
||||
|
||||
But as it is just one small function without additional impact
|
||||
and another rhel-alt artifacts became deprecated this month,
|
||||
I consider it better to fulfill our promise and add it on the
|
||||
deprecation list for 6months instead.
|
||||
|
||||
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
||||
---
|
||||
docs/source/libraries-and-api/deprecations-list.md | 2 ++
|
||||
repos/system_upgrade/common/libraries/config/version.py | 5 +++++
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/docs/source/libraries-and-api/deprecations-list.md b/docs/source/libraries-and-api/deprecations-list.md
|
||||
index c8489af3..b3abfc5d 100644
|
||||
--- a/docs/source/libraries-and-api/deprecations-list.md
|
||||
+++ b/docs/source/libraries-and-api/deprecations-list.md
|
||||
@@ -16,6 +16,8 @@ Only the versions in which a deprecation has been made are listed.
|
||||
|
||||
- Shared libraries
|
||||
- **`leapp.libraries.common.config.version.SUPPORTED_VERSIONS`** - The `SUPPORTED_VERSIONS` dict has been deprecated as it is problematic with the new design. Use `leapp.libraries.common.config.version.is_supported_version()` or `IPUConfig.supported_upgrade_paths` instead.
|
||||
+ - **`leapp.libraries.common.config.version.is_rhel_alt()`** - The function can return only `False` nowadays as RHEL-ALT 7 is EOL for years and future version of leapp-repository will not support RHEL 7 anymore.
|
||||
+
|
||||
|
||||
## v0.20.0 <span style="font-size:0.5em; font-weight:normal">(till September 2024)</span>
|
||||
- Models
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index 4b6e616c..7f29c9cd 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -314,6 +314,11 @@ def is_sap_hana_flavour():
|
||||
return api.current_actor().configuration.flavour == 'saphana'
|
||||
|
||||
|
||||
+@deprecated(since='2025-05-31', message=(
|
||||
+ 'RHEL-ALT reached EOL years ago and it is connected just to RHEL 7 systems.'
|
||||
+ 'As such the function is useless nowadays and will return always False.'
|
||||
+ 'The function is going to be removed in the next leapp-repository release.'
|
||||
+))
|
||||
def is_rhel_alt():
|
||||
"""
|
||||
Check if the current system is RHEL-ALT or not (only for RHEL 7)
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,533 +0,0 @@
|
||||
From 7d29232bdc45e15401d24a86f5508c3b3de826d1 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Pelka <tpelka@redhat.com>
|
||||
Date: Thu, 2 Apr 2026 09:24:33 +0200
|
||||
Subject: [PATCH 36/44] pulseaudiocheck: Add PulseAudio config check for RHEL 9
|
||||
to 10 upgrade
|
||||
|
||||
PulseAudio is replaced by PipeWire in RHEL 10. Add a scanner/checker
|
||||
actor pair that detects custom PulseAudio configuration which won't
|
||||
carry over after the upgrade.
|
||||
|
||||
The scanner (FactsCollectionPhase) checks for:
|
||||
- Modified default config files via RPM verification
|
||||
- Drop-in fragments in /etc/pulse/default.pa.d/ and system.pa.d/
|
||||
- Per-user configuration in ~/.config/pulse/
|
||||
|
||||
The checker (ChecksPhase) consumes the scan results and produces
|
||||
a report with a link to the PipeWire migration guide.
|
||||
|
||||
Resolves: DESKTOP-1151
|
||||
---
|
||||
.../pulseaudiocheck/checkpulseaudio/actor.py | 20 +++
|
||||
.../libraries/checkpulseaudio.py | 86 ++++++++++++
|
||||
.../tests/test_checkpulseaudio.py | 127 ++++++++++++++++++
|
||||
.../pulseaudiocheck/scanpulseaudio/actor.py | 20 +++
|
||||
.../libraries/scanpulseaudio.py | 98 ++++++++++++++
|
||||
.../tests/test_scanpulseaudio.py | 77 +++++++++++
|
||||
.../models/pulseaudioconfiguration.py | 24 ++++
|
||||
7 files changed, 452 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/actor.py
|
||||
create mode 100644 repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/libraries/checkpulseaudio.py
|
||||
create mode 100644 repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/tests/test_checkpulseaudio.py
|
||||
create mode 100644 repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/actor.py
|
||||
create mode 100644 repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/libraries/scanpulseaudio.py
|
||||
create mode 100644 repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/tests/test_scanpulseaudio.py
|
||||
create mode 100644 repos/system_upgrade/el9toel10/models/pulseaudioconfiguration.py
|
||||
|
||||
diff --git a/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/actor.py b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..9417d6d6
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/actor.py
|
||||
@@ -0,0 +1,20 @@
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.libraries.actor.checkpulseaudio import check_pulseaudio
|
||||
+from leapp.models import DistributionSignedRPM, PulseAudioConfiguration, Report
|
||||
+from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+
|
||||
+class CheckPulseAudio(Actor):
|
||||
+ """
|
||||
+ Check for custom PulseAudio configuration that won't carry over after upgrade.
|
||||
+
|
||||
+ PulseAudio is replaced by PipeWire with the pipewire-pulseaudio compatibility
|
||||
+ plugin in RHEL 10. Custom PulseAudio configuration will not be applied.
|
||||
+ """
|
||||
+ name = 'check_pulseaudio'
|
||||
+ consumes = (DistributionSignedRPM, PulseAudioConfiguration)
|
||||
+ produces = (Report,)
|
||||
+ tags = (ChecksPhaseTag, IPUWorkflowTag)
|
||||
+
|
||||
+ def process(self):
|
||||
+ check_pulseaudio()
|
||||
diff --git a/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/libraries/checkpulseaudio.py b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/libraries/checkpulseaudio.py
|
||||
new file mode 100644
|
||||
index 00000000..0453ca05
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/libraries/checkpulseaudio.py
|
||||
@@ -0,0 +1,86 @@
|
||||
+from leapp import reporting
|
||||
+from leapp.libraries.common.distro import DISTRO_REPORT_NAMES
|
||||
+from leapp.libraries.common.rpms import has_package
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import DistributionSignedRPM, PulseAudioConfiguration
|
||||
+
|
||||
+FMT_LIST_SEPARATOR = '\n - '
|
||||
+
|
||||
+
|
||||
+def _report_custom_pulseaudio_config(modified_defaults, dropin_dirs, user_config_dirs):
|
||||
+ """
|
||||
+ Create a report warning about custom PulseAudio configuration.
|
||||
+
|
||||
+ :param modified_defaults: list of modified default config files
|
||||
+ :type modified_defaults: list
|
||||
+ :param dropin_dirs: list of drop-in directories with content
|
||||
+ :type dropin_dirs: list
|
||||
+ :param user_config_dirs: list of per-user config directories
|
||||
+ :type user_config_dirs: list
|
||||
+ """
|
||||
+ details = []
|
||||
+ if modified_defaults:
|
||||
+ details.append(
|
||||
+ 'The following default PulseAudio configuration files have been modified:{sep}{files}'.format(
|
||||
+ sep=FMT_LIST_SEPARATOR,
|
||||
+ files=FMT_LIST_SEPARATOR.join(modified_defaults),
|
||||
+ )
|
||||
+ )
|
||||
+ if dropin_dirs:
|
||||
+ details.append(
|
||||
+ 'The following PulseAudio drop-in configuration directories contain custom '
|
||||
+ 'fragments:{sep}{dirs}'.format(
|
||||
+ sep=FMT_LIST_SEPARATOR,
|
||||
+ dirs=FMT_LIST_SEPARATOR.join(dropin_dirs),
|
||||
+ )
|
||||
+ )
|
||||
+ if user_config_dirs:
|
||||
+ details.append(
|
||||
+ 'Per-user PulseAudio configuration was found in:{sep}{dirs}'.format(
|
||||
+ sep=FMT_LIST_SEPARATOR,
|
||||
+ dirs=FMT_LIST_SEPARATOR.join(user_config_dirs),
|
||||
+ )
|
||||
+ )
|
||||
+
|
||||
+ summary = (
|
||||
+ 'PulseAudio is replaced by PipeWire in {target_distro} 10. The PipeWire pipewire-pulseaudio plugin provides '
|
||||
+ 'compatibility with the default PulseAudio configuration, but custom PulseAudio configuration will '
|
||||
+ 'not be applied after the upgrade. Review your PulseAudio configuration and migrate any custom '
|
||||
+ 'settings to PipeWire equivalents after upgrading.'
|
||||
+ ).format_map(DISTRO_REPORT_NAMES)
|
||||
+ if details:
|
||||
+ summary += '\n\n' + '\n\n'.join(details)
|
||||
+
|
||||
+ all_paths = modified_defaults + dropin_dirs + user_config_dirs
|
||||
+ reporting.create_report([
|
||||
+ reporting.Title('Custom PulseAudio configuration detected'),
|
||||
+ reporting.Summary(summary),
|
||||
+ reporting.Severity(reporting.Severity.MEDIUM),
|
||||
+ reporting.Groups([reporting.Groups.SERVICES]),
|
||||
+ reporting.ExternalLink(title='Migrate PulseAudio to PipeWire',
|
||||
+ url='https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Migrate-PulseAudio'),
|
||||
+ reporting.Remediation(
|
||||
+ hint='Review your PulseAudio configuration and plan to migrate custom settings to PipeWire '
|
||||
+ 'after the upgrade. The pipewire-pulseaudio plugin handles default configuration automatically.'
|
||||
+ ),
|
||||
+ reporting.RelatedResource('package', 'pulseaudio'),
|
||||
+ ] + [reporting.RelatedResource('file', f) for f in all_paths])
|
||||
+
|
||||
+
|
||||
+def check_pulseaudio():
|
||||
+ """
|
||||
+ Consume PulseAudioConfiguration and generate report if custom config is found.
|
||||
+ """
|
||||
+ if not has_package(DistributionSignedRPM, 'pulseaudio'):
|
||||
+ api.current_logger().debug('PulseAudio is not installed, skipping check.')
|
||||
+ return
|
||||
+
|
||||
+ msg = next(api.consume(PulseAudioConfiguration), None)
|
||||
+ if not msg:
|
||||
+ api.current_logger().debug('No PulseAudioConfiguration message received.')
|
||||
+ return
|
||||
+
|
||||
+ if msg.modified_defaults or msg.dropin_dirs or msg.user_config_dirs:
|
||||
+ _report_custom_pulseaudio_config(msg.modified_defaults, msg.dropin_dirs, msg.user_config_dirs)
|
||||
+ else:
|
||||
+ api.current_logger().info('No custom PulseAudio configuration detected.')
|
||||
diff --git a/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/tests/test_checkpulseaudio.py b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/tests/test_checkpulseaudio.py
|
||||
new file mode 100644
|
||||
index 00000000..518bfb73
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/checkpulseaudio/tests/test_checkpulseaudio.py
|
||||
@@ -0,0 +1,127 @@
|
||||
+from leapp import reporting
|
||||
+from leapp.libraries.actor.checkpulseaudio import check_pulseaudio
|
||||
+from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import DistributionSignedRPM, PulseAudioConfiguration, RPM
|
||||
+
|
||||
+
|
||||
+def _generate_rpm_with_name(name):
|
||||
+ """
|
||||
+ Generate new RPM model item with given name.
|
||||
+
|
||||
+ :param name: rpm name
|
||||
+ :type name: str
|
||||
+ :return: new RPM object with name parameter set
|
||||
+ :rtype: RPM
|
||||
+ """
|
||||
+ return RPM(name=name,
|
||||
+ version='0.1',
|
||||
+ release='1.sm01',
|
||||
+ epoch='1',
|
||||
+ pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 199e2f91fd431d51',
|
||||
+ packager='Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>',
|
||||
+ arch='noarch')
|
||||
+
|
||||
+
|
||||
+class TestCheckPulseaudio:
|
||||
+ """Tests for check_pulseaudio checker function."""
|
||||
+
|
||||
+ def test_pulseaudio_not_installed(self, monkeypatch):
|
||||
+ rpms = [_generate_rpm_with_name('some-other-package')]
|
||||
+ msg = PulseAudioConfiguration(modified_defaults=['/etc/pulse/daemon.conf'])
|
||||
+ curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms), msg])
|
||||
+ monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
+ monkeypatch.setattr(reporting, 'create_report', create_report_mocked())
|
||||
+
|
||||
+ check_pulseaudio()
|
||||
+
|
||||
+ assert not reporting.create_report.called
|
||||
+
|
||||
+ def test_no_message(self, monkeypatch):
|
||||
+ rpms = [_generate_rpm_with_name('pulseaudio')]
|
||||
+ curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms)])
|
||||
+ monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
+ monkeypatch.setattr(reporting, 'create_report', create_report_mocked())
|
||||
+
|
||||
+ check_pulseaudio()
|
||||
+
|
||||
+ assert not reporting.create_report.called
|
||||
+
|
||||
+ def test_no_custom_config(self, monkeypatch):
|
||||
+ rpms = [_generate_rpm_with_name('pulseaudio')]
|
||||
+ msg = PulseAudioConfiguration()
|
||||
+ curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms), msg])
|
||||
+ monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
+ monkeypatch.setattr(reporting, 'create_report', create_report_mocked())
|
||||
+
|
||||
+ check_pulseaudio()
|
||||
+
|
||||
+ assert not reporting.create_report.called
|
||||
+
|
||||
+ def test_modified_defaults(self, monkeypatch):
|
||||
+ rpms = [_generate_rpm_with_name('pulseaudio')]
|
||||
+ msg = PulseAudioConfiguration(
|
||||
+ modified_defaults=['/etc/pulse/daemon.conf'],
|
||||
+ )
|
||||
+ curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms), msg])
|
||||
+ monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
+ monkeypatch.setattr(reporting, 'create_report', create_report_mocked())
|
||||
+
|
||||
+ check_pulseaudio()
|
||||
+
|
||||
+ assert reporting.create_report.called == 1
|
||||
+ report_fields = reporting.create_report.report_fields
|
||||
+ assert 'Custom PulseAudio configuration detected' in report_fields['title']
|
||||
+ assert '/etc/pulse/daemon.conf' in report_fields['summary']
|
||||
+
|
||||
+ def test_dropin_dirs(self, monkeypatch):
|
||||
+ rpms = [_generate_rpm_with_name('pulseaudio')]
|
||||
+ msg = PulseAudioConfiguration(
|
||||
+ dropin_dirs=['/etc/pulse/default.pa.d'],
|
||||
+ )
|
||||
+ curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms), msg])
|
||||
+ monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
+ monkeypatch.setattr(reporting, 'create_report', create_report_mocked())
|
||||
+
|
||||
+ check_pulseaudio()
|
||||
+
|
||||
+ assert reporting.create_report.called == 1
|
||||
+ report_fields = reporting.create_report.report_fields
|
||||
+ assert '/etc/pulse/default.pa.d' in report_fields['summary']
|
||||
+
|
||||
+ def test_user_config_dirs(self, monkeypatch):
|
||||
+ rpms = [_generate_rpm_with_name('pulseaudio')]
|
||||
+ msg = PulseAudioConfiguration(
|
||||
+ user_config_dirs=['/home/admin/.config/pulse'],
|
||||
+ )
|
||||
+ curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms), msg])
|
||||
+ monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
+ monkeypatch.setattr(reporting, 'create_report', create_report_mocked())
|
||||
+
|
||||
+ check_pulseaudio()
|
||||
+
|
||||
+ assert reporting.create_report.called == 1
|
||||
+ report_fields = reporting.create_report.report_fields
|
||||
+ assert '/home/admin/.config/pulse' in report_fields['summary']
|
||||
+
|
||||
+ def test_report_all_sources(self, monkeypatch):
|
||||
+ rpms = [_generate_rpm_with_name('pulseaudio')]
|
||||
+ msg = PulseAudioConfiguration(
|
||||
+ modified_defaults=['/etc/pulse/daemon.conf'],
|
||||
+ dropin_dirs=['/etc/pulse/default.pa.d'],
|
||||
+ user_config_dirs=['/root/.config/pulse'],
|
||||
+ )
|
||||
+ curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms), msg])
|
||||
+ monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
+ monkeypatch.setattr(reporting, 'create_report', create_report_mocked())
|
||||
+
|
||||
+ check_pulseaudio()
|
||||
+
|
||||
+ assert reporting.create_report.called == 1
|
||||
+ report_fields = reporting.create_report.report_fields
|
||||
+ resources = report_fields['detail']['related_resources']
|
||||
+ pkg_resources = [r for r in resources if r['scheme'] == 'package']
|
||||
+ file_resources = [r for r in resources if r['scheme'] == 'file']
|
||||
+ assert len(pkg_resources) == 1
|
||||
+ assert pkg_resources[0]['title'] == 'pulseaudio'
|
||||
+ assert len(file_resources) == 3
|
||||
diff --git a/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/actor.py b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..5614c802
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/actor.py
|
||||
@@ -0,0 +1,20 @@
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.libraries.actor.scanpulseaudio import scan_pulseaudio
|
||||
+from leapp.models import PulseAudioConfiguration
|
||||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+
|
||||
+class ScanPulseAudio(Actor):
|
||||
+ """
|
||||
+ Scan the system for PulseAudio custom configuration.
|
||||
+
|
||||
+ Detects whether PulseAudio is installed and checks for custom
|
||||
+ configuration that will not carry over to PipeWire after upgrade.
|
||||
+ """
|
||||
+ name = 'scan_pulseaudio'
|
||||
+ consumes = ()
|
||||
+ produces = (PulseAudioConfiguration,)
|
||||
+ tags = (FactsPhaseTag, IPUWorkflowTag)
|
||||
+
|
||||
+ def process(self):
|
||||
+ self.produce(scan_pulseaudio())
|
||||
diff --git a/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/libraries/scanpulseaudio.py b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/libraries/scanpulseaudio.py
|
||||
new file mode 100644
|
||||
index 00000000..e5c2be53
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/libraries/scanpulseaudio.py
|
||||
@@ -0,0 +1,98 @@
|
||||
+import os
|
||||
+import pwd
|
||||
+
|
||||
+from leapp.libraries.common.rpms import check_file_modification
|
||||
+from leapp.models import PulseAudioConfiguration
|
||||
+
|
||||
+# System-wide PulseAudio configuration directory
|
||||
+PULSEAUDIO_CONFIG_DIR = '/etc/pulse'
|
||||
+
|
||||
+# Drop-in directories included from default.pa and system.pa
|
||||
+_DROPIN_DIRS = (
|
||||
+ '/etc/pulse/default.pa.d',
|
||||
+ '/etc/pulse/system.pa.d',
|
||||
+)
|
||||
+
|
||||
+# Files that are part of the default PulseAudio installation
|
||||
+_DEFAULT_CONFIG_FILES = frozenset((
|
||||
+ 'client.conf',
|
||||
+ 'daemon.conf',
|
||||
+ 'default.pa',
|
||||
+ 'system.pa',
|
||||
+))
|
||||
+
|
||||
+# Per-user PulseAudio config directory relative to home
|
||||
+_USER_CONFIG_SUBDIR = '.config/pulse'
|
||||
+
|
||||
+
|
||||
+def _get_dropin_dirs_with_content():
|
||||
+ """
|
||||
+ Return list of drop-in directories that exist and contain files.
|
||||
+
|
||||
+ PulseAudio includes fragments from /etc/pulse/default.pa.d/ and
|
||||
+ /etc/pulse/system.pa.d/ via .include directives. These directories
|
||||
+ do not exist by default.
|
||||
+
|
||||
+ :return: list of drop-in directory paths that contain files
|
||||
+ :rtype: list
|
||||
+ """
|
||||
+ found = []
|
||||
+ for dropin_dir in _DROPIN_DIRS:
|
||||
+ if os.path.isdir(dropin_dir) and os.listdir(dropin_dir):
|
||||
+ found.append(dropin_dir)
|
||||
+ return found
|
||||
+
|
||||
+
|
||||
+def _get_user_config_dirs():
|
||||
+ """
|
||||
+ Return list of user home directories that contain PulseAudio configuration.
|
||||
+
|
||||
+ Checks ~/.config/pulse/ for each user with a valid home directory.
|
||||
+
|
||||
+ :return: list of per-user PulseAudio config directory paths
|
||||
+ :rtype: list
|
||||
+ """
|
||||
+ found = []
|
||||
+ for user in pwd.getpwall():
|
||||
+ pulse_dir = os.path.join(user.pw_dir, _USER_CONFIG_SUBDIR)
|
||||
+ if os.path.isdir(pulse_dir) and os.listdir(pulse_dir):
|
||||
+ found.append(pulse_dir)
|
||||
+ return sorted(found)
|
||||
+
|
||||
+
|
||||
+def _check_default_configs_modified():
|
||||
+ """
|
||||
+ Check whether any of the default PulseAudio config files have been modified.
|
||||
+
|
||||
+ Uses RPM verification to detect changes to files owned by the pulseaudio
|
||||
+ package. Returns list of modified default config file paths.
|
||||
+
|
||||
+ :return: list of modified default config file paths
|
||||
+ :rtype: list
|
||||
+ """
|
||||
+ modified = []
|
||||
+ for filename in sorted(_DEFAULT_CONFIG_FILES):
|
||||
+ filepath = os.path.join(PULSEAUDIO_CONFIG_DIR, filename)
|
||||
+ if os.path.isfile(filepath):
|
||||
+ if check_file_modification(filepath):
|
||||
+ modified.append(filepath)
|
||||
+
|
||||
+ return modified
|
||||
+
|
||||
+
|
||||
+def scan_pulseaudio():
|
||||
+ """
|
||||
+ Scan the system for PulseAudio configuration and return findings.
|
||||
+
|
||||
+ :return: PulseAudioConfiguration message with scan results
|
||||
+ :rtype: PulseAudioConfiguration
|
||||
+ """
|
||||
+ modified_defaults = _check_default_configs_modified()
|
||||
+ dropin_dirs = _get_dropin_dirs_with_content()
|
||||
+ user_config_dirs = _get_user_config_dirs()
|
||||
+
|
||||
+ return PulseAudioConfiguration(
|
||||
+ modified_defaults=modified_defaults,
|
||||
+ dropin_dirs=dropin_dirs,
|
||||
+ user_config_dirs=user_config_dirs,
|
||||
+ )
|
||||
diff --git a/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/tests/test_scanpulseaudio.py b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/tests/test_scanpulseaudio.py
|
||||
new file mode 100644
|
||||
index 00000000..f499aafe
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el9toel10/actors/pulseaudiocheck/scanpulseaudio/tests/test_scanpulseaudio.py
|
||||
@@ -0,0 +1,77 @@
|
||||
+import os
|
||||
+
|
||||
+from leapp.libraries.actor import scanpulseaudio
|
||||
+from leapp.libraries.actor.scanpulseaudio import _get_dropin_dirs_with_content, _get_user_config_dirs, scan_pulseaudio
|
||||
+
|
||||
+
|
||||
+class TestGetDropinDirsWithContent:
|
||||
+ """Tests for _get_dropin_dirs_with_content."""
|
||||
+
|
||||
+ def test_no_dropin_dirs(self, monkeypatch):
|
||||
+ monkeypatch.setattr(os.path, 'isdir', lambda _: False)
|
||||
+ assert _get_dropin_dirs_with_content() == []
|
||||
+
|
||||
+ def test_empty_dropin_dirs(self, monkeypatch):
|
||||
+ monkeypatch.setattr(os.path, 'isdir', lambda _: True)
|
||||
+ monkeypatch.setattr(os, 'listdir', lambda _: [])
|
||||
+ assert _get_dropin_dirs_with_content() == []
|
||||
+
|
||||
+ def test_dropin_dirs_with_content(self, monkeypatch):
|
||||
+ monkeypatch.setattr(os.path, 'isdir', lambda _: True)
|
||||
+ monkeypatch.setattr(os, 'listdir', lambda _: ['custom.conf'])
|
||||
+ result = _get_dropin_dirs_with_content()
|
||||
+ assert result == ['/etc/pulse/default.pa.d', '/etc/pulse/system.pa.d']
|
||||
+
|
||||
+ def test_only_one_dropin_dir_exists(self, monkeypatch):
|
||||
+ monkeypatch.setattr(os.path, 'isdir', lambda path: path == '/etc/pulse/default.pa.d')
|
||||
+ monkeypatch.setattr(os, 'listdir', lambda _: ['custom.conf'])
|
||||
+ result = _get_dropin_dirs_with_content()
|
||||
+ assert result == ['/etc/pulse/default.pa.d']
|
||||
+
|
||||
+
|
||||
+class TestGetUserConfigDirs:
|
||||
+ """Tests for _get_user_config_dirs."""
|
||||
+
|
||||
+ def test_no_user_config(self, monkeypatch):
|
||||
+ monkeypatch.setattr(os.path, 'isdir', lambda _: False)
|
||||
+ assert _get_user_config_dirs() == []
|
||||
+
|
||||
+ def test_user_config_found(self, monkeypatch):
|
||||
+ monkeypatch.setattr(os.path, 'isdir', lambda path: path == '/home/testuser/.config/pulse')
|
||||
+ monkeypatch.setattr(os, 'listdir', lambda _: ['default.pa'])
|
||||
+
|
||||
+ class FakeUser:
|
||||
+ pw_dir = '/home/testuser'
|
||||
+
|
||||
+ monkeypatch.setattr(scanpulseaudio.pwd, 'getpwall', lambda: [FakeUser()])
|
||||
+ result = _get_user_config_dirs()
|
||||
+ assert result == ['/home/testuser/.config/pulse']
|
||||
+
|
||||
+
|
||||
+class TestScanPulseaudio:
|
||||
+ """Tests for scan_pulseaudio main function."""
|
||||
+
|
||||
+ def test_no_custom_config(self, monkeypatch):
|
||||
+ monkeypatch.setattr(scanpulseaudio, '_check_default_configs_modified', lambda: [])
|
||||
+ monkeypatch.setattr(scanpulseaudio, '_get_dropin_dirs_with_content', lambda: [])
|
||||
+ monkeypatch.setattr(scanpulseaudio, '_get_user_config_dirs', lambda: [])
|
||||
+
|
||||
+ result = scan_pulseaudio()
|
||||
+
|
||||
+ assert result.modified_defaults == []
|
||||
+ assert result.dropin_dirs == []
|
||||
+ assert result.user_config_dirs == []
|
||||
+
|
||||
+ def test_with_all_findings(self, monkeypatch):
|
||||
+ monkeypatch.setattr(scanpulseaudio, '_check_default_configs_modified',
|
||||
+ lambda: ['/etc/pulse/daemon.conf'])
|
||||
+ monkeypatch.setattr(scanpulseaudio, '_get_dropin_dirs_with_content',
|
||||
+ lambda: ['/etc/pulse/default.pa.d'])
|
||||
+ monkeypatch.setattr(scanpulseaudio, '_get_user_config_dirs',
|
||||
+ lambda: ['/root/.config/pulse'])
|
||||
+
|
||||
+ result = scan_pulseaudio()
|
||||
+
|
||||
+ assert result.modified_defaults == ['/etc/pulse/daemon.conf']
|
||||
+ assert result.dropin_dirs == ['/etc/pulse/default.pa.d']
|
||||
+ assert result.user_config_dirs == ['/root/.config/pulse']
|
||||
diff --git a/repos/system_upgrade/el9toel10/models/pulseaudioconfiguration.py b/repos/system_upgrade/el9toel10/models/pulseaudioconfiguration.py
|
||||
new file mode 100644
|
||||
index 00000000..bfb7aa22
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el9toel10/models/pulseaudioconfiguration.py
|
||||
@@ -0,0 +1,24 @@
|
||||
+from leapp.models import fields, Model
|
||||
+from leapp.topics import SystemInfoTopic
|
||||
+
|
||||
+
|
||||
+class PulseAudioConfiguration(Model):
|
||||
+ """
|
||||
+ Model describing the state of PulseAudio configuration on the system.
|
||||
+ """
|
||||
+ topic = SystemInfoTopic
|
||||
+
|
||||
+ modified_defaults = fields.List(fields.String(), default=[])
|
||||
+ """
|
||||
+ Default config files modified from RPM originals (full paths)
|
||||
+ """
|
||||
+
|
||||
+ dropin_dirs = fields.List(fields.String(), default=[])
|
||||
+ """
|
||||
+ Drop-in directories that exist and contain files (full paths)
|
||||
+ """
|
||||
+
|
||||
+ user_config_dirs = fields.List(fields.String(), default=[])
|
||||
+ """
|
||||
+ Per-user config directories that exist and contain files (full paths)
|
||||
+ """
|
||||
--
|
||||
2.53.0
|
||||
|
||||
9671
SOURCES/0037-data-update-data-files-stream-3.3-1380.patch
Normal file
9671
SOURCES/0037-data-update-data-files-stream-3.3-1380.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,31 +0,0 @@
|
||||
From 87c192519e8764f59516cca563816f062428a533 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Mocary <pmocary@redhat.com>
|
||||
Date: Thu, 2 Apr 2026 16:28:48 +0200
|
||||
Subject: [PATCH 37/44] fix(checkyumpluginsenabled): correctly create
|
||||
remediation command
|
||||
|
||||
The remediation command for the inhibitor triggered when required dnf
|
||||
plugins are not enabled was created incorrectly. This patch fixes the
|
||||
command creation.
|
||||
---
|
||||
.../libraries/checkyumpluginsenabled.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py b/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
index 9afa51ac..869e2a88 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
@@ -36,8 +36,8 @@ def check_required_dnf_plugins_enabled(pkg_manager_info):
|
||||
product_id_plugin_conf = os.path.join(plugin_configs_dir, 'product-id.conf')
|
||||
|
||||
remediation_commands = [
|
||||
- f"sed -i 's/^plugins=0/plugins=1/' '{dnf_conf_path}'"
|
||||
- f"sed -i 's/^enabled=0/enabled=1/' '{rhsm_plugin_conf}'"
|
||||
+ f"sed -i 's/^plugins=0/plugins=1/' '{dnf_conf_path}'",
|
||||
+ f"sed -i 's/^enabled=0/enabled=1/' '{rhsm_plugin_conf}'",
|
||||
f"sed -i 's/^enabled=0/enabled=1/' '{product_id_plugin_conf}'"
|
||||
]
|
||||
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
From 397975d6b63ff70755ea41b8ec8fc413966218e4 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 30 May 2025 14:13:35 +0200
|
||||
Subject: [PATCH 38/43] Makefile: Non-zero exit code on failed tests in
|
||||
container
|
||||
|
||||
Previously all exit codes from execution of tests inside
|
||||
container have been ignored and make command ended with zero always.
|
||||
|
||||
Also drop testing of el7toel8 repository for Python 3.6 on RHEL 8.
|
||||
The test started to fail for unknown reason (changes in pytest or
|
||||
another nonstandard python module?). As we are in the middle of
|
||||
dropping all el7toel8 and python2 related content, let's just drop
|
||||
it. Keeping the full removal of Py2 and el7toel8 content on separate
|
||||
PR.
|
||||
---
|
||||
Makefile | 29 ++++++++++++++++-------------
|
||||
1 file changed, 16 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ceb013ab..6769b2f3 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -164,9 +164,9 @@ help:
|
||||
@echo " PR=7 SUFFIX='my_additional_suffix' make <target>"
|
||||
@echo " MR=6 COPR_CONFIG='path/to/the/config/copr/file' make <target>"
|
||||
@echo " ACTOR=<actor> TEST_LIBS=y make test"
|
||||
- @echo " BUILD_CONTAINER=el7 make build_container"
|
||||
+ @echo " BUILD_CONTAINER=rhel8 make build_container"
|
||||
@echo " TEST_CONTAINER=f34 make test_container"
|
||||
- @echo " CONTAINER_TOOL=docker TEST_CONTAINER=rhel7 make test_container_no_lint"
|
||||
+ @echo " CONTAINER_TOOL=docker TEST_CONTAINER=rhel8 make test_container_no_lint"
|
||||
@echo ""
|
||||
|
||||
clean:
|
||||
@@ -459,30 +459,33 @@ test_container:
|
||||
$(_CONTAINER_TOOL) ps -q -f name=$$_CONT_NAME && { $(_CONTAINER_TOOL) kill $$_CONT_NAME; $(_CONTAINER_TOOL) rm $$_CONT_NAME; }; \
|
||||
$(_CONTAINER_TOOL) run -di --name $$_CONT_NAME -v "$$PWD":/repo:Z -e PYTHON_VENV=$$_VENV $$TEST_IMAGE && \
|
||||
$(_CONTAINER_TOOL) exec $$_CONT_NAME rsync -aur --delete --exclude "tut*" /repo/ /repocopy && \
|
||||
+ export res=0; \
|
||||
case $$_VENV in \
|
||||
python2.7) \
|
||||
- TEST_CONT_IPU=el7toel8 $(MAKE) _test_container_ipu; \
|
||||
+ TEST_CONT_IPU=el7toel8 $(MAKE) _test_container_ipu || res=1; \
|
||||
;;\
|
||||
python3.6) \
|
||||
- TEST_CONT_IPU=el7toel8 $(MAKE) _test_container_ipu; \
|
||||
- TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu; \
|
||||
+ echo "INFO: Skipping testing of el7toel8 repository. Obsoleted"; \
|
||||
+ TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu || res=1; \
|
||||
;; \
|
||||
python3.9) \
|
||||
- TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu; \
|
||||
- TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu; \
|
||||
+ TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu || res=1; \
|
||||
+ TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu || res=1; \
|
||||
;; \
|
||||
python3.12) \
|
||||
- TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu; \
|
||||
+ TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu || res=1; \
|
||||
;; \
|
||||
*) \
|
||||
- TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu; \
|
||||
- ;;\
|
||||
+ TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu || res=1; \
|
||||
+ ;; \
|
||||
esac; \
|
||||
$(_CONTAINER_TOOL) kill $$_CONT_NAME; \
|
||||
- $(_CONTAINER_TOOL) rm $$_CONT_NAME
|
||||
+ $(_CONTAINER_TOOL) rm $$_CONT_NAME; \
|
||||
+ [ $$res -ne 0 ] && echo "TIP: If you do not see an error in the end of logs, scroll up. Multiple tests could be executed." ; \
|
||||
+ exit $$res
|
||||
|
||||
test_container_all:
|
||||
- @for container in "f34" "rhel7" "rhel8"; do \
|
||||
+ @for container in "f34" "rhel7" "rhel8" "rhel9"; do \
|
||||
TEST_CONTAINER=$$container $(MAKE) test_container || exit 1; \
|
||||
done
|
||||
|
||||
@@ -490,7 +493,7 @@ test_container_no_lint:
|
||||
@_TEST_CONT_TARGET="test_no_lint" $(MAKE) test_container
|
||||
|
||||
test_container_all_no_lint:
|
||||
- @for container in "f34" "rhel7" "rhel8"; do \
|
||||
+ @for container in "f34" "rhel7" "rhel8" "rhel9"; do \
|
||||
TEST_CONTAINER=$$container $(MAKE) test_container_no_lint || exit 1; \
|
||||
done
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,201 +0,0 @@
|
||||
From 0cfeee9fa113690c7e58877edf65842aad7d7ce5 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 27 Mar 2026 13:53:49 +0100
|
||||
Subject: [PATCH 38/44] fix(rhui): consider source clients always signed
|
||||
|
||||
Previously, all RHUI clients mentioned in the cloud map in the rhui.py
|
||||
library were considered as signed by RH. However, configs allow using
|
||||
clients that are not known to leapp, and, therefore, such clients would
|
||||
not be considered as signed. Consequently, these packages would not be
|
||||
removed, causing the upgrade to fail. This patch changes this behavior
|
||||
so that all source clients mentioned in the RHUIInfo message are
|
||||
considered as signed.
|
||||
---
|
||||
.../filterrpmtransactionevents/actor.py | 12 +-
|
||||
.../tests/test_filterrpmtransactionevents.py | 120 +++++++++++++++++-
|
||||
2 files changed, 125 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py b/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py
|
||||
index 582a5821..aa735da3 100644
|
||||
--- a/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py
|
||||
@@ -1,8 +1,11 @@
|
||||
from leapp.actors import Actor
|
||||
+from leapp.libraries.common.rpms import has_package
|
||||
from leapp.models import (
|
||||
DistributionSignedRPM,
|
||||
FilteredRpmTransactionTasks,
|
||||
+ InstalledRPM,
|
||||
PESRpmTransactionTasks,
|
||||
+ RHUIInfo,
|
||||
RpmTransactionTasks
|
||||
)
|
||||
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
@@ -18,7 +21,7 @@ class FilterRpmTransactionTasks(Actor):
|
||||
"""
|
||||
|
||||
name = 'check_rpm_transaction_events'
|
||||
- consumes = (PESRpmTransactionTasks, RpmTransactionTasks, DistributionSignedRPM,)
|
||||
+ consumes = (PESRpmTransactionTasks, RpmTransactionTasks, DistributionSignedRPM, RHUIInfo, InstalledRPM)
|
||||
produces = (FilteredRpmTransactionTasks,)
|
||||
tags = (IPUWorkflowTag, ChecksPhaseTag)
|
||||
|
||||
@@ -27,6 +30,13 @@ class FilterRpmTransactionTasks(Actor):
|
||||
for rpm_pkgs in self.consume(DistributionSignedRPM):
|
||||
installed_pkgs.update([pkg.name for pkg in rpm_pkgs.items])
|
||||
|
||||
+ # Consider all RHUI source clients as signed, so that we can always remove them
|
||||
+ rhui_info = next(self.consume(RHUIInfo), None)
|
||||
+ if rhui_info:
|
||||
+ for source_client in rhui_info.src_client_pkg_names:
|
||||
+ if has_package(InstalledRPM, source_client):
|
||||
+ installed_pkgs.add(source_client)
|
||||
+
|
||||
local_rpms = set()
|
||||
to_install = set()
|
||||
to_remove = set()
|
||||
diff --git a/repos/system_upgrade/common/actors/filterrpmtransactionevents/tests/test_filterrpmtransactionevents.py b/repos/system_upgrade/common/actors/filterrpmtransactionevents/tests/test_filterrpmtransactionevents.py
|
||||
index 7173805e..a228ed07 100644
|
||||
--- a/repos/system_upgrade/common/actors/filterrpmtransactionevents/tests/test_filterrpmtransactionevents.py
|
||||
+++ b/repos/system_upgrade/common/actors/filterrpmtransactionevents/tests/test_filterrpmtransactionevents.py
|
||||
@@ -1,7 +1,37 @@
|
||||
-from leapp.models import DistributionSignedRPM, FilteredRpmTransactionTasks, Module, RPM, RpmTransactionTasks
|
||||
+from leapp.models import (
|
||||
+ DistributionSignedRPM,
|
||||
+ FilteredRpmTransactionTasks,
|
||||
+ InstalledRPM,
|
||||
+ Module,
|
||||
+ RHUIInfo,
|
||||
+ RPM,
|
||||
+ RpmTransactionTasks,
|
||||
+ TargetRHUIPostInstallTasks,
|
||||
+ TargetRHUIPreInstallTasks,
|
||||
+ TargetRHUISetupInfo
|
||||
+)
|
||||
from leapp.snactor.fixture import current_actor_context
|
||||
|
||||
RH_PACKAGER = 'Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>'
|
||||
+UNSIGNED_PACKAGER = 'Third Party <third@party.com>'
|
||||
+
|
||||
+
|
||||
+def _make_rpm(name, packager=RH_PACKAGER):
|
||||
+ return RPM(name=name, version='0.1', release='1.sm01', epoch='1',
|
||||
+ packager=packager, arch='noarch', pgpsig='SOME_PGP_SIG')
|
||||
+
|
||||
+
|
||||
+def _make_rhui_info(src_clients, target_clients, provider='azure'):
|
||||
+ setup_info = TargetRHUISetupInfo(
|
||||
+ preinstall_tasks=TargetRHUIPreInstallTasks(),
|
||||
+ postinstall_tasks=TargetRHUIPostInstallTasks(),
|
||||
+ )
|
||||
+ return RHUIInfo(
|
||||
+ provider=provider,
|
||||
+ src_client_pkg_names=src_clients,
|
||||
+ target_client_pkg_names=target_clients,
|
||||
+ target_client_setup_info=setup_info,
|
||||
+ )
|
||||
|
||||
|
||||
def test_actor_execution(current_actor_context):
|
||||
@@ -10,11 +40,7 @@ def test_actor_execution(current_actor_context):
|
||||
|
||||
|
||||
def test_actor_execution_with_sample_data(current_actor_context):
|
||||
- installed_rpm = [
|
||||
- RPM(name='sample01', version='0.1', release='1.sm01', epoch='1', packager=RH_PACKAGER, arch='noarch',
|
||||
- pgpsig='SOME_PGP_SIG'),
|
||||
- RPM(name='sample02', version='0.1', release='1.sm01', epoch='1', packager=RH_PACKAGER, arch='noarch',
|
||||
- pgpsig='SOME_PGP_SIG')]
|
||||
+ installed_rpm = [_make_rpm('sample01'), _make_rpm('sample02')]
|
||||
modules_to_enable = [Module(name='enable', stream='1'), Module(name='enable', stream='2')]
|
||||
modules_to_reset = [Module(name='reset', stream='1'), Module(name='reset', stream='2')]
|
||||
current_actor_context.feed(DistributionSignedRPM(items=installed_rpm))
|
||||
@@ -43,3 +69,85 @@ def test_actor_execution_with_sample_data(current_actor_context):
|
||||
assert all(m.name == 'reset' for m in result[0].modules_to_reset)
|
||||
assert '1' in {m.stream for m in result[0].modules_to_reset}
|
||||
assert '2' in {m.stream for m in result[0].modules_to_reset}
|
||||
+
|
||||
+
|
||||
+def test_rhui_source_client_treated_as_signed(current_actor_context):
|
||||
+ """Installed RHUI source clients should be removable even if they are not distribution-signed."""
|
||||
+ rhui_client_rpm = _make_rpm('rhui-azure-rhel8', packager=UNSIGNED_PACKAGER)
|
||||
+ signed_rpm = _make_rpm('sample01')
|
||||
+
|
||||
+ current_actor_context.feed(DistributionSignedRPM(items=[signed_rpm]))
|
||||
+ current_actor_context.feed(InstalledRPM(items=[rhui_client_rpm, signed_rpm]))
|
||||
+ current_actor_context.feed(_make_rhui_info(['rhui-azure-rhel8'], ['rhui-azure-rhel9']))
|
||||
+ current_actor_context.feed(RpmTransactionTasks(to_remove=['rhui-azure-rhel8']))
|
||||
+ current_actor_context.run()
|
||||
+
|
||||
+ result = current_actor_context.consume(FilteredRpmTransactionTasks)
|
||||
+ assert len(result) == 1
|
||||
+ assert 'rhui-azure-rhel8' in result[0].to_remove
|
||||
+
|
||||
+
|
||||
+def test_rhui_source_client_not_installed_is_ignored(current_actor_context):
|
||||
+ """RHUI source clients that are not installed should not be added to the installed set."""
|
||||
+ signed_rpm = _make_rpm('sample01')
|
||||
+
|
||||
+ current_actor_context.feed(DistributionSignedRPM(items=[signed_rpm]))
|
||||
+ current_actor_context.feed(InstalledRPM(items=[signed_rpm]))
|
||||
+ current_actor_context.feed(_make_rhui_info(['rhui-azure-rhel8'], ['rhui-azure-rhel9']))
|
||||
+ current_actor_context.feed(RpmTransactionTasks(to_remove=['rhui-azure-rhel8']))
|
||||
+ current_actor_context.run()
|
||||
+
|
||||
+ result = current_actor_context.consume(FilteredRpmTransactionTasks)
|
||||
+ assert len(result) == 1
|
||||
+ assert 'rhui-azure-rhel8' not in result[0].to_remove
|
||||
+
|
||||
+
|
||||
+def test_no_rhui_info_unsigned_pkg_not_removable(current_actor_context):
|
||||
+ """Without RHUIInfo, unsigned packages should not be removable (baseline behavior)."""
|
||||
+ unsigned_rpm = _make_rpm('some-unsigned-pkg', packager=UNSIGNED_PACKAGER)
|
||||
+ signed_rpm = _make_rpm('sample01')
|
||||
+
|
||||
+ current_actor_context.feed(DistributionSignedRPM(items=[signed_rpm]))
|
||||
+ current_actor_context.feed(InstalledRPM(items=[unsigned_rpm, signed_rpm]))
|
||||
+ current_actor_context.feed(RpmTransactionTasks(to_remove=['some-unsigned-pkg']))
|
||||
+ current_actor_context.run()
|
||||
+
|
||||
+ result = current_actor_context.consume(FilteredRpmTransactionTasks)
|
||||
+ assert len(result) == 1
|
||||
+ assert 'some-unsigned-pkg' not in result[0].to_remove
|
||||
+
|
||||
+
|
||||
+def test_rhui_multiple_source_clients(current_actor_context):
|
||||
+ """Multiple RHUI source clients should all be treated as signed when installed."""
|
||||
+ client_rpms = [
|
||||
+ _make_rpm('rhui-client-a', packager=UNSIGNED_PACKAGER),
|
||||
+ _make_rpm('rhui-client-b', packager=UNSIGNED_PACKAGER),
|
||||
+ ]
|
||||
+
|
||||
+ current_actor_context.feed(DistributionSignedRPM(items=[]))
|
||||
+ current_actor_context.feed(InstalledRPM(items=client_rpms))
|
||||
+ current_actor_context.feed(_make_rhui_info(['rhui-client-a', 'rhui-client-b'], ['rhui-client-target']))
|
||||
+ current_actor_context.feed(RpmTransactionTasks(
|
||||
+ to_remove=['rhui-client-a', 'rhui-client-b'],
|
||||
+ ))
|
||||
+ current_actor_context.run()
|
||||
+
|
||||
+ result = current_actor_context.consume(FilteredRpmTransactionTasks)
|
||||
+ assert len(result) == 1
|
||||
+ assert 'rhui-client-a' in result[0].to_remove
|
||||
+ assert 'rhui-client-b' in result[0].to_remove
|
||||
+
|
||||
+
|
||||
+def test_rhui_source_client_ends_up_in_upgrade_if_not_removed(current_actor_context):
|
||||
+ """An installed RHUI source client not in to_remove/to_install should be upgraded."""
|
||||
+ rhui_client_rpm = _make_rpm('rhui-azure-rhel8', packager=UNSIGNED_PACKAGER)
|
||||
+
|
||||
+ current_actor_context.feed(DistributionSignedRPM(items=[]))
|
||||
+ current_actor_context.feed(InstalledRPM(items=[rhui_client_rpm]))
|
||||
+ current_actor_context.feed(_make_rhui_info(['rhui-azure-rhel8'], ['rhui-azure-rhel9']))
|
||||
+ current_actor_context.feed(RpmTransactionTasks())
|
||||
+ current_actor_context.run()
|
||||
+
|
||||
+ result = current_actor_context.consume(FilteredRpmTransactionTasks)
|
||||
+ assert len(result) == 1
|
||||
+ assert 'rhui-azure-rhel8' in result[0].to_upgrade
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,82 @@
|
||||
From 4e87908b2e17d87b69bcec29ba1e9b777439a0fe Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 30 May 2025 15:02:53 +0200
|
||||
Subject: [PATCH 39/43] CI: Unit-tests: Rename tasks & tests executions
|
||||
|
||||
Previous name have been very long, repeating, and it has been
|
||||
problem to read the whole informatino about what tests are performed
|
||||
as the description has been shortened in WebUI, e.g.:
|
||||
|
||||
Unit Tests / Run unit tests in containers (Run python linters for el8toel9 and common repositories on p...
|
||||
|
||||
Let's change the name so it's shortened and easier read what test
|
||||
has been actually performed. Also, no need to mention that tests are
|
||||
running in container anymore, as we are not running unit-tests outside
|
||||
of the container in upstream. Example of new style names:
|
||||
|
||||
Unit Tests / Run: Linters (python:3.9; repos:el9toel10,common) (pull_request)
|
||||
Unit Tests / Run: Unit Tests (python:3.9; repos:el9toel10,common) (pull_request)
|
||||
---
|
||||
.github/workflows/unit-tests.yml | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
|
||||
index 37748396..ed82e0e5 100644
|
||||
--- a/.github/workflows/unit-tests.yml
|
||||
+++ b/.github/workflows/unit-tests.yml
|
||||
@@ -9,43 +9,43 @@ on:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
- name: Run unit tests in containers
|
||||
+ name: 'Run: ${{ matrix.scenarios.name }}'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
scenarios:
|
||||
# 9to10
|
||||
- - name: Run unit tests for el9toel10 and common repositories on python 3.12
|
||||
+ - name: 'Unit tests (python:3.12; repos:el9toel10,common)'
|
||||
python: python3.12
|
||||
repos: 'el9toel10,common'
|
||||
container: ubi9
|
||||
- - name: Run python linters for el9toel10 and common repositories on python 3.12
|
||||
+ - name: 'Linters (python:3.12; repos:el9toel10,common)'
|
||||
python: python3.12
|
||||
repos: 'el9toel10,common'
|
||||
container: ubi9-lint
|
||||
- - name: Run unit tests for el9toel10 and common repositories on python 3.9
|
||||
+ - name: 'Unit tests (python:3.9; repos:el9toel10,common)'
|
||||
python: python3.9
|
||||
repos: 'el9toel10,common'
|
||||
container: ubi9
|
||||
- - name: Run python linters for el9toel10 and common repositories on python 3.9
|
||||
+ - name: 'Linters (python:3.9; repos:el9toel10,common)'
|
||||
python: python3.9
|
||||
repos: 'el9toel10,common'
|
||||
container: ubi9-lint
|
||||
# 8to9
|
||||
- - name: Run unit tests for el8toel9 and common repositories on python 3.9
|
||||
+ - name: 'Unit tests (python:3.9; repos:el8toel9,common)'
|
||||
python: python3.9
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi9
|
||||
- - name: Run python linters for el8toel9 and common repositories on python 3.9
|
||||
+ - name: 'Linters (python:3.9; repos:el8toel9,common)'
|
||||
python: python3.9
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi9-lint
|
||||
- - name: Run unit tests for el8toel9 and common repositories on python 3.6
|
||||
+ - name: 'Unit tests (python:3.6; repos:el8toel9,common)'
|
||||
python: python3.6
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi8
|
||||
- - name: Run python linters for el8toel9 and common repositories on python 3.6
|
||||
+ - name: 'Linters (python:3.6; repos:el8toel9,common)'
|
||||
python: python3.6
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi8-lint
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
From f11f7c4c022b990f3cad15eff5149591e747a27b Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Thu, 2 Apr 2026 10:57:55 +0200
|
||||
Subject: [PATCH 39/44] Ensure that greenboot rpms are removed during IPU
|
||||
|
||||
The greenboot packages have a value just for rpm-ostree based systems.
|
||||
However, if someone install them anyway (e.g. configuration mistake..),
|
||||
they would damage the upgraded systems - mainly in case IPU 8.10 -> 9.8+.
|
||||
Systemd fails with error:
|
||||
```
|
||||
Failed to isolate the default target.
|
||||
```
|
||||
|
||||
Due to bugs in greenboot scriptlets, that do not count with DNF
|
||||
execution inside container, nor with the update of greenboot packages
|
||||
from 0.14.x to 0.16.x and newer.
|
||||
|
||||
As there is not value to have these packages on rpm based system
|
||||
at all, just remove them during the upgrade to stay on a safe side.
|
||||
---
|
||||
etc/leapp/transaction/to_remove | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/etc/leapp/transaction/to_remove b/etc/leapp/transaction/to_remove
|
||||
index 0feb7827..420078f4 100644
|
||||
--- a/etc/leapp/transaction/to_remove
|
||||
+++ b/etc/leapp/transaction/to_remove
|
||||
@@ -1,3 +1,11 @@
|
||||
### List of packages (each on new line) to be removed from the upgrade transaction
|
||||
# Removing initial-setup package to avoid it asking for EULA acceptance during upgrade - OAMG-1531
|
||||
initial-setup
|
||||
+
|
||||
+# greenboot packages have a value just for rpm-ostree based systems
|
||||
+# however, if someone would install them anyway, they would damage
|
||||
+# the upgraded systems (mainly in case IPU 8.10 -> 9.8+).
|
||||
+# As there is not value for of these packages on systems upgraded by leapp
|
||||
+# (rpm based only), let's just remove them to stay safe
|
||||
+greenboot
|
||||
+greenboot-default-health-checks
|
||||
--
|
||||
2.53.0
|
||||
|
||||
166
SOURCES/0040-Fix-parsing-of-the-kernel-cmdline.patch
Normal file
166
SOURCES/0040-Fix-parsing-of-the-kernel-cmdline.patch
Normal file
@ -0,0 +1,166 @@
|
||||
From 2646484407bef15688fb4838c2f61d06f2098f81 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 30 Apr 2025 12:54:22 +0200
|
||||
Subject: [PATCH 40/43] Fix parsing of the kernel cmdline
|
||||
|
||||
Original parsing has been splitting string tokens by "=" without a
|
||||
limit, means that e.g.
|
||||
root=UUID=some-id
|
||||
has been split to
|
||||
(root, UUID, some-id)
|
||||
and and stored just "root" and "UUID" strings in the parsed msg,
|
||||
instead of "root" and "UUID=some-id".
|
||||
|
||||
So split the key=value just based on the first occurence of "="
|
||||
instead.
|
||||
|
||||
JIRA: RHELMISC-12490
|
||||
|
||||
Co-Authored-By: Karolina Kula <kkula@redhat.com>
|
||||
---
|
||||
.../common/actors/scankernelcmdline/actor.py | 16 ++---
|
||||
.../libraries/scankernelcmdline.py | 23 +++++++
|
||||
.../tests/test_scankernelcmdline.py | 67 +++++++++++++++++++
|
||||
3 files changed, 94 insertions(+), 12 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/actors/scankernelcmdline/libraries/scankernelcmdline.py
|
||||
create mode 100644 repos/system_upgrade/common/actors/scankernelcmdline/tests/test_scankernelcmdline.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/scankernelcmdline/actor.py b/repos/system_upgrade/common/actors/scankernelcmdline/actor.py
|
||||
index 9f8fef30..2f1a5ae2 100644
|
||||
--- a/repos/system_upgrade/common/actors/scankernelcmdline/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/scankernelcmdline/actor.py
|
||||
@@ -1,12 +1,12 @@
|
||||
from leapp.actors import Actor
|
||||
-from leapp.libraries.stdlib import run
|
||||
-from leapp.models import KernelCmdline, KernelCmdlineArg
|
||||
+from leapp.libraries.actor import scankernelcmdline
|
||||
+from leapp.models import KernelCmdline
|
||||
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
|
||||
|
||||
class ScanKernelCmdline(Actor):
|
||||
"""
|
||||
- No documentation has been provided for the scan_kernel_cmdline actor.
|
||||
+ Scan the kernel command line of the booted system.
|
||||
"""
|
||||
|
||||
name = 'scan_kernel_cmdline'
|
||||
@@ -15,12 +15,4 @@ class ScanKernelCmdline(Actor):
|
||||
tags = (FactsPhaseTag, IPUWorkflowTag)
|
||||
|
||||
def process(self):
|
||||
- cmdline = run(['cat', '/proc/cmdline'])['stdout'].strip()
|
||||
- parameters = []
|
||||
- for parameter in cmdline.split(' '):
|
||||
- if '=' in parameter:
|
||||
- kv = parameter.split('=')
|
||||
- parameters.append(KernelCmdlineArg(key=kv[0], value=kv[1]))
|
||||
- else:
|
||||
- parameters.append(KernelCmdlineArg(key=parameter))
|
||||
- self.produce(KernelCmdline(parameters=parameters))
|
||||
+ scankernelcmdline.parse_cmdline_input()
|
||||
diff --git a/repos/system_upgrade/common/actors/scankernelcmdline/libraries/scankernelcmdline.py b/repos/system_upgrade/common/actors/scankernelcmdline/libraries/scankernelcmdline.py
|
||||
new file mode 100644
|
||||
index 00000000..9cffa70e
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scankernelcmdline/libraries/scankernelcmdline.py
|
||||
@@ -0,0 +1,23 @@
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
+from leapp.models import KernelCmdline, KernelCmdlineArg
|
||||
+
|
||||
+
|
||||
+def get_cmdline_input():
|
||||
+ try:
|
||||
+ cmdline_input = run(['cat', '/proc/cmdline'])['stdout'].strip()
|
||||
+ return cmdline_input
|
||||
+ except (OSError, CalledProcessError):
|
||||
+ api.current_logger().debug('Executing `cat /proc/cmdline` failed', exc_info=True)
|
||||
+ return ''
|
||||
+
|
||||
+
|
||||
+def parse_cmdline_input():
|
||||
+ cmdline = get_cmdline_input()
|
||||
+ parameters = []
|
||||
+ for parameter in cmdline.split(' '):
|
||||
+ if '=' in parameter:
|
||||
+ kv = parameter.split('=', 1)
|
||||
+ parameters.append(KernelCmdlineArg(key=kv[0], value=kv[1]))
|
||||
+ else:
|
||||
+ parameters.append(KernelCmdlineArg(key=parameter))
|
||||
+ api.produce(KernelCmdline(parameters=parameters))
|
||||
diff --git a/repos/system_upgrade/common/actors/scankernelcmdline/tests/test_scankernelcmdline.py b/repos/system_upgrade/common/actors/scankernelcmdline/tests/test_scankernelcmdline.py
|
||||
new file mode 100644
|
||||
index 00000000..ff79054f
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scankernelcmdline/tests/test_scankernelcmdline.py
|
||||
@@ -0,0 +1,67 @@
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.actor import scankernelcmdline
|
||||
+from leapp.libraries.common.testutils import CurrentActorMocked, produce_mocked
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError
|
||||
+from leapp.models import KernelCmdline, KernelCmdlineArg
|
||||
+
|
||||
+
|
||||
+def mock_cmd_output():
|
||||
+ expected_cmd_output = (
|
||||
+ 'BOOT_IMAGE=(hd0,msdos1)/vmlinuz-xxx root=UUID=some_uid ro console=tty0'
|
||||
+ ' console=ttyS0,115200 rd_NO_PLYMOUTH biosdevname=0 net.ifnames=0 crashkernel=auto'
|
||||
+ )
|
||||
+ return expected_cmd_output
|
||||
+
|
||||
+
|
||||
+def test_cmdline_output(monkeypatch):
|
||||
+
|
||||
+ monkeypatch.setattr(scankernelcmdline, 'get_cmdline_input', mock_cmd_output)
|
||||
+ current_actor = CurrentActorMocked(src_ver='8.10', dst_ver='9.6')
|
||||
+ monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ scankernelcmdline.parse_cmdline_input()
|
||||
+
|
||||
+ expected_params = [KernelCmdlineArg(key=k, value=v) for k, v in [
|
||||
+ ('BOOT_IMAGE', '(hd0,msdos1)/vmlinuz-xxx'),
|
||||
+ ('root', 'UUID=some_uid'),
|
||||
+ ('ro', None),
|
||||
+ ('console', 'tty0'),
|
||||
+ ('console', 'ttyS0,115200'),
|
||||
+ ('rd_NO_PLYMOUTH', None),
|
||||
+ ('biosdevname', '0'),
|
||||
+ ('net.ifnames', '0'),
|
||||
+ ('crashkernel', 'auto')]]
|
||||
+
|
||||
+ expected_output_msg = KernelCmdline(parameters=expected_params)
|
||||
+ assert api.produce.model_instances
|
||||
+ assert expected_output_msg == api.produce.model_instances[0]
|
||||
+
|
||||
+
|
||||
+def test_cmdline_content(monkeypatch):
|
||||
+
|
||||
+ def run_mocked(cmd, **kwargs):
|
||||
+ assert cmd == ['cat', '/proc/cmdline']
|
||||
+ output = mock_cmd_output()
|
||||
+ return {'stdout': output}
|
||||
+
|
||||
+ monkeypatch.setattr(scankernelcmdline, 'run', run_mocked)
|
||||
+ cmd_output = scankernelcmdline.get_cmdline_input()
|
||||
+ expected_cmd_output = mock_cmd_output()
|
||||
+
|
||||
+ assert cmd_output == expected_cmd_output
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize('is_os_error', [True, False])
|
||||
+def test_cmdline_run_failed(monkeypatch, is_os_error):
|
||||
+
|
||||
+ def run_mocked_error(cmd, **kwargs):
|
||||
+ assert cmd == ['cat', '/proc/cmdline']
|
||||
+ if is_os_error:
|
||||
+ raise OSError('OSError raised')
|
||||
+ raise CalledProcessError("CalledProcessError raised", cmd, "result")
|
||||
+
|
||||
+ monkeypatch.setattr(scankernelcmdline, 'run', run_mocked_error)
|
||||
+ cmd_output = scankernelcmdline.get_cmdline_input()
|
||||
+ assert cmd_output == ''
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,205 +0,0 @@
|
||||
From 83540ae7dbd6cb030a024249d6308c56f0d3216d Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Tue, 31 Mar 2026 17:23:39 +0200
|
||||
Subject: [PATCH 40/44] Regenerate grub config during 8->9 conversions
|
||||
|
||||
This is mainly a preventative action to make sure that the grub config
|
||||
is compatible with the target grub.
|
||||
|
||||
The actor only runs grub2-mkconfig when BLS is enabled in
|
||||
/etc/default/grub. When BLS is disabled, the regeneration is taken care
|
||||
of by the grub kernel install scripts (in /usr/lib/kernel/install/),
|
||||
which do call grub2-mkconfig as required.
|
||||
|
||||
On 9to10 conversions the kernel install scripts handle regeneration
|
||||
whether the BLS is enabled or not.
|
||||
|
||||
Note that in some cases grub2-mkconfig might be ran twice, as there are
|
||||
2 more actors that run it (ensurevalidgrubcfghybrid and
|
||||
grub2mkconfigonppc64). This shouldn't be a problem since the generation
|
||||
is quick. However a better solution could be designed in the future.
|
||||
|
||||
Jira: RHEL-110712
|
||||
---
|
||||
.../actors/regenerategrubcfg/actor.py | 23 ++++
|
||||
.../libraries/regenerategrubcfg.py | 28 +++++
|
||||
.../tests/test_regenerategrubcfg.py | 102 ++++++++++++++++++
|
||||
3 files changed, 153 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/el8toel9/actors/regenerategrubcfg/actor.py
|
||||
create mode 100644 repos/system_upgrade/el8toel9/actors/regenerategrubcfg/libraries/regenerategrubcfg.py
|
||||
create mode 100644 repos/system_upgrade/el8toel9/actors/regenerategrubcfg/tests/test_regenerategrubcfg.py
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/actor.py b/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..d87e9c7b
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/actor.py
|
||||
@@ -0,0 +1,23 @@
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.libraries.actor import regenerategrubcfg
|
||||
+from leapp.models import DefaultGrubInfo, TransactionCompleted
|
||||
+from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+
|
||||
+class RegenerateGrubCfg(Actor):
|
||||
+ """
|
||||
+ Regenerate GRUB2 configuration during conversion from EL8 to EL9.
|
||||
+
|
||||
+ During distribution conversions (e.g. CentOS to RHEL), the GRUB2
|
||||
+ configuration may need to be regenerated to ensure compatibility
|
||||
+ with the target distribution's GRUB2 tooling. This actor runs
|
||||
+ grub2-mkconfig when BLS is enabled in /etc/default/grub.
|
||||
+ """
|
||||
+
|
||||
+ name = 'regenerate_grub_cfg'
|
||||
+ consumes = (DefaultGrubInfo, TransactionCompleted)
|
||||
+ produces = ()
|
||||
+ tags = (IPUWorkflowTag, ApplicationsPhaseTag)
|
||||
+
|
||||
+ def process(self):
|
||||
+ regenerategrubcfg.process()
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/libraries/regenerategrubcfg.py b/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/libraries/regenerategrubcfg.py
|
||||
new file mode 100644
|
||||
index 00000000..bedd0897
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/libraries/regenerategrubcfg.py
|
||||
@@ -0,0 +1,28 @@
|
||||
+from leapp.libraries.common import grub
|
||||
+from leapp.libraries.common.config import architecture, is_conversion
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
+from leapp.models import DefaultGrubInfo
|
||||
+
|
||||
+GRUB_CFG_PATH = '/boot/grub2/grub.cfg'
|
||||
+
|
||||
+
|
||||
+def process():
|
||||
+ if architecture.matches_architecture(architecture.ARCH_S390X):
|
||||
+ return
|
||||
+
|
||||
+ if not is_conversion():
|
||||
+ return
|
||||
+
|
||||
+ default_grub_msg = next(api.consume(DefaultGrubInfo), None)
|
||||
+ if not default_grub_msg:
|
||||
+ api.current_logger().warning('No DefaultGrubInfo message, skipping GRUB config regeneration.')
|
||||
+ return
|
||||
+
|
||||
+ if not grub.is_blscfg_enabled_in_defaultgrub(default_grub_msg):
|
||||
+ return
|
||||
+
|
||||
+ api.current_logger().info('Conversion detected with BLS enabled, regenerating GRUB config')
|
||||
+ try:
|
||||
+ run(['grub2-mkconfig', '-o', GRUB_CFG_PATH])
|
||||
+ except CalledProcessError as e:
|
||||
+ api.current_logger().error('Failed to regenerate GRUB config: {}'.format(e))
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/tests/test_regenerategrubcfg.py b/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/tests/test_regenerategrubcfg.py
|
||||
new file mode 100644
|
||||
index 00000000..7d8fb6f3
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/regenerategrubcfg/tests/test_regenerategrubcfg.py
|
||||
@@ -0,0 +1,102 @@
|
||||
+from unittest import mock
|
||||
+
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.actor import regenerategrubcfg
|
||||
+from leapp.libraries.common.config import architecture
|
||||
+from leapp.libraries.common.testutils import CurrentActorMocked, logger_mocked
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError
|
||||
+from leapp.models import DefaultGrub, DefaultGrubInfo
|
||||
+
|
||||
+GRUB2_MKCONFIG_CMD = ['grub2-mkconfig', '-o', '/boot/grub2/grub.cfg']
|
||||
+
|
||||
+BLS_ENABLED = DefaultGrubInfo(
|
||||
+ default_grub_info=[DefaultGrub(name='GRUB_ENABLE_BLSCFG', value='true')]
|
||||
+)
|
||||
+BLS_DISABLED = DefaultGrubInfo(
|
||||
+ default_grub_info=[DefaultGrub(name='GRUB_ENABLE_BLSCFG', value='false')]
|
||||
+)
|
||||
+
|
||||
+
|
||||
+@pytest.fixture
|
||||
+def mocked_run():
|
||||
+ with mock.patch.object(regenerategrubcfg, 'run') as m:
|
||||
+ yield m
|
||||
+
|
||||
+
|
||||
+@pytest.fixture(autouse=True)
|
||||
+def mocked_logger():
|
||||
+ with mock.patch.object(api, 'current_logger', logger_mocked()):
|
||||
+ yield api.current_logger
|
||||
+
|
||||
+
|
||||
+@pytest.fixture
|
||||
+def mock_actor(monkeypatch):
|
||||
+
|
||||
+ def make_mock(msgs, arch=architecture.ARCH_X86_64, is_conversion=False):
|
||||
+ instance = CurrentActorMocked(
|
||||
+ msgs=msgs,
|
||||
+ arch=arch,
|
||||
+ src_ver="8.10",
|
||||
+ dst_ver="9.6",
|
||||
+ )
|
||||
+ monkeypatch.setattr(api, 'current_actor', instance)
|
||||
+ # let's use this to cover all conversion paths
|
||||
+ monkeypatch.setattr(regenerategrubcfg, 'is_conversion', lambda: is_conversion)
|
||||
+ return instance
|
||||
+
|
||||
+ return make_mock
|
||||
+
|
||||
+
|
||||
+def test_conversion_bls_enabled_regenerates(mock_actor, mocked_run):
|
||||
+ """Conversion with BLS enabled -> regenerate."""
|
||||
+ mock_actor([BLS_ENABLED], is_conversion=True)
|
||||
+ regenerategrubcfg.process()
|
||||
+ mocked_run.assert_called_once_with(GRUB2_MKCONFIG_CMD)
|
||||
+
|
||||
+
|
||||
+def test_conversion_bls_disabled_skips(mock_actor, mocked_run):
|
||||
+ """Conversion with BLS not enabled -> skip."""
|
||||
+ mock_actor([BLS_DISABLED], is_conversion=True)
|
||||
+ regenerategrubcfg.process()
|
||||
+ mocked_run.assert_not_called()
|
||||
+
|
||||
+
|
||||
+def test_non_conversion_skips(mock_actor, mocked_run):
|
||||
+ """Non-conversion upgrade -> skip."""
|
||||
+ mock_actor([BLS_ENABLED])
|
||||
+ regenerategrubcfg.process()
|
||||
+ mocked_run.assert_not_called()
|
||||
+
|
||||
+
|
||||
+def test_s390x_skips(mock_actor, mocked_run):
|
||||
+ """s390x -> skip (uses ZIPL)."""
|
||||
+ mock_actor([BLS_ENABLED], arch=architecture.ARCH_S390X)
|
||||
+ regenerategrubcfg.process()
|
||||
+ mocked_run.assert_not_called()
|
||||
+
|
||||
+
|
||||
+def test_no_default_grub_info_skips(mock_actor, mocked_run, mocked_logger):
|
||||
+ """No DefaultGrubInfo -> skip."""
|
||||
+ mock_actor([], is_conversion=True)
|
||||
+ regenerategrubcfg.process()
|
||||
+ mocked_run.assert_not_called()
|
||||
+ assert any(
|
||||
+ "No DefaultGrubInfo message, skipping GRUB config regeneration." in msg
|
||||
+ for msg in mocked_logger.warnmsg
|
||||
+ )
|
||||
+
|
||||
+
|
||||
+def test_failure_nonfatal(mock_actor, mocked_run, mocked_logger):
|
||||
+ """grub2-mkconfig failure -> non-fatal, logs error."""
|
||||
+ mocked_run.side_effect = CalledProcessError(
|
||||
+ message='A Leapp Command Error occurred.',
|
||||
+ command=GRUB2_MKCONFIG_CMD,
|
||||
+ result={'signal': None, 'exit_code': 1, 'pid': 0, 'stdout': 'fake', 'stderr': 'fake'}
|
||||
+ )
|
||||
+ mock_actor([BLS_ENABLED], is_conversion=True)
|
||||
+
|
||||
+ regenerategrubcfg.process()
|
||||
+
|
||||
+ mocked_run.assert_called_once_with(GRUB2_MKCONFIG_CMD)
|
||||
+ assert any('Failed to regenerate GRUB config' in msg for msg in mocked_logger.errmsg)
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -1,75 +0,0 @@
|
||||
From 971e5e329290d8e5047ac85c6c85943dfadd5fe6 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Tue, 14 Apr 2026 11:25:01 +0200
|
||||
Subject: [PATCH 41/44] python tests deps: update version requirements per
|
||||
python
|
||||
|
||||
tl;dr; We haven't updated the requirements.txt file for a long time
|
||||
(basically since IPU 7 -> 8; if we do not count some minor updates).
|
||||
Let's update dependencies to use newer python modules for newer
|
||||
versions of python.
|
||||
|
||||
* Pytest
|
||||
Originally we required pytest v6.2.5 for any python 3.6+. This is
|
||||
pretty old requirement coming from time of python ~ 3.8 and recently
|
||||
a CVE-2025-71176 occuared, which is fix in pytest v9.0.3.
|
||||
So let's update ranges to actually allow use of newer pytest on newer
|
||||
systems:
|
||||
|
||||
+----------------+---------------+
|
||||
| pytest version | python range |
|
||||
+----------------+---------------+
|
||||
| 6.2.5 | 3.6.x - 3.7.x |
|
||||
| 7.4.4 | 3.8.x - 3.9.x |
|
||||
| 9.0.3 | 3.10+ |
|
||||
+----------------+---------------+
|
||||
Note that Pytest 8.x is messing with imports which breaks leapp
|
||||
import handling unfortunately (race-condition). Seems that these
|
||||
problems are fixed for Pytest 9 with Python 3.10+. In case we
|
||||
figure out problems anyway, pytest will need to be executed with
|
||||
additional parameters to use old import style again. As there is
|
||||
no high demand for newer pytest on python 3.9, let's stick just
|
||||
with working pytest versions.
|
||||
|
||||
* Pyudev
|
||||
The original v0.22 is used up to CS 9 (pyton 3.9-). Use 0.24.1 for
|
||||
python 3.10+ (reflects CS 10 as well)
|
||||
|
||||
* Distro
|
||||
The original v1.5.0 can be used till CS 9 (python 3.9 included) safely
|
||||
as nowadays. Let's use version 1.9.0 for Python 3.10+
|
||||
|
||||
* Drop unsued dependencies (old python that is no longer supported
|
||||
in the project).
|
||||
---
|
||||
requirements.txt | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/requirements.txt b/requirements.txt
|
||||
index 3c79b23d..e4294718 100644
|
||||
--- a/requirements.txt
|
||||
+++ b/requirements.txt
|
||||
@@ -5,13 +5,14 @@ isort
|
||||
funcsigs==1.0.2
|
||||
mock==2.0.0
|
||||
pylint
|
||||
-pytest==4.6.11; python_version < '3.0'
|
||||
-pytest==6.2.5; python_version >= '3.6'
|
||||
-pyudev==0.22.0
|
||||
-distro==1.5.0
|
||||
+pytest==6.2.5; python_version >= '3.6' and python_version < '3.8'
|
||||
+pytest==7.4.4; python_version >= '3.8' and python_version < '3.10'
|
||||
+pytest==9.0.3; python_version >= '3.10'
|
||||
+pyudev==0.22.0; python_version < '3.10'
|
||||
+pyudev==0.24.1; python_version >= '3.10'
|
||||
+distro==1.5.0; python_version < '3.10'
|
||||
+distro==1.9.0; python_version >= '3.10'
|
||||
ipaddress==1.0.23
|
||||
git+https://github.com/oamg/leapp
|
||||
requests
|
||||
-# pinning a py27 troublemaking transitive dependency
|
||||
-lazy-object-proxy==1.5.2; python_version < '3'
|
||||
rpm
|
||||
--
|
||||
2.53.0
|
||||
|
||||
1142
SOURCES/0041-repomap-Process-repositories-based-on-distro.patch
Normal file
1142
SOURCES/0041-repomap-Process-repositories-based-on-distro.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,149 +0,0 @@
|
||||
From 0f0be8e4ca80721173d289a3db0b170334529c2c Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Wed, 29 Oct 2025 19:31:00 +0100
|
||||
Subject: [PATCH 42/44] Drop dependency on mock
|
||||
|
||||
The mock library is now a part of the Python standard library since
|
||||
Python 3.3 and is available as the unittest.mock. The 'mock' library is
|
||||
only a backport which is not needed anymore.
|
||||
|
||||
Also remove some unnecessary imports.
|
||||
---
|
||||
commands/tests/test_upgrade_paths.py | 2 +-
|
||||
.../common/actors/biosdevname/tests/test_biosdevname.py | 3 ++-
|
||||
.../actors/cephvolumescan/tests/test_cephvolumescan.py | 5 +----
|
||||
.../tests/test_distributionsignedrpmscanner.py | 3 +--
|
||||
.../actors/ifcfgscanner/tests/unit_test_ifcfgscanner.py | 2 +-
|
||||
.../common/actors/scanmemory/tests/test_scanmemory.py | 3 ++-
|
||||
.../tests/component_test_selinuxcontentscanner.py | 4 +---
|
||||
.../el8toel9/actors/nisscanner/tests/test_nisscan.py | 3 ++-
|
||||
requirements.txt | 1 -
|
||||
9 files changed, 11 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/commands/tests/test_upgrade_paths.py b/commands/tests/test_upgrade_paths.py
|
||||
index 773cdf1c..83e8b7f9 100644
|
||||
--- a/commands/tests/test_upgrade_paths.py
|
||||
+++ b/commands/tests/test_upgrade_paths.py
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
import resource
|
||||
+import unittest.mock as mock
|
||||
|
||||
-import mock
|
||||
import pytest
|
||||
|
||||
from leapp.cli.commands import command_utils
|
||||
diff --git a/repos/system_upgrade/common/actors/biosdevname/tests/test_biosdevname.py b/repos/system_upgrade/common/actors/biosdevname/tests/test_biosdevname.py
|
||||
index 3aa8c614..1b11174f 100644
|
||||
--- a/repos/system_upgrade/common/actors/biosdevname/tests/test_biosdevname.py
|
||||
+++ b/repos/system_upgrade/common/actors/biosdevname/tests/test_biosdevname.py
|
||||
@@ -1,7 +1,8 @@
|
||||
+from unittest.mock import mock_open, patch
|
||||
+
|
||||
import pytest
|
||||
import pyudev
|
||||
import six
|
||||
-from mock import mock_open, patch
|
||||
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.actor import biosdevname
|
||||
diff --git a/repos/system_upgrade/common/actors/cephvolumescan/tests/test_cephvolumescan.py b/repos/system_upgrade/common/actors/cephvolumescan/tests/test_cephvolumescan.py
|
||||
index 168b8fc2..14e1f359 100644
|
||||
--- a/repos/system_upgrade/common/actors/cephvolumescan/tests/test_cephvolumescan.py
|
||||
+++ b/repos/system_upgrade/common/actors/cephvolumescan/tests/test_cephvolumescan.py
|
||||
@@ -1,9 +1,6 @@
|
||||
-import pytest
|
||||
-from mock import Mock, patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
from leapp.libraries.actor import cephvolumescan
|
||||
-from leapp.models import InstalledRPM, LsblkEntry, RPM, StorageInfo
|
||||
-from leapp.reporting import Report
|
||||
|
||||
CONT_PS_COMMAND_OUTPUT = {
|
||||
"stdout":
|
||||
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 b0c616cb..e5db0c8f 100644
|
||||
--- a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+import unittest.mock as mock
|
||||
|
||||
from leapp.libraries.common import rpms
|
||||
from leapp.libraries.common.config import mock_configs
|
||||
@@ -8,7 +8,6 @@ from leapp.models import (
|
||||
fields,
|
||||
InstalledRPM,
|
||||
InstalledUnsignedRPM,
|
||||
- IPUConfig,
|
||||
Model,
|
||||
OSRelease,
|
||||
RPM,
|
||||
diff --git a/repos/system_upgrade/common/actors/ifcfgscanner/tests/unit_test_ifcfgscanner.py b/repos/system_upgrade/common/actors/ifcfgscanner/tests/unit_test_ifcfgscanner.py
|
||||
index d996de84..bef3d485 100644
|
||||
--- a/repos/system_upgrade/common/actors/ifcfgscanner/tests/unit_test_ifcfgscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/ifcfgscanner/tests/unit_test_ifcfgscanner.py
|
||||
@@ -1,9 +1,9 @@
|
||||
import errno
|
||||
import textwrap
|
||||
+import unittest.mock as mock
|
||||
from io import StringIO
|
||||
from os.path import basename
|
||||
|
||||
-import mock
|
||||
import six
|
||||
|
||||
from leapp.libraries.actor import ifcfgscanner
|
||||
diff --git a/repos/system_upgrade/common/actors/scanmemory/tests/test_scanmemory.py b/repos/system_upgrade/common/actors/scanmemory/tests/test_scanmemory.py
|
||||
index 13e4e724..20fa8e91 100644
|
||||
--- a/repos/system_upgrade/common/actors/scanmemory/tests/test_scanmemory.py
|
||||
+++ b/repos/system_upgrade/common/actors/scanmemory/tests/test_scanmemory.py
|
||||
@@ -1,4 +1,5 @@
|
||||
-import mock
|
||||
+import unittest.mock as mock
|
||||
+
|
||||
import six
|
||||
|
||||
from leapp.libraries.actor import scanmemory
|
||||
diff --git a/repos/system_upgrade/common/actors/selinux/selinuxcontentscanner/tests/component_test_selinuxcontentscanner.py b/repos/system_upgrade/common/actors/selinux/selinuxcontentscanner/tests/component_test_selinuxcontentscanner.py
|
||||
index 802e038a..15aef5d8 100644
|
||||
--- a/repos/system_upgrade/common/actors/selinux/selinuxcontentscanner/tests/component_test_selinuxcontentscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/selinux/selinuxcontentscanner/tests/component_test_selinuxcontentscanner.py
|
||||
@@ -4,9 +4,7 @@ import pytest
|
||||
|
||||
from leapp.libraries.common.config import mock_configs
|
||||
from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
-from leapp.models import SELinuxCustom, SELinuxFacts, SELinuxModule, SELinuxModules, SELinuxRequestRPMs
|
||||
-from leapp.reporting import Report
|
||||
-from leapp.snactor.fixture import current_actor_context
|
||||
+from leapp.models import SELinuxCustom, SELinuxFacts, SELinuxModules, SELinuxRequestRPMs
|
||||
|
||||
# compat module ensures compatibility with newer systems and is not part of testing
|
||||
TEST_MODULES = [
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/nisscanner/tests/test_nisscan.py b/repos/system_upgrade/el8toel9/actors/nisscanner/tests/test_nisscan.py
|
||||
index ed000ce0..d7e77a28 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/nisscanner/tests/test_nisscan.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/nisscanner/tests/test_nisscan.py
|
||||
@@ -1,4 +1,5 @@
|
||||
-import mock
|
||||
+import unittest.mock as mock
|
||||
+
|
||||
import pytest
|
||||
import six
|
||||
|
||||
diff --git a/requirements.txt b/requirements.txt
|
||||
index e4294718..ee1d9006 100644
|
||||
--- a/requirements.txt
|
||||
+++ b/requirements.txt
|
||||
@@ -3,7 +3,6 @@
|
||||
flake8
|
||||
isort
|
||||
funcsigs==1.0.2
|
||||
-mock==2.0.0
|
||||
pylint
|
||||
pytest==6.2.5; python_version >= '3.6' and python_version < '3.8'
|
||||
pytest==7.4.4; python_version >= '3.8' and python_version < '3.10'
|
||||
--
|
||||
2.53.0
|
||||
|
||||
8925
SOURCES/0042-Update-the-upgrade-data-files-stream-4.0.patch
Normal file
8925
SOURCES/0042-Update-the-upgrade-data-files-stream-4.0.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,194 +0,0 @@
|
||||
From d8c82c9460e2ab08ac735c7af06ec4a73a9b4de4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Peter=20Mo=C4=8D=C3=A1ry?=
|
||||
<68905580+PeterMocary@users.noreply.github.com>
|
||||
Date: Thu, 16 Apr 2026 23:00:14 +0200
|
||||
Subject: [PATCH 43/44] remove single quoting from remediation commands (#1520)
|
||||
|
||||
The framework now uses shlex.quote to always make literals out of
|
||||
remediation command arguments. Some of the existing remediation commands used single
|
||||
quotes in their subcommands so the resulting command in leapp-report.txt used
|
||||
unintuitive escaping of single quotes.
|
||||
|
||||
The chackrootsymlinks can still end up with a single quote if the user
|
||||
has it in one of the symlinks that need to be adjusted. However, it is
|
||||
not possible to handle this differently without introducing side effects.
|
||||
|
||||
jira: RHEL-156521
|
||||
---
|
||||
packaging/leapp-repository.spec | 2 +-
|
||||
.../common/actors/checkrootsymlinks/actor.py | 53 +--------------
|
||||
.../libraries/checkrootsymlinks.py | 65 +++++++++++++++++++
|
||||
.../libraries/checkyumpluginsenabled.py | 6 +-
|
||||
4 files changed, 71 insertions(+), 55 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/actors/checkrootsymlinks/libraries/checkrootsymlinks.py
|
||||
|
||||
diff --git a/packaging/leapp-repository.spec b/packaging/leapp-repository.spec
|
||||
index 3ffafafa..70b1d7d3 100644
|
||||
--- a/packaging/leapp-repository.spec
|
||||
+++ b/packaging/leapp-repository.spec
|
||||
@@ -120,7 +120,7 @@ Requires: leapp-repository-dependencies = %{leapp_repo_deps}
|
||||
|
||||
# IMPORTANT: this is capability provided by the leapp framework rpm.
|
||||
# Check that 'version' instead of the real framework rpm version.
|
||||
-Requires: leapp-framework >= 6.4, leapp-framework < 7
|
||||
+Requires: leapp-framework >= 6.5, leapp-framework < 7
|
||||
|
||||
# Since we provide sub-commands for the leapp utility, we expect the leapp
|
||||
# tool to be installed as well.
|
||||
diff --git a/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py b/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
index 2e805542..391e5589 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
@@ -1,8 +1,5 @@
|
||||
-import os
|
||||
-
|
||||
-from leapp import reporting
|
||||
from leapp.actors import Actor
|
||||
-from leapp.exceptions import StopActorExecutionError
|
||||
+from leapp.libraries.actor import checkrootsymlinks
|
||||
from leapp.models import Report, RootDirectory
|
||||
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
@@ -20,50 +17,4 @@ class CheckRootSymlinks(Actor):
|
||||
tags = (IPUWorkflowTag, ChecksPhaseTag)
|
||||
|
||||
def process(self):
|
||||
- rootdir = next(self.consume(RootDirectory), None)
|
||||
- if not rootdir:
|
||||
- raise StopActorExecutionError('Cannot check root symlinks',
|
||||
- details={'Problem': 'Did not receive a message with '
|
||||
- 'root subdirectories'})
|
||||
- absolute_links = [item for item in rootdir.items if item.target and os.path.isabs(item.target)]
|
||||
- absolute_links_nonutf = [item for item in rootdir.invalid_items if item.target and os.path.isabs(item.target)]
|
||||
- if not absolute_links and not absolute_links_nonutf:
|
||||
- return
|
||||
-
|
||||
- report_fields = [
|
||||
- reporting.Title('Upgrade requires links in root directory to be relative'),
|
||||
- reporting.Summary(
|
||||
- 'After rebooting, parts of the upgrade process can fail if symbolic links in / '
|
||||
- 'point to absolute paths.\n'
|
||||
- 'Please change these links to relative ones.'
|
||||
- ),
|
||||
- reporting.ExternalLink(
|
||||
- url='https://access.redhat.com/solutions/6989732',
|
||||
- title='leapp upgrade stops with Inhibitor "Upgrade requires links in root '
|
||||
- 'directory to be relative"'
|
||||
- ),
|
||||
- reporting.Severity(reporting.Severity.HIGH),
|
||||
- reporting.Groups([reporting.Groups.INHIBITOR])]
|
||||
-
|
||||
- # Generate reports about absolute links presence
|
||||
- rem_commands = []
|
||||
- if absolute_links:
|
||||
- commands = []
|
||||
- for item in absolute_links:
|
||||
- command = ' '.join(['ln',
|
||||
- '-snf',
|
||||
- f"'{os.path.relpath(item.target, '/')}'",
|
||||
- f"'{os.path.join('/', item.name)}'"])
|
||||
- commands.append(command)
|
||||
- rem_commands = [['bash', '-c', '{}'.format(' && '.join(commands))]]
|
||||
- # Generate reports about non-utf8 absolute links presence
|
||||
- nonutf_count = len(absolute_links_nonutf)
|
||||
- if nonutf_count > 0:
|
||||
- # for non-utf encoded filenames can't provide a remediation command, so will mention this fact in a hint
|
||||
- rem_hint = ("{} symbolic links point to absolute paths that have non-utf8 encoding and need to be"
|
||||
- " fixed additionally".format(nonutf_count))
|
||||
- report_fields.append(reporting.Remediation(hint=rem_hint, commands=rem_commands))
|
||||
- else:
|
||||
- report_fields.append(reporting.Remediation(commands=rem_commands))
|
||||
-
|
||||
- reporting.create_report(report_fields)
|
||||
+ checkrootsymlinks.process()
|
||||
diff --git a/repos/system_upgrade/common/actors/checkrootsymlinks/libraries/checkrootsymlinks.py b/repos/system_upgrade/common/actors/checkrootsymlinks/libraries/checkrootsymlinks.py
|
||||
new file mode 100644
|
||||
index 00000000..2c5676bd
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/checkrootsymlinks/libraries/checkrootsymlinks.py
|
||||
@@ -0,0 +1,65 @@
|
||||
+import os
|
||||
+
|
||||
+from leapp import reporting
|
||||
+from leapp.exceptions import StopActorExecutionError
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import RootDirectory
|
||||
+
|
||||
+
|
||||
+def _dquote(s):
|
||||
+ """Double-quote a string for use inside a non-interactive shell script."""
|
||||
+ escaped = (s.replace('\\', '\\\\')
|
||||
+ .replace('"', '\\"')
|
||||
+ .replace('$', '\\$')
|
||||
+ .replace('`', '\\`'))
|
||||
+ return '"{}"'.format(escaped)
|
||||
+
|
||||
+
|
||||
+def process():
|
||||
+ rootdir = next(api.consume(RootDirectory), None)
|
||||
+ if not rootdir:
|
||||
+ raise StopActorExecutionError('Cannot check root symlinks',
|
||||
+ details={'Problem': 'Did not receive a message with '
|
||||
+ 'root subdirectories'})
|
||||
+ absolute_links = [item for item in rootdir.items if item.target and os.path.isabs(item.target)]
|
||||
+ absolute_links_nonutf = [item for item in rootdir.invalid_items if item.target and os.path.isabs(item.target)]
|
||||
+ if not absolute_links and not absolute_links_nonutf:
|
||||
+ return
|
||||
+
|
||||
+ report_fields = [
|
||||
+ reporting.Title('Upgrade requires links in root directory to be relative'),
|
||||
+ reporting.Summary(
|
||||
+ 'After rebooting, parts of the upgrade process can fail if symbolic links in / '
|
||||
+ 'point to absolute paths.\n'
|
||||
+ 'Please change these links to relative ones.'
|
||||
+ ),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/6989732',
|
||||
+ title='leapp upgrade stops with Inhibitor "Upgrade requires links in root '
|
||||
+ 'directory to be relative"'
|
||||
+ ),
|
||||
+ reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Groups([reporting.Groups.INHIBITOR])]
|
||||
+
|
||||
+ # Generate reports about absolute links presence
|
||||
+ rem_commands = []
|
||||
+ if absolute_links:
|
||||
+ commands = []
|
||||
+ for item in absolute_links:
|
||||
+ command = ' '.join(['ln',
|
||||
+ '-snf',
|
||||
+ _dquote(os.path.relpath(item.target, '/')),
|
||||
+ _dquote(os.path.join('/', item.name))])
|
||||
+ commands.append(command)
|
||||
+ rem_commands = [['bash', '-c', '{}'.format(' && '.join(commands))]]
|
||||
+ # Generate reports about non-utf8 absolute links presence
|
||||
+ nonutf_count = len(absolute_links_nonutf)
|
||||
+ if nonutf_count > 0:
|
||||
+ # for non-utf encoded filenames can't provide a remediation command, so will mention this fact in a hint
|
||||
+ rem_hint = ("{} symbolic links point to absolute paths that have non-utf8 encoding and need to be"
|
||||
+ " fixed additionally".format(nonutf_count))
|
||||
+ report_fields.append(reporting.Remediation(hint=rem_hint, commands=rem_commands))
|
||||
+ else:
|
||||
+ report_fields.append(reporting.Remediation(commands=rem_commands))
|
||||
+
|
||||
+ reporting.create_report(report_fields)
|
||||
diff --git a/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py b/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
index 869e2a88..5c99a0d9 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
@@ -36,9 +36,9 @@ def check_required_dnf_plugins_enabled(pkg_manager_info):
|
||||
product_id_plugin_conf = os.path.join(plugin_configs_dir, 'product-id.conf')
|
||||
|
||||
remediation_commands = [
|
||||
- f"sed -i 's/^plugins=0/plugins=1/' '{dnf_conf_path}'",
|
||||
- f"sed -i 's/^enabled=0/enabled=1/' '{rhsm_plugin_conf}'",
|
||||
- f"sed -i 's/^enabled=0/enabled=1/' '{product_id_plugin_conf}'"
|
||||
+ f'sed -i "s/^plugins=0/plugins=1/" "{dnf_conf_path}"',
|
||||
+ f'sed -i "s/^enabled=0/enabled=1/" "{rhsm_plugin_conf}"',
|
||||
+ f'sed -i "s/^enabled=0/enabled=1/" "{product_id_plugin_conf}"',
|
||||
]
|
||||
|
||||
reporting.create_report([
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
From 6c205281850c28068edc7fc5ab453c65398b7054 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 30 May 2025 18:28:25 +0200
|
||||
Subject: [PATCH 43/43] unit-tests: suppress deprecation warning for
|
||||
is_rhel_alt()
|
||||
|
||||
The deprecation warning is not wanted in unit-tests. Supress it.
|
||||
|
||||
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
||||
---
|
||||
.../system_upgrade/common/libraries/config/tests/test_version.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index 420571c0..d51f8098 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -108,6 +108,7 @@ def test_matches_target_version(monkeypatch, result, version_list):
|
||||
(False, '4.14.0-100.8.2.el8.x86_64', 'rhel', '8.1'),
|
||||
(False, '4.14.0-100.8.2.el9.x86_64', 'rhel', '9.1'),
|
||||
])
|
||||
+@suppress_deprecation(version.is_rhel_alt)
|
||||
def test_is_rhel_alt(monkeypatch, result, kernel, release_id, src_ver):
|
||||
monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(src_ver=src_ver, kernel=kernel,
|
||||
release_id=release_id))
|
||||
--
|
||||
2.49.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
568
SOURCES/0100-Allow-upgrades-of-almalinux-AlmaLinux-OS.patch
Normal file
568
SOURCES/0100-Allow-upgrades-of-almalinux-AlmaLinux-OS.patch
Normal file
@ -0,0 +1,568 @@
|
||||
From 5b702f9cdd791a4f39147be4b2c071a0b5f407fb Mon Sep 17 00:00:00 2001
|
||||
From: Yuriy Kohut <yura.kohut@gmail.com>
|
||||
Date: Fri, 27 Jun 2025 12:25:51 +0300
|
||||
Subject: [PATCH] Allow upgrades of almalinux (AlmaLinux OS)
|
||||
|
||||
* add information about 'almalinux' new distro and its 'default' upgrade path
|
||||
* update mapping with 'almalinux' distro ID and its OS version format
|
||||
* add AlmaLinux OS release 9 and 10 RPM GPG keys, fingerprints of GPG keys, and obsoleted GPG keys
|
||||
* update unit tests to cover 'almalinux'
|
||||
---
|
||||
commands/command_utils.py | 2 +
|
||||
.../test_distributionsignedrpmscanner.py | 33 ++++++++++
|
||||
.../tests/test_ipuworkflowconfig.py | 20 ++++++
|
||||
.../tests/files/repomap_example.json | 39 +++++++++++
|
||||
.../tests/unit_test_repositoriesmapping.py | 12 +++-
|
||||
.../tests/test_repomapping.py | 10 ++-
|
||||
.../tests/test_setuptargetrepos.py | 66 ++++++++++---------
|
||||
.../distro/almalinux/gpg-signatures.json | 18 +++++
|
||||
.../rpm-gpg/10/RPM-GPG-KEY-AlmaLinux-10 | 29 ++++++++
|
||||
.../rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9 | 52 +++++++++++++++
|
||||
.../common/files/upgrade_paths.json | 6 ++
|
||||
.../common/libraries/tests/test_gpg.py | 2 +
|
||||
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
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9
|
||||
|
||||
diff --git a/commands/command_utils.py b/commands/command_utils.py
|
||||
index 155bacad..ef5daf03 100644
|
||||
--- a/commands/command_utils.py
|
||||
+++ b/commands/command_utils.py
|
||||
@@ -36,11 +36,13 @@ class _VersionKind(str, Enum):
|
||||
class DistroIDs(str, Enum):
|
||||
RHEL = 'rhel'
|
||||
CENTOS = 'centos'
|
||||
+ ALMALINUX = 'almalinux'
|
||||
|
||||
|
||||
_DISTRO_VERSION_FORMATS = {
|
||||
DistroIDs.RHEL: VersionFormats.MAJOR_MINOR,
|
||||
DistroIDs.CENTOS: VersionFormats.MAJOR_ONLY,
|
||||
+ DistroIDs.ALMALINUX: VersionFormats.MAJOR_MINOR,
|
||||
}
|
||||
"""
|
||||
Maps distro ID to the expected OS version format.
|
||||
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..af21bc8d 100644
|
||||
--- a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/distributionsignedrpmscanner/tests/test_distributionsignedrpmscanner.py
|
||||
@@ -110,6 +110,39 @@ def test_actor_execution_with_signed_unsigned_data_centos(current_actor_context)
|
||||
assert len(current_actor_context.consume(InstalledUnsignedRPM)[0].items) == 6
|
||||
|
||||
|
||||
+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.os_release = OSRelease(
|
||||
+ release_id='almalinux',
|
||||
+ name='AlmaLinux',
|
||||
+ pretty_name='AlmaLinux 8.10 (Cerulean Leopard)',
|
||||
+ version='8.10 (Cerulean Leopard)',
|
||||
+ version_id='8.10'
|
||||
+ )
|
||||
+
|
||||
+ installed_rpm = [
|
||||
+ RPM(name='sample01', version='0.1', release='1.sm01', epoch='1', packager=ALMALINUX_PACKAGER, arch='noarch',
|
||||
+ pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 2ae81e8aced7258b'),
|
||||
+ RPM(name='sample02', version='0.1', release='1.sm01', epoch='1', packager=ALMALINUX_PACKAGER, arch='noarch',
|
||||
+ pgpsig='SOME_OTHER_SIG_X'),
|
||||
+ RPM(name='sample03', version='0.1', release='1.sm01', epoch='1', packager=ALMALINUX_PACKAGER, arch='noarch',
|
||||
+ pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 51d6647ec21ad6ea'),
|
||||
+ RPM(name='sample04', version='0.1', release='1.sm01', epoch='1', packager=ALMALINUX_PACKAGER, arch='noarch',
|
||||
+ pgpsig='SOME_OTHER_SIG_X'),
|
||||
+ ]
|
||||
+
|
||||
+ current_actor_context.feed(InstalledRPM(items=installed_rpm))
|
||||
+ current_actor_context.run(config_model=config)
|
||||
+ assert current_actor_context.consume(DistributionSignedRPM)
|
||||
+ assert len(current_actor_context.consume(DistributionSignedRPM)[0].items) == 2
|
||||
+ assert current_actor_context.consume(InstalledRedHatSignedRPM)
|
||||
+ assert not current_actor_context.consume(InstalledRedHatSignedRPM)[0].items
|
||||
+ assert current_actor_context.consume(InstalledUnsignedRPM)
|
||||
+ assert len(current_actor_context.consume(InstalledUnsignedRPM)[0].items) == 2
|
||||
+
|
||||
+
|
||||
def test_actor_execution_with_unknown_distro(current_actor_context):
|
||||
config = mock_configs.CONFIG
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
index 6184121b..8b7faffb 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
@@ -129,6 +129,13 @@ def test_construct_models_for_paths_matching_source_major(source_major_version,
|
||||
'9': ['10.0']
|
||||
}
|
||||
),
|
||||
+ (
|
||||
+ 'almalinux', 'default',
|
||||
+ {
|
||||
+ '8.10': ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5', '9.6'],
|
||||
+ '9.6': ['10.0']
|
||||
+ }
|
||||
+ ),
|
||||
)
|
||||
)
|
||||
def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flavour, expected_result):
|
||||
@@ -147,6 +154,12 @@ def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flav
|
||||
'9.6': ['10.0'],
|
||||
'9': ['10.0']
|
||||
}
|
||||
+ },
|
||||
+ 'almalinux': {
|
||||
+ 'default': {
|
||||
+ '8.10': ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5', '9.6'],
|
||||
+ '9.6': ['10.0']
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +173,7 @@ def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flav
|
||||
[
|
||||
(('centos', '8', '9'), ('8.10', '9.5')),
|
||||
(('rhel', '8.10', '9.4'), ('8.10', '9.4')),
|
||||
+ (('almalinux', '8.10', '9.6'), ('8.10', '9.6')),
|
||||
]
|
||||
)
|
||||
def test_virtual_version_construction(construction_params, expected_versions):
|
||||
@@ -186,6 +200,12 @@ def test_virtual_version_construction(construction_params, expected_versions):
|
||||
'9': '9.5',
|
||||
}
|
||||
},
|
||||
+ 'almalinux': {
|
||||
+ 'default': {
|
||||
+ '8.10': ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5', '9.6'],
|
||||
+ '9.6': ['10.0']
|
||||
+ }
|
||||
+ },
|
||||
}
|
||||
|
||||
result = ipuworkflowconfig.construct_virtual_versions(defined_upgrade_paths, *construction_params)
|
||||
diff --git a/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json b/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
|
||||
index 1f04d72d..9ce8c410 100644
|
||||
--- a/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
|
||||
+++ b/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
|
||||
@@ -120,6 +120,45 @@
|
||||
"distro": "centos"
|
||||
}
|
||||
]
|
||||
+ },
|
||||
+ {
|
||||
+ "pesid": "pesid8",
|
||||
+ "entries": [
|
||||
+ {
|
||||
+ "major_version": "8",
|
||||
+ "repoid": "some-almalinux-8-repoid1",
|
||||
+ "arch": "x86_64",
|
||||
+ "repo_type": "rpm",
|
||||
+ "channel": "ga",
|
||||
+ "distro": "almalinux"
|
||||
+ }
|
||||
+ ]
|
||||
+ },
|
||||
+ {
|
||||
+ "pesid": "pesid9",
|
||||
+ "entries": [
|
||||
+ {
|
||||
+ "major_version": "9",
|
||||
+ "repoid": "some-almalinux-9-repoid1",
|
||||
+ "arch": "x86_64",
|
||||
+ "repo_type": "rpm",
|
||||
+ "channel": "ga",
|
||||
+ "distro": "almalinux"
|
||||
+ }
|
||||
+ ]
|
||||
+ },
|
||||
+ {
|
||||
+ "pesid": "pesid10",
|
||||
+ "entries": [
|
||||
+ {
|
||||
+ "major_version": "10",
|
||||
+ "repoid": "some-almalinux-10-repoid1",
|
||||
+ "arch": "x86_64",
|
||||
+ "repo_type": "rpm",
|
||||
+ "channel": "ga",
|
||||
+ "distro": "almalinux"
|
||||
+ }
|
||||
+ ]
|
||||
}
|
||||
]
|
||||
}
|
||||
diff --git a/repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py b/repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py
|
||||
index 9d781125..6d1a173a 100644
|
||||
--- a/repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py
|
||||
+++ b/repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py
|
||||
@@ -52,7 +52,7 @@ def test_scan_existing_valid_data(monkeypatch, adjust_cwd):
|
||||
# 2. Verify that only repositories valid for the current IPU are produced
|
||||
pesid_repos = repo_mapping.repositories
|
||||
fail_description = 'Actor produced incorrect number of IPU-relevant pesid repos.'
|
||||
- assert len(pesid_repos) == 5, fail_description
|
||||
+ assert len(pesid_repos) == 6, fail_description
|
||||
|
||||
expected_pesid_repos = [
|
||||
PESIDRepositoryEntry(
|
||||
@@ -105,6 +105,16 @@ def test_scan_existing_valid_data(monkeypatch, adjust_cwd):
|
||||
rhui='',
|
||||
distro='centos',
|
||||
),
|
||||
+ PESIDRepositoryEntry(
|
||||
+ pesid='pesid8',
|
||||
+ major_version='8',
|
||||
+ repoid='some-almalinux-8-repoid1',
|
||||
+ arch='x86_64',
|
||||
+ repo_type='rpm',
|
||||
+ channel='ga',
|
||||
+ rhui='',
|
||||
+ distro='almalinux',
|
||||
+ ),
|
||||
]
|
||||
|
||||
fail_description = 'Expected pesid repo is not present in the deserialization output.'
|
||||
diff --git a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py b/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py
|
||||
index af40c443..1b0a3122 100644
|
||||
--- a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py
|
||||
+++ b/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py
|
||||
@@ -75,6 +75,9 @@ def repomap_data_multiple_distros():
|
||||
make_pesid_repo("pesid3", "10", "pesid3-repoid-eus", channel="eus"),
|
||||
make_pesid_repo("pesid3", "10", "pesid3-repoid-aws", rhui="aws"),
|
||||
make_pesid_repo("pesid3", "10", "pesid3-repoid-centos", distro="centos"),
|
||||
+ make_pesid_repo("pesid1", "9", "pesid1-repoid-almalinux", distro="almalinux"),
|
||||
+ make_pesid_repo("pesid2", "10", "pesid2-repoid-almalinux", distro="almalinux"),
|
||||
+ make_pesid_repo("pesid3", "10", "pesid3-repoid-almalinux", distro="almalinux"),
|
||||
],
|
||||
)
|
||||
return repomap_data
|
||||
@@ -106,7 +109,7 @@ def test_get_pesid_repo_entry(monkeypatch, repomap_data_for_pesid_repo_retrieval
|
||||
assert handler.get_pesid_repo_entry('nonexisting-repo', '7') is None, fail_description
|
||||
|
||||
|
||||
-@pytest.mark.parametrize('distro', ('rhel', 'centos'))
|
||||
+@pytest.mark.parametrize('distro', ('rhel', 'centos', 'almalinux'))
|
||||
def test_get_pesid_repo_entry_distro(
|
||||
monkeypatch, repomap_data_multiple_distros, distro
|
||||
):
|
||||
@@ -163,7 +166,7 @@ def test_get_target_pesids(monkeypatch, repomap_data_for_pesid_repo_retrieval):
|
||||
assert [] == handler.get_target_pesids('pesid_no_mapping'), fail_description
|
||||
|
||||
|
||||
-@pytest.mark.parametrize('distro', ('rhel', 'centos'))
|
||||
+@pytest.mark.parametrize('distro', ('rhel', 'centos', 'almalinux'))
|
||||
def test_get_target_pesids_distro(
|
||||
monkeypatch, repomap_data_multiple_distros, distro
|
||||
):
|
||||
@@ -199,6 +202,7 @@ def test_get_target_pesids_distro(
|
||||
[
|
||||
('rhel', [5, 6, 7], [0, 1]),
|
||||
('centos', [8], [2]),
|
||||
+ ('almalinux', [11], [9]),
|
||||
]
|
||||
)
|
||||
def test_get_pesid_repos(
|
||||
@@ -251,6 +255,7 @@ def test_get_pesid_repos(
|
||||
[
|
||||
('rhel', [0, 1]),
|
||||
('centos', []),
|
||||
+ ('almalinux', []),
|
||||
]
|
||||
)
|
||||
def test_get_source_pesid_repos(monkeypatch, repomap_data_for_pesid_repo_retrieval, distro, expected_repos_index):
|
||||
@@ -291,6 +296,7 @@ def test_get_source_pesid_repos(monkeypatch, repomap_data_for_pesid_repo_retriev
|
||||
[
|
||||
('rhel', [3, 4, 5]),
|
||||
('centos', []),
|
||||
+ ('almalinux', []),
|
||||
]
|
||||
)
|
||||
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
|
||||
index 91d9cd24..1f898e8f 100644
|
||||
--- a/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_setuptargetrepos.py
|
||||
+++ b/repos/system_upgrade/common/actors/setuptargetrepos/tests/test_setuptargetrepos.py
|
||||
@@ -100,94 +100,99 @@ def test_repositories_setup_tasks(monkeypatch):
|
||||
assert rhel_repos[0].repoid == 'rhel-8-server-rpms'
|
||||
|
||||
|
||||
-def test_repos_mapping(monkeypatch):
|
||||
+@pytest.mark.parametrize('distro_id', ['rhel', 'centos', 'almalinux'])
|
||||
+def test_repos_mapping_for_distro(monkeypatch, distro_id):
|
||||
"""
|
||||
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
|
||||
- the RepositoriesMapping information.
|
||||
+ the RepositoriesMapping information for a specific distro.
|
||||
"""
|
||||
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-blacklisted-rpms'.format(distro_id), name='{} 7 Blacklisted'.format(distro_id))]
|
||||
|
||||
repos_files = [RepositoryFile(file='/etc/yum.repos.d/redhat.repo', data=repos_data)]
|
||||
facts = RepositoriesFacts(repositories=repos_files)
|
||||
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)),
|
||||
+ mock_package('foreman-proxy', 'nosuch-{}-7-for-x86_64-satellite-extras-rpms'.format(distro_id))])
|
||||
|
||||
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),
|
||||
+ target=['{0}8-baseos'.format(distro_id),
|
||||
+ '{0}8-appstream'.format(distro_id),
|
||||
+ '{0}8-blacklist'.format(distro_id)]),
|
||||
+ RepoMapEntry(source='{0}7-satellite-extras'.format(distro_id),
|
||||
+ target=['{0}8-satellite-extras'.format(distro_id)])],
|
||||
repositories=[
|
||||
PESIDRepositoryEntry(
|
||||
- pesid='rhel7-base',
|
||||
- repoid='rhel-7-server-rpms',
|
||||
+ pesid='{0}7-base'.format(distro_id),
|
||||
+ repoid='{0}-7-server-rpms'.format(distro_id),
|
||||
major_version='7',
|
||||
arch='x86_64',
|
||||
repo_type='rpm',
|
||||
channel='ga',
|
||||
rhui='',
|
||||
- distro='rhel',
|
||||
+ distro=distro_id,
|
||||
),
|
||||
PESIDRepositoryEntry(
|
||||
- pesid='rhel8-baseos',
|
||||
- repoid='rhel-8-for-x86_64-baseos-htb-rpms',
|
||||
+ pesid='{0}8-baseos'.format(distro_id),
|
||||
+ repoid='{0}-8-for-x86_64-baseos-htb-rpms'.format(distro_id),
|
||||
major_version='8',
|
||||
arch='x86_64',
|
||||
repo_type='rpm',
|
||||
channel='ga',
|
||||
rhui='',
|
||||
- distro='rhel',
|
||||
+ distro=distro_id,
|
||||
),
|
||||
PESIDRepositoryEntry(
|
||||
- pesid='rhel8-appstream',
|
||||
- repoid='rhel-8-for-x86_64-appstream-htb-rpms',
|
||||
+ pesid='{0}8-appstream'.format(distro_id),
|
||||
+ repoid='{0}-8-for-x86_64-appstream-htb-rpms'.format(distro_id),
|
||||
major_version='8',
|
||||
arch='x86_64',
|
||||
repo_type='rpm',
|
||||
channel='ga',
|
||||
rhui='',
|
||||
- distro='rhel',
|
||||
+ distro=distro_id,
|
||||
),
|
||||
PESIDRepositoryEntry(
|
||||
- pesid='rhel8-blacklist',
|
||||
- repoid='rhel-8-blacklisted-rpms',
|
||||
+ pesid='{0}8-blacklist'.format(distro_id),
|
||||
+ repoid='{0}-8-blacklisted-rpms'.format(distro_id),
|
||||
major_version='8',
|
||||
arch='x86_64',
|
||||
repo_type='rpm',
|
||||
channel='ga',
|
||||
rhui='',
|
||||
- distro='rhel',
|
||||
+ distro=distro_id,
|
||||
),
|
||||
PESIDRepositoryEntry(
|
||||
- pesid='rhel7-satellite-extras',
|
||||
- repoid='rhel-7-for-x86_64-satellite-extras-rpms',
|
||||
+ pesid='{0}7-satellite-extras'.format(distro_id),
|
||||
+ repoid='{0}-7-for-x86_64-satellite-extras-rpms'.format(distro_id),
|
||||
major_version='7',
|
||||
arch='x86_64',
|
||||
repo_type='rpm',
|
||||
channel='ga',
|
||||
rhui='',
|
||||
- distro='rhel',
|
||||
+ distro=distro_id,
|
||||
),
|
||||
PESIDRepositoryEntry(
|
||||
- pesid='rhel8-satellite-extras',
|
||||
- repoid='rhel-8-for-x86_64-satellite-extras-rpms',
|
||||
+ pesid='{0}8-satellite-extras'.format(distro_id),
|
||||
+ repoid='{0}-8-for-x86_64-satellite-extras-rpms'.format(distro_id),
|
||||
major_version='8',
|
||||
arch='x86_64',
|
||||
repo_type='rpm',
|
||||
channel='ga',
|
||||
rhui='',
|
||||
- distro='rhel',
|
||||
+ distro=distro_id,
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
- repos_blacklisted = RepositoriesBlacklisted(repoids=['rhel-8-blacklisted-rpms'])
|
||||
+ repos_blacklisted = RepositoriesBlacklisted(repoids=['{}-8-blacklisted-rpms'.format(distro_id)])
|
||||
|
||||
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, 'produce', produce_mocked())
|
||||
|
||||
setuptargetrepos.process()
|
||||
@@ -197,6 +202,7 @@ def test_repos_mapping(monkeypatch):
|
||||
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',
|
||||
- 'rhel-8-for-x86_64-satellite-extras-rpms'}
|
||||
+ 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-satellite-extras-rpms'.format(distro_id)}
|
||||
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
|
||||
new file mode 100644
|
||||
index 00000000..24bc93ba
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json
|
||||
@@ -0,0 +1,18 @@
|
||||
+{
|
||||
+ "keys": [
|
||||
+ "51d6647ec21ad6ea",
|
||||
+ "d36cb86cb86b3716",
|
||||
+ "2ae81e8aced7258b",
|
||||
+ "429785e181b961a5",
|
||||
+ "d07bf2a08d50eb66"
|
||||
+ ],
|
||||
+ "obsoleted-keys": {
|
||||
+ "7": [],
|
||||
+ "8": [],
|
||||
+ "9": [
|
||||
+ "gpg-pubkey-3abb34f8-5ffd890e",
|
||||
+ "gpg-pubkey-ced7258b-6525146f"
|
||||
+ ],
|
||||
+ "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
|
||||
new file mode 100644
|
||||
index 00000000..5228281c
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/10/RPM-GPG-KEY-AlmaLinux-10
|
||||
@@ -0,0 +1,29 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+
|
||||
+mQINBGaP6O8BEACvg8IlAxGayV8zOi9Ex+Pd8lrj2BrBzloG8ri84ORp9o8ojq7l
|
||||
+ykKmIElHe11cQD2Lf/a4lcQQ4Ec3baiD786X6K2eVSlBEAnZMzfjDg8R63SfsBuu
|
||||
+8Yk+lUyqlBrDnSDYaPruOAzLIz2r82ikIC1jDbipZsMFPFHPI4/hayyWxJ3oGxRe
|
||||
+0mbtYLB9ElEKngt+/hfo7JLklakbznyIRuVEF3VrZb91XC6r/idqfJoNyBXSKidj
|
||||
+z0IwqOhgkLUk84rzltDo3AzwGqusd7PEuhOmqinOhp0hMdXsztD4TVyhw82iXu/O
|
||||
+onOAObZTZYfM6Z8btmDqkoo0aT+oPPCuZ3yC/caU9dhvCSXET/CGoXc3hL55u9PV
|
||||
+qmcVm/mwvuEImEAvxVc0/dBzEUk+FwW8KsaN3HoUKrC4/NqgmaQz8/42np7u2j+B
|
||||
+OOJ4hAckNEdWd8rB86CYN00sdxnvLBsp8V3IwEqXLhGOoBsagy61Z8hKCM+siOGn
|
||||
+xmbbybgaLOs+DPlxt9LrtgLJHODwmD96oysUPJuA0lv8KMiSpId0tSpp9Wn/wHBG
|
||||
+kRgxGYfzQu7WRvRZqQaleft1JTXXOjNzPur0RkJyb3yFwAoxpePyo/WrupM41OHW
|
||||
+58cEqdC6riCnJcS4U84RLj+hwvufBVB7areQ75sETnKeyozZW+P16E1t/wARAQAB
|
||||
+tChBbG1hTGludXggT1MgMTAgPHBhY2thZ2VyQGFsbWFsaW51eC5vcmc+iQJMBBMB
|
||||
+CgA2FiEE7m23uY9b9e3Z2g3l3uXBHMKh5XIFAmaP6O8CGwMECwkIBwQVCgkIBRYC
|
||||
+AwEAAh4FAheAAAoJEN7lwRzCoeVy32AP/A2+KI+JhmsxnactSptkAWGyAAf1YBWW
|
||||
+Js2sc9OJdKj7uIkzszCx7c7VIVeF/VLijIYpM/zwUgir5S5SimzQmY+FumwbKIml
|
||||
+K5RBsoSog22i7Edho0MLa1pa6qvnKS0nkl9DEcu8EbMUhucWbxGnCG/22EEMTrY+
|
||||
+Si1IZNkDGtlBHHBKMC+STbqqTxtdy4tAd2NYwWh3sBIh6PF7T4NLRAugu7PZQr5K
|
||||
+amS4z2lV3ebshGjieA0Zoznwh0AXgN0gZ/0pC/LXI25gcgtrvkCyL8Fe0AyZUMd8
|
||||
+UvZXaRSsm3SkCUIlGjPrvuItn1D7tHmqVSCDKXDM2TqjfiRm1JF+2OFCBNvGz19V
|
||||
+LxWd/Gf+0qw0dtKxRMKzGh0mxXY40hjtmYZulrPxhG5itNDjStovgrevM1HBsXs9
|
||||
+ikrkOGQ0pFcqizTn4ZKAmMozEMuIuV89Vof2bBCg7pHT1FmXVdAaYJxb6a7A/CgN
|
||||
+qHjoh8AxBiGw/Q2NM4YJlUVhHqqd+/lUG3WJqACNEnqSlZkYQ3HqNNaKhHVbD4mN
|
||||
+q/g6v+f8aWWDZDsI6IAfbJUB+KPEnIvQJQleWuHrq7kcUMhEq3dwBMIoTVEHhUUr
|
||||
+RQKToSEM1rN7PcanaXQM2gy141dS7tFLxhapG8ug75LkIUnEOpPMtUjvrU1ZELGq
|
||||
+36vVHBB+dTDg
|
||||
+=tJCw
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9 b/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9
|
||||
new file mode 100644
|
||||
index 00000000..d4165d58
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/almalinux/rpm-gpg/9/RPM-GPG-KEY-AlmaLinux-9
|
||||
@@ -0,0 +1,52 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+
|
||||
+mQINBGHmnykBEACuIcqcNYTmu2q58XI5NRZowdJGAxxs+6ExX7qsa4vbPp6St7lB
|
||||
+JmLpwf5p6czIBhLL4b8E7zJpu57tVDo7Ejw6Hv584rbI8vw7pnMTe6XUFhMTL8FT
|
||||
+lyAmn8xAIlcyM+SzshnxAc5b8E0p/egMonr3J1QnvMSfixMQ59GrmLVyece7Vv3J
|
||||
+4fREh6k31kg7eQdEkzRQhRdO2KyxWYLR0A6haXSXVaiBOjFF7iUs7anlJSfeD3FO
|
||||
+afPq0Ix8oWi+mUc4txkABMdsGpdkE/MHOwN90FB8EG5XVrdv3emm3yzKMMzb53Yd
|
||||
+jcf0fovIeRloQyl9+CrVCnkBjFcIFBZZddsB43kM7eTflmAQ+tanOZ8OKBRPMtmI
|
||||
+56b/vk31ozHUoST/NmjbEI5tu+QYCuFSZ++mC06qJg0Bkw821DTAsM7Kynuj7K2f
|
||||
+WWQjlDL9ZsFifLqDXRymL+sn6g142hHQOa5KSHtT7cAcrm6L48gEL3fPntVSOU/H
|
||||
+BlTnODiSSTIsIRNA7kBkbSP3wWoYC1JQPmNYbUtZ7va2uXNb9dGT2k7Ae0465WND
|
||||
+wqRQJDxsr6TLYFpti+JRaOpSMNclXz4kRSP263Y4ZzQvkMGgSgwqg7JU00Uahk2p
|
||||
+KTlJAA8AiaMBdShlo/QXvL29Lyg0Y5klq2HCNziJDupWhXto5j5pjixrpwARAQAB
|
||||
+tCdBbG1hTGludXggT1MgOSA8cGFja2FnZXJAYWxtYWxpbnV4Lm9yZz6JAk4EEwEI
|
||||
+ADgWIQS/GKwodheJCNbnEmfTbLhsuGs3FgUCYeafKQIbAwULCQgHAgYVCgkICwIE
|
||||
+FgIDAQIeAQIXgAAKCRDTbLhsuGs3FrvnD/9X1wDM/C214t3UVsMVjTLdIJDGG+iU
|
||||
+E7Uk7QGeyeNif19rRatzXUHBBGjiAwpxe2rkveWBHCHPSUKqsAR9Arv3nMKiaGfA
|
||||
+0nomzDndLEDIgv35xzaU6OhX95mZzvj+9PThuxDxUnsNoA+7vGkaiRw+cyyDdTJQ
|
||||
+bKwum8bx1gS8Kbqo9mqrMekQ4NHCodq9bb2hI6pAxlYa472QuwFAXFAzbE3LIMIK
|
||||
+hzLkew7nxwP0txP/zzqPw4lYN38fg9AlHL2qgf0twCFO4N/ftkw25qwoiBhiwaWT
|
||||
+Ca8Z9wUJx35Z/ufscbNrtRrIGYNXTDFJdGY/WxKDp7QsyOx/sclcsSksKoC/52tL
|
||||
+2yFLQrMXsqnLjAQajA6adaeCAAwvp2/8VP8R65O4KMuKghMneCGwXVlVVYyRUXJD
|
||||
+Kjg7EvmmMGuh/Lj2A/vj+mQMmlS2kAl0qOsK9DtUIA7Z9m98zI3UmN/5BMb/HdqW
|
||||
+KADagOW9IPyo6IaSIT+A+7npTN1Y7m1aIrL1vsAKrus4MrCvAs1vYqzqIikv88Di
|
||||
+EWYVFCWTsTWf7jxBCVTLn1Lr7Mj08i+7OgRgguQGpcnvKsbwq1v2whQrs+YKR9hP
|
||||
+vVaW5DmGJ5brPykJUaQS6p5Esp1q3HBk0HbBxiiGIwGsKbLp0pKsk5TLzMIJwIG/
|
||||
+lEolCV+fJ0P4nLkCDQRh5p8pARAAvXTL29arJ5Dl9FXVpE4Km1jJLaK2WfbQARJz
|
||||
+ygQKps9QNqS1yz7C7mYdTtgRxeK2eqcX5oA83w3ppJ0DTsxfAkY3nqAXS8+QRORU
|
||||
+ffSFvhdsU1G/qpvhX0Aq62gr4y1bkIMr9GlLq86uVKIQrNdmto4NDfQc1bDD5e4j
|
||||
+KaNMmNLXxq/s67AxFW/yLchYYZ7cMqQd6Ab4lacqpGdYFIAkBkVMmj3GUSo+FLpl
|
||||
++4c50AZ8O0aB+xkrjch+4PoVyIpIC1IuqNYBYn2wMYFB414QY2iDopzpZXUhpCqx
|
||||
+NP4Zyhl1noUcOtH/wUfH1JsIcYRn0ixWF6JnE9KmjpkqBuM2/4Ot/bl67iPiN/if
|
||||
+vf3Z1kYjNPaszoMW3kmJj8MlBCSH9w6nQRG/eikihbeUDBB6rh2O7Dz8ltFqlt8N
|
||||
+asbngRoNZMnWMnItRV67Fo0pfn/DZA8VvI029apE21sNp6l7MUa8Z2/I/PNq10E8
|
||||
+rPMQM//k9y2kgxz52i6iCyesobPvun6UC4xuFoYKUTQMgKQgqOhyZ4evkepFhmHg
|
||||
+Gzx+F8EmwN1FtxfNxfLtQZSUT3kxuUDizwpaH/LkSkRXpJOQyHJL6VBINNTjB4j1
|
||||
+3+0jD+lCV6xIt88NYkGJL9rtKwZLQHSDPiI0ooCJ69GKy8SmSx04AwSsY67In1q8
|
||||
++FQjT20AEQEAAYkCNgQYAQgAIBYhBL8YrCh2F4kI1ucSZ9NsuGy4azcWBQJh5p8p
|
||||
+AhsMAAoJENNsuGy4azcW0KkP/i0YLRv+pDiSC4034oboczAnNrzJnBhqTi9cUEGn
|
||||
+Xpqvf/Zz3opqvRQiqZAgVcCtxfW+P9J3Vb/mBJ6OkR/jywAlY5il2dzK08YfVXmP
|
||||
+cEf6RF4M0KNtlYJmPlnQCZjMJaisrPmYD3Yy8ER1qJ5JQZ7n0REHZCbBCqH8w+5r
|
||||
+j4ohEHY7xXbd7+tvWTCk2MkHaide/UV/04WiO064AoZSUze/vaAx8Ll4AyFpxuIk
|
||||
+ktXZXbq7MaVzqYYJptiRB6TljzMwIbblLm9A7T7YTA/1rNe12OhDT8VoR3gG2C/l
|
||||
+Mtf37EmYq3QVqFlbj4+ouQWIiQmp5dQenH5ugf+Bob7IiENpxzF1cIu6wd4p5Y64
|
||||
+3cdYUoxrjhsCM6W1lSqECoN8yXJnRTxpBwwm65SVk477KS2h77aJfa+v5UnBhpSt
|
||||
+eVlAhs0A8Qp/hX3o7qMO1jWca3zdJwXppLlFEYTVaFUOUrc4Lhlbi0gAnn8aBwSx
|
||||
+xF1r5GhPGIBzHtRgulwZkmS6VwtDMuC6KlrASu9f93D5gLZqVk22Oar9LpgCEACd
|
||||
+8Gw/+BFbdANqo9IKmDrWf7k/YuEqZ3h+eoyKI/2z7dKh/fcVEydMTn3LB4nFRvSD
|
||||
+AZ27tvC0IUXCUNx7iJdrD5kDsMhZRl5/dXbe539G4y2W00QYuJC0DpUvGdtOuaFx
|
||||
+1WKL
|
||||
+=jk2t
|
||||
+-----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
|
||||
index 279e6eaa..f99d9c48 100644
|
||||
--- a/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
+++ b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
@@ -27,5 +27,11 @@
|
||||
"9": "9.6",
|
||||
"10": "10.0"
|
||||
}
|
||||
+ },
|
||||
+ "almalinux": {
|
||||
+ "default": {
|
||||
+ "8.10": ["9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6"],
|
||||
+ "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
|
||||
|
||||
@ -51,8 +51,8 @@ py2_byte_compile "%1" "%2"}
|
||||
# RHEL 8+ packages to be consistent with other leapp projects in future.
|
||||
|
||||
Name: leapp-repository
|
||||
Version: 0.24.0
|
||||
Release: 2%{?dist}
|
||||
Version: 0.22.0
|
||||
Release: 4%{?dist}.alma.2
|
||||
Summary: Repositories for leapp
|
||||
|
||||
License: ASL 2.0
|
||||
@ -65,50 +65,53 @@ BuildArch: noarch
|
||||
|
||||
### PATCHES HERE
|
||||
# Patch0001: filename.patch
|
||||
Patch0001: 0001-Remove-legacy-overlay-solution-leftovers.patch
|
||||
Patch0002: 0002-update-upgrade-paths-8.10-9.9-10.3.patch
|
||||
Patch0003: 0003-Enable-logrotate.timer-during-8to9-IPU.patch
|
||||
Patch0004: 0004-feat-net-naming-scheme-enable-by-default-on-CS-9to10.patch
|
||||
Patch0005: 0005-Leapp_resume.service-Silence-AVC-SELinux-warnings.patch
|
||||
Patch0006: 0006-Add-API-to-get-a-distro-report-name.patch
|
||||
Patch0007: 0007-livemode-copy-upgrade-kernel-s-hmac-into-boot.patch
|
||||
Patch0008: 0008-fix-livemode-make-live.dir-is-relative-to-device-roo.patch
|
||||
Patch0009: 0009-fix-livemode-change-location-of-source-system-tree.patch
|
||||
Patch00010: 0010-Respect-distro-names-in-reports.patch
|
||||
Patch00011: 0011-checkblacklistca-Respect-distro-name-in-reports.patch
|
||||
Patch00012: 0012-blsgrubcfgonppc64-Respect-distro-name-in-reports.patch
|
||||
Patch00013: 0013-checkselinux-Respect-distro-name-in-report.patch
|
||||
Patch00014: 0014-checkosrelease-Respect-distro-name-in-report.patch
|
||||
Patch00015: 0015-rocecheck-Remove-outadated-check-for-source-version.patch
|
||||
Patch00016: 0016-rocecheck-Respect-distro-name-in-report.patch
|
||||
Patch00017: 0017-opensshpermitrootlogincheck-Remove-7to8-related-code.patch
|
||||
Patch00018: 0018-opensshpermitrootlogincheck-Respect-target-distro-na.patch
|
||||
Patch00019: 0019-checkifcfg_ifcfg-Respect-distro-name-in-report.patch
|
||||
Patch00020: 0020-opensslproviders-Use-distro-name-in-the-leapp-commen.patch
|
||||
Patch00021: 0021-opensslconfigcheck-Dont-make-the-recommendation-as-r.patch
|
||||
Patch00022: 0022-checkmicroarchitecture-Respect-distro-name-in-report.patch
|
||||
Patch00023: 0023-checkmemory-Respect-distro-name-in-reports.patch
|
||||
Patch00024: 0024-targetuserspacecreator-Respect-distro-name-in-report.patch
|
||||
Patch00025: 0025-checkdetecteddevicesanddirvers-Respect-distro-name-i.patch
|
||||
Patch00026: 0026-reportleftoverpackages-Respect-distro-name-in-report.patch
|
||||
Patch00027: 0027-fix-overlaygen-exclude-hugetlbfs-from-overlay-mounts.patch
|
||||
Patch00028: 0028-biosdevname-Fix-check-of-naming-scheme-and-tests.patch
|
||||
Patch00029: 0029-persistentnetnamesdisable-refactoring-fix-ethX-detec.patch
|
||||
Patch00030: 0030-Fix-scan-of-net-interfaces-non-PCI-conflicting-broke.patch
|
||||
Patch00031: 0031-persistentnetnamesconfig-Deprecate-legacy-functional.patch
|
||||
Patch00032: 0032-persistentnetnamesdisable-Disable-net.ifnames-correc.patch
|
||||
Patch00033: 0033-persistentnetnamesdisable-Mention-net.naming-scheme-.patch
|
||||
Patch00034: 0034-fix-quoting-in-list-representation-of-commands.patch
|
||||
Patch00035: 0035-fixup-fix-quoting-in-list-representation-of-commands.patch
|
||||
Patch00036: 0036-pulseaudiocheck-Add-PulseAudio-config-check-for-RHEL.patch
|
||||
Patch00037: 0037-fix-checkyumpluginsenabled-correctly-create-remediat.patch
|
||||
Patch00038: 0038-fix-rhui-consider-source-clients-always-signed.patch
|
||||
Patch00039: 0039-Ensure-that-greenboot-rpms-are-removed-during-IPU.patch
|
||||
Patch00040: 0040-Regenerate-grub-config-during-8-9-conversions.patch
|
||||
Patch00041: 0041-python-tests-deps-update-version-requirements-per-py.patch
|
||||
Patch00042: 0042-Drop-dependency-on-mock.patch
|
||||
Patch00043: 0043-remove-single-quoting-from-remediation-commands-1520.patch
|
||||
Patch00044: 0044-Update-leapp-data-data-stream-4.3-CTC-1.patch
|
||||
|
||||
Patch0001: 0001-Use-leapp.libraries.common.rpms.get_leapp_packages-w.patch
|
||||
Patch0002: 0002-fix-spell-AllowZoneDrifting-correctly.patch
|
||||
Patch0003: 0003-cli-upgrade-allow-users-to-enable-entire-experimenta.patch
|
||||
Patch0004: 0004-feat-livemode-exclude-DNF-cache-from-the-created-squ.patch
|
||||
Patch0005: 0005-livemode-cfg-add-declaration-of-livemode-config-fiel.patch
|
||||
Patch0006: 0006-livemode-cfg-use-framework-s-configurability-instead.patch
|
||||
Patch0007: 0007-fix-livemode-do-not-stop-if-dbus-already-appears-to-.patch
|
||||
Patch0008: 0008-feat-livemode-remove-the-use-of-LEAPP_DEVEL_ENABLE_L.patch
|
||||
Patch0009: 0009-spec-require-leapp-framework-6.1-for-default-CLI-val.patch
|
||||
Patch0010: 0010-docs-configuring-ipu-add-experimental-features-secti.patch
|
||||
Patch0011: 0011-docs-livemode-add-LiveMode-documentation.patch
|
||||
Patch0012: 0012-DOC-rename-configuring-ipu.md-to-envars.md.patch
|
||||
Patch0013: 0013-fix-userspacegen-add-exeception-handling-to-swapping.patch
|
||||
Patch0014: 0014-selinux-do-not-run-semodule-when-no-modules-are-sele.patch
|
||||
Patch0015: 0015-feat-ipuconfig-provide-info-about-supported-upgrade-.patch
|
||||
Patch0016: 0016-feat-upgrade_paths-include-information-about-distro-.patch
|
||||
Patch0017: 0017-cleanup-ipupaths-remove-IPUPaths-message.patch
|
||||
Patch0018: 0018-libs-version-use-supported_upgrade_paths.patch
|
||||
Patch0019: 0019-Remove-7to8-CI-tests.patch
|
||||
Patch0020: 0020-Fix-lint-in-Makefile-for-docs.patch
|
||||
Patch0021: 0021-Improve-report-of-removed-kernel-drivers.patch
|
||||
Patch0022: 0022-Improve-report-of-unsupported-network-configuration.patch
|
||||
Patch0023: 0023-DOCS-add-missing-envar-LEAPP_OVL_IMG_FS_EXT4.patch
|
||||
Patch0024: 0024-data-update-data-files-stream-3.3-1358.patch
|
||||
Patch0025: 0025-Add-RHEL-10.1-and-9.7-product-certificates.patch
|
||||
Patch0026: 0026-Add-handling-of-shorten-PCI-ID-and-lowercases.patch
|
||||
Patch0027: 0027-Prevent-device-list-from-containing-incorrent-conten.patch
|
||||
Patch0028: 0028-feat-command_utils-allow-missing-minor-major-version.patch
|
||||
Patch0029: 0029-refactor-versions-config-rename-_simple_versions.patch
|
||||
Patch0030: 0030-fix-lib-version-broken-_validate_version-on-RHEL-10.patch
|
||||
Patch0031: 0031-upgrade_paths-add-information-about-centos-virtual-v.patch
|
||||
Patch0032: 0032-models-ipuconfig-extend-Version-class-to-contain-vir.patch
|
||||
Patch0033: 0033-libs-common-version-autocorrect-centos-versions-into.patch
|
||||
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
|
||||
|
||||
# CTC1 Candidate2
|
||||
Patch0038: 0038-Makefile-Non-zero-exit-code-on-failed-tests-in-conta.patch
|
||||
Patch0039: 0039-CI-Unit-tests-Rename-tasks-tests-executions.patch
|
||||
Patch0040: 0040-Fix-parsing-of-the-kernel-cmdline.patch
|
||||
Patch0041: 0041-repomap-Process-repositories-based-on-distro.patch
|
||||
Patch0042: 0042-Update-the-upgrade-data-files-stream-4.0.patch
|
||||
Patch0043: 0043-unit-tests-suppress-deprecation-warning-for-is_rhel_.patch
|
||||
Patch0100: 0100-Allow-upgrades-of-almalinux-AlmaLinux-OS.patch
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
@ -163,7 +166,7 @@ Requires: leapp-repository-dependencies = %{leapp_repo_deps}
|
||||
|
||||
# IMPORTANT: this is capability provided by the leapp framework rpm.
|
||||
# Check that 'version' instead of the real framework rpm version.
|
||||
Requires: leapp-framework >= 6.5
|
||||
Requires: leapp-framework >= 6.1
|
||||
|
||||
# Since we provide sub-commands for the leapp utility, we expect the leapp
|
||||
# tool to be installed as well.
|
||||
@ -173,10 +176,6 @@ Requires: leapp
|
||||
# uncompressing redhat-release package from the ISO.
|
||||
Requires: cpio
|
||||
|
||||
# Subpackage for managing fapolicyd rules for %{lpr_name} installed only if
|
||||
# fapolicyd is present on the system
|
||||
Requires: (%{lpr_name}-fapolicyd = %{version}-%{release} if fapolicyd)
|
||||
|
||||
# The leapp-repository rpm is renamed to %%{lpr_name}
|
||||
Obsoletes: leapp-repository < 0.14.0-5
|
||||
Provides: leapp-repository = %{version}-%{release}
|
||||
@ -274,15 +273,6 @@ Requires: libdb-utils
|
||||
%{summary}
|
||||
|
||||
|
||||
%package -n %{lpr_name}-fapolicyd
|
||||
Summary: Manage fapolicyd rules for %{lpr_name} during the upgrade
|
||||
|
||||
Requires: fapolicyd
|
||||
|
||||
%description -n %{lpr_name}-fapolicyd
|
||||
%{summary}
|
||||
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}
|
||||
%setup -q -n %{name}-%{version} -D -T -a 1
|
||||
@ -332,7 +322,8 @@ Requires: fapolicyd
|
||||
%patch -P 0041 -p1
|
||||
%patch -P 0042 -p1
|
||||
%patch -P 0043 -p1
|
||||
%patch -P 0044 -p1
|
||||
%patch -P 0100 -p1
|
||||
|
||||
|
||||
%build
|
||||
cp -a leapp*deps*el%{next_major_ver}.noarch.rpm repos/system_upgrade/%{repo_shortname}/files/bundled-rpms/
|
||||
@ -349,10 +340,6 @@ install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/files/
|
||||
install -m 0644 etc/leapp/transaction/* %{buildroot}%{_sysconfdir}/leapp/transaction
|
||||
install -m 0644 etc/leapp/files/* %{buildroot}%{_sysconfdir}/leapp/files
|
||||
|
||||
# install rules necessary for fapolicy
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/fapolicyd/rules.d/
|
||||
install -m 0644 etc/fapolicyd/rules.d/31-leapp-repository.rules %{buildroot}%{_sysconfdir}/fapolicyd/rules.d
|
||||
|
||||
# uncomment to install existing configs if any exists
|
||||
#install -m 0644 etc/leapp/actor_conf.d/* %%{buildroot}%%{_sysconfdir}/leapp/actor_conf.d
|
||||
|
||||
@ -395,12 +382,6 @@ done;
|
||||
%endif
|
||||
|
||||
|
||||
%posttrans -n %{lpr_name}-fapolicyd
|
||||
if systemctl is-active --quiet fapolicyd; then
|
||||
systemctl restart fapolicyd
|
||||
fi
|
||||
|
||||
|
||||
%files -n %{lpr_name}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
@ -422,97 +403,12 @@ fi
|
||||
%files -n %{lpr_name}-deps
|
||||
# no files here
|
||||
|
||||
|
||||
%files -n %{lpr_name}-fapolicyd
|
||||
%attr(644, root, fapolicyd) %config %{_sysconfdir}/fapolicyd/rules.d/31-leapp-repository.rules
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Apr 17 2026 Matej Matuska <mmatuska@redhat.com> - 0.24.0-2
|
||||
- Introduce new upgrade paths 8.10 -> 9.9
|
||||
- Requires leapp-framework 6.5+
|
||||
- Modify keys for several reports that have been inconsistent between major releases. The keys are now independent of the used upgrade path.
|
||||
- Enable the logrotate timer automatically
|
||||
- Fix AVC SELinux warnings caused by leapp execution
|
||||
- Fix the upgrade with LiveMode on systems with FIPS
|
||||
- Livemode: Fix the upgrade on systems where the generated live image is not in rootfs
|
||||
- Fix failing upgrades with hugetlbfs file systems specified in FSTAB
|
||||
- Fix scan of physical network interfaces and ethX detection
|
||||
- Fix detection of network interfaces with biosdevname naming on Dell machines
|
||||
- Fix quoting in list representation of remediation commands
|
||||
- Consider RHUI source clients as signed by distribution vendor
|
||||
- Ensure that greenboot packages are removed during the upgrade
|
||||
- Respect names of distributions used for the IPU in preupgrade reports
|
||||
- Minor updates in reports
|
||||
- Regenerate GRUB2 config during conversions
|
||||
- Update leapp data files
|
||||
- Introduce DISTRO_REPORT_NAMES in the distro library to provide unified names for linux distributions for the use in leapp reports
|
||||
- Resolves: RHEL-3370, RHEL-17361, RHEL-104379, RHEL-110712, RHEL-129571, RHEL-130948
|
||||
* Tue Jul 22 2025 Yuriy Kohut <ykohut@almalinux.org> - 0.22.0-4.alma.2
|
||||
- Support of AlmaLinux OS. Phase 1 (update 1)
|
||||
|
||||
* Tue Feb 10 2026 Matej Matuska <mmatuska@redhat.com> - 0.24.0-1
|
||||
- Rebase to new upstream 0.24.0
|
||||
- Introduce new IPU path 8.10 -> 9.8
|
||||
- Remove obsoleted IPU paths
|
||||
- Fix the upgrade for systems with installed kernel-rt
|
||||
- Enable php:8.2 module stream if enabled on the source system
|
||||
- Skip check for required baseos & appstream repos when upgrading from CS 8
|
||||
- Improve the error message when a problematic DNF repository definition is detected
|
||||
- Process enabled DNF module-streams correctly during the upgrade
|
||||
- Fix the leapp rerun command when upgrading using LiveMode
|
||||
- Ignore trailing slashes when checking that required mountpoints are persistent
|
||||
- Wait until filesystems defined in FSTAB are initialized and mounted when booting into the upgrade environment
|
||||
- Drop inhibitor for use of LiveMode on aarch64, s390x, ppcle64 architectures
|
||||
- LiveMode: Do not install RPMs that are not essential in the initramfs by default
|
||||
- Added scan and checks for NVMe devices, inhibiting upgrades on known problematic setups
|
||||
- Handle the upgrade on systems with NVMe-FC storage
|
||||
- Migrate the UEFI configuration when converting to RHEL
|
||||
- Inhibit the upgrade when converting system to a different linux distribution with enabled Secure Boot
|
||||
- Resolves: RHEL-128267, RHEL-95215, RHEL-102361, RHEL-46807, RHEL-100961, RHEL-42609, RHEL-33661, RHEL-19249, RHEL-119516
|
||||
|
||||
* Wed Dec 17 2025 Matej Matuska <mmatuska@redhat.com> - 0.23.0-3
|
||||
- Fix handling of LVM and Multipath during the upgrade
|
||||
- Fix remediation command for making symlinks in root directory relative
|
||||
- Remove RPM GPG keys of the source distribution when upgrading and converting the system
|
||||
- Replace distro specific packages during upgrade and conversion
|
||||
- Improve error message when scanning invalid SSHD configuration
|
||||
- Update the leapp data files
|
||||
- Minor changes in logs and reports
|
||||
- Resolves: RHEL-14712, RHEL-30447, RHEL-19247, RHEL-127066, RHEL-124923, RHEL-119516
|
||||
|
||||
* Thu Nov 13 2025 Karolina Kula <kkula@redhat.com> - 0.23.0-2
|
||||
- Requires leapp-framework 6.2+
|
||||
- Detect potentially harmful third party python modules for the target python version
|
||||
- Fix detection of encrypted Ceph OSD containers
|
||||
- Fix unlocking of LUKS devices when applied on non-rootfs file systems
|
||||
- Inhibit the upgrade if pluginpath is configured explicitly in DNF
|
||||
- Introduce `--target-os` option to specify target distribution for possible conversion during the upgrade
|
||||
- Introduce the `--target-version` alias for the `--target` option
|
||||
- Minor changes in logs and reports
|
||||
- Modernize the storage initialization when booting to the upgrade environment
|
||||
- Prevent sssdupdate actor from rising errors that could stop the upgrade
|
||||
- Respect repomapping on CentOS-like distributions
|
||||
- Respect repomapping when converting the system to different Linux distribution
|
||||
- Skip empty lines when parsing dumped DNF config to prevent confusing warning log
|
||||
- Cover JBoss EAP repositories for the upgrade
|
||||
- Update the leapp data files
|
||||
- Resolves: RHEL-25838, RHEL-35446, RHEL-69601, RHEL-71882, RHEL-90098, RHEL-120328, RHEL-123886
|
||||
|
||||
* Thu Aug 14 2025 Karolina Kula <kkula@redhat.com> - 0.23.0-1
|
||||
- Rebase to new upstream 0.23.0
|
||||
- Enable in-place upgrades on CentOS Stream systems
|
||||
- Introduce leapp-upgrade-el8toel9-fapolicyd subpackage with fapolicyd rules for in-place upgrades
|
||||
- Ignore Red Hat subscription-manager actions on non-RHEL distros
|
||||
- Update leapp upgrade data files
|
||||
- Resolves: RHEL-65599, RHEL-67627
|
||||
|
||||
* Fri Jul 18 2025 Karolina Kula <kkula@redhat.com> - 0.22.0-5
|
||||
- Fix broken bootloader on Azure hybrid images for systems previously upgraded from RHEL 7
|
||||
- Load DNF configuration correctly when using DNF libraries
|
||||
- Disable localpkg_gpgcheck during the upgrade if set to allow installation of bundled leapp and leapp-repository deps packages
|
||||
- Add actor with recommendations for upgrade of MySQL
|
||||
- The HybridImage model has been replaced by ConvertGrubenvTask
|
||||
- Check the input format of the target version properly
|
||||
- Resolves: RHEL-5459, RHEL-38255, RHEL-39095, RHEL-47472, RHEL-96238
|
||||
* Fri Jun 27 2025 Yuriy Kohut <ykohut@almalinux.org> - 0.22.0-4.alma.1
|
||||
- Support of AlmaLinux OS. Phase 1
|
||||
|
||||
* Thu Jun 05 2025 Karolina Kula <kkula@redhat.com> - 0.22.0-4
|
||||
- Fix parsing of the kernel cmdline
|
||||
@ -1332,4 +1228,3 @@ fi
|
||||
* Wed Nov 07 2018 Petr Stodulka <pstodulk@redhat.com> - 0.3-1
|
||||
- Initial RPM
|
||||
Resolves: #1636481
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user