Sync from SUSE:SLFO:Main gnome-settings-daemon revision 8431c873c6c450eaf04d8dc7c73adad1

This commit is contained in:
Adrian Schröter 2025-02-20 09:29:28 +01:00
parent 3b432b4bc4
commit 42d03445bc
7 changed files with 157 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.gnome.org/GNOME/gnome-settings-daemon.git</param>
<param name="revision">47.1</param>
<param name="revision">47.2</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>

BIN
gnome-settings-daemon-47.1.obscpio (Stored with Git LFS)

Binary file not shown.

BIN
gnome-settings-daemon-47.2.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,122 @@
From afc8df459f6603799a50f221e77dfdf4df1d6d56 Mon Sep 17 00:00:00 2001
From: Joan Torres <joan.torres@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.torres@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

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Tue Dec 10 09:57:27 UTC 2024 - Joan Torres <joan.torres@suse.com>
- Add gnome-settings-daemon-fix-stop-service.patch
* Part of the fix of bsc#1233824
* Reference: glgo#GNOME/gnome-settings-daemon!395
-------------------------------------------------------------------
Fri Nov 22 10:36:52 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Only recommend xf86-input-libinput if xorg-x11-server is present:
wayland does not rely on the xf86 drivers.
-------------------------------------------------------------------
Thu Nov 21 22:17:00 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 47.2:
+ Power:
- Fix possible invalid reads if backlight fails to initialize.
- Handle broken upower more elegantly.
- Test warning fixes.
+ Updated translations.
-------------------------------------------------------------------
Sun Sep 15 21:57:28 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@ -1,4 +1,4 @@
name: gnome-settings-daemon
version: 47.1
mtime: 1726434154
commit: 1d74286fc38483febffb935679ad9588a6b7321d
version: 47.2
mtime: 1732213073
commit: 845133f6f859d234733fcff3c4166243de9cb18b

View File

@ -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
@ -30,7 +30,7 @@
%define base_ver 47
Name: gnome-settings-daemon
Version: 47.1
Version: 47.2
Release: 0
Summary: Settings daemon for the GNOME desktop
License: GPL-2.0-or-later AND LGPL-2.1-only
@ -44,6 +44,8 @@ Patch0: gnome-settings-daemon-initial-keyboard.patch
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 sckang@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 hpj@suse.com -- notify user about auto suspend when returning from sleep
@ -113,7 +115,7 @@ BuildRequires: pkgconfig(wayland-client)
%endif
Recommends: iio-sensor-proxy
# g-s-d only support configurtion of libinput based pointer drivers now.
Recommends: xf86-input-libinput
Recommends: (xf86-input-libinput if xorg-x11-server)
%description
gnome-settings-daemon provides a daemon run by all GNOME sessions to