diff --git a/backport-Fix-expected-exception-type-when-activating-devices-.patch b/backport-Fix-expected-exception-type-when-activating-devices-.patch new file mode 100644 index 0000000000000000000000000000000000000000..b666819a24d0663734a17b19e545926f5cdf33ac --- /dev/null +++ b/backport-Fix-expected-exception-type-when-activating-devices-.patch @@ -0,0 +1,58 @@ +From 96e8288367b5e2b6de27fbd33b47672131f6b982 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 29 Apr 2025 08:09:06 +0200 +Subject: [PATCH] Fix expected exception type when activating devices in + populor + +We are no longer raising libblockdev exceptions in our public API +calls (see #1014) so when calling setup() ourselves we need to +catch our exceptions instead of libblockdev ones as well. + +Resolves: rhbz#2362743 + +Conflict: NA +Reference: https://github.com/storaged-project/blivet/commit/96e8288367b5e2b6de27fbd33b47672131f6b982 + +--- + blivet/populator/helpers/luks.py | 2 +- + blivet/populator/helpers/lvm.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/blivet/populator/helpers/luks.py b/blivet/populator/helpers/luks.py +index 02ba3d890..e1360ce81 100644 +--- a/blivet/populator/helpers/luks.py ++++ b/blivet/populator/helpers/luks.py +@@ -175,7 +175,7 @@ def run(self): + self.device.format.passphrase = passphrase + try: + self.device.format.setup() +- except blockdev.BlockDevError: ++ except LUKSError: + self.device.format.passphrase = None + else: + break +diff --git a/blivet/populator/helpers/lvm.py b/blivet/populator/helpers/lvm.py +index 7ebce0636..0afc5266b 100644 +--- a/blivet/populator/helpers/lvm.py ++++ b/blivet/populator/helpers/lvm.py +@@ -29,7 +29,7 @@ + from ... import udev + from ...devicelibs import lvm + from ...devices.lvm import LVMVolumeGroupDevice, LVMLogicalVolumeDevice, LVMInternalLVtype +-from ...errors import DeviceTreeError, DuplicateVGError ++from ...errors import DeviceTreeError, DuplicateVGError, LVMError + from ...flags import flags + from ...size import Size + from ...storage_log import log_method_call +@@ -295,7 +295,7 @@ def add_lv(lv): + if flags.auto_dev_updates: + try: + lv_device.setup() +- except blockdev.LVMError: ++ except LVMError: + log.warning("failed to activate lv %s", lv_device.name) + lv_device.controllable = False + +-- +2.33.0 + diff --git a/python-blivet.spec b/python-blivet.spec index d6fa4e576c120ba066e76bc1e79d9ef3eb5e3af2..8fc5b4bb0bccb308543590a41ad91757466c566b 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -3,7 +3,7 @@ Name: python-blivet Version: 3.8.2 -Release: 10 +Release: 11 Epoch: 1 Summary: A python module for system storage configuration License: LGPL-2.1-or-later @@ -26,6 +26,7 @@ patch6001: backport-Ignore-invalid-empty-UUIDs-for-NVMe-namespaces.patch patch9003: bugfix-fix-empty-UUIDs-for-NVMe-namespaces.patch patch9004: bugfix-revert-Prefer-UUID-for-fstab-spec-for-DM-devices-too.patch patch6002: backport-Fix-intel-biosraid-cant-get-device-name-causing-crashed.patch +patch6003: backport-Fix-expected-exception-type-when-activating-devices-.patch %description The python-blivet package is a python module for examining and modifying @@ -128,6 +129,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install %doc README.md %changelog +* Mon Aug 25 2025 sunhai - 1:3.8.2-11 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Fix expected exception type when activating devices in populor + * Sun Mar 09 2025 yueyuankun - 1:3.8.2-10 - Type:update - ID:NA