Sync from SUSE:SLFO:Main gnome-settings-daemon revision 4c72525fd219a7389cfc0aa7931ff095
This commit is contained in:
parent
0558026eac
commit
5488e6682d
101
0001-usb-protection-Treat-hubs-and-HID-devices-like-any-o.patch
Normal file
101
0001-usb-protection-Treat-hubs-and-HID-devices-like-any-o.patch
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
From a3c62f442981e39186ce78c140921c4bedfd7b16 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carlos Garnacho <carlosg@gnome.org>
|
||||||
|
Date: Fri, 17 May 2024 11:35:41 +0200
|
||||||
|
Subject: [PATCH] usb-protection: Treat hubs and HID devices like any other USB
|
||||||
|
gadget
|
||||||
|
|
||||||
|
The checks on the classes offered by a USB device are pretty lax and
|
||||||
|
uninformative from the kernel and UsbGuard levels, so our attempt at
|
||||||
|
user friendliness with USB hubs and HID devices may result in everyone
|
||||||
|
(lastly us) allowing maliciously crafted devices that present themselves
|
||||||
|
as one of these devices, but implement other classes (e.g. mass storage).
|
||||||
|
|
||||||
|
We believe this is ultimately an issue in the lower layers if this
|
||||||
|
may go through as good up to us and we cannot truly believe UsbGuard
|
||||||
|
information, but it is definitely us being the front face of this issue.
|
||||||
|
|
||||||
|
Avoid treating USB hubs and HID devices different to any other USB
|
||||||
|
gadget, this will require users to "enroll" them the same ways.
|
||||||
|
---
|
||||||
|
.../gsd-usb-protection-manager.c | 58 +++++--------------
|
||||||
|
1 file changed, 15 insertions(+), 43 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/usb-protection/gsd-usb-protection-manager.c b/plugins/usb-protection/gsd-usb-protection-manager.c
|
||||||
|
index 43644408..538b6b1f 100644
|
||||||
|
--- a/plugins/usb-protection/gsd-usb-protection-manager.c
|
||||||
|
+++ b/plugins/usb-protection/gsd-usb-protection-manager.c
|
||||||
|
@@ -678,56 +678,28 @@ on_usbguard_signal (GDBusProxy *proxy,
|
||||||
|
* If this device advertises also interfaces outside the HID class, or the
|
||||||
|
* HUB class, it is suspect. It could be a false positive because this could
|
||||||
|
* be a "smart" keyboard for example, but at this stage is better be safe. */
|
||||||
|
- if (hid_or_hub && !has_other_classes) {
|
||||||
|
- guint device_id;
|
||||||
|
+ if (protection_level == G_DESKTOP_USB_PROTECTION_LOCKSCREEN) {
|
||||||
|
show_notification (manager,
|
||||||
|
- _("New device detected"),
|
||||||
|
- _("Either one of your existing devices has been reconnected or a new one has been plugged in. "
|
||||||
|
- "If you did not do it, check your system for any suspicious device."));
|
||||||
|
- g_variant_get_child (parameters, POLICY_APPLIED_DEVICE_ID, "u", &device_id);
|
||||||
|
- authorize_device (manager, device_id);
|
||||||
|
+ _("Reconnect USB device"),
|
||||||
|
+ _("New device has been detected while you were away. "
|
||||||
|
+ "Please disconnect and reconnect the device to start using it."));
|
||||||
|
} else {
|
||||||
|
- if (protection_level == G_DESKTOP_USB_PROTECTION_LOCKSCREEN) {
|
||||||
|
- show_notification (manager,
|
||||||
|
- _("Reconnect USB device"),
|
||||||
|
- _("New device has been detected while you were away. "
|
||||||
|
- "Please disconnect and reconnect the device to start using it."));
|
||||||
|
- } else {
|
||||||
|
- const char* name_for_notification = device_name ? device_name : "unknown name";
|
||||||
|
- g_debug ("Showing notification for %s", name_for_notification);
|
||||||
|
- show_notification (manager,
|
||||||
|
- _("USB device blocked"),
|
||||||
|
- _("New device has been detected while you were away. "
|
||||||
|
- "It has been blocked because the USB protection is active."));
|
||||||
|
- }
|
||||||
|
+ const char* name_for_notification = device_name ? device_name : "unknown name";
|
||||||
|
+ g_debug ("Showing notification for %s", name_for_notification);
|
||||||
|
+ show_notification (manager,
|
||||||
|
+ _("USB device blocked"),
|
||||||
|
+ _("New device has been detected while you were away. "
|
||||||
|
+ "It has been blocked because the USB protection is active."));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* If the protection level is "lockscreen" the device will be automatically
|
||||||
|
* authorized by usbguard. */
|
||||||
|
if (protection_level == G_DESKTOP_USB_PROTECTION_ALWAYS) {
|
||||||
|
- /* We authorize the device if this is a HID,
|
||||||
|
- * e.g. a keyboard or a mouse, or an HUB.
|
||||||
|
- * We also lock the screen to prevent an attacker to plug malicious
|
||||||
|
- * devices if the legitimate user forgot to lock his session.
|
||||||
|
- *
|
||||||
|
- * If this device advertises also interfaces outside the HID class, or the
|
||||||
|
- * HUB class, it is suspect. It could be a false positive because this could
|
||||||
|
- * be a "smart" keyboard for example, but at this stage is better be safe. */
|
||||||
|
- if (hid_or_hub && !has_other_classes) {
|
||||||
|
- ManagerDeviceId* manager_devid = g_malloc ( sizeof (ManagerDeviceId) );
|
||||||
|
- manager_devid->manager = manager;
|
||||||
|
- g_variant_get_child (parameters, POLICY_APPLIED_DEVICE_ID, "u", &(manager_devid->device_id));
|
||||||
|
- gsd_screen_saver_call_lock (manager->screensaver_proxy,
|
||||||
|
- manager->cancellable,
|
||||||
|
- (GAsyncReadyCallback) on_screen_locked,
|
||||||
|
- manager_devid);
|
||||||
|
- } else {
|
||||||
|
- show_notification (manager,
|
||||||
|
- _("USB device blocked"),
|
||||||
|
- _("The new inserted device has been blocked because the USB protection is active. "
|
||||||
|
- "If you want to activate the device, disable the USB protection and re-plug "
|
||||||
|
- "the device."));
|
||||||
|
- }
|
||||||
|
+ show_notification (manager,
|
||||||
|
+ _("USB device blocked"),
|
||||||
|
+ _("The new inserted device has been blocked because the USB protection is active. "
|
||||||
|
+ "If you want to activate the device, disable the USB protection and re-plug "
|
||||||
|
+ "the device."));
|
||||||
|
} else {
|
||||||
|
/* This is protection level == Lockscreen, so we allow everything when the session is unlocked.
|
||||||
|
There should be a USBGuard rule that automatically allows all devices,
|
||||||
|
--
|
||||||
|
2.44.0
|
||||||
|
|
BIN
gnome-settings-daemon-44.1.tar.xz
(Stored with Git LFS)
BIN
gnome-settings-daemon-44.1.tar.xz
(Stored with Git LFS)
Binary file not shown.
BIN
gnome-settings-daemon-45.1.tar.xz
(Stored with Git LFS)
Normal file
BIN
gnome-settings-daemon-45.1.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,7 +1,8 @@
|
|||||||
diff -urp gnome-settings-daemon-3.33.90.orig/plugins/media-keys/gsd-media-keys-manager.c gnome-settings-daemon-3.33.90/plugins/media-keys/gsd-media-keys-manager.c
|
Index: gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
--- gnome-settings-daemon-3.33.90.orig/plugins/media-keys/gsd-media-keys-manager.c 2019-08-05 18:40:19.000000000 -0500
|
===================================================================
|
||||||
+++ gnome-settings-daemon-3.33.90/plugins/media-keys/gsd-media-keys-manager.c 2019-08-31 06:38:56.889827801 -0500
|
--- gnome-settings-daemon-45.0.orig/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
@@ -374,7 +374,7 @@ get_key_string (MediaKey *key)
|
+++ gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
|
@@ -350,7 +350,7 @@ get_key_string (MediaKey *key)
|
||||||
else if (key->custom_path != NULL)
|
else if (key->custom_path != NULL)
|
||||||
return g_strdup_printf ("custom:%s", key->custom_path);
|
return g_strdup_printf ("custom:%s", key->custom_path);
|
||||||
else
|
else
|
||||||
@ -10,7 +11,7 @@ diff -urp gnome-settings-daemon-3.33.90.orig/plugins/media-keys/gsd-media-keys-m
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GStrv
|
static GStrv
|
||||||
@@ -416,7 +416,7 @@ get_bindings (GsdMediaKeysManager *manag
|
@@ -392,7 +392,7 @@ get_bindings (GsdMediaKeysManager *manag
|
||||||
key->custom_path);
|
key->custom_path);
|
||||||
binding = g_settings_get_string (settings, "binding");
|
binding = g_settings_get_string (settings, "binding");
|
||||||
} else
|
} else
|
||||||
@ -19,9 +20,10 @@ diff -urp gnome-settings-daemon-3.33.90.orig/plugins/media-keys/gsd-media-keys-m
|
|||||||
|
|
||||||
array = g_ptr_array_new ();
|
array = g_ptr_array_new ();
|
||||||
g_ptr_array_add (array, binding);
|
g_ptr_array_add (array, binding);
|
||||||
diff -urp gnome-settings-daemon-3.33.90.orig/plugins/rfkill/rfkill-glib.c gnome-settings-daemon-3.33.90/plugins/rfkill/rfkill-glib.c
|
Index: gnome-settings-daemon-45.0/plugins/rfkill/rfkill-glib.c
|
||||||
--- gnome-settings-daemon-3.33.90.orig/plugins/rfkill/rfkill-glib.c 2019-08-05 18:40:19.000000000 -0500
|
===================================================================
|
||||||
+++ gnome-settings-daemon-3.33.90/plugins/rfkill/rfkill-glib.c 2019-08-31 06:39:55.674139424 -0500
|
--- gnome-settings-daemon-45.0.orig/plugins/rfkill/rfkill-glib.c
|
||||||
|
+++ gnome-settings-daemon-45.0/plugins/rfkill/rfkill-glib.c
|
||||||
@@ -268,7 +268,7 @@ op_to_string (unsigned int op)
|
@@ -268,7 +268,7 @@ op_to_string (unsigned int op)
|
||||||
case RFKILL_OP_CHANGE_ALL:
|
case RFKILL_OP_CHANGE_ALL:
|
||||||
return "CHANGE_ALL";
|
return "CHANGE_ALL";
|
||||||
@ -31,10 +33,11 @@ diff -urp gnome-settings-daemon-3.33.90.orig/plugins/rfkill/rfkill-glib.c gnome-
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
diff -urp gnome-settings-daemon-3.33.90.orig/plugins/xsettings/xsettings-manager.c gnome-settings-daemon-3.33.90/plugins/xsettings/xsettings-manager.c
|
Index: gnome-settings-daemon-45.0/plugins/xsettings/xsettings-manager.c
|
||||||
--- gnome-settings-daemon-3.33.90.orig/plugins/xsettings/xsettings-manager.c 2019-08-05 18:40:19.000000000 -0500
|
===================================================================
|
||||||
+++ gnome-settings-daemon-3.33.90/plugins/xsettings/xsettings-manager.c 2019-08-31 06:40:54.030448794 -0500
|
--- gnome-settings-daemon-45.0.orig/plugins/xsettings/xsettings-manager.c
|
||||||
@@ -268,7 +268,7 @@ xsettings_get_typecode (GVariant *value)
|
+++ gnome-settings-daemon-45.0/plugins/xsettings/xsettings-manager.c
|
||||||
|
@@ -271,7 +271,7 @@ xsettings_get_typecode (GVariant *value)
|
||||||
case G_VARIANT_CLASS_TUPLE:
|
case G_VARIANT_CLASS_TUPLE:
|
||||||
return XSETTINGS_TYPE_COLOR;
|
return XSETTINGS_TYPE_COLOR;
|
||||||
default:
|
default:
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
From fd0df3003ba7c0ae4d04a8314358db7f82dd2ab1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Felix Zhang <fezhang@suse.com>
|
|
||||||
Date: Tue, 6 May 2014 16:13:04 +0800
|
|
||||||
Subject: [PATCH] hide warnings
|
|
||||||
|
|
||||||
---
|
|
||||||
diff -urp gnome-settings-daemon-3.33.90.orig/plugins/color/gsd-color-profiles.c gnome-settings-daemon-3.33.90/plugins/color/gsd-color-profiles.c
|
|
||||||
--- gnome-settings-daemon-3.33.90.orig/plugins/color/gsd-color-profiles.c 2019-08-05 18:40:19.000000000 -0500
|
|
||||||
+++ gnome-settings-daemon-3.33.90/plugins/color/gsd-color-profiles.c 2019-08-31 19:41:32.942733480 -0500
|
|
||||||
@@ -71,7 +71,9 @@ gcm_session_client_connect_cb (GObject *
|
|
||||||
profiles = GSD_COLOR_PROFILES (user_data);
|
|
||||||
ret = cd_client_get_has_server (profiles->client);
|
|
||||||
if (!ret) {
|
|
||||||
+ /* hide this warning for SLES
|
|
||||||
g_warning ("There is no colord server available");
|
|
||||||
+ */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff -urp gnome-settings-daemon-3.33.90.orig/plugins/color/gsd-color-state.c gnome-settings-daemon-3.33.90/plugins/color/gsd-color-state.c
|
|
||||||
--- gnome-settings-daemon-3.33.90.orig/plugins/color/gsd-color-state.c 2019-08-05 18:40:19.000000000 -0500
|
|
||||||
+++ gnome-settings-daemon-3.33.90/plugins/color/gsd-color-state.c 2019-08-31 19:42:00.470879362 -0500
|
|
||||||
@@ -1359,7 +1359,9 @@ gcm_session_client_connect_cb (GObject *
|
|
||||||
/* is there an available colord instance? */
|
|
||||||
ret = cd_client_get_has_server (state->client);
|
|
||||||
if (!ret) {
|
|
||||||
+ /* hide this warning for SLES
|
|
||||||
g_warning ("There is no colord server available");
|
|
||||||
+ */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
@ -13,10 +13,11 @@ https://bugzilla.suse.com/show_bug.cgi?id=979051
|
|||||||
plugins/keyboard/gsd-keyboard-manager.c | 18 +++++++++++++-----
|
plugins/keyboard/gsd-keyboard-manager.c | 18 +++++++++++++-----
|
||||||
1 file changed, 13 insertions(+), 5 deletions(-)
|
1 file changed, 13 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff -urp gnome-settings-daemon-3.33.90.orig/plugins/keyboard/gsd-keyboard-manager.c gnome-settings-daemon-3.33.90/plugins/keyboard/gsd-keyboard-manager.c
|
Index: b/plugins/keyboard/gsd-keyboard-manager.c
|
||||||
--- gnome-settings-daemon-3.33.90.orig/plugins/keyboard/gsd-keyboard-manager.c 2019-08-05 18:40:19.000000000 -0500
|
===================================================================
|
||||||
+++ gnome-settings-daemon-3.33.90/plugins/keyboard/gsd-keyboard-manager.c 2019-08-31 06:29:26.930806593 -0500
|
--- a/plugins/keyboard/gsd-keyboard-manager.c
|
||||||
@@ -331,7 +331,7 @@ update_gtk_im_module (GsdKeyboardManager
|
+++ b/plugins/keyboard/gsd-keyboard-manager.c
|
||||||
|
@@ -207,7 +207,7 @@ settings_changed (GSettings *se
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -25,7 +26,7 @@ diff -urp gnome-settings-daemon-3.33.90.orig/plugins/keyboard/gsd-keyboard-manag
|
|||||||
{
|
{
|
||||||
GVariantBuilder builder;
|
GVariantBuilder builder;
|
||||||
GVariant *v;
|
GVariant *v;
|
||||||
@@ -349,7 +349,7 @@ get_sources_from_xkb_config (GsdKeyboard
|
@@ -225,7 +225,7 @@ get_sources_from_xkb_config (GsdKeyboard
|
||||||
|
|
||||||
init_builder_with_sources (&builder, manager->input_sources_settings);
|
init_builder_with_sources (&builder, manager->input_sources_settings);
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ diff -urp gnome-settings-daemon-3.33.90.orig/plugins/keyboard/gsd-keyboard-manag
|
|||||||
g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_XKB, DEFAULT_LAYOUT);
|
g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_XKB, DEFAULT_LAYOUT);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -528,15 +528,23 @@ maybe_create_initial_settings (GsdKeyboa
|
@@ -404,15 +404,23 @@ maybe_create_initial_settings (GsdKeyboa
|
||||||
|
|
||||||
settings = manager->input_sources_settings;
|
settings = manager->input_sources_settings;
|
||||||
|
|
||||||
|
@ -1,16 +1,7 @@
|
|||||||
From 3d9c3ecda9c68039c309bfb6bfc93830c4a0e20e Mon Sep 17 00:00:00 2001
|
Index: gnome-settings-daemon-45.0/data/gsd-enums.h
|
||||||
From: Felix Zhang <fezhang@suse.com>
|
===================================================================
|
||||||
Date: Mon, 12 Sep 2016 18:00:07 +0800
|
--- gnome-settings-daemon-45.0.orig/data/gsd-enums.h
|
||||||
Subject: [PATCH] more power button actions
|
+++ gnome-settings-daemon-45.0/data/gsd-enums.h
|
||||||
|
|
||||||
---
|
|
||||||
data/gsd-enums.h | 2 ++
|
|
||||||
plugins/media-keys/gsd-media-keys-manager.c | 6 ++++++
|
|
||||||
2 files changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff -urp gnome-settings-daemon-3.33.90.orig/data/gsd-enums.h gnome-settings-daemon-3.33.90/data/gsd-enums.h
|
|
||||||
--- gnome-settings-daemon-3.33.90.orig/data/gsd-enums.h 2019-08-05 18:40:19.000000000 -0500
|
|
||||||
+++ gnome-settings-daemon-3.33.90/data/gsd-enums.h 2019-08-31 19:45:22.123948132 -0500
|
|
||||||
@@ -105,6 +105,7 @@ typedef enum
|
@@ -105,6 +105,7 @@ typedef enum
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
@ -19,14 +10,15 @@ diff -urp gnome-settings-daemon-3.33.90.orig/data/gsd-enums.h gnome-settings-dae
|
|||||||
GSD_POWER_BUTTON_ACTION_SUSPEND,
|
GSD_POWER_BUTTON_ACTION_SUSPEND,
|
||||||
GSD_POWER_BUTTON_ACTION_HIBERNATE,
|
GSD_POWER_BUTTON_ACTION_HIBERNATE,
|
||||||
GSD_POWER_BUTTON_ACTION_INTERACTIVE
|
GSD_POWER_BUTTON_ACTION_INTERACTIVE
|
||||||
diff -urp gnome-settings-daemon-3.33.90.orig/plugins/media-keys/gsd-media-keys-manager.c gnome-settings-daemon-3.33.90/plugins/media-keys/gsd-media-keys-manager.c
|
Index: gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
--- gnome-settings-daemon-3.33.90.orig/plugins/media-keys/gsd-media-keys-manager.c 2019-08-31 19:31:09.939430941 -0500
|
===================================================================
|
||||||
+++ gnome-settings-daemon-3.33.90/plugins/media-keys/gsd-media-keys-manager.c 2019-08-31 19:45:22.127948152 -0500
|
--- gnome-settings-daemon-45.0.orig/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
@@ -2230,6 +2230,9 @@ do_config_power_button_action (GsdMediaK
|
+++ gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
|
@@ -2053,6 +2053,9 @@ do_config_power_button_action (GsdMediaK
|
||||||
|
}
|
||||||
|
|
||||||
action_type = g_settings_get_enum (priv->power_settings, "power-button-action");
|
|
||||||
switch (action_type) {
|
switch (action_type) {
|
||||||
+ case GSD_POWER_BUTTON_ACTION_SHUTDOWN:
|
+ case GSD_POWER_BUTTON_ACTION_SHUTDOWN:
|
||||||
+ do_config_power_action (manager, GSD_POWER_ACTION_SHUTDOWN, in_lock_screen);
|
+ do_config_power_action (manager, GSD_POWER_ACTION_SHUTDOWN, in_lock_screen);
|
||||||
+ break;
|
+ break;
|
||||||
case GSD_POWER_BUTTON_ACTION_SUSPEND:
|
case GSD_POWER_BUTTON_ACTION_SUSPEND:
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Index: gnome-settings-daemon-41.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
|
Index: gnome-settings-daemon-45.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gnome-settings-daemon-41.0.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
|
--- gnome-settings-daemon-45.0.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
|
||||||
+++ gnome-settings-daemon-41.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
|
+++ gnome-settings-daemon-45.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
|
||||||
@@ -41,6 +41,11 @@
|
@@ -41,6 +41,11 @@
|
||||||
<summary>Power button action</summary>
|
<summary>Power button action</summary>
|
||||||
<description>The action to take when the system power button is pressed. This action is hard-coded (and the setting ignored) on virtual machines (power off) and tablets (suspend).</description>
|
<description>The action to take when the system power button is pressed. Virtual machines only honor the 'nothing' action, and will shutdown otherwise. Tablets always suspend, ignoring all the other action options.</description>
|
||||||
</key>
|
</key>
|
||||||
+ <key name="notify-idle-resumed" type="b">
|
+ <key name="notify-idle-resumed" type="b">
|
||||||
+ <default>true</default>
|
+ <default>true</default>
|
||||||
@ -14,27 +14,27 @@ Index: gnome-settings-daemon-41.0/data/org.gnome.settings-daemon.plugins.power.g
|
|||||||
<key name="power-saver-profile-on-low-battery" type="b">
|
<key name="power-saver-profile-on-low-battery" type="b">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
<summary>Enable power-saver profile when battery is low</summary>
|
<summary>Enable power-saver profile when battery is low</summary>
|
||||||
Index: gnome-settings-daemon-41.0/plugins/power/gsd-power-manager.c
|
Index: gnome-settings-daemon-45.0/plugins/power/gsd-power-manager.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gnome-settings-daemon-41.0.orig/plugins/power/gsd-power-manager.c
|
--- gnome-settings-daemon-45.0.orig/plugins/power/gsd-power-manager.c
|
||||||
+++ gnome-settings-daemon-41.0/plugins/power/gsd-power-manager.c
|
+++ gnome-settings-daemon-45.0/plugins/power/gsd-power-manager.c
|
||||||
@@ -164,6 +164,7 @@ struct _GsdPowerManager
|
@@ -165,6 +165,7 @@ struct _GsdPowerManager
|
||||||
NotifyNotification *notification_ups_discharging;
|
NotifyNotification *notification_ups_discharging;
|
||||||
NotifyNotification *notification_low;
|
NotifyNotification *notification_low;
|
||||||
NotifyNotification *notification_sleep_warning;
|
NotifyNotification *notification_sleep_warning;
|
||||||
+ NotifyNotification *notification_resumed;
|
+ NotifyNotification *notification_resumed;
|
||||||
GsdPowerActionType sleep_action_type;
|
GsdPowerActionType sleep_action_type;
|
||||||
GHashTable *devices_notified_ht; /* key = serial str, value = UpDeviceLevel */
|
GHashTable *devices_notified_ht; /* key = serial str, value = UpDeviceLevel */
|
||||||
gboolean battery_is_low; /* battery low, or UPS discharging */
|
gboolean battery_is_low; /* battery low, or UPS discharging */
|
||||||
@@ -205,6 +206,7 @@ struct _GsdPowerManager
|
@@ -206,6 +207,7 @@ struct _GsdPowerManager
|
||||||
gboolean inhibit_suspend_taken;
|
gboolean inhibit_suspend_taken;
|
||||||
guint inhibit_lid_switch_timer_id;
|
guint inhibit_lid_switch_timer_id;
|
||||||
gboolean is_virtual_machine;
|
gboolean is_virtual_machine;
|
||||||
+ GsdPowerActionType last_idle_power_action;
|
+ GsdPowerActionType last_idle_power_action;
|
||||||
|
|
||||||
/* Idles */
|
/* Idles */
|
||||||
GnomeIdleMonitor *idle_monitor;
|
GnomeIdleMonitor *idle_monitor;
|
||||||
@@ -1744,6 +1746,49 @@ is_session_active (GsdPowerManager *mana
|
@@ -1730,6 +1732,49 @@ is_session_active (GsdPowerManager *mana
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -84,24 +84,23 @@ Index: gnome-settings-daemon-41.0/plugins/power/gsd-power-manager.c
|
|||||||
idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
|
idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
|
||||||
{
|
{
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
@@ -1824,6 +1869,7 @@ idle_set_mode (GsdPowerManager *manager,
|
@@ -1810,6 +1855,7 @@ idle_set_mode (GsdPowerManager *manager,
|
||||||
action_type = g_settings_get_enum (manager->settings,
|
action_type = g_settings_get_enum (manager->settings,
|
||||||
"sleep-inactive-ac-type");
|
"sleep-inactive-ac-type");
|
||||||
}
|
}
|
||||||
+ manager->last_idle_power_action = action_type;
|
+ manager->last_idle_power_action = action_type;
|
||||||
do_power_action_type (manager, action_type);
|
do_power_action_type (manager, action_type);
|
||||||
|
|
||||||
/* turn on screen and restore user-selected brightness level */
|
/* turn on screen and restore user-selected brightness level */
|
||||||
@@ -2777,6 +2823,12 @@ handle_suspend_actions (GsdPowerManager
|
@@ -2784,6 +2830,11 @@ handle_suspend_actions (GsdPowerManager
|
||||||
static void
|
static void
|
||||||
handle_resume_actions (GsdPowerManager *manager)
|
handle_resume_actions (GsdPowerManager *manager)
|
||||||
{
|
{
|
||||||
+ if (manager->last_idle_power_action == GSD_POWER_ACTION_SUSPEND ||
|
+ if (manager->last_idle_power_action == GSD_POWER_ACTION_SUSPEND ||
|
||||||
+ manager->last_idle_power_action == GSD_POWER_ACTION_HIBERNATE)
|
+ manager->last_idle_power_action == GSD_POWER_ACTION_HIBERNATE)
|
||||||
+ show_resumed_notification (manager);
|
+ show_resumed_notification (manager);
|
||||||
+
|
+
|
||||||
+ manager->last_idle_power_action = GSD_POWER_ACTION_NOTHING;
|
+ manager->last_idle_power_action = GSD_POWER_ACTION_NOTHING;
|
||||||
+
|
|
||||||
/* ensure we turn the panel back on after resume */
|
/* ensure we turn the panel back on after resume */
|
||||||
backlight_enable (manager);
|
backlight_enable (manager);
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: gnome-settings-daemon-3.32.1/plugins/keyboard/gsd-keyboard-manager.c
|
Index: b/plugins/keyboard/gsd-keyboard-manager.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gnome-settings-daemon-3.32.1.orig/plugins/keyboard/gsd-keyboard-manager.c
|
--- a/plugins/keyboard/gsd-keyboard-manager.c
|
||||||
+++ gnome-settings-daemon-3.32.1/plugins/keyboard/gsd-keyboard-manager.c
|
+++ b/plugins/keyboard/gsd-keyboard-manager.c
|
||||||
@@ -524,7 +524,11 @@ get_sources_from_xkb_config (GsdKeyboard
|
@@ -251,7 +251,11 @@ get_sources_from_xkb_config (GsdKeyboard
|
||||||
else
|
else
|
||||||
id = g_strdup (layouts[i]);
|
id = g_strdup (layouts[i]);
|
||||||
|
|
||||||
|
@ -1,3 +1,99 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 19 02:38:55 UTC 2024 - Jonathan Kang <songchuan.kang@suse.com>
|
||||||
|
|
||||||
|
- Add 0001-usb-protection-Treat-hubs-and-HID-devices-like-any-o.patch:
|
||||||
|
usb-protection: Treat hubs and HID devices like any other USB
|
||||||
|
gadget(glgo#GNOME/gnome-settings-daemon#780, bsc#1226423,
|
||||||
|
CVE-2024-38394).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 4 17:03:51 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Update to version 45.1:
|
||||||
|
+ Power: Compiler warning fixes.
|
||||||
|
+ Smartcard: Error handling fix.
|
||||||
|
+ USB Protection: Comment clean up.
|
||||||
|
+ Updated translations.
|
||||||
|
- Drop upstream fixed patches:
|
||||||
|
+ 41d0dc1db4d75c37ba67fe903105b4e162d42f1a.patch
|
||||||
|
+ 538816ff42f682fc4b541810ca107486abab9976.patch
|
||||||
|
+ a059909d62da0c11774f1089d02937699fabf150.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 28 12:06:23 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Use %patch -p N instead of deprecated %patchN.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 26 12:06:19 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Add a059909d62da0c11774f1089d02937699fabf150.patch: power: Fix
|
||||||
|
enum mismatch warning
|
||||||
|
- Add 41d0dc1db4d75c37ba67fe903105b4e162d42f1a.patch: power: Fix
|
||||||
|
uninitialised variable warning
|
||||||
|
- Renumber patches, ensure we have a patch0 when upstream patches
|
||||||
|
are available in future release.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 26 08:40:13 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Add 538816ff42f682fc4b541810ca107486abab9976.patch: smartcard:
|
||||||
|
Steal error when propagating through GTask.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 18 03:01:27 UTC 2023 - Rahul Jain <rahul.jain@suse.com>
|
||||||
|
|
||||||
|
- Rebase patches on gnome-settings-daemon 45(bsc#1216073)
|
||||||
|
+ Patch1000:gnome-settings-daemon-notify-idle-resumed.patch
|
||||||
|
+ Patch1001:gnome-settings-daemon-more-power-button-actions.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Sep 16 15:31:51 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Update to version 45.0:
|
||||||
|
+ Updated translations.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 6 03:06:15 UTC 2023 - Luciano Santos <luc14n0@opensuse.org>
|
||||||
|
|
||||||
|
- Update to version 45.rc:
|
||||||
|
+ Smartcards: Rewrite to use p11-kit backend via Gck API.
|
||||||
|
+ Updated translations.
|
||||||
|
- Replace BuildRequires on pkgconfig(nss) with pkgconfig(gck-2),
|
||||||
|
following upstream change. And nest it under if-with "smartcard",
|
||||||
|
as it's only required when building with smartcard support.
|
||||||
|
- Refresh patches with Quilt.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 11 10:37:50 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Update to version 45.beta:
|
||||||
|
+ Fix linkage of GResources.
|
||||||
|
+ USB protection: Change wording of notification.
|
||||||
|
+ Updated translations.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 4 09:04:02 UTC 2023 - Yifan Jiang <yfjiang@suse.com>
|
||||||
|
|
||||||
|
- Do not use %autopatch to build on SLE where rpm version is not
|
||||||
|
ready for the macro.
|
||||||
|
- Drop patch gnome-settings-daemon-bnc873545-hide-warnings.patch:
|
||||||
|
the relevant color management has been moved to mutter.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 7 19:14:08 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Update to version 45.alpha:
|
||||||
|
+ Housekeeping: Clean up x-large and xx-large thumbnails.
|
||||||
|
+ Power:
|
||||||
|
- Respect the "nothing" power-button-action for VMs.
|
||||||
|
- Expose number of supported steps for keyboard backlight.
|
||||||
|
+ Screensaver: Better explain why out-of-spec D-Bus methods don't
|
||||||
|
work.
|
||||||
|
+ USB protection: Fix race conditions and other general
|
||||||
|
improvements.
|
||||||
|
+ Updated translations.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 18 14:40:35 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
Tue Apr 18 14:40:35 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
@ -122,6 +218,15 @@ Fri Feb 18 09:37:49 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com>
|
|||||||
BuildRequires following upstreams port.
|
BuildRequires following upstreams port.
|
||||||
- Drop afa7e4bb9c519e2daf500a6079088669500768c0.patch.: Fixed
|
- Drop afa7e4bb9c519e2daf500a6079088669500768c0.patch.: Fixed
|
||||||
upstream.
|
upstream.
|
||||||
|
- Drop fix-meson-i18n.patch: Fixed upstream.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 18 08:37:50 UTC 2022 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
- Add patch to fix build with meson >0.60.0 which now fails if a
|
||||||
|
positional argument is used in i18n.merge_file instead of
|
||||||
|
ignoring it:
|
||||||
|
* fix-meson-i18n.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 18 08:37:49 UTC 2022 - Yifan Jiang <yfjiang@suse.com>
|
Fri Feb 18 08:37:49 UTC 2022 - Yifan Jiang <yfjiang@suse.com>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package gnome-settings-daemon
|
# spec file for package gnome-settings-daemon
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -27,31 +27,31 @@
|
|||||||
%bcond_without wacom
|
%bcond_without wacom
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define base_ver 44
|
%define base_ver 45
|
||||||
|
|
||||||
Name: gnome-settings-daemon
|
Name: gnome-settings-daemon
|
||||||
Version: 44.1
|
Version: 45.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Settings daemon for the GNOME desktop
|
Summary: Settings daemon for the GNOME desktop
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-only
|
License: GPL-2.0-or-later AND LGPL-2.1-only
|
||||||
Group: System/GUI/GNOME
|
Group: System/GUI/GNOME
|
||||||
URL: https://gitlab.gnome.org/GNOME/gnome-settings-daemon
|
URL: https://gitlab.gnome.org/GNOME/gnome-settings-daemon
|
||||||
Source0: https://download.gnome.org/sources/gnome-settings-daemon/44/%{name}-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/gnome-settings-daemon/45/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
# PATCH-FIX-OPENSUSE gnome-settings-daemon-initial-keyboard.patch bsc#979051 boo#1009515 federico@suse.com -- Deal with the default keyboard being set from xkb instead of GNOME
|
# PATCH-FIX-OPENSUSE gnome-settings-daemon-initial-keyboard.patch bsc#979051 boo#1009515 federico@suse.com -- Deal with the default keyboard being set from xkb instead of GNOME
|
||||||
Patch1: gnome-settings-daemon-initial-keyboard.patch
|
Patch0: gnome-settings-daemon-initial-keyboard.patch
|
||||||
# PATCH-FIX-OPENSUSE gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch bnc#1029083 boo#1056289 qzhao@suse.com -- Switch new user's default input engine from "anthy" to "mozc" in gnome-desktop with Japanese language and ibus input frame-work condition.
|
# PATCH-FIX-OPENSUSE gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch bnc#1029083 boo#1056289 qzhao@suse.com -- Switch new user's default input engine from "anthy" to "mozc" in gnome-desktop with Japanese language and ibus input frame-work condition.
|
||||||
Patch2: gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch
|
Patch1: gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch
|
||||||
# PATCH-FIX-UPSTREAM gnome-settings-daemon-bgo793253.patch bgo#793253 dimstar@opensuse.org -- Fix no-return-in-nonvoid-function
|
# PATCH-FIX-UPSTREAM gnome-settings-daemon-bgo793253.patch bgo#793253 dimstar@opensuse.org -- Fix no-return-in-nonvoid-function
|
||||||
Patch3: gnome-settings-daemon-bgo793253.patch
|
Patch2: gnome-settings-daemon-bgo793253.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
|
||||||
|
Patch3: 0001-usb-protection-Treat-hubs-and-HID-devices-like-any-o.patch
|
||||||
|
|
||||||
## SLE/LEAP-only patches start at 1000
|
## 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
|
# 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
|
||||||
Patch1000: gnome-settings-daemon-notify-idle-resumed.patch
|
Patch1000: gnome-settings-daemon-notify-idle-resumed.patch
|
||||||
# PATCH-FIX-OPENSUSE gnome-settings-daemon-bnc873545-hide-warnings.patch bnc#873545 fezhang@suse.com -- hide the warnings when g-s-d cannot find colord running, which is expected on SLES
|
|
||||||
Patch1001: gnome-settings-daemon-bnc873545-hide-warnings.patch
|
|
||||||
# PATCH-FIX-OPENSUSE gnome-settings-daemon-more-power-button-actions.patch bsc#996342 fezhang@suse.com -- Bring back the "shutdown" and "interactive" power button actions.
|
# PATCH-FIX-OPENSUSE gnome-settings-daemon-more-power-button-actions.patch bsc#996342 fezhang@suse.com -- Bring back the "shutdown" and "interactive" power button actions.
|
||||||
Patch1002: gnome-settings-daemon-more-power-button-actions.patch
|
Patch1001: gnome-settings-daemon-more-power-button-actions.patch
|
||||||
|
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -85,7 +85,6 @@ BuildRequires: pkgconfig(libpulse) >= 2.0
|
|||||||
BuildRequires: pkgconfig(libpulse-mainloop-glib) >= 2.0
|
BuildRequires: pkgconfig(libpulse-mainloop-glib) >= 2.0
|
||||||
BuildRequires: pkgconfig(librsvg-2.0) >= 2.36.2
|
BuildRequires: pkgconfig(librsvg-2.0) >= 2.36.2
|
||||||
BuildRequires: pkgconfig(mm-glib) >= 1.0
|
BuildRequires: pkgconfig(mm-glib) >= 1.0
|
||||||
BuildRequires: pkgconfig(nss)
|
|
||||||
BuildRequires: pkgconfig(pango) >= 1.20.0
|
BuildRequires: pkgconfig(pango) >= 1.20.0
|
||||||
BuildRequires: pkgconfig(polkit-gobject-1) >= 0.114
|
BuildRequires: pkgconfig(polkit-gobject-1) >= 0.114
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
@ -105,6 +104,9 @@ Requires: gsettings-desktop-schemas
|
|||||||
Requires: /usr/bin/pkexec
|
Requires: /usr/bin/pkexec
|
||||||
# For housekeeping plugin, that uses the nautilus dbus service
|
# For housekeeping plugin, that uses the nautilus dbus service
|
||||||
Recommends: nautilus
|
Recommends: nautilus
|
||||||
|
%if %{with smartcard}
|
||||||
|
BuildRequires: pkgconfig(gck-2)
|
||||||
|
%endif
|
||||||
%if %{with wacom}
|
%if %{with wacom}
|
||||||
BuildRequires: pkgconfig(libwacom) >= 0.7
|
BuildRequires: pkgconfig(libwacom) >= 0.7
|
||||||
%endif
|
%endif
|
||||||
@ -142,11 +144,20 @@ contact the settings daemon via its DBus interface.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -N
|
%autosetup -N
|
||||||
|
|
||||||
|
%if ! 0%{?sle_version}
|
||||||
%autopatch -p1 -M 999
|
%autopatch -p1 -M 999
|
||||||
|
%else
|
||||||
|
%patch -P 0 -p1
|
||||||
|
%patch -P 1 -p1
|
||||||
|
%patch -P 2 -p1
|
||||||
|
%patch -P 3 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
# Enable the patches for both Leap 15 and SLE 15, please find the clarification at bsc#1158476.
|
# Enable the patches for both Leap 15 and SLE 15, please find the clarification at bsc#1158476.
|
||||||
%if 0%{?sle_version} >= 150000
|
%if 0%{?sle_version} >= 150000
|
||||||
%autopatch -p1 -m 1000
|
%patch -P 1000 -p1
|
||||||
|
%patch -P 1001 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user