Compare commits
10 Commits
5dd22d467b
...
094fcd37d3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
094fcd37d3 | ||
|
|
cbc8693957 | ||
|
|
47ab530f39 | ||
|
|
3aab25856f | ||
|
|
ac6647c8c9 | ||
|
|
d1dd1c6f85 | ||
|
|
7acab4dc7b | ||
|
|
b4b8f48049 | ||
|
|
cdcbb61959 | ||
|
|
659121b959 |
72
0001-mdraid-Expose-consistency_policy-sysfs-value.patch
Normal file
72
0001-mdraid-Expose-consistency_policy-sysfs-value.patch
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
From d33d1dda277a78dcf63574c567ca24d7c3462f49 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Vollmer <mvollmer@redhat.com>
|
||||||
|
Date: Tue, 30 Apr 2024 14:39:13 +0300
|
||||||
|
Subject: [PATCH] mdraid: Expose "consistency_policy" sysfs value
|
||||||
|
|
||||||
|
---
|
||||||
|
data/org.freedesktop.UDisks2.xml | 12 ++++++++++++
|
||||||
|
src/udiskslinuxmdraid.c | 4 ++++
|
||||||
|
2 files changed, 16 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/org.freedesktop.UDisks2.xml b/data/org.freedesktop.UDisks2.xml
|
||||||
|
index 53194c7..5d34901 100644
|
||||||
|
--- a/data/org.freedesktop.UDisks2.xml
|
||||||
|
+++ b/data/org.freedesktop.UDisks2.xml
|
||||||
|
@@ -3137,6 +3137,18 @@
|
||||||
|
-->
|
||||||
|
<property name="Degraded" type="u" access="read"/>
|
||||||
|
|
||||||
|
+ <!-- ConsistencyPolicy:
|
||||||
|
+ @since: 2.11.0
|
||||||
|
+ The consistency policy of the array.
|
||||||
|
+
|
||||||
|
+ If the RAID array does not support consistency policies (for
|
||||||
|
+ example RAID-0 arrays), this is empty.
|
||||||
|
+
|
||||||
|
+ This property corresponds to the
|
||||||
|
+ <literal>consistency_policy</literal> sysfs file.
|
||||||
|
+ -->
|
||||||
|
+ <property name="ConsistencyPolicy" type="s" access="read"/>
|
||||||
|
+
|
||||||
|
<!-- BitmapLocation:
|
||||||
|
The location of a write-intent bitmap (empty if the array is not running), if any.
|
||||||
|
|
||||||
|
diff --git a/src/udiskslinuxmdraid.c b/src/udiskslinuxmdraid.c
|
||||||
|
index 900cd65..46ee77e 100644
|
||||||
|
--- a/src/udiskslinuxmdraid.c
|
||||||
|
+++ b/src/udiskslinuxmdraid.c
|
||||||
|
@@ -237,6 +237,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
|
||||||
|
const gchar *name = NULL;
|
||||||
|
gchar *sync_action = NULL;
|
||||||
|
gchar *sync_completed = NULL;
|
||||||
|
+ gchar *consistency_policy = NULL;
|
||||||
|
gchar *bitmap_location = NULL;
|
||||||
|
guint degraded = 0;
|
||||||
|
guint64 chunk_size = 0;
|
||||||
|
@@ -316,6 +317,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
|
||||||
|
degraded = udisks_linux_device_read_sysfs_attr_as_int (raid_device, "md/degraded", NULL);
|
||||||
|
sync_action = udisks_linux_device_read_sysfs_attr (raid_device, "md/sync_action", NULL);
|
||||||
|
sync_completed = udisks_linux_device_read_sysfs_attr (raid_device, "md/sync_completed", NULL);
|
||||||
|
+ consistency_policy = udisks_linux_device_read_sysfs_attr (raid_device, "md/consistency_policy", NULL);
|
||||||
|
bitmap_location = udisks_linux_device_read_sysfs_attr (raid_device, "md/bitmap/location", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -326,6 +328,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
|
||||||
|
}
|
||||||
|
udisks_mdraid_set_degraded (iface, degraded);
|
||||||
|
udisks_mdraid_set_sync_action (iface, sync_action);
|
||||||
|
+ udisks_mdraid_set_consistency_policy (iface, consistency_policy);
|
||||||
|
udisks_mdraid_set_bitmap_location (iface, bitmap_location);
|
||||||
|
udisks_mdraid_set_chunk_size (iface, chunk_size);
|
||||||
|
|
||||||
|
@@ -517,6 +520,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
|
||||||
|
bd_md_examine_data_free (raid_data);
|
||||||
|
g_free (sync_completed);
|
||||||
|
g_free (sync_action);
|
||||||
|
+ g_free (consistency_policy);
|
||||||
|
g_free (bitmap_location);
|
||||||
|
g_list_free_full (member_devices, g_object_unref);
|
||||||
|
g_clear_object (&raid_device);
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
115
0002-udiskslinuxmanager-use-dbus-interface-after-free.patch
Normal file
115
0002-udiskslinuxmanager-use-dbus-interface-after-free.patch
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
From 3dc036fb5045fc068c6abfbe4e62d0871d7ca82a Mon Sep 17 00:00:00 2001
|
||||||
|
From: xinpeng wang <wangxinpeng@uniontech.com>
|
||||||
|
Date: Tue, 18 Jun 2024 16:32:39 +0800
|
||||||
|
Subject: [PATCH] udiskslinuxmanager:use dbus interface after free
|
||||||
|
|
||||||
|
In handle_get_block_devices, call get_block_objects to obtain iface_block_device
|
||||||
|
of all current UDisksLinuxBlockObject, and then obtain the corresponding
|
||||||
|
UDisksLinuxBlockObject's object_path through iface_block_device.iface_block_device
|
||||||
|
is a GDBusInterfaceSkeleton, which saves the object through
|
||||||
|
g_dbus_interface_skeleton_set_object. g_object_add_weak_pointer is used here. This
|
||||||
|
function is not thread-safe.At this time, if other threads are releasing the object,
|
||||||
|
the program will crash.
|
||||||
|
This scene can be reproduced by quickly plugging and unplugging the USB disk.
|
||||||
|
The core is as follows (the redundant stack is omitted):
|
||||||
|
When accessing object in thread 1, the object is released by thread 2
|
||||||
|
info threads
|
||||||
|
Id Target Id Frame
|
||||||
|
* 1 Thread 0x7f80979e70 (LWP 24559) 0x0000007f8a48dda0 in
|
||||||
|
g_dbus_object_get_object_path (object=0x0) at ../../../gio/gdbusobject.c:109
|
||||||
|
2 Thread 0x7f88a43010 (LWP 1159) 0x0000007f8a0a6ae8 in __GI___libc_free
|
||||||
|
(mem=0x556a919c80) at malloc.c:3093
|
||||||
|
|
||||||
|
thread 1
|
||||||
|
(gdb) bt
|
||||||
|
0 0x0000007f8a48dda0 in g_dbus_object_get_object_path (object=0x0) at
|
||||||
|
../../../gio/gdbusobject.c:109
|
||||||
|
1 0x000000556a56911c in handle_get_block_devices (object=0x7f7c007ed0, invocation=
|
||||||
|
0x7f74016f20 [GDBusMethodInvocation], arg_options=<optimized out>)
|
||||||
|
at udiskslinuxmanager.c:1063
|
||||||
|
|
||||||
|
(gdb) p ((GObject*)(blocks_p->data))->ref_count
|
||||||
|
$3 = 1
|
||||||
|
(gdb) p *((GDBusInterfaceSkeleton*)(blocks_p->data))
|
||||||
|
$6 = {parent_instance = {g_type_instance = {g_class = 0x556a64e740
|
||||||
|
[g_type: UDisksLinuxBlock/UDisksBlockSkeleton/GDBusInterfaceSkeleton]}, ref_count = 1,
|
||||||
|
qdata = 0x0}, priv = 0x7f7c004ac0}
|
||||||
|
(gdb) p *((GDBusInterfaceSkeleton*)(blocks_p->data))->priv
|
||||||
|
$7 = {lock = {p = 0x0, i = {0, 0}}, object = 0x0,
|
||||||
|
flags = G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD,
|
||||||
|
connections = 0x0, object_path = 0x0, hooked_vtable = 0x556a62b9f0}
|
||||||
|
|
||||||
|
thread 2
|
||||||
|
(gdb) bt
|
||||||
|
0 0x0000007f8a0a6ae8 in __GI___libc_free (mem=0x556a919c80) at malloc.c:3093
|
||||||
|
1 0x0000007f89ff1224 in () at /lib/aarch64-linux-gnu/libudev.so.1
|
||||||
|
2 0x0000007f89ff1348 in () at /lib/aarch64-linux-gnu/libudev.so.1
|
||||||
|
3 0x0000007f89ff5520 in () at /lib/aarch64-linux-gnu/libudev.so.1
|
||||||
|
4 0x0000007f89fff878 in udev_device_unref () at /lib/aarch64-linux-gnu/libudev.so.1
|
||||||
|
5 0x0000007f8a7aeb74 in () at /lib/aarch64-linux-gnu/libgudev-1.0.so.0
|
||||||
|
6 0x0000007f8a3193f8 in g_object_unref (_object=<optimized out>) at
|
||||||
|
../../../gobject/gobject.c:3346
|
||||||
|
7 0x0000007f8a3193f8 in g_object_unref (_object=0x7f680038a0) at
|
||||||
|
../../../gobject/gobject.c:3238
|
||||||
|
8 0x000000556a57700c in udisks_linux_device_finalize (object=0x7f5c005730
|
||||||
|
[UDisksLinuxDevice]) at udiskslinuxdevice.c:75
|
||||||
|
9 0x0000007f8a3193f8 in g_object_unref (_object=<optimized out>) at
|
||||||
|
../../../gobject/gobject.c:3346
|
||||||
|
10 0x0000007f8a3193f8 in g_object_unref (_object=0x7f5c005730) at
|
||||||
|
../../../gobject/gobject.c:3238
|
||||||
|
11 0x000000556a55d0fc in udisks_linux_drive_object_uevent
|
||||||
|
(object=object@entry=0x556a5df370 [UDisksLinuxDriveObject],
|
||||||
|
action=action@entry=0x556a87b120
|
||||||
|
"remove",device=device@entry=0x7f74007610 [UDisksLinuxDevice])
|
||||||
|
at udiskslinuxdriveobject.c:715
|
||||||
|
12 0x000000556a54840c in handle_block_uevent_for_drive
|
||||||
|
(provider=provider@entry=0x556a5c8200 [UDisksLinuxProvider],
|
||||||
|
action=action@entry=0x556a87b120 "remove",device=device@entry=0x7f74007610
|
||||||
|
[UDisksLinuxDevice]) at udiskslinuxprovider.c:1035
|
||||||
|
13 0x000000556a548ab8 in handle_block_uevent (device=0x7f74007610 [UDisksLinuxDevice],
|
||||||
|
action=0x556a87b120 "remove", provider=0x556a5c8200 [UDisksLinuxProvider]) at
|
||||||
|
udiskslinuxprovider.c:1349
|
||||||
|
14 0x000000556a548ab8 in udisks_linux_provider_handle_uevent
|
||||||
|
(provider=0x556a5c8200 [UDisksLinuxProvider], action=0x556a87b120 "remove",
|
||||||
|
device=0x7f74007610 [UDisksLinuxDevice]) at udiskslinuxprovider.c:1399
|
||||||
|
15 0x000000556a548cac in on_idle_with_probed_uevent (user_data=0x556a7e65a0) at
|
||||||
|
udiskslinuxprovider.c:230
|
||||||
|
---
|
||||||
|
src/udiskslinuxmanager.c | 13 +++++++++----
|
||||||
|
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/udiskslinuxmanager.c b/src/udiskslinuxmanager.c
|
||||||
|
index 5bfeec1..491edb9 100644
|
||||||
|
--- a/src/udiskslinuxmanager.c
|
||||||
|
+++ b/src/udiskslinuxmanager.c
|
||||||
|
@@ -1196,8 +1196,11 @@ handle_get_block_devices (UDisksManager *object,
|
||||||
|
blocks = get_block_objects (object, &num_blocks);
|
||||||
|
block_paths = g_new0 (const gchar *, num_blocks + 1);
|
||||||
|
|
||||||
|
- for (i = 0,blocks_p = blocks; blocks_p != NULL; blocks_p = blocks_p->next, i++)
|
||||||
|
- block_paths[i] = g_dbus_object_get_object_path (g_dbus_interface_get_object (G_DBUS_INTERFACE (blocks_p->data)));
|
||||||
|
+ for (blocks_p = blocks; blocks_p != NULL; blocks_p = blocks_p->next) {
|
||||||
|
+ GDBusObject * block_object = g_dbus_interface_get_object (G_DBUS_INTERFACE (blocks_p->data));
|
||||||
|
+ if (block_object)
|
||||||
|
+ block_paths[i++] = g_dbus_object_get_object_path (block_object);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
udisks_manager_complete_get_block_devices (object,
|
||||||
|
invocation,
|
||||||
|
@@ -1284,9 +1287,11 @@ handle_resolve_device (UDisksManager *object,
|
||||||
|
}
|
||||||
|
|
||||||
|
ret_paths = g_new0 (const gchar *, num_found + 1);
|
||||||
|
- for (i = 0,ret_p = ret; ret_p != NULL; ret_p = ret_p->next, i++)
|
||||||
|
+ for (i = 0,ret_p = ret; ret_p != NULL; ret_p = ret_p->next)
|
||||||
|
{
|
||||||
|
- ret_paths[i] = g_dbus_object_get_object_path (g_dbus_interface_get_object (G_DBUS_INTERFACE (ret_p->data)));
|
||||||
|
+ GDBusObject *block_object = g_dbus_interface_get_object (G_DBUS_INTERFACE (ret_p->data));
|
||||||
|
+ if (block_object)
|
||||||
|
+ ret_paths[i++] = g_dbus_object_get_object_path (block_object);
|
||||||
|
}
|
||||||
|
|
||||||
|
udisks_manager_complete_resolve_device (object,
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
24
0003-udiskslinuxblock-Fix-leaking-string.patch
Normal file
24
0003-udiskslinuxblock-Fix-leaking-string.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From 43e30c01c709412b1a905f3997b63017c205471a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||||
|
Date: Tue, 13 Aug 2024 17:24:28 +0800
|
||||||
|
Subject: [PATCH] udiskslinuxblock: Fix leaking string
|
||||||
|
|
||||||
|
---
|
||||||
|
src/udiskslinuxblock.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
|
||||||
|
index 829dd5f..be5c340 100644
|
||||||
|
--- a/src/udiskslinuxblock.c
|
||||||
|
+++ b/src/udiskslinuxblock.c
|
||||||
|
@@ -1244,6 +1244,7 @@ udisks_linux_block_update (UDisksLinuxBlock *block,
|
||||||
|
bitlk_info = bd_crypto_bitlk_info (device_file, &error);
|
||||||
|
if (bitlk_info)
|
||||||
|
{
|
||||||
|
+ g_free (s);
|
||||||
|
s = g_strdup (bitlk_info->uuid);
|
||||||
|
bd_crypto_bitlk_info_free (bitlk_info);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
BIN
udisks-2.10.1.tar.bz2
Normal file
BIN
udisks-2.10.1.tar.bz2
Normal file
Binary file not shown.
Binary file not shown.
245
udisks2.spec
245
udisks2.spec
@ -1,82 +1,48 @@
|
|||||||
%global glib2_version 2.36
|
%global glib2_version 2.68
|
||||||
%global gobject_introspection_version 1.30.0
|
%global gobject_introspection_version 1.30.0
|
||||||
%global polkit_version 0.102
|
%global polkit_version 0.102
|
||||||
%global systemd_version 208
|
%global systemd_version 208
|
||||||
%global libatasmart_version 0.17
|
%global libatasmart_version 0.17
|
||||||
%global dbus_version 1.4.0
|
%global dbus_version 1.4.0
|
||||||
%global with_gtk_doc 1
|
%global with_gtk_doc 1
|
||||||
%global libblockdev_version 2.19
|
%global libblockdev_version 3.0
|
||||||
|
|
||||||
%define with_bcache 1
|
|
||||||
%define with_btrfs 1
|
%define with_btrfs 1
|
||||||
%define with_vdo 1
|
|
||||||
%define with_lsm 1
|
%define with_lsm 1
|
||||||
%define with_zram 1
|
|
||||||
%define with_lvmcache 1
|
|
||||||
|
|
||||||
# valid options are 'luks1' or 'luks2'
|
|
||||||
%define default_luks_encryption luks1
|
|
||||||
|
|
||||||
%define is_fedora (0%{?rhel} == 0) && (0%{?openeuler} == 0)
|
%define is_fedora (0%{?rhel} == 0) && (0%{?openeuler} == 0)
|
||||||
|
%define is_git %(git show > /dev/null 2>&1 && echo 1 || echo 0)
|
||||||
%define git_hash %(git log -1 --pretty=format:"%h" || true)
|
%define git_hash %(git log -1 --pretty=format:"%h" || true)
|
||||||
%define build_date %(date '+%Y%m%d')
|
%define build_date %(date '+%Y%m%d')
|
||||||
|
|
||||||
|
|
||||||
# bcache is not available on RHEL
|
|
||||||
%if (0%{?rhel}) || (0%{?openeuler}) || %{with_bcache} == 0
|
|
||||||
%define with_bcache 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# btrfs is not available on RHEL > 7
|
|
||||||
%if 0%{?rhel} > 7 || 0%{?openeuler} || %{with_btrfs} == 0
|
|
||||||
%define with_btrfs 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# vdo is not available on Fedora
|
|
||||||
%if (0%{?fedora}) || %{with_vdo} == 0
|
|
||||||
%define with_vdo 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# vdo is not available on i686
|
|
||||||
%ifnarch x86_64 aarch64 ppc64le s390x
|
|
||||||
%define with_vdo 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# feature parity with existing RHEL 7 packages
|
|
||||||
%if (0%{?rhel}) && (0%{?rhel} <= 7) && (0%{?openeuler} == 0)
|
|
||||||
%define with_lsm 0
|
|
||||||
%define with_zram 0
|
|
||||||
%define with_lvmcache 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# default to LUKS2 for RHEL > 7
|
|
||||||
%if 0%{?rhel} > 7 || 0%{?openeuler}
|
|
||||||
%define default_luks_encryption luks2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
Name: udisks2
|
Name: udisks2
|
||||||
Summary: Disk Manager
|
Summary: Disk Manager
|
||||||
Version: 2.9.4
|
Version: 2.10.1
|
||||||
Release: 3
|
Release: 4
|
||||||
License: GPL-2.0+ and LGPL-2.0+
|
License: GPL-2.0+ and LGPL-2.0+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: https://github.com/storaged-project/udisks
|
URL: https://github.com/storaged-project/udisks
|
||||||
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
|
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
|
||||||
|
|
||||||
|
Patch0001: 0001-mdraid-Expose-consistency_policy-sysfs-value.patch
|
||||||
|
Patch0002: 0002-udiskslinuxmanager-use-dbus-interface-after-free.patch
|
||||||
|
Patch0003: 0003-udiskslinuxblock-Fix-leaking-string.patch
|
||||||
|
|
||||||
|
BuildRequires: make
|
||||||
BuildRequires: glib2-devel >= %{glib2_version}
|
BuildRequires: glib2-devel >= %{glib2_version}
|
||||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||||
BuildRequires: libgudev1-devel >= %{systemd_version}
|
BuildRequires: libgudev1-devel >= %{systemd_version}
|
||||||
BuildRequires: libatasmart-devel >= %{libatasmart_version}
|
BuildRequires: libatasmart-devel >= %{libatasmart_version}
|
||||||
BuildRequires: polkit-devel >= %{polkit_version}
|
BuildRequires: polkit-devel >= %{polkit_version}
|
||||||
|
BuildRequires: systemd >= %{systemd_version}
|
||||||
BuildRequires: systemd-devel >= %{systemd_version}
|
BuildRequires: systemd-devel >= %{systemd_version}
|
||||||
BuildRequires: gnome-common
|
|
||||||
BuildRequires: libacl-devel
|
BuildRequires: libacl-devel
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: gtk-doc
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
BuildRequires: system-rpm-config
|
BuildRequires: system-rpm-config
|
||||||
|
BuildRequires: gettext-devel
|
||||||
BuildRequires: libblockdev-devel >= %{libblockdev_version}
|
BuildRequires: libblockdev-devel >= %{libblockdev_version}
|
||||||
BuildRequires: libblockdev-part-devel >= %{libblockdev_version}
|
BuildRequires: libblockdev-part-devel >= %{libblockdev_version}
|
||||||
BuildRequires: libblockdev-loop-devel >= %{libblockdev_version}
|
BuildRequires: libblockdev-loop-devel >= %{libblockdev_version}
|
||||||
@ -84,7 +50,9 @@ BuildRequires: libblockdev-swap-devel >= %{libblockdev_version}
|
|||||||
BuildRequires: libblockdev-mdraid-devel >= %{libblockdev_version}
|
BuildRequires: libblockdev-mdraid-devel >= %{libblockdev_version}
|
||||||
BuildRequires: libblockdev-fs-devel >= %{libblockdev_version}
|
BuildRequires: libblockdev-fs-devel >= %{libblockdev_version}
|
||||||
BuildRequires: libblockdev-crypto-devel >= %{libblockdev_version}
|
BuildRequires: libblockdev-crypto-devel >= %{libblockdev_version}
|
||||||
|
#BuildRequires: libblockdev-nvme-devel >= %{libblockdev_version}
|
||||||
BuildRequires: libmount-devel
|
BuildRequires: libmount-devel
|
||||||
|
BuildRequires: libuuid-devel
|
||||||
|
|
||||||
Requires: libblockdev >= %{libblockdev_version}
|
Requires: libblockdev >= %{libblockdev_version}
|
||||||
Requires: libblockdev-part >= %{libblockdev_version}
|
Requires: libblockdev-part >= %{libblockdev_version}
|
||||||
@ -93,10 +61,9 @@ Requires: libblockdev-swap >= %{libblockdev_version}
|
|||||||
Requires: libblockdev-mdraid >= %{libblockdev_version}
|
Requires: libblockdev-mdraid >= %{libblockdev_version}
|
||||||
Requires: libblockdev-fs >= %{libblockdev_version}
|
Requires: libblockdev-fs >= %{libblockdev_version}
|
||||||
Requires: libblockdev-crypto >= %{libblockdev_version}
|
Requires: libblockdev-crypto >= %{libblockdev_version}
|
||||||
|
#Requires: libblockdev-nvme >= %{libblockdev_version}
|
||||||
|
|
||||||
# Needed for the systemd-related macros used in this file
|
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
||||||
%{?systemd_requires}
|
|
||||||
BuildRequires: systemd
|
|
||||||
|
|
||||||
# Needed to pull in the system bus daemon
|
# Needed to pull in the system bus daemon
|
||||||
Requires: dbus >= %{dbus_version}
|
Requires: dbus >= %{dbus_version}
|
||||||
@ -107,31 +74,39 @@ Requires: libatasmart >= %{libatasmart_version}
|
|||||||
# For mount, umount, mkswap
|
# For mount, umount, mkswap
|
||||||
Requires: util-linux
|
Requires: util-linux
|
||||||
# For mkfs.ext3, mkfs.ext3, e2label
|
# For mkfs.ext3, mkfs.ext3, e2label
|
||||||
Requires: e2fsprogs
|
Recommends: e2fsprogs
|
||||||
# For mkfs.xfs, xfs_admin
|
# For mkfs.xfs, xfs_admin
|
||||||
Requires: xfsprogs
|
Recommends: xfsprogs
|
||||||
# For mkfs.vfat
|
# For mkfs.vfat
|
||||||
Requires: dosfstools
|
Recommends: dosfstools
|
||||||
Requires: gdisk
|
# For exfat
|
||||||
|
Recommends: exfatprogs
|
||||||
|
# For UDF
|
||||||
|
Recommends: udftools
|
||||||
# For ejecting removable disks
|
# For ejecting removable disks
|
||||||
Requires: eject
|
Recommends: eject
|
||||||
# For utab monitor
|
# For utab monitor
|
||||||
Requires: libmount
|
Requires: libmount
|
||||||
|
# The actual polkit agent
|
||||||
|
Requires: polkit >= %{polkit_version}
|
||||||
|
|
||||||
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
# For mkntfs (not available on rhel or on ppc/ppc64) and f2fs
|
||||||
|
%if %{is_fedora}
|
||||||
# For mkntfs (not available on rhel or on ppc/ppc64)
|
Recommends: f2fs-tools
|
||||||
%if ! 0%{?rhel} && ! 0%{?openeuler}
|
Recommends: nilfs-utils
|
||||||
%ifnarch ppc ppc64
|
%ifnarch ppc ppc64
|
||||||
Requires: ntfsprogs
|
Recommends: ntfsprogs
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
Recommends: ntfs-3g
|
||||||
|
|
||||||
# For /proc/self/mountinfo, only available in 2.6.26 or higher
|
# btrfs
|
||||||
Conflicts: kernel < 2.6.26
|
%if 0%{?with_btrfs}
|
||||||
|
Recommends: btrfs-progs
|
||||||
|
%endif
|
||||||
|
|
||||||
Provides: storaged = %{version}-%{release}
|
Provides: storaged = %{version}-%{release}
|
||||||
Obsoletes: storaged
|
Obsoletes: storaged < %{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Udisks project provides a daemon, tools and libraries to access and
|
The Udisks project provides a daemon, tools and libraries to access and
|
||||||
@ -139,10 +114,9 @@ manipulate disks, storage devices and technologies.
|
|||||||
|
|
||||||
%package -n lib%{name}
|
%package -n lib%{name}
|
||||||
Summary: Dynamic library to access the udisksd daemon
|
Summary: Dynamic library to access the udisksd daemon
|
||||||
Group: System Environment/Libraries
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Provides: libstoraged = %{version}-%{release}
|
Provides: libstoraged = %{version}-%{release}
|
||||||
Obsoletes: libstoraged
|
Obsoletes: libstoraged < %{version}-%{release}
|
||||||
|
|
||||||
%description -n lib%{name}
|
%description -n lib%{name}
|
||||||
This package contains the dynamic library, which provides
|
This package contains the dynamic library, which provides
|
||||||
@ -150,56 +124,37 @@ access to the udisksd daemon.
|
|||||||
|
|
||||||
%package -n %{name}-lvm2
|
%package -n %{name}-lvm2
|
||||||
Summary: Module for LVM2
|
Summary: Module for LVM2
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: lvm2
|
Requires: lvm2
|
||||||
Requires: libblockdev-lvm >= %{libblockdev_version}
|
Requires: libblockdev-lvm >= %{libblockdev_version}
|
||||||
BuildRequires: lvm2-devel
|
|
||||||
BuildRequires: libblockdev-lvm-devel >= %{libblockdev_version}
|
BuildRequires: libblockdev-lvm-devel >= %{libblockdev_version}
|
||||||
Provides: storaged-lvm2 = %{version}-%{release}
|
Provides: storaged-lvm2 = %{version}-%{release}
|
||||||
Obsoletes: storaged-lvm2
|
Obsoletes: storaged-lvm2 < %{version}-%{release}
|
||||||
|
|
||||||
%description -n %{name}-lvm2
|
%description -n %{name}-lvm2
|
||||||
This package contains module for LVM2 configuration.
|
This package contains module for LVM2 configuration.
|
||||||
|
|
||||||
%package -n lib%{name}-devel
|
%package -n lib%{name}-devel
|
||||||
Summary: Development files for lib%{name}
|
Summary: Development files for lib%{name}
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Provides: libstoraged-devel = %{version}-%{release}
|
Provides: libstoraged-devel = %{version}-%{release}
|
||||||
Obsoletes: libstoraged-devel
|
Obsoletes: libstoraged-devel < %{version}-%{release}
|
||||||
|
|
||||||
%description -n lib%{name}-devel
|
%description -n lib%{name}-devel
|
||||||
This package contains the development files for the library lib%{name}, a
|
This package contains the development files for the library lib%{name},
|
||||||
dynamic library, which provides access to the udisksd daemon.
|
a dynamic library, which provides access to the udisksd daemon.
|
||||||
|
|
||||||
%if 0%{?with_bcache}
|
|
||||||
%package -n %{name}-bcache
|
|
||||||
Summary: Module for Bcache
|
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
License: LGPLv2+
|
|
||||||
Requires: libblockdev-kbd >= %{libblockdev_version}
|
|
||||||
BuildRequires: libblockdev-kbd-devel >= %{libblockdev_version}
|
|
||||||
Provides: storaged-bcache = %{version}-%{release}
|
|
||||||
Obsoletes: storaged-bcache
|
|
||||||
|
|
||||||
%description -n %{name}-bcache
|
|
||||||
This package contains module for Bcache configuration.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_btrfs}
|
%if 0%{?with_btrfs}
|
||||||
%package -n %{name}-btrfs
|
%package -n %{name}-btrfs
|
||||||
Summary: Module for BTRFS
|
Summary: Module for BTRFS
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: libblockdev-btrfs >= %{libblockdev_version}
|
Requires: libblockdev-btrfs >= %{libblockdev_version}
|
||||||
BuildRequires: libblockdev-btrfs-devel >= %{libblockdev_version}
|
BuildRequires: libblockdev-btrfs-devel >= %{libblockdev_version}
|
||||||
Provides: storaged-btrfs = %{version}-%{release}
|
Provides: storaged-btrfs = %{version}-%{release}
|
||||||
Obsoletes: storaged-btrfs
|
Obsoletes: storaged-btrfs < %{version}-%{release}
|
||||||
|
|
||||||
%description -n %{name}-btrfs
|
%description -n %{name}-btrfs
|
||||||
This package contains module for BTRFS configuration.
|
This package contains module for BTRFS configuration.
|
||||||
@ -208,81 +163,39 @@ This package contains module for BTRFS configuration.
|
|||||||
%if 0%{?with_lsm}
|
%if 0%{?with_lsm}
|
||||||
%package -n %{name}-lsm
|
%package -n %{name}-lsm
|
||||||
Summary: Module for LSM
|
Summary: Module for LSM
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: libstoragemgmt
|
Requires: libstoragemgmt
|
||||||
BuildRequires: libstoragemgmt-devel
|
BuildRequires: libstoragemgmt-devel
|
||||||
BuildRequires: libconfig-devel
|
BuildRequires: libconfig-devel
|
||||||
Provides: storaged-lsm = %{version}-%{release}
|
Provides: storaged-lsm = %{version}-%{release}
|
||||||
Obsoletes: storaged-lsm
|
Obsoletes: storaged-lsm < %{version}-%{release}
|
||||||
|
|
||||||
%description -n %{name}-lsm
|
%description -n %{name}-lsm
|
||||||
This package contains module for LSM configuration.
|
This package contains module for LSM configuration.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_zram}
|
|
||||||
%package -n %{name}-zram
|
|
||||||
Summary: Module for ZRAM
|
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
License: LGPLv2+
|
|
||||||
Requires: libblockdev-kbd >= %{libblockdev_version}
|
|
||||||
Requires: libblockdev-swap >= %{libblockdev_version}
|
|
||||||
BuildRequires: libblockdev-kbd-devel >= %{libblockdev_version}
|
|
||||||
BuildRequires: libblockdev-swap-devel
|
|
||||||
Provides: storaged-zram = %{version}-%{release}
|
|
||||||
Obsoletes: storaged-zram
|
|
||||||
|
|
||||||
%description -n %{name}-zram
|
|
||||||
This package contains module for ZRAM configuration.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_vdo}
|
|
||||||
%package -n %{name}-vdo
|
|
||||||
Summary: Module for VDO
|
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
License: LGPLv2+
|
|
||||||
Requires: vdo
|
|
||||||
Requires: libblockdev-vdo >= %{libblockdev_version}
|
|
||||||
BuildRequires: libblockdev-vdo-devel >= %{libblockdev_version}
|
|
||||||
|
|
||||||
%description -n %{name}-vdo
|
|
||||||
This package contains module for VDO management.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n udisks-%{version}
|
%autosetup -p1 -n udisks-%{version}
|
||||||
sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/"
|
rm -f src/tests/dbus-tests/config_h.py
|
||||||
|
rm -f src/udisks-daemon-resources.{c,h}
|
||||||
|
# default to ntfs-3g (#2182206)
|
||||||
|
sed -i data/builtin_mount_options.conf -e 's/ntfs_drivers=ntfs3,ntfs/ntfs_drivers=ntfs,ntfs3/'
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -ivf
|
# autoreconf -ivf
|
||||||
# modules need to be explicitly enabled
|
# modules need to be explicitly enabled
|
||||||
%configure \
|
%configure \
|
||||||
--sysconfdir=/etc \
|
|
||||||
%if %{with_gtk_doc}
|
%if %{with_gtk_doc}
|
||||||
--enable-gtk-doc \
|
--enable-gtk-doc \
|
||||||
%else
|
%else
|
||||||
--disable-gtk-doc \
|
--disable-gtk-doc \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?with_bcache}
|
|
||||||
--enable-bcache \
|
|
||||||
%endif
|
|
||||||
%if 0%{?with_btrfs}
|
%if 0%{?with_btrfs}
|
||||||
--enable-btrfs \
|
--enable-btrfs \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?with_vdo}
|
|
||||||
--enable-vdo \
|
|
||||||
%endif
|
|
||||||
%if 0%{?with_zram}
|
|
||||||
--enable-zram \
|
|
||||||
%endif
|
|
||||||
%if 0%{?with_lsm}
|
%if 0%{?with_lsm}
|
||||||
--enable-lsm \
|
--enable-lsm \
|
||||||
%endif
|
|
||||||
%if 0%{?with_lvmcache}
|
|
||||||
--enable-lvmcache \
|
|
||||||
%endif
|
%endif
|
||||||
--enable-lvm2
|
--enable-lvm2
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -306,7 +219,12 @@ make check
|
|||||||
|
|
||||||
%post -n %{name}
|
%post -n %{name}
|
||||||
%systemd_post udisks2.service
|
%systemd_post udisks2.service
|
||||||
udevadm trigger
|
# skip retriggering if udevd isn't even accessible, e.g. containers or
|
||||||
|
# rpm-ostree-based systems
|
||||||
|
if [ -S /run/udev/control ]; then
|
||||||
|
udevadm control --reload
|
||||||
|
udevadm trigger
|
||||||
|
fi
|
||||||
|
|
||||||
%preun -n %{name}
|
%preun -n %{name}
|
||||||
%systemd_preun udisks2.service
|
%systemd_preun udisks2.service
|
||||||
@ -316,14 +234,6 @@ udevadm trigger
|
|||||||
|
|
||||||
%ldconfig_scriptlets -n lib%{name}
|
%ldconfig_scriptlets -n lib%{name}
|
||||||
|
|
||||||
%if 0%{?with_zram}
|
|
||||||
%post -n %{name}-zram
|
|
||||||
|
|
||||||
%preun -n %{name}-zram
|
|
||||||
|
|
||||||
%postun -n %{name}-zram
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -f udisks2.lang
|
%files -f udisks2.lang
|
||||||
%doc README.md AUTHORS NEWS HACKING
|
%doc README.md AUTHORS NEWS HACKING
|
||||||
%license COPYING
|
%license COPYING
|
||||||
@ -337,6 +247,7 @@ udevadm trigger
|
|||||||
|
|
||||||
%{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf
|
%{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf
|
||||||
%{_datadir}/bash-completion/completions/udisksctl
|
%{_datadir}/bash-completion/completions/udisksctl
|
||||||
|
%{_datadir}/zsh/site-functions/_udisks2
|
||||||
%{_tmpfilesdir}/%{name}.conf
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
%{_unitdir}/udisks2.service
|
%{_unitdir}/udisks2.service
|
||||||
%{_udevrulesdir}/80-udisks2.rules
|
%{_udevrulesdir}/80-udisks2.rules
|
||||||
@ -383,27 +294,12 @@ udevadm trigger
|
|||||||
%endif
|
%endif
|
||||||
%{_libdir}/pkgconfig/udisks2.pc
|
%{_libdir}/pkgconfig/udisks2.pc
|
||||||
%{_libdir}/pkgconfig/udisks2-lvm2.pc
|
%{_libdir}/pkgconfig/udisks2-lvm2.pc
|
||||||
%if 0%{?with_bcache}
|
|
||||||
%{_libdir}/pkgconfig/udisks2-bcache.pc
|
|
||||||
%endif
|
|
||||||
%if 0%{?with_btrfs}
|
%if 0%{?with_btrfs}
|
||||||
%{_libdir}/pkgconfig/udisks2-btrfs.pc
|
%{_libdir}/pkgconfig/udisks2-btrfs.pc
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?with_lsm}
|
%if 0%{?with_lsm}
|
||||||
%{_libdir}/pkgconfig/udisks2-lsm.pc
|
%{_libdir}/pkgconfig/udisks2-lsm.pc
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?with_zram}
|
|
||||||
%{_libdir}/pkgconfig/udisks2-zram.pc
|
|
||||||
%endif
|
|
||||||
%if 0%{?with_vdo}
|
|
||||||
%{_libdir}/pkgconfig/udisks2-vdo.pc
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_bcache}
|
|
||||||
%files -n %{name}-bcache
|
|
||||||
%{_libdir}/udisks2/modules/libudisks2_bcache.so
|
|
||||||
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.bcache.policy
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_btrfs}
|
%if 0%{?with_btrfs}
|
||||||
%files -n %{name}-btrfs
|
%files -n %{name}-btrfs
|
||||||
@ -420,22 +316,23 @@ udevadm trigger
|
|||||||
%attr(0600,root,root) %{_sysconfdir}/udisks2/modules.conf.d/udisks2_lsm.conf
|
%attr(0600,root,root) %{_sysconfdir}/udisks2/modules.conf.d/udisks2_lsm.conf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_zram}
|
|
||||||
%files -n %{name}-zram
|
|
||||||
%dir %{_sysconfdir}/udisks2/modules.conf.d
|
|
||||||
%{_libdir}/udisks2/modules/libudisks2_zram.so
|
|
||||||
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.zram.policy
|
|
||||||
%{_unitdir}/udisks2-zram-setup@.service
|
|
||||||
%{_udevrulesdir}/90-udisks2-zram.rules
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_vdo}
|
|
||||||
%files -n %{name}-vdo
|
|
||||||
%{_libdir}/udisks2/modules/libudisks2_vdo.so
|
|
||||||
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.vdo.policy
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 13 2024 cenhuilin <cenhuilin@kylinos.cn> - 2.10.1-4
|
||||||
|
- udiskslinuxblock: Fix leaking string
|
||||||
|
|
||||||
|
* Tue Jun 18 2024 cenhuilin <cenhuilin@kylinos.cn> - 2.10.1-3
|
||||||
|
- udiskslinuxmanager:use dbus interface after free
|
||||||
|
|
||||||
|
* Wed Jun 12 2024 Deyuan Fan <fandeyuan@kylinos.cn> - 2.10.1-2
|
||||||
|
- mdraid: Expose "consistency_policy" sysfs value
|
||||||
|
|
||||||
|
* Mon Oct 30 2023 li weigang <weigangli99@gmail.com> - 2.10.1-1
|
||||||
|
- update to version 2.10.1
|
||||||
|
|
||||||
|
* Tue Feb 21 2023 miaoguanqin <miaoguanqin@huawei.com> - 2.9.4-4
|
||||||
|
- fix coredump while stop udisks2
|
||||||
|
|
||||||
* Sat Oct 29 2022 wangzhiqiang <wangzhiqiang95@huawei.com> - 2.9.4-3
|
* Sat Oct 29 2022 wangzhiqiang <wangzhiqiang95@huawei.com> - 2.9.4-3
|
||||||
- update release
|
- update release
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
version_control: github
|
version_control: github
|
||||||
src_repo: storaged-project/udisks
|
src_repo: storaged-project/udisks
|
||||||
tag_prefix: "udisks-"
|
tag_prefix: "udisks-"
|
||||||
seperator: "."
|
separator: "."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user