Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package thunar for openSUSE:Factory checked 
in at 2026-01-27 16:12:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/thunar (Old)
 and      /work/SRC/openSUSE:Factory/.thunar.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "thunar"

Tue Jan 27 16:12:28 2026 rev:113 rq:1329289 version:4.20.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/thunar/thunar.changes    2026-01-26 
11:05:34.646166049 +0100
+++ /work/SRC/openSUSE:Factory/.thunar.new.1928/thunar.changes  2026-01-27 
16:13:02.975892265 +0100
@@ -1,0 +2,8 @@
+Mon Jan 26 09:17:55 UTC 2026 - Franck Bui <[email protected]>
+
+- Add 0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch 
(bsc#1255667)
+
+  This patch ensures Thunar only reacts to genuine media insertions, ignoring
+  irrelevant uevents.
+
+-------------------------------------------------------------------

New:
----
  0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch

----------(New B)----------
  New:
- Add 0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch 
(bsc#1255667)
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ thunar.spec ++++++
--- /var/tmp/diff_new_pack.xJLmlb/_old  2026-01-27 16:13:03.803926824 +0100
+++ /var/tmp/diff_new_pack.xJLmlb/_new  2026-01-27 16:13:03.803926824 +0100
@@ -1,6 +1,7 @@
 #
 # spec file for package thunar
 #
+# Copyright (c) 2026 SUSE LLC
 # Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
@@ -26,6 +27,7 @@
 URL:            https://docs.xfce.org/xfce/thunar/start
 Source:         
https://archive.xfce.org/src/xfce/thunar/4.20/%{name}-%{version}.tar.bz2
 Source100:      %{name}-rpmlintrc
+Patch:          0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch
 BuildRequires:  appstream-glib
 BuildRequires:  fdupes
 BuildRequires:  gettext >= 0.19.8
@@ -102,7 +104,7 @@
 %lang_package
 
 %prep
-%autosetup
+%autosetup -p1
 
 %build
 %configure \

++++++ 0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch ++++++
>From 08fd8e74ff93ddadab908d00135770c0a59861bb Mon Sep 17 00:00:00 2001
From: Franck Bui <[email protected]>
Date: Mon, 26 Jan 2026 09:59:38 +0100
Subject: [PATCH 1/1] Detect CDROM media changes using ID_FD_UUID udev property

Thunar currently interprets every "change" uevent from a CD-ROM device as
indicating that the media has changed, even when the uevent carries no
meaningful updates relevant to the application. This leads to incorrect
behavior, such as unnecessary mounting attempts triggered by synthetic uevents
(via `udevadm trigger /dev/sr0`) or unrelated system events.

A notable consequence is inconsistent handling of unmounts: after a user
explicitly unmounts a CDROM via the GUI, Thunar immediately remounts it due to
spurious uevents.

Since systemd v258, applying ACLs to seat devices involves triggering
uevents. When switching TTYs, these uevents cause Thunar to attempt mounting the
drive. However, with the active seat changed during the TTY switch, the mount
requires authentication, which prompts the user upon returning to the graphical
session.

To address this issue, introduce a check in the uevent handler to verify if the
filesystem UUID (ID_FS_UUID) has actually changed before treating a "change"
event as a media update. This ensures Thunar only reacts to genuine media
insertions, ignoring irrelevant uevents.

The FS UUID is stored in a new ThunarApplication field (cdrom_media_fs_uuid) and
updated only on confirmed changes. If no media is present, the stored UUID is
cleared.
---
 thunar/thunar-application.c | 40 ++++++++++++++++++++++++++++++-------
 1 file changed, 33 insertions(+), 7 deletions(-)

diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
index a8de3549..5398c3ec 100644
--- a/thunar/thunar-application.c
+++ b/thunar/thunar-application.c
@@ -247,6 +247,7 @@ struct _ThunarApplication
   GSList *volman_udis;
   guint   volman_idle_id;
   guint   volman_watch_id;
+  gchar  *cdrom_media_fs_uuid;
 #endif
 
   GList                         *files_to_launch;
@@ -406,6 +407,8 @@ thunar_application_startup (GApplication *gapp)
    * or disconnected from the computer */
   g_signal_connect (application->udev_client, "uevent",
                     G_CALLBACK (thunar_application_uevent), application);
+
+  application->cdrom_media_fs_uuid = NULL;
 #endif
 
   thunar_application_dbus_init (application);
@@ -455,6 +458,8 @@ thunar_application_shutdown (GApplication *gapp)
 
   /* disconnect from the udev client */
   g_object_unref (application->udev_client);
+
+  g_free(application->cdrom_media_fs_uuid);
 #endif
 
   /* drop any running "show dialogs" timer */
@@ -1068,6 +1073,33 @@ thunar_application_launch (ThunarApplication     
*application,
 
 
 #ifdef HAVE_GUDEV
+static gboolean has_cdrom_media_changed(GUdevDevice       *device,
+                                       ThunarApplication *application)
+{
+  const gchar *media_fs_uuid = NULL;
+
+  /* check if the device is a CD drive */
+  if (!g_udev_device_get_property_as_boolean (device, "ID_CDROM"))
+         return FALSE;
+
+  /* check if the CD drive has a media */
+  if (!g_udev_device_get_property_as_boolean (device, "ID_CDROM_MEDIA")) {
+         g_free(application->cdrom_media_fs_uuid);
+         application->cdrom_media_fs_uuid = NULL;
+         return FALSE;
+  }
+
+  media_fs_uuid = g_udev_device_get_property (device, "ID_FS_UUID");
+
+  if (g_strcmp0 (application->cdrom_media_fs_uuid, media_fs_uuid) == 0)
+         return FALSE;
+
+  g_free(application->cdrom_media_fs_uuid);
+  application->cdrom_media_fs_uuid = g_strdup(media_fs_uuid);
+
+  return TRUE;
+}
+
 static void
 thunar_application_uevent (GUdevClient       *client,
                            const gchar       *action,
@@ -1075,8 +1107,6 @@ thunar_application_uevent (GUdevClient       *client,
                            ThunarApplication *application)
 {
   const gchar *sysfs_path;
-  gboolean     is_cdrom = FALSE;
-  gboolean     has_media = FALSE;
   GSList      *lp;
 
   _thunar_return_if_fail (G_UDEV_IS_CLIENT (client));
@@ -1088,13 +1118,9 @@ thunar_application_uevent (GUdevClient       *client,
   /* determine the sysfs path of the device */
   sysfs_path = g_udev_device_get_sysfs_path (device);
 
-  /* check if the device is a CD drive */
-  is_cdrom = g_udev_device_get_property_as_boolean (device, "ID_CDROM");
-  has_media = g_udev_device_get_property_as_boolean (device, "ID_CDROM_MEDIA");
-
   /* distinguish between "add", "change" and "remove" actions, ignore "move" */
   if (g_strcmp0 (action, "add") == 0
-      || (is_cdrom && has_media && g_strcmp0 (action, "change") == 0))
+      || (has_cdrom_media_changed(device, application) && g_strcmp0 (action, 
"change") == 0))
     {
       /* only insert the path if we don't have it already */
       if (g_slist_find_custom (application->volman_udis, sysfs_path,
-- 
2.51.0

Reply via email to