Accepting request 660933 from home:zhengqiang:branches:GNOME:Factory
- Add gdm-ignore-duplicate-desktop-file.patch to ignore duplicate desktop file with same "Name" value, including symlinks of desktop files (bsc#1112834, glgo#GNOME/gdm#437). - Drop gdm-ignore-duplicate-session.patch, the patch hardcodes "default.desktop" while LightDM and SDDM treat symlinks as aliases. OBS-URL: https://build.opensuse.org/request/show/660933 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=418
This commit is contained in:
parent
f4f5957b85
commit
0cb3aa30d9
48
gdm-ignore-duplicate-desktop-file.patch
Normal file
48
gdm-ignore-duplicate-desktop-file.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
|
||||
index 7badafe..2aafce1 100644
|
||||
--- a/libgdm/gdm-sessions.c
|
||||
+++ b/libgdm/gdm-sessions.c
|
||||
@@ -111,6 +111,17 @@ key_file_is_relevant (GKeyFile *key_file)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+find_translated_name (gpointer key,
|
||||
+ gpointer value,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ char *id = key;
|
||||
+ GdmSessionFile *session = value;
|
||||
+ char *translated_name = user_data;
|
||||
+ return g_strcmp0 (session->translated_name, translated_name) == 0;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
load_session_file (const char *id,
|
||||
const char *path)
|
||||
@@ -118,7 +129,7 @@ load_session_file (const char *id,
|
||||
GKeyFile *key_file;
|
||||
GError *error;
|
||||
gboolean res;
|
||||
- GdmSessionFile *session;
|
||||
+ GdmSessionFile *session, *psession;
|
||||
|
||||
key_file = g_key_file_new ();
|
||||
|
||||
@@ -154,9 +165,13 @@ load_session_file (const char *id,
|
||||
session->translated_name = g_key_file_get_locale_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Name", NULL, NULL);
|
||||
session->translated_comment = g_key_file_get_locale_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Comment", NULL, NULL);
|
||||
|
||||
- g_hash_table_insert (gdm_available_sessions_map,
|
||||
- g_strdup (id),
|
||||
- session);
|
||||
+ psession = g_hash_table_find (gdm_available_sessions_map, find_translated_name, session->translated_name);
|
||||
+
|
||||
+ if(psession)
|
||||
+ g_hash_table_remove (gdm_available_sessions_map, psession->id);
|
||||
+
|
||||
+ g_hash_table_insert (gdm_available_sessions_map, g_strdup (id), session);
|
||||
+
|
||||
out:
|
||||
g_key_file_free (key_file);
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
Index: gdm-3.29.90/libgdm/gdm-sessions.c
|
||||
===================================================================
|
||||
--- gdm-3.29.90.orig/libgdm/gdm-sessions.c 2018-06-26 19:59:06.000000000 +0200
|
||||
+++ gdm-3.29.90/libgdm/gdm-sessions.c 2018-08-04 00:34:12.709684550 +0200
|
||||
@@ -212,6 +212,34 @@ collect_sessions_from_directory (const c
|
||||
g_dir_close (dir);
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+find_translated_name (const char *id,
|
||||
+ GdmSessionFile *session,
|
||||
+ char *translated_name)
|
||||
+{
|
||||
+ if (g_str_equal (id, "default"))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ return g_str_equal (session->translated_name, translated_name) ? TRUE : FALSE;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+remove_duplicated_session_name (void)
|
||||
+{
|
||||
+ GdmSessionFile *session;
|
||||
+ char *translated_name = NULL;
|
||||
+
|
||||
+ session = g_hash_table_lookup (gdm_available_sessions_map, "default");
|
||||
+ if (session)
|
||||
+ translated_name = session->translated_name;
|
||||
+
|
||||
+ if (translated_name) {
|
||||
+ session = g_hash_table_find (gdm_available_sessions_map, (GHRFunc)find_translated_name, translated_name);
|
||||
+ if (session)
|
||||
+ g_hash_table_remove (gdm_available_sessions_map, session->id);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void
|
||||
collect_sessions (void)
|
||||
{
|
||||
@@ -269,6 +269,7 @@ collect_sessions (void)
|
||||
#ifdef ENABLE_USER_DISPLAY_SERVER
|
||||
if (g_getenv ("WAYLAND_DISPLAY") == NULL && g_getenv ("RUNNING_UNDER_GDM") != NULL) {
|
||||
g_array_free (wayland_search_array, TRUE);
|
||||
+ remove_duplicated_session_name();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -279,6 +280,8 @@ collect_sessions (void)
|
||||
|
||||
g_array_free (wayland_search_array, TRUE);
|
||||
#endif
|
||||
+
|
||||
+ remove_duplicated_session_name();
|
||||
}
|
||||
|
||||
/**
|
10
gdm.changes
10
gdm.changes
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 21 02:48:21 UTC 2018 - qzheng@suse.com
|
||||
|
||||
- Add gdm-ignore-duplicate-desktop-file.patch to ignore duplicate
|
||||
desktop file with same "Name" value, including symlinks of
|
||||
desktop files (bsc#1112834, glgo#GNOME/gdm#437).
|
||||
- Drop gdm-ignore-duplicate-session.patch, the patch hardcodes
|
||||
"default.desktop" while LightDM and SDDM treat symlinks as
|
||||
aliases.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 7 06:28:27 UTC 2018 - bjorn.lie@gmail.com
|
||||
|
||||
|
8
gdm.spec
8
gdm.spec
@ -49,15 +49,15 @@ Patch2: gdm-suse-xsession.patch
|
||||
Patch3: gdm-default-wm.patch
|
||||
# PATCH-FIX-OPENSUSE gdm-xauthlocalhostname.patch bnc#538064 vuntz@novell.com -- Set XAUTHLOCALHOSTNAME to current hostname when we authenticate, for local logins, to avoid issues in the session in case the hostname changes later one. See comment 24 in the bug.
|
||||
Patch4: gdm-xauthlocalhostname.patch
|
||||
# PATCH-FIX-OPENSUSE gdm-ignore-duplicate-session.patch xwang@suse.com -- gdm sessions entries duplicate
|
||||
Patch5: gdm-ignore-duplicate-session.patch
|
||||
# PATCH-FIX-UPSTREAM gdm-plymouth-vt1.patch bnc#881676 fcrozat@suse.com -- switch to VT1 when quitting if gdm was starting with plymouth running
|
||||
Patch6: gdm-plymouth-vt1.patch
|
||||
# PATCH-FIX-UPSTREAM gdm-fails-to-restart-gnome-shell.patch bsc#981976 bgo#769969 tyang@suse.com -- Gdm should stop after a few times fails
|
||||
Patch7: gdm-fails-to-restart-gnome-shell.patch
|
||||
# PATCH-NEEDS-REBASE gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch bnc#1075805 bgo#793255 msrb@suse.com -- Add runtime option to start X under root instead of regular user. Necessary if no DRI drivers are present. WAS: PATCH-FIX-UPSTREAM, rejected upstream
|
||||
Patch8: gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch
|
||||
|
||||
# PATCH-FIX-UPSTREAM gdm-ignore-duplicate-desktop-file.patch bsc#1112834 glgo#GNOME/gdm#437 qzheng@suse.com -- Ignore duplicate desktop file with same "Name".
|
||||
Patch9: gdm-ignore-duplicate-desktop-file.patch
|
||||
|
||||
### NOTE: Keep please SLE-only patches at bottom (starting on 1000).
|
||||
# PATCH-FIX-SLE gdm-disable-gnome-initial-setup.patch bnc#1067976 qzhao@suse.com -- Disable gnome-initial-setup runs before gdm, g-i-s will only serve for CJK people to choose the input-method after login.
|
||||
Patch1000: gdm-disable-gnome-initial-setup.patch
|
||||
@ -196,10 +196,10 @@ cp %{SOURCE8} .
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
#patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
# TODO: Hack still needed until https://gitlab.gnome.org/GNOME/gdm/issues/424 gets fixed and released.
|
||||
rm data/61-gdm.rules
|
||||
|
Loading…
x
Reference in New Issue
Block a user