Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gnome-settings-daemon for 
openSUSE:Factory checked in at 2025-01-12 11:10:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-settings-daemon (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-settings-daemon.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-settings-daemon"

Sun Jan 12 11:10:26 2025 rev:198 rq:1236825 version:47.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/gnome-settings-daemon/gnome-settings-daemon.changes  
    2024-11-24 11:03:53.982095826 +0100
+++ 
/work/SRC/openSUSE:Factory/.gnome-settings-daemon.new.1881/gnome-settings-daemon.changes
    2025-01-12 11:11:09.679039796 +0100
@@ -1,0 +2,7 @@
+Tue Dec 10 09:57:27 UTC 2024 - Joan Torres <joan.tor...@suse.com>
+
+- Add gnome-settings-daemon-fix-stop-service.patch
+  * Part of the fix of bsc#1233824
+  * Reference: glgo#GNOME/gnome-settings-daemon!395
+
+-------------------------------------------------------------------

New:
----
  gnome-settings-daemon-fix-stop-service.patch

BETA DEBUG BEGIN:
  New:
- Add gnome-settings-daemon-fix-stop-service.patch
  * Part of the fix of bsc#1233824
BETA DEBUG END:

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

Other differences:
------------------
++++++ gnome-settings-daemon.spec ++++++
--- /var/tmp/diff_new_pack.RxBhID/_old  2025-01-12 11:11:10.579076833 +0100
+++ /var/tmp/diff_new_pack.RxBhID/_new  2025-01-12 11:11:10.583076997 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gnome-settings-daemon
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -44,6 +44,8 @@
 Patch1:         
gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch
 # PATCH-FIX-UPSTREAM 
0001-usb-protection-Treat-hubs-and-HID-devices-like-any-o.patch 
glgo#GNOME/gnome-settings-daemon#780, bsc#1226423, CVE-2024-38394 
sck...@suse.com -- usb-protection: Treat hubs and HID devices like any other 
USB gadget
 Patch4:         0001-usb-protection-Treat-hubs-and-HID-devices-like-any-o.patch
+# PATCH-FIX-UPSTREAM gnome-settings-daemon-fix-stop-service.patch bsc#1233824 
glgo#GNOME/gnome-settings-daemon!395-- sharing: Stop systemd service waiting 
when daemon is stopping
+Patch5:         gnome-settings-daemon-fix-stop-service.patch
 
 ## SLE/LEAP-only patches start at 1000
 # PATCH-FEATURE-OPENSUSE gnome-settings-daemon-notify-idle-resumed.patch 
bnc#439018 bnc#708182 bgo#575467 h...@suse.com -- notify user about auto 
suspend when returning from sleep

++++++ gnome-settings-daemon-fix-stop-service.patch ++++++
>From afc8df459f6603799a50f221e77dfdf4df1d6d56 Mon Sep 17 00:00:00 2001
From: Joan Torres <joan.tor...@suse.com>
Date: Wed, 11 Dec 2024 15:29:17 +0100
Subject: [PATCH 1/2] sharing: Stop assigned services properly on manager stop

Assigned services are started when sharing status is not offline.
But they were being stopped only when sharing status is available.
To fix this, stop assigned services when sharing status is not offline.

This doesn't affect configurable services which weren't already started.
---
 plugins/sharing/gsd-sharing-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/sharing/gsd-sharing-manager.c 
b/plugins/sharing/gsd-sharing-manager.c
index 8b818c4e..c20b42e6 100644
--- a/plugins/sharing/gsd-sharing-manager.c
+++ b/plugins/sharing/gsd-sharing-manager.c
@@ -951,7 +951,7 @@ gsd_sharing_manager_stop (GsdSharingManager *manager)
 
         cancel_pending_wait_tasks (manager);
 
-        if (manager->sharing_status == GSD_SHARING_STATUS_AVAILABLE &&
+        if (manager->sharing_status != GSD_SHARING_STATUS_OFFLINE &&
             manager->connection != NULL) {
                 manager->sharing_status = GSD_SHARING_STATUS_OFFLINE;
                 gsd_sharing_manager_sync_services (manager);
-- 
2.47.1


>From 9d92d287218733c5754c853c0a298874eb704754 Mon Sep 17 00:00:00 2001
From: Joan Torres <joan.tor...@suse.com>
Date: Wed, 11 Dec 2024 13:22:56 +0100
Subject: [PATCH 2/2] common: Stop manager before stopping main loop

When the sharing manager is stopped, some async calls are done to stop
some services. If the main loop is stopped before, those calls are not
handled properly and the services are left orphaned.

Stop the manager first and wait a few seconds before stopping the
main loop to allow the async calls to finish successfully.

This fixes an issue where the gnome-remote-desktop-handover.service was
not stopped on logout. Making the session on a new login, use the same old
handover daemon which is still listening to the old handover iface with
the old session id.
---
 plugins/common/daemon-skeleton.h | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/plugins/common/daemon-skeleton.h b/plugins/common/daemon-skeleton.h
index 40b7f149..8fb12422 100644
--- a/plugins/common/daemon-skeleton.h
+++ b/plugins/common/daemon-skeleton.h
@@ -30,6 +30,7 @@
 
 #define GNOME_SESSION_DBUS_NAME                     "org.gnome.SessionManager"
 #define GNOME_SESSION_CLIENT_PRIVATE_DBUS_INTERFACE 
"org.gnome.SessionManager.ClientPrivate"
+#define WAIT_BEFORE_STOPPING_LOOP 3
 
 static MANAGER *manager = NULL;
 static int timeout = -1;
@@ -53,10 +54,24 @@ respond_to_end_session (GDBusProxy *proxy)
                            -1, NULL, NULL, NULL);
 }
 
+static gboolean
+stop_loop (gpointer user_data)
+{
+        GMainLoop *loop = user_data;
+
+        if (g_main_loop_is_running (loop))
+                g_main_loop_quit (loop);
+
+        return G_SOURCE_REMOVE;
+}
+
 static void
 do_stop (GMainLoop *loop)
 {
-        g_main_loop_quit (loop);
+        if (manager)
+                STOP (manager);
+
+        g_timeout_add_seconds (WAIT_BEFORE_STOPPING_LOOP, stop_loop, loop);
 }
 
 static void
@@ -149,8 +164,7 @@ handle_sigterm (gpointer user_data)
 
   g_debug ("Got SIGTERM; shutting down ...");
 
-  if (g_main_loop_is_running (main_loop))
-    g_main_loop_quit (main_loop);
+  do_stop (main_loop);
 
   return G_SOURCE_REMOVE;
 }
@@ -229,8 +243,8 @@ main (int argc, char **argv)
 
        if (timeout > 0) {
                guint id;
-               id = g_timeout_add_seconds (timeout, (GSourceFunc) 
g_main_loop_quit, loop);
-               g_source_set_name_by_id (id, "[gnome-settings-daemon] 
g_main_loop_quit");
+               id = g_timeout_add_seconds (timeout, (GSourceFunc) do_stop, 
loop);
+               g_source_set_name_by_id (id, "[gnome-settings-daemon] do_stop");
        }
 
         install_signal_handler (loop);
@@ -255,8 +269,6 @@ main (int argc, char **argv)
 
         g_main_loop_run (loop);
 
-        STOP (manager);
-
         g_object_unref (manager);
         g_bus_unown_name (name_own_id);
 
-- 
2.47.1

Reply via email to