From b66ecfb4dc09ba76e37787df2f7df1a78c3c1cc9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 16 Sep 2024 12:11:35 +0100 Subject: gentoo auto-resync : 16:09:2024 - 12:11:35 --- sys-fs/udisks/Manifest | 7 +- .../files/udisks-2.10.1-BLKRRPART_harder.patch | 55 ++++++++ ....10.1-targetcli_config.json_netif_timeout.patch | 38 ++++++ ....1-udiskslinuxblock_survive_missing_fstab.patch | 32 +++++ ...-2.10.1-udiskslinuxmanager_use_after_free.patch | 112 ++++++++++++++++ sys-fs/udisks/udisks-2.10.0.ebuild | 141 -------------------- sys-fs/udisks/udisks-2.10.1-r1.ebuild | 148 +++++++++++++++++++++ 7 files changed, 390 insertions(+), 143 deletions(-) create mode 100644 sys-fs/udisks/files/udisks-2.10.1-BLKRRPART_harder.patch create mode 100644 sys-fs/udisks/files/udisks-2.10.1-targetcli_config.json_netif_timeout.patch create mode 100644 sys-fs/udisks/files/udisks-2.10.1-udiskslinuxblock_survive_missing_fstab.patch create mode 100644 sys-fs/udisks/files/udisks-2.10.1-udiskslinuxmanager_use_after_free.patch delete mode 100644 sys-fs/udisks/udisks-2.10.0.ebuild create mode 100644 sys-fs/udisks/udisks-2.10.1-r1.ebuild (limited to 'sys-fs/udisks') diff --git a/sys-fs/udisks/Manifest b/sys-fs/udisks/Manifest index 198fd3a3c88f..fb6ac592bf99 100644 --- a/sys-fs/udisks/Manifest +++ b/sys-fs/udisks/Manifest @@ -1,8 +1,11 @@ +AUX udisks-2.10.1-BLKRRPART_harder.patch 1903 BLAKE2B 4c45c74ea5d5715d8d821b4042288ce1a88ba07b46583e92540d918bce1be5aae70e711863d97d04a7472c124b7ffd9fdfd43a0169028f167634614d243bd642 SHA512 dece2c2768903f05555f87479818a2658dd1208841178a51750d75f823867afd873e8d3ebbff8ca66ba06fc18b0115e1012028815a8642f508d983644d04ac97 +AUX udisks-2.10.1-targetcli_config.json_netif_timeout.patch 1427 BLAKE2B 3916bfb9e0ad43151dbd11f1b27a294879967c464707d78b53ceb753c63f648e6ad316141f2e132e3c61c6bde120713455eb9a28e095388533594cfc6775058d SHA512 84626e7733ded2b9c9e92ee15f7fef780b39e93c8a3154164a53890fcfa4c879a19e73165b7b8cf8362ef451726f6a15c5ff89afb71d3b931993b17750532474 +AUX udisks-2.10.1-udiskslinuxblock_survive_missing_fstab.patch 1023 BLAKE2B 550f327d4495ff7f30fc7194327ead64cd498f3c629d33fc753cea0c9d7fad19c3430c3cd6837a4b825efa405efd3801d8a30fc574014ee86aec75b96df28d07 SHA512 da69edf84733283b0c5feeb702988893bd5e2ffa2eae195232657bb332a525da519ea8076f0551391d4b478abe7e3337284e32ce1eff045fb6458c001a40b9b1 +AUX udisks-2.10.1-udiskslinuxmanager_use_after_free.patch 5722 BLAKE2B 954e9e2ef09e88b10ce26e479b82e240e7d95ab963ecc2ecbd5bc7e9ff47f94a988ec945f0348649e7ca3b57d8cf5858548e0815f39aa63515a41db2ebce1e7e SHA512 81d2afcb97d247186bef32d6340cd261e3e436340e9f61e7c4a69d918bc9b09df79bc537f08f4e203e9a491bd79474708f43b6db01fa1636f1ceb70f7dd9a59b AUX udisks-2.9.4-undefined.patch 6251 BLAKE2B 1c2eb5b5448686dcd343fd582e5e79ecb38bbfae4108a56c5b27de9c446a49b7ec1e22f7f55778f7ace7f309b4d2bb7bae99932411917abbefbc58b62fd7dae0 SHA512 103cf151084dd239baa40554cfc2396281e478d8ca9e73c848cd4af42716d7677a50a7dd1b18d8a84a3f97210c695f392ea3556104ed03b50640d0cca96303cd -DIST udisks-2.10.0.tar.bz2 1784010 BLAKE2B a3923433408ab87448ea0b6dcafcf329b1392f5810ca6d1bcb52da90aad02578f9e533041a5ad62258c485e43b834a60b28fc66ade0aa241c1cdfafdb130bf65 SHA512 3c9dc18dd5f6d61442205f4df2592ebf79211d12d71168f96e6814c2ce16f7a46cda7c0a5ccf47b7dc8b655d8af654d5a62e54b04e5b600af0b15558442cf3ed DIST udisks-2.10.1.tar.bz2 1896207 BLAKE2B 41282e4dbbd93e6bda2a10a6ff2f2fb82bfc83b3ccbed9450cca7888c634cde9300fcd0b7d055e0d8e4c8fc0b431a75d5612a24132ea9b2677d194529732178d SHA512 9cdaeca4306a970c85f88d406dbe5d2dad23d72f47d9ab1c021b8c2888d4c790f680eb94388d86f9255024283b4a36e98b8aee4408d193a7d4aad1e74463356a DIST udisks-2.9.4.tar.bz2 1699288 BLAKE2B 913f6dd02988c0bded13ae15a5f05e5b3c6404f0b0d58a493601a0762c7534403f89e9fb46ec6a536b85d5f9ca1f788c7a308f5563a897b324d212da0e7bab4b SHA512 35f5429bc2a7092aa659cba9296837d127e2b17c23ab23111d0d9b230d15ef5a6965e112b1f3829748a69a52fb5b09722153f86f1ef70977b3ad7b7a4ec40ec5 -EBUILD udisks-2.10.0.ebuild 3676 BLAKE2B 8695bd8aecfe755d4022090ff06ce895cccb00a852ab8e207940d3049704c09c0c0d3f0288ac85e4a37a0d25a710f5282ea7191ffe05fc7a45f1871c3f35e6a2 SHA512 58091fc48e370b5325815492b260dc6f5c7dd8aad7e0cadbf883d8ff5179b0d8a53fbd9191e0251003fceaa81debcb56598386bb7fd9bc969c62af89ca3790f1 +EBUILD udisks-2.10.1-r1.ebuild 3919 BLAKE2B dab1912909d4ff984778ca65e729642a6b5657d5bd960385472b864c90a26df2797e5d4f1372e926187f080db426bf68e03e6f457f5013101deedcb460d49736 SHA512 94980330d160a53c1df2ad31f62b58a8711465b2ab021b372ab7cea50be29b5e830940e1580517f02e8f3257467497823aecd058a0e67d8ae391de02da8c1988 EBUILD udisks-2.10.1.ebuild 3671 BLAKE2B b45d2bf42443b312721e7d5bce0cb2b950d67d62a2c429cff89e03d0797a1aa7862a2886e35b84ddefbbb781772a670dd28f16145f9aa9550e31f4afc697ac72 SHA512 6e515a8b9ef0301e73b5188a62955258b370e5e64b1c9c29ce1aa1fcc2d53a7113d57d2ce6063fc1dad7a718f0038433f2e132860a7e3c91ebfd1a842f17edb5 EBUILD udisks-2.9.4-r3.ebuild 3948 BLAKE2B d6078b200453793cc925d605e6a60ef8ae3cf714099bbc28c3ad58c1894dafe3bbe4d5c9c18d1d0e9f2f6587b096a9ca8c68346024c3e7b5c8252c7d224e150b SHA512 68c827b6ad5b2f3b1b368e0a18e9cf7fd043b8c19102d1d3e3fc2b08e03447409ccd3b2a305b4e92c879b8042ca9ec980d5480b0a6528a40f01c753bc254e6ce MISC metadata.xml 817 BLAKE2B 8de63b889a0237db873c61e20fd4c03e0b3cba0e76af124ccc6ce8240557c6cb60b15e566918a358714a7c9c981fba2581c155a22fc8ca81bfc363012426b000 SHA512 26df20e075b5f6f23d78ee21c52908c54bd499502208570b575227464f4105044d08421c01e025cbd15fb5d003190f72ded2ea905bc037746b3df452a50999df diff --git a/sys-fs/udisks/files/udisks-2.10.1-BLKRRPART_harder.patch b/sys-fs/udisks/files/udisks-2.10.1-BLKRRPART_harder.patch new file mode 100644 index 000000000000..39af1e0fe5b3 --- /dev/null +++ b/sys-fs/udisks/files/udisks-2.10.1-BLKRRPART_harder.patch @@ -0,0 +1,55 @@ +From eb1d4a2bcbb8744074d17553bd0d55ffbd76bdeb Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Tue, 14 Nov 2023 13:16:39 +0000 +Subject: [PATCH] udiskslinuxblockobject: Try issuing BLKRRPART ioctl harder + +For some reason even after acquiring a voluntary BSD lock on +the device the BLKRRPART ioctl still fails with EBUSY. Wait +a couple of msec and everything is fine. + +So try harder, several attempts, if busy. There might be number +of things going on in the system and it's out of our control +even when holding a lock. +--- + src/udiskslinuxblockobject.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/udiskslinuxblockobject.c b/src/udiskslinuxblockobject.c +index d5da4bc4d9..33604df841 100644 +--- a/src/udiskslinuxblockobject.c ++++ b/src/udiskslinuxblockobject.c +@@ -1098,23 +1098,31 @@ udisks_linux_block_object_reread_partition_table (UDisksLinuxBlockObject *objec + } + else + { +- gint num_tries = 0; ++ gint num_tries; + + /* acquire an exclusive BSD lock to prevent udev probes. + * See also https://systemd.io/BLOCK_DEVICE_LOCKING + */ ++ num_tries = 10; + while (flock (fd, LOCK_EX | LOCK_NB) != 0) + { + g_usleep (100 * 1000); /* microseconds */ +- if (num_tries++ > 5) ++ if (num_tries-- < 0) + break; + } + +- if (ioctl (fd, BLKRRPART) != 0) ++ num_tries = 5; ++ while (ioctl (fd, BLKRRPART) != 0) + { ++ if (errno == EBUSY && num_tries-- >= 0) ++ { ++ g_usleep (200 * 1000); /* microseconds */ ++ continue; ++ } + g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno), + "Error re-reading partition table (BLKRRPART ioctl) on %s: %m", device_file); + ret = FALSE; ++ break; + } + close (fd); + } diff --git a/sys-fs/udisks/files/udisks-2.10.1-targetcli_config.json_netif_timeout.patch b/sys-fs/udisks/files/udisks-2.10.1-targetcli_config.json_netif_timeout.patch new file mode 100644 index 000000000000..e40f136dfe2d --- /dev/null +++ b/sys-fs/udisks/files/udisks-2.10.1-targetcli_config.json_netif_timeout.patch @@ -0,0 +1,38 @@ +From acae6bf4594f80da57855343ab325f87386178c4 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Fri, 3 Nov 2023 16:40:54 +0100 +Subject: [PATCH] tests: Fix targetcli_config.json + +Not all attributes are available anymore in newer kernel versions. +--- + src/tests/dbus-tests/targetcli_config.json | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/tests/dbus-tests/targetcli_config.json b/src/tests/dbus-tests/targetcli_config.json +index 3be9eac2be..f50bf7d4d2 100644 +--- a/src/tests/dbus-tests/targetcli_config.json ++++ b/src/tests/dbus-tests/targetcli_config.json +@@ -331,7 +331,6 @@ + "demo_mode_write_protect": 0, + "generate_node_acls": 1, + "login_timeout": 15, +- "netif_timeout": 2, + "prod_mode_write_protect": 0, + "t10_pi": 0, + "tpg_enabled_sendtargets": 1 +@@ -393,7 +392,6 @@ + "demo_mode_write_protect": 1, + "generate_node_acls": 0, + "login_timeout": 15, +- "netif_timeout": 2, + "prod_mode_write_protect": 0, + "t10_pi": 0, + "tpg_enabled_sendtargets": 1 +@@ -479,7 +477,6 @@ + "demo_mode_write_protect": 1, + "generate_node_acls": 0, + "login_timeout": 15, +- "netif_timeout": 2, + "prod_mode_write_protect": 0, + "t10_pi": 0, + "tpg_enabled_sendtargets": 1 diff --git a/sys-fs/udisks/files/udisks-2.10.1-udiskslinuxblock_survive_missing_fstab.patch b/sys-fs/udisks/files/udisks-2.10.1-udiskslinuxblock_survive_missing_fstab.patch new file mode 100644 index 000000000000..9acd8bd10331 --- /dev/null +++ b/sys-fs/udisks/files/udisks-2.10.1-udiskslinuxblock_survive_missing_fstab.patch @@ -0,0 +1,32 @@ +From 8f62f7c6888659f3b66d5861d46fb9b3a34ff169 Mon Sep 17 00:00:00 2001 +From: Marius Vollmer +Date: Thu, 22 Feb 2024 16:49:24 +0200 +Subject: [PATCH] udiskslinuxblock: Survive a missing /etc/fstab + +This is similar to b79f6840ca82551e672156153b7e13328f0ba19d, which +solved the same problem for /etc/crypttab. +--- + src/udiskslinuxblock.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c +index 829dd5f78..a3fa183be 100644 +--- a/src/udiskslinuxblock.c ++++ b/src/udiskslinuxblock.c +@@ -1541,7 +1541,15 @@ add_remove_fstab_entry (UDisksBlock *block, + &contents, + NULL, + error)) +- goto out; ++ { ++ if (g_error_matches (*error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) ++ { ++ contents = g_strdup (""); ++ g_clear_error (error); ++ } ++ else ++ goto out; ++ } + + lines = g_strsplit (contents, "\n", 0); + diff --git a/sys-fs/udisks/files/udisks-2.10.1-udiskslinuxmanager_use_after_free.patch b/sys-fs/udisks/files/udisks-2.10.1-udiskslinuxmanager_use_after_free.patch new file mode 100644 index 000000000000..3157b10f8c87 --- /dev/null +++ b/sys-fs/udisks/files/udisks-2.10.1-udiskslinuxmanager_use_after_free.patch @@ -0,0 +1,112 @@ +From 3dc036fb5045fc068c6abfbe4e62d0871d7ca82a Mon Sep 17 00:00:00 2001 +From: xinpeng wang +Date: Thu, 21 Sep 2023 13:57:40 +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=) + 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=) 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=) 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 5bfeec103..491edb92b 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, diff --git a/sys-fs/udisks/udisks-2.10.0.ebuild b/sys-fs/udisks/udisks-2.10.0.ebuild deleted file mode 100644 index b7ec7275b635..000000000000 --- a/sys-fs/udisks/udisks-2.10.0.ebuild +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit autotools bash-completion-r1 linux-info systemd tmpfiles udev xdg-utils - -DESCRIPTION="Daemon providing interfaces to work with storage devices" -HOMEPAGE="https://www.freedesktop.org/wiki/Software/udisks" -SRC_URI="https://github.com/storaged-project/udisks/releases/download/${P}/${P}.tar.bz2" - -LICENSE="LGPL-2+ GPL-2+" -SLOT="2" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86" -IUSE="acl +daemon debug elogind +introspection lvm nls selinux systemd" - -REQUIRED_USE=" - ?? ( elogind systemd ) - elogind? ( daemon ) - systemd? ( daemon ) -" - -# See configure.ac file for the required min version -BLOCKDEV_MIN_VER="3.0" - -COMMON_DEPEND=" - >=sys-auth/polkit-0.114[daemon] - >=sys-libs/libblockdev-${BLOCKDEV_MIN_VER}:=[cryptsetup,lvm?,nvme] - virtual/udev - acl? ( virtual/acl ) - daemon? ( - >=dev-libs/glib-2.68:2 - >=dev-libs/libatasmart-0.19 - >=dev-libs/libgudev-165:= - ) - elogind? ( >=sys-auth/elogind-219 ) - introspection? ( >=dev-libs/gobject-introspection-1.30:= ) - lvm? ( sys-fs/lvm2 ) - systemd? ( >=sys-apps/systemd-209 ) -" -# util-linux -> mount, umount, swapon, swapoff (see also #403073) -RDEPEND="${COMMON_DEPEND} - >=sys-block/parted-3 - >=sys-apps/util-linux-2.30 - selinux? ( sec-policy/selinux-devicekit ) -" -DEPEND="${COMMON_DEPEND} - >=sys-kernel/linux-headers-3.1 -" -BDEPEND=" - app-text/docbook-xsl-stylesheets - >=dev-util/gdbus-codegen-2.32 - >=dev-build/gtk-doc-am-1.3 - virtual/pkgconfig - nls? ( >=sys-devel/gettext-0.19.8 ) - dev-libs/gobject-introspection-common - dev-build/autoconf-archive -" -# If adding a eautoreconf, then these might be needed at buildtime: -# dev-libs/gobject-introspection-common -# dev-build/autoconf-archive - -DOCS=( AUTHORS HACKING NEWS README.md ) - -pkg_setup() { - # Listing only major arch's here to avoid tracking kernel's defconfig - if use amd64 || use arm || use ppc || use ppc64 || use x86; then - CONFIG_CHECK="~!IDE" #319829 - CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" #412377 - CONFIG_CHECK+=" ~NLS_UTF8" #425562 - kernel_is lt 3 10 && CONFIG_CHECK+=" ~USB_SUSPEND" #331065, #477278 - linux-info_pkg_setup - fi -} - -src_prepare() { - xdg_environment_reset - default - - if ! use systemd ; then - sed -i -e 's:libsystemd-login:&disable:' configure || die - fi - - # Added for bug # 782061 - eautoreconf -} - -src_configure() { - local myeconfargs=( - --enable-btrfs - --disable-gtk-doc - --disable-static - --localstatedir="${EPREFIX}"/var - --with-html-dir="${EPREFIX}"/usr/share/gtk-doc/html - --with-modprobedir="${EPREFIX}"/lib/modprobe.d - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - --with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d - --with-udevdir="${EPREFIX}$(get_udevdir)" - $(use_enable acl) - $(use_enable daemon) - $(use_enable debug) - $(use_enable introspection) - $(use_enable lvm lvm2) - $(use_enable nls) - ) - econf "${myeconfargs[@]}" -} - -src_install() { - default - find "${ED}" -type f -name "*.la" -delete || die - keepdir /var/lib/udisks2 #383091 - - rm -rf "${ED}"/usr/share/bash-completion - dobashcomp data/completions/udisksctl -} - -pkg_preinst() { - # Remove gtk-doc symlink, #597628 - if [[ -L "${EROOT}"/usr/share/gtk-doc/html/udisks2 ]]; then - rm "${EROOT}"/usr/share/gtk-doc/html/udisks2 || die - fi -} - -pkg_postinst() { - udev_reload - - # TODO: obsolete with tmpfiles_process? - # mkdir -p "${EROOT}"/run #415987 - - tmpfiles_process udisks2.conf - - # See pkg_postinst() of >=sys-apps/baselayout-2.1-r1. Keep in sync? - if ! grep -qs "^tmpfs.*/run " "${EROOT}"/proc/mounts ; then - echo - ewarn "You should reboot the system now to get /run mounted with tmpfs!" - fi -} - -pkg_postrm() { - udev_reload -} diff --git a/sys-fs/udisks/udisks-2.10.1-r1.ebuild b/sys-fs/udisks/udisks-2.10.1-r1.ebuild new file mode 100644 index 000000000000..d2f4f213c1bb --- /dev/null +++ b/sys-fs/udisks/udisks-2.10.1-r1.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit autotools bash-completion-r1 linux-info systemd tmpfiles udev xdg-utils + +DESCRIPTION="Daemon providing interfaces to work with storage devices" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/udisks" +SRC_URI="https://github.com/storaged-project/udisks/releases/download/${P}/${P}.tar.bz2" + +LICENSE="LGPL-2+ GPL-2+" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86" +IUSE="acl +daemon debug elogind +introspection lvm nls selinux systemd" + +REQUIRED_USE=" + ?? ( elogind systemd ) + elogind? ( daemon ) + systemd? ( daemon ) +" + +# See configure.ac file for the required min version +BLOCKDEV_MIN_VER="3.0" + +COMMON_DEPEND=" + >=sys-auth/polkit-0.114[daemon] + >=sys-libs/libblockdev-${BLOCKDEV_MIN_VER}:=[cryptsetup,lvm?,nvme] + virtual/udev + acl? ( virtual/acl ) + daemon? ( + >=dev-libs/glib-2.68:2 + >=dev-libs/libatasmart-0.19 + >=dev-libs/libgudev-165:= + ) + elogind? ( >=sys-auth/elogind-219 ) + introspection? ( >=dev-libs/gobject-introspection-1.30:= ) + lvm? ( sys-fs/lvm2 ) + systemd? ( >=sys-apps/systemd-209 ) +" +# util-linux -> mount, umount, swapon, swapoff (see also #403073) +RDEPEND="${COMMON_DEPEND} + >=sys-block/parted-3 + >=sys-apps/util-linux-2.30 + selinux? ( sec-policy/selinux-devicekit ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-3.1 +" +BDEPEND=" + app-text/docbook-xsl-stylesheets + >=dev-util/gdbus-codegen-2.32 + >=dev-build/gtk-doc-am-1.3 + virtual/pkgconfig + nls? ( >=sys-devel/gettext-0.19.8 ) + dev-libs/gobject-introspection-common + dev-build/autoconf-archive +" +# If adding a eautoreconf, then these might be needed at buildtime: +# dev-libs/gobject-introspection-common +# dev-build/autoconf-archive + +DOCS=( AUTHORS HACKING NEWS README.md ) + +PATCHES=( + "${FILESDIR}"/${P}-BLKRRPART_harder.patch + "${FILESDIR}"/${P}-targetcli_config.json_netif_timeout.patch + "${FILESDIR}"/${P}-udiskslinuxmanager_use_after_free.patch + "${FILESDIR}"/${P}-udiskslinuxblock_survive_missing_fstab.patch +) + +pkg_setup() { + # Listing only major arch's here to avoid tracking kernel's defconfig + if use amd64 || use arm || use ppc || use ppc64 || use x86; then + CONFIG_CHECK="~!IDE" #319829 + CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" #412377 + CONFIG_CHECK+=" ~NLS_UTF8" #425562 + kernel_is lt 3 10 && CONFIG_CHECK+=" ~USB_SUSPEND" #331065, #477278 + linux-info_pkg_setup + fi +} + +src_prepare() { + xdg_environment_reset + default + + if ! use systemd ; then + sed -i -e 's:libsystemd-login:&disable:' configure || die + fi + + # Added for bug # 782061 + eautoreconf +} + +src_configure() { + local myeconfargs=( + --enable-btrfs + --disable-gtk-doc + --disable-static + --localstatedir="${EPREFIX}"/var + --with-html-dir="${EPREFIX}"/usr/share/gtk-doc/html + --with-modprobedir="${EPREFIX}"/lib/modprobe.d + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + --with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d + --with-udevdir="${EPREFIX}$(get_udevdir)" + $(use_enable acl) + $(use_enable daemon) + $(use_enable debug) + $(use_enable introspection) + $(use_enable lvm lvm2) + $(use_enable nls) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${ED}" -type f -name "*.la" -delete || die + keepdir /var/lib/udisks2 #383091 + + rm -rf "${ED}"/usr/share/bash-completion + dobashcomp data/completions/udisksctl +} + +pkg_preinst() { + # Remove gtk-doc symlink, #597628 + if [[ -L "${EROOT}"/usr/share/gtk-doc/html/udisks2 ]]; then + rm "${EROOT}"/usr/share/gtk-doc/html/udisks2 || die + fi +} + +pkg_postinst() { + udev_reload + + # TODO: obsolete with tmpfiles_process? + # mkdir -p "${EROOT}"/run #415987 + + tmpfiles_process udisks2.conf + + # See pkg_postinst() of >=sys-apps/baselayout-2.1-r1. Keep in sync? + if ! grep -qs "^tmpfs.*/run " "${EROOT}"/proc/mounts ; then + echo + ewarn "You should reboot the system now to get /run mounted with tmpfs!" + fi +} + +pkg_postrm() { + udev_reload +} -- cgit v1.2.3