Update ELevate patch:

- add EuroLinux to the list of distributions, where grub config should
- update actor.py to support NVMe device enumeration

Bump the package release.
This commit is contained in:
Yuriy Kohut 2024-04-23 19:02:06 +03:00
parent 6bc680c702
commit fb2067ea90
2 changed files with 26 additions and 5 deletions

View File

@ -4432,10 +4432,10 @@ index 00000000..e0058e6d
+ """
+ return os.path.isfile(NGINX_BINARY)
diff --git a/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py b/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py
index f42909f0..2728cb4c 100644
index f42909f0..9564c5bf 100644
--- a/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py
+++ b/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py
@@ -1,17 +1,102 @@
@@ -1,17 +1,119 @@
+import os
+import re
+
@ -4475,6 +4475,7 @@ index f42909f0..2728cb4c 100644
+ 'Rocky Linux': 'rocky',
+ 'Scientific Linux': 'redhat',
+ 'CloudLinux': 'centos',
+ 'EuroLinux': 'eurolinux',
+ }
+
+ efi_shimname_dict = {
@ -4483,6 +4484,22 @@ index f42909f0..2728cb4c 100644
+ }
+
+ def devparts(dev):
+ """
+ NVMe block devices aren't named like SCSI/ATA/etc block devices and must be parsed differently.
+ SCSI/ATA/etc devices have a syntax resembling /dev/sdb4 for the 4th partition on the 2nd disk.
+ NVMe devices have a syntax resembling /dev/nvme0n2p4 for the 4th partition on the 2nd disk.
+ """
+ if '/dev/nvme' in dev:
+ """
+ NVMe
+ """
+ part = next(re.finditer(r'p\d+$', dev)).group(0)
+ dev = dev[:-len(part)]
+ part = part[1:]
+ else:
+ """
+ Non-NVMe (SCSI, ATA, etc)
+ """
+ part = next(re.finditer(r'\d+$', dev)).group(0)
+ dev = dev[:-len(part)]
+ return [dev, part];

View File

@ -43,7 +43,7 @@ py2_byte_compile "%1" "%2"}
Epoch: 1
Name: leapp-repository
Version: 0.16.0
Release: 6%{?dist}.elevate.19
Release: 6%{?dist}.elevate.20
Summary: Repositories for leapp
License: ASL 2.0
@ -250,6 +250,10 @@ done;
# no files here
%changelog
* Tue apr 23 2024 Yuriy Kohut <ykohut@almalinux.org> - 0.16.0-6.elevate.20
- Add EuroLinux to the list of distributions, where grub config should be created in case if EFI
- Update actor.py to support NVMe device enumeration
* Wed Aug 17 2022 Andrew Lukoshko <alukoshko@almalinux.org> - 0.16.0-6.elevate.2
- Fix UEFI boot entries