dm: Fix comparing DM RAID member devices UUID (#1583351)
This commit is contained in:
parent
d8981421df
commit
a0c2a70de0
27
0001-Fix-comparing-DM-RAID-member-devices-UUID.patch
Normal file
27
0001-Fix-comparing-DM-RAID-member-devices-UUID.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 2da13152619ee7233650339797657b45088b2219 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vojtech Trefny <vtrefny@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2020 09:44:29 +0200
|
||||||
|
Subject: [PATCH] dm: Fix comparing DM RAID member devices UUID
|
||||||
|
|
||||||
|
There is no "UUID" property in UDev we must use the "ID_FS_UUID"
|
||||||
|
one.
|
||||||
|
This comparison works only because most DM RAID members don't have
|
||||||
|
UUID so the check is skipped, but it fails for DDF RAID members
|
||||||
|
which have a special GUID/UUID in UDev database.
|
||||||
|
---
|
||||||
|
src/plugins/dm.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/dm.c b/src/plugins/dm.c
|
||||||
|
index a6412028..4ab0d2a4 100644
|
||||||
|
--- a/src/plugins/dm.c
|
||||||
|
+++ b/src/plugins/dm.c
|
||||||
|
@@ -482,7 +482,7 @@ static gboolean raid_dev_matches_spec (struct raid_dev *raid_dev, const gchar *n
|
||||||
|
|
||||||
|
context = udev_new ();
|
||||||
|
device = udev_device_new_from_subsystem_sysname (context, "block", dev_name);
|
||||||
|
- dev_uuid = udev_device_get_property_value (device, "UUID");
|
||||||
|
+ dev_uuid = udev_device_get_property_value (device, "ID_FS_UUID");
|
||||||
|
major_str = udev_device_get_property_value (device, "MAJOR");
|
||||||
|
minor_str = udev_device_get_property_value (device, "MINOR");
|
||||||
|
|
@ -125,12 +125,13 @@
|
|||||||
|
|
||||||
Name: libblockdev
|
Name: libblockdev
|
||||||
Version: 2.24
|
Version: 2.24
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: A library for low-level manipulation with block devices
|
Summary: A library for low-level manipulation with block devices
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/storaged-project/libblockdev
|
URL: https://github.com/storaged-project/libblockdev
|
||||||
Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz
|
||||||
Patch0: libblockdev-gcc11.patch
|
Patch0: libblockdev-gcc11.patch
|
||||||
|
Patch1: 0001-Fix-comparing-DM-RAID-member-devices-UUID.patch
|
||||||
|
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
%if %{with_gi}
|
%if %{with_gi}
|
||||||
@ -682,6 +683,7 @@ A meta-package that pulls all the libblockdev plugins as dependencies.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -ivf
|
autoreconf -ivf
|
||||||
@ -985,6 +987,9 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
|
|||||||
%files plugins-all
|
%files plugins-all
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 20 2020 Vojtech Trefny <vtrefny@redhat.com> - 2.24-5
|
||||||
|
- dm: Fix comparing DM RAID member devices UUID
|
||||||
|
|
||||||
* Wed Aug 19 2020 Jeff Law <law@redhat.com> - 2.24-4
|
* Wed Aug 19 2020 Jeff Law <law@redhat.com> - 2.24-4
|
||||||
- Work around gcc-11 false positive warning
|
- Work around gcc-11 false positive warning
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user