From 3579f4fb42f5854f2ccf7236a0e3eabb98444b31 Mon Sep 17 00:00:00 2001 From: sun_hai_10 Date: Fri, 10 May 2024 01:52:09 +0800 Subject: [PATCH] fix empty UUIDs for NVMe namespaces (cherry picked from commit 0ba11ffab838f895364cd6dd9c696c4242086efe) --- ...-fix-empty-UUIDs-for-NVMe-namespaces.patch | 25 +++++++++++++++++++ python-blivet.spec | 9 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 bugfix-fix-empty-UUIDs-for-NVMe-namespaces.patch diff --git a/bugfix-fix-empty-UUIDs-for-NVMe-namespaces.patch b/bugfix-fix-empty-UUIDs-for-NVMe-namespaces.patch new file mode 100644 index 0000000..4c1e334 --- /dev/null +++ b/bugfix-fix-empty-UUIDs-for-NVMe-namespaces.patch @@ -0,0 +1,25 @@ +From f1aa249bc848634ccd1d6694b59321eac31b5f0e Mon Sep 17 00:00:00 2001 +From: sunhai +Date: Wed, 17 Apr 2024 00:20:07 +0800 +Subject: [PATCH] fix empty UUIDs for NVMe namespaces + +--- + blivet/populator/helpers/disk.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blivet/populator/helpers/disk.py b/blivet/populator/helpers/disk.py +index 43c902a..b9ec843 100644 +--- a/blivet/populator/helpers/disk.py ++++ b/blivet/populator/helpers/disk.py +@@ -287,7 +287,7 @@ class NVMeNamespaceDevicePopulator(DiskDevicePopulator): + kwargs["eui64"] = ninfo.eui64 + kwargs["nguid"] = ninfo.nguid + +- if ninfo.uuid and ninfo.uuid != uuid.UUID(int=0): ++ if ninfo.uuid and str(ninfo.uuid) != str(uuid.UUID(int=0)): + kwargs["uuid"] = ninfo.uuid + else: + kwargs["uuid"] = None +-- +2.43.0 + diff --git a/python-blivet.spec b/python-blivet.spec index dee2357..3d5710f 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -3,7 +3,7 @@ Name: python-blivet Version: 3.8.2 -Release: 4 +Release: 5 Epoch: 1 Summary: A python module for system storage configuration License: LGPL-2.1-or-later @@ -25,6 +25,7 @@ patch9001: blivet-3.4.2-sw.patch patch9002: Incomplete-Chineseization-of-disk-mount.patch patch6001: backport-Ignore-invalid-empty-UUIDs-for-NVMe-namespaces.patch +patch9003: bugfix-fix-empty-UUIDs-for-NVMe-namespaces.patch %description The python-blivet package is a python module for examining and modifying @@ -126,6 +127,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install %doc README.md %changelog +* Fri May 10 2024 sunhai - 1:3.8.2-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix empty UUIDs for NVMe namespaces + * Mon Apr 15 2024 sunhai - 1:3.8.2-4 - Type:bugfix - ID:NA -- Gitee