diff --git a/0003-Fix-UnboundLocalError-in-MD-populator.patch b/0003-Fix-UnboundLocalError-in-MD-populator.patch new file mode 100644 index 0000000..c81c78f --- /dev/null +++ b/0003-Fix-UnboundLocalError-in-MD-populator.patch @@ -0,0 +1,26 @@ +From c141179b18984c5a96cd605c29df9716c714afe8 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 12 Feb 2024 14:49:23 +0100 +Subject: [PATCH] Fix UnboundLocalError in MD populator + +Follow-up for a73bb08255a97cf4f16c764ef09341a2421318d6 +--- + blivet/populator/helpers/mdraid.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/blivet/populator/helpers/mdraid.py b/blivet/populator/helpers/mdraid.py +index 22ca5195..c552aace 100644 +--- a/blivet/populator/helpers/mdraid.py ++++ b/blivet/populator/helpers/mdraid.py +@@ -60,6 +60,8 @@ class MDDevicePopulator(DevicePopulator): + # try to get the device again now that we've got all the parents + if name: + device = self._devicetree.get_device_by_device_id("MDRAID-" + name, incomplete=flags.allow_imperfect_devices) ++ else: ++ device = None + + if device is None: + try: +-- +2.43.0 + diff --git a/python-blivet.spec b/python-blivet.spec index 8181415..991d441 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -5,7 +5,7 @@ Version: 3.9.0 #%%global prerelease .b2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 -Release: 2%{?prerelease}%{?dist} +Release: 3%{?prerelease}%{?dist} Epoch: 1 License: LGPL-2.1-or-later %global realname blivet @@ -18,6 +18,7 @@ Patch0: 0001-remove-btrfs-plugin.patch %endif Patch1: 0002-Fix-crash-when-scanning-degraded-not-fully-assembled.patch +Patch2: 0003-Fix-UnboundLocalError-in-MD-populator.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -116,6 +117,9 @@ make DESTDIR=%{buildroot} install %{python3_sitelib}/* %changelog +* Mon Feb 12 2024 Vojtech Trefny - 3.9.0-3 +- Fix UnboundLocalError in MD populator (#2263668) + * Tue Feb 06 2024 Vojtech Trefny - 3.9.0-2 - Fix crash when scanning degraded/not fully assembled MD arrays