diff --git a/0002-Fix-scanning-partitions-on-RAID-arrays-2269133.patch b/0002-Fix-scanning-partitions-on-RAID-arrays-2269133.patch new file mode 100644 index 0000000..632abc3 --- /dev/null +++ b/0002-Fix-scanning-partitions-on-RAID-arrays-2269133.patch @@ -0,0 +1,43 @@ +From 84b5ee50cadc4a6caf2fd3e608886c01472d6555 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 12 Mar 2024 14:22:22 +0100 +Subject: [PATCH] Fix scanning partitions on RAID arrays (#2269133) + +We cannot use get_device_by_device_id here because we get name +from udev. +--- + blivet/populator/helpers/partition.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/blivet/populator/helpers/partition.py b/blivet/populator/helpers/partition.py +index 2548f0e9..9257407e 100644 +--- a/blivet/populator/helpers/partition.py ++++ b/blivet/populator/helpers/partition.py +@@ -46,21 +46,21 @@ class PartitionDevicePopulator(DevicePopulator): + log_method_call(self, name=name) + sysfs_path = udev.device_get_sysfs_path(self.data) + +- device = self._devicetree.get_device_by_device_id(name) ++ device = self._devicetree.get_device_by_name(name) + if device: + return device + + disk = None + disk_name = udev.device_get_partition_disk(self.data) + if disk_name: +- disk = self._devicetree.get_device_by_device_id(disk_name) ++ disk = self._devicetree.get_device_by_name(disk_name) + if disk is None: + # create a device instance for the disk + disk_info = six.next((i for i in udev.get_devices() + if udev.device_get_name(i) == disk_name), None) + if disk_info is not None: + self._devicetree.handle_device(disk_info) +- disk = self._devicetree.get_device_by_device_id(disk_name) ++ disk = self._devicetree.get_device_by_name(disk_name) + + if disk is None: + # if the disk is still not in the tree something has gone wrong +-- +2.44.0 + diff --git a/python-blivet.spec b/python-blivet.spec index 1eb5f17..ef53c33 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -5,7 +5,7 @@ Version: 3.9.1 #%%global prerelease .b2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 -Release: 1%{?prerelease}%{?dist} +Release: 2%{?prerelease}%{?dist} Epoch: 1 License: LGPL-2.1-or-later %global realname blivet @@ -17,6 +17,8 @@ Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realver Patch0: 0001-remove-btrfs-plugin.patch %endif +Patch1: 0002-Fix-scanning-partitions-on-RAID-arrays-2269133.patch + # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). %global partedver 1.8.1 @@ -114,6 +116,9 @@ make DESTDIR=%{buildroot} install %{python3_sitelib}/* %changelog +* Tue Mar 12 2024 Vojtech Trefny - 3.9.1-2 +- Fix scanning partitions on RAID arrays (#2269133) + * Tue Feb 27 2024 Vojtech Trefny - 3.9.1-1 - Try to assemble MD arrays during populate (#2236356) (vtrefny) - Fix UnboundLocalError in MD populator (vtrefny)