From 383099975c5e635646306edbb1ec0cc751e6d6f2 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 9 Mar 2026 14:54:15 +0100 Subject: [PATCH] * Mon Mar 09 2026 Tomas Bzatek - 2.11.1-1 - Version 2.11.1 (RHEL-150897) - udiskslinuxnvmecontroller: Fix sanitize job start (RHEL-69113) - udiskslinuxpartitiontable: Fix missing job completion (RHEL-124987) - udiskslinuxdevice: multipath handling fixes (RHEL-128598) - lvm2: Prevent a segfault on discarded probe output (RHEL-138293) - udisksmodulemanager: Silence console warnings when requested module is not available (RHEL-144145) - tests: Make sure to load sr_mod for cdrom tests (RHEL-153132) Resolves: RHEL-150897,RHEL-69113,RHEL-124987,RHEL-128598,RHEL-138293,RHEL-144145,RHEL-153132 --- .gitignore | 1 + sources | 2 +- udisks-2.11.90-tests_module_ENOENT.patch | 38 ++++++++++ udisks-2.11.90-tests_sr_mod.patch | 29 +++++++ ...ing_NULL_terminator_in_resolve_links.patch | 37 +++++++++ ...Silence_warnings_on_module_not_found.patch | 76 +++++++++++++++++++ udisks2.spec | 19 ++++- 7 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 udisks-2.11.90-tests_module_ENOENT.patch create mode 100644 udisks-2.11.90-tests_sr_mod.patch create mode 100644 udisks-2.11.90-udisksdaemonutil_missing_NULL_terminator_in_resolve_links.patch create mode 100644 udisks-2.11.90-udisksmodulemanager_Silence_warnings_on_module_not_found.patch diff --git a/.gitignore b/.gitignore index 919f18a..b84551a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /udisks-2.10.90.gitdb54112e.tar.bz2 /udisks-2.10.90.tar.bz2 /udisks-2.11.0.tar.bz2 +/udisks-2.11.1.tar.bz2 diff --git a/sources b/sources index da0149d..ecae2c7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (udisks-2.11.0.tar.bz2) = ddf7bbf6d71c100ea2787aa45d51ae84d8184d33d9e0c1c8824e3da1ca34814b3278f9f74a1aab7acc37efe3ed2b702404fbb9dc3733c0accbb366a74e7d3fe5 +SHA512 (udisks-2.11.1.tar.bz2) = c2ef8c1068f109bcc858a897cb45af970442170fc8dd991d5692b463c7f4693fe4731e4e5010bc923588a7ee9f1c794630ad5fffef454a9d959bcf17e8bf704f diff --git a/udisks-2.11.90-tests_module_ENOENT.patch b/udisks-2.11.90-tests_module_ENOENT.patch new file mode 100644 index 0000000..0f7c469 --- /dev/null +++ b/udisks-2.11.90-tests_module_ENOENT.patch @@ -0,0 +1,38 @@ +commit 8a52370659b94faf12886c80ce08ef55e7bfa726 +Author: Tomas Bzatek +Date: Mon Feb 23 14:56:53 2026 +0100 + + tests: Update expected error messages for unavailable modules + + Adapt the D-Bus test assertions to match the new "Module not available" + error message introduced by the g_access() check in + load_single_module_unlocked(). + + Co-Authored-By: Claude Opus 4.6 + +diff --git a/src/tests/dbus-tests/test_10_basic.py b/src/tests/dbus-tests/test_10_basic.py +index f5c77521..97a2faf0 100644 +--- a/src/tests/dbus-tests/test_10_basic.py ++++ b/src/tests/dbus-tests/test_10_basic.py +@@ -74,7 +74,7 @@ class UdisksBaseTest(udiskstestcase.UdisksTestCase): + manager.EnableModule(module, dbus.Boolean(False)) + manager.EnableModule(module, dbus.Boolean(True)) + with self.assertRaisesRegex(dbus.exceptions.DBusException, +- r'cannot open shared object file: No such file or directory'): ++ r'Module not available: '): + manager.EnableModule("non-exist_ent", dbus.Boolean(True)) + with self.assertRaisesRegex(dbus.exceptions.DBusException, + r'Module unloading is not currently supported.'): +diff --git a/src/tests/dbus-tests/udiskstestcase.py b/src/tests/dbus-tests/udiskstestcase.py +index 4e802f40..eef8e8ff 100644 +--- a/src/tests/dbus-tests/udiskstestcase.py ++++ b/src/tests/dbus-tests/udiskstestcase.py +@@ -428,7 +428,7 @@ class UdisksTestCase(unittest.TestCase): + manager.EnableModule(module, dbus.Boolean(True)) + return True + except dbus.exceptions.DBusException as e: +- msg = r"Error initializing module '%s': .*\.so: cannot open shared object file: No such file or directory" % module ++ msg = r"Error initializing module '%s': Module not available: " % module + if re.search(msg, e.get_dbus_message()): + return False + else: diff --git a/udisks-2.11.90-tests_sr_mod.patch b/udisks-2.11.90-tests_sr_mod.patch new file mode 100644 index 0000000..2406db9 --- /dev/null +++ b/udisks-2.11.90-tests_sr_mod.patch @@ -0,0 +1,29 @@ +commit f76b205c0e178ed849cc26abd55040e24af0ee70 +Author: guazhang +Date: Wed Mar 4 17:57:53 2026 +0800 + + tests: Make sure to load sr_mod for cdrom tests + +diff --git a/src/tests/dbus-tests/test_40_drive.py b/src/tests/dbus-tests/test_40_drive.py +index 07dba387..cdd69b97 100644 +--- a/src/tests/dbus-tests/test_40_drive.py ++++ b/src/tests/dbus-tests/test_40_drive.py +@@ -17,12 +17,17 @@ class UdisksDriveTest(udiskstestcase.UdisksTestCase): + def setUp(self): + # create new fake CD-ROM + # ptype=5 - created device will be CD drive, one new target and host ++ # ensure sr driver is available ++ self.run_command('modprobe sr_mod') + res, _ = self.run_command('modprobe scsi_debug ptype=5 num_tgts=1 add_host=1') + self.assertEqual(res, 0) + self.udev_settle() + dirs = [] +- # wait until directory appears ++ # wait until block directory appears (avoid infinite loop) ++ start = time.time() + while len(dirs) < 1: ++ if time.time() - start > 10: ++ self.fail('scsi_debug block device did not appear') + dirs = glob.glob('/sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*:*/block') + time.sleep(0.1) + diff --git a/udisks-2.11.90-udisksdaemonutil_missing_NULL_terminator_in_resolve_links.patch b/udisks-2.11.90-udisksdaemonutil_missing_NULL_terminator_in_resolve_links.patch new file mode 100644 index 0000000..d7857fe --- /dev/null +++ b/udisks-2.11.90-udisksdaemonutil_missing_NULL_terminator_in_resolve_links.patch @@ -0,0 +1,37 @@ +commit 42f1a7c66a1e40f8dddeb16fe5ff13fd86d563bf +Author: Tomas Bzatek +Date: Thu Feb 19 17:50:09 2026 +0100 + + udisksdaemonutil: Fix missing NULL terminator in resolve_links() + + Move the NULL sentinel addition after the out label so the returned + array is always properly NULL-terminated, even when g_dir_open() + fails. Also add the (array zero-terminated=1) introspection + annotation. + + Co-Authored-By: Claude Opus 4.6 + +diff --git a/src/udisksdaemonutil.c b/src/udisksdaemonutil.c +index 45f3d83c..3aebfdb1 100644 +--- a/src/udisksdaemonutil.c ++++ b/src/udisksdaemonutil.c +@@ -484,7 +484,7 @@ udisks_daemon_util_resolve_link (const gchar *path, + * Resolves all symlinks in @path/@dir_name. This can be used to + * easily walk e.g. holders or slaves of block devices. + * +- * Returns: An array of canonicalized absolute pathnames. Free with g_strfreev(). ++ * Returns: (array zero-terminated=1): An array of canonicalized absolute pathnames. Free with g_strfreev(). + */ + gchar ** + udisks_daemon_util_resolve_links (const gchar *path, +@@ -508,9 +508,9 @@ udisks_daemon_util_resolve_links (const gchar *path, + if (resolved != NULL) + g_ptr_array_add (p, resolved); + } +- g_ptr_array_add (p, NULL); + + out: ++ g_ptr_array_add (p, NULL); + if (dir != NULL) + g_dir_close (dir); + g_free (s); diff --git a/udisks-2.11.90-udisksmodulemanager_Silence_warnings_on_module_not_found.patch b/udisks-2.11.90-udisksmodulemanager_Silence_warnings_on_module_not_found.patch new file mode 100644 index 0000000..80bf3ae --- /dev/null +++ b/udisks-2.11.90-udisksmodulemanager_Silence_warnings_on_module_not_found.patch @@ -0,0 +1,76 @@ +commit 59d988f0f45bb83e3075e5404f3aef647e5d84e4 +Author: Tomas Bzatek +Date: Thu Feb 19 19:14:58 2026 +0100 + + udisksmodulemanager: Silence console warnings when requested module is not available + + Don't pollute stderr with messages about modules that are not available, + but still return the error from the D-Bus method call. + + The original intention behind the org.freedesktop.UDisks2.Manager.EnableModule() + method was to attempt to load a module and let the caller handle the error. + Reporting an error by the daemon that the module is unavailable may result + in excessive and mostly useless messages logged in the syslog. + + Co-Authored-By: Claude Opus 4.6 + +diff --git a/src/udiskslinuxmanager.c b/src/udiskslinuxmanager.c +index 6143507e..2597a3e6 100644 +--- a/src/udiskslinuxmanager.c ++++ b/src/udiskslinuxmanager.c +@@ -934,8 +934,12 @@ load_modules_in_idle_cb (gpointer user_data) + /* Load single requested module */ + if (! udisks_module_manager_load_single_module (module_manager, data->module_name, &error)) + { ++ if (g_error_matches (error, UDISKS_ERROR, UDISKS_ERROR_NOT_SUPPORTED)) ++ /* Module not available, change to UDISKS_ERROR_FAILED for backwards compatibility */ ++ error->code = UDISKS_ERROR_FAILED; ++ else ++ g_warning ("Error initializing module '%s': %s", data->module_name, error->message); + g_prefix_error (&error, "Error initializing module '%s': ", data->module_name); +- g_warning ("%s", error->message); + g_dbus_method_invocation_take_error (data->invocation, error); + } + else +diff --git a/src/udisksmodulemanager.c b/src/udisksmodulemanager.c +index 8d9df818..db320b0f 100644 +--- a/src/udisksmodulemanager.c ++++ b/src/udisksmodulemanager.c +@@ -31,6 +31,7 @@ + + #include + #include ++#include + #include + + #include "udisksdaemon.h" +@@ -295,6 +296,17 @@ load_single_module_unlocked (UDisksModuleManager *manager, + UDisksModuleNewFunc module_new_func; + UDisksModule *module; + ++ /* Unfortunately error reporting from dlopen() is done through dlerror() which ++ * only returns a string - no errno set (or at least not officially documented). ++ * Thus perform this extra check in a slightly racy way. ++ */ ++ if (g_access (sopath, R_OK) != 0) ++ { ++ g_set_error (error, UDISKS_ERROR, UDISKS_ERROR_NOT_SUPPORTED, ++ "Module not available: %s", sopath); ++ return FALSE; ++ } ++ + handle = g_module_open (sopath, 0); + if (handle == NULL) + { +@@ -450,8 +462,9 @@ udisks_module_manager_load_modules (UDisksModuleManager *manager) + &do_notify, + &error)) + { +- udisks_critical ("Error loading module: %s", +- error->message); ++ if (! g_error_matches (error, UDISKS_ERROR, UDISKS_ERROR_NOT_SUPPORTED)) ++ udisks_critical ("Error loading module: %s", ++ error->message); + g_clear_error (&error); + continue; + } diff --git a/udisks2.spec b/udisks2.spec index 9411b02..5c0fa10 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -22,12 +22,20 @@ Name: udisks2 Summary: Disk Manager -Version: 2.11.0 +Version: 2.11.1 Release: 1%{?dist} License: GPL-2.0-or-later URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 +# https://issues.redhat.com/browse/RHEL-128598 +Patch0: udisks-2.11.90-udisksdaemonutil_missing_NULL_terminator_in_resolve_links.patch +# https://issues.redhat.com/browse/RHEL-144145 +Patch1: udisks-2.11.90-udisksmodulemanager_Silence_warnings_on_module_not_found.patch +Patch2: udisks-2.11.90-tests_module_ENOENT.patch +# https://issues.redhat.com/browse/RHEL-153132 +Patch3: udisks-2.11.90-tests_sr_mod.patch + BuildRequires: make BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} @@ -334,6 +342,15 @@ fi %endif %changelog +* Mon Mar 09 2026 Tomas Bzatek - 2.11.1-1 +- Version 2.11.1 (RHEL-150897) +- udiskslinuxnvmecontroller: Fix sanitize job start (RHEL-69113) +- udiskslinuxpartitiontable: Fix missing job completion (RHEL-124987) +- udiskslinuxdevice: multipath handling fixes (RHEL-128598) +- lvm2: Prevent a segfault on discarded probe output (RHEL-138293) +- udisksmodulemanager: Silence console warnings when requested module is not available (RHEL-144145) +- tests: Make sure to load sr_mod for cdrom tests (RHEL-153132) + * Thu Nov 06 2025 Tomas Bzatek - 2.11.0-1 - Version 2.11.0 (RHEL-114981) - tests: Rework nvme revision check (RHEL-90572)