Update to 41.alpha
This commit is contained in:
parent
7bd1da8263
commit
bf8b6b429d
1
.gitignore
vendored
1
.gitignore
vendored
@ -137,3 +137,4 @@ gdm-2.30.2.tar.bz2
|
||||
/gdm-40.beta.tar.xz
|
||||
/gdm-40.rc.tar.xz
|
||||
/gdm-40.0.tar.xz
|
||||
/gdm-41.alpha.tar.xz
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,131 +0,0 @@
|
||||
From b8adb4f610ab285d1c0b9e7bd4d0e2dc64f3e821 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 20 Jul 2021 13:36:45 -0400
|
||||
Subject: [PATCH 2/3] libgdm: Sort session list
|
||||
|
||||
Right now the session list comes out in hash table order.
|
||||
|
||||
This commit changes the code to sort by description.
|
||||
---
|
||||
libgdm/gdm-sessions.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
|
||||
index 97ed5ef3..f078e04b 100644
|
||||
--- a/libgdm/gdm-sessions.c
|
||||
+++ b/libgdm/gdm-sessions.c
|
||||
@@ -311,92 +311,111 @@ collect_sessions (void)
|
||||
g_ptr_array_add (wayland_search_array, g_strdup (wayland_search_dirs[i]));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gdm_available_sessions_map == NULL) {
|
||||
gdm_available_sessions_map = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
g_free, (GDestroyNotify)gdm_session_file_free);
|
||||
}
|
||||
|
||||
if (!supported_session_types || g_strv_contains ((const char * const *) supported_session_types, "x11")) {
|
||||
for (i = 0; i < xorg_search_array->len; i++) {
|
||||
collect_sessions_from_directory (g_ptr_array_index (xorg_search_array, i));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WAYLAND_SUPPORT
|
||||
#ifdef ENABLE_USER_DISPLAY_SERVER
|
||||
if (!supported_session_types || g_strv_contains ((const char * const *) supported_session_types, "wayland")) {
|
||||
for (i = 0; i < wayland_search_array->len; i++) {
|
||||
collect_sessions_from_directory (g_ptr_array_index (wayland_search_array, i));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
g_hash_table_foreach_remove (gdm_available_sessions_map,
|
||||
remove_duplicate_sessions,
|
||||
names_seen_before);
|
||||
}
|
||||
|
||||
+static gint
|
||||
+compare_session_ids (gconstpointer a,
|
||||
+ gconstpointer b)
|
||||
+{
|
||||
+ GdmSessionFile *session_a, *session_b;
|
||||
+ session_a = (GdmSessionFile *) g_hash_table_lookup (gdm_available_sessions_map, a);
|
||||
+ session_b = (GdmSessionFile *) g_hash_table_lookup (gdm_available_sessions_map, b);
|
||||
+
|
||||
+ if (session_a == NULL)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (session_b == NULL)
|
||||
+ return 1;
|
||||
+
|
||||
+ return g_strcmp0 (session_a->translated_name, session_b->translated_name);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* gdm_get_session_ids:
|
||||
*
|
||||
* Reads /usr/share/xsessions and other relevant places for possible sessions
|
||||
* to log into and returns the complete list.
|
||||
*
|
||||
* Returns: (transfer full): a %NULL terminated list of session ids
|
||||
*/
|
||||
char **
|
||||
gdm_get_session_ids (void)
|
||||
{
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
GPtrArray *array;
|
||||
|
||||
if (!gdm_sessions_map_is_initialized) {
|
||||
collect_sessions ();
|
||||
|
||||
gdm_sessions_map_is_initialized = TRUE;
|
||||
}
|
||||
|
||||
array = g_ptr_array_new ();
|
||||
g_hash_table_iter_init (&iter, gdm_available_sessions_map);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value)) {
|
||||
GdmSessionFile *session;
|
||||
|
||||
session = (GdmSessionFile *) value;
|
||||
|
||||
g_ptr_array_add (array, g_strdup (session->id));
|
||||
}
|
||||
g_ptr_array_add (array, NULL);
|
||||
|
||||
+ g_ptr_array_sort (array, compare_session_ids);
|
||||
+
|
||||
return (char **) g_ptr_array_free (array, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdm_get_session_name_and_description:
|
||||
* @id: an id from gdm_get_session_ids()
|
||||
* @description: (out): optional returned session description
|
||||
*
|
||||
* Takes an xsession id and returns the name and comment about it.
|
||||
*
|
||||
* Returns: The session name if found, or %NULL otherwise
|
||||
*/
|
||||
char *
|
||||
gdm_get_session_name_and_description (const char *id,
|
||||
char **description)
|
||||
{
|
||||
GdmSessionFile *session;
|
||||
char *name;
|
||||
|
||||
if (!gdm_sessions_map_is_initialized) {
|
||||
collect_sessions ();
|
||||
|
||||
gdm_sessions_map_is_initialized = TRUE;
|
||||
}
|
||||
|
||||
session = (GdmSessionFile *) g_hash_table_lookup (gdm_available_sessions_map,
|
||||
id);
|
||||
|
||||
if (session == NULL) {
|
||||
return NULL;
|
||||
--
|
||||
2.32.0
|
||||
|
@ -1,118 +0,0 @@
|
||||
From f067fb9bc471f176b6f6693fd9da5307c35bac3c Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Thu, 22 Jul 2021 14:46:50 -0400
|
||||
Subject: [PATCH 3/3] local-display-factory: Fix overrun in session type list
|
||||
generation
|
||||
|
||||
Some confusion in the session type list generation from GNOME/gdm!146,
|
||||
means we could actually overrun the list.
|
||||
|
||||
This commit fixes that.
|
||||
---
|
||||
daemon/gdm-local-display-factory.c | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
|
||||
index 0bb3851f..f2da3b6e 100644
|
||||
--- a/daemon/gdm-local-display-factory.c
|
||||
+++ b/daemon/gdm-local-display-factory.c
|
||||
@@ -202,87 +202,89 @@ get_preferred_display_server (GdmLocalDisplayFactory *factory)
|
||||
|
||||
gdm_settings_direct_get_string (GDM_KEY_PREFERRED_DISPLAY_SERVER, &preferred_display_server);
|
||||
|
||||
if (g_strcmp0 (preferred_display_server, "wayland") == 0) {
|
||||
if (wayland_enabled)
|
||||
return g_strdup (preferred_display_server);
|
||||
else
|
||||
return g_strdup ("xorg");
|
||||
}
|
||||
|
||||
if (g_strcmp0 (preferred_display_server, "xorg") == 0) {
|
||||
if (xorg_enabled)
|
||||
return g_strdup (preferred_display_server);
|
||||
else
|
||||
return g_strdup ("wayland");
|
||||
}
|
||||
|
||||
if (g_strcmp0 (preferred_display_server, "legacy-xorg") == 0) {
|
||||
if (xorg_enabled)
|
||||
return g_strdup (preferred_display_server);
|
||||
}
|
||||
|
||||
return g_strdup ("none");
|
||||
}
|
||||
|
||||
static const char *
|
||||
gdm_local_display_factory_get_session_type (GdmLocalDisplayFactory *factory,
|
||||
gboolean should_fall_back)
|
||||
{
|
||||
const char *session_types[3] = { NULL };
|
||||
- gsize i, session_type_index = 0, number_of_session_types = 0;
|
||||
+ gsize i, session_type_index = 0;
|
||||
g_autofree gchar *preferred_display_server = NULL;
|
||||
|
||||
preferred_display_server = get_preferred_display_server (factory);
|
||||
|
||||
if (g_strcmp0 (preferred_display_server, "wayland") != 0 &&
|
||||
g_strcmp0 (preferred_display_server, "xorg") != 0)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (session_types) - 1; i++) {
|
||||
#ifdef ENABLE_WAYLAND_SUPPORT
|
||||
- if (number_of_session_types > 0 ||
|
||||
+ if (i > 0 ||
|
||||
g_strcmp0 (preferred_display_server, "wayland") == 0) {
|
||||
gboolean wayland_enabled = FALSE;
|
||||
if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled)) {
|
||||
- if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE) )
|
||||
- session_types[number_of_session_types++] = "wayland";
|
||||
+ if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE)) {
|
||||
+ session_types[i] = "wayland"; continue;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
- if (number_of_session_types > 0 ||
|
||||
+ if (i > 0 ||
|
||||
g_strcmp0 (preferred_display_server, "xorg") == 0) {
|
||||
gboolean xorg_enabled = FALSE;
|
||||
if (gdm_settings_direct_get_boolean (GDM_KEY_XORG_ENABLE, &xorg_enabled)) {
|
||||
- if (xorg_enabled && g_file_test ("/usr/bin/Xorg", G_FILE_TEST_IS_EXECUTABLE) )
|
||||
- session_types[number_of_session_types++] = "x11";
|
||||
+ if (xorg_enabled && g_file_test ("/usr/bin/Xorg", G_FILE_TEST_IS_EXECUTABLE)) {
|
||||
+ session_types[i] = "x11"; continue;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (should_fall_back)
|
||||
session_type_index++;
|
||||
|
||||
return session_types[session_type_index];
|
||||
}
|
||||
|
||||
static void
|
||||
on_display_disposed (GdmLocalDisplayFactory *factory,
|
||||
GdmDisplay *display)
|
||||
{
|
||||
g_debug ("GdmLocalDisplayFactory: Display %p disposed", display);
|
||||
}
|
||||
|
||||
static void
|
||||
store_display (GdmLocalDisplayFactory *factory,
|
||||
GdmDisplay *display)
|
||||
{
|
||||
GdmDisplayStore *store;
|
||||
|
||||
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
|
||||
gdm_display_store_add (store, display);
|
||||
}
|
||||
|
||||
/*
|
||||
Example:
|
||||
dbus-send --system --dest=org.gnome.DisplayManager \
|
||||
--
|
||||
2.32.0
|
||||
|
12
gdm.spec
12
gdm.spec
@ -10,8 +10,8 @@
|
||||
|
||||
Name: gdm
|
||||
Epoch: 1
|
||||
Version: 40.0
|
||||
Release: 6%{?dist}
|
||||
Version: 41~alpha
|
||||
Release: 1%{?dist}
|
||||
Summary: The GNOME Display Manager
|
||||
|
||||
License: GPLv2+
|
||||
@ -22,11 +22,6 @@ Source1: org.gnome.login-screen.gschema.override
|
||||
# moved here from pulseaudio-gdm-hooks-11.1-16
|
||||
Source5: default.pa-for-gdm
|
||||
|
||||
# Already upstream, waiting on a release
|
||||
Patch10001: 0001-daemon-Provide-more-flexibility-for-configuring-disp.patch
|
||||
Patch10002: 0002-libgdm-Sort-session-list.patch
|
||||
Patch10003: 0003-local-display-factory-Fix-overrun-in-session-type-li.patch
|
||||
|
||||
# Downstream patches
|
||||
Patch80001: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch
|
||||
Patch90001: 0001-data-add-system-dconf-databases-to-gdm-profile.patch
|
||||
@ -307,6 +302,9 @@ fi
|
||||
%{_libdir}/pkgconfig/gdm-pam-extensions.pc
|
||||
|
||||
%changelog
|
||||
* Wed Jul 28 2021 Ray Strode <rstrode@redhat.com> - 1:41~alpha-1
|
||||
- Update to 41.alpha
|
||||
|
||||
* Tue Jul 27 2021 Ray Strode <rstrode@redhat.com> - 1:40.0-6
|
||||
- Correct logic error leading to wrong display server preference
|
||||
getting chosen.
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (gdm-40.0.tar.xz) = b20d02f8a80f6aff8909a69c6c621c20c5aa1b25cfedd68bf95faaaa56d5f7cd5d607d1a7388b97aa06510684f1e9e474248042a00203f496c39930e001bb64c
|
||||
SHA512 (gdm-41.alpha.tar.xz) = a84f5a7cc27d1de8706f2b10ca290e5b636c0edf8e6ccadb99f5665dfe176b6c50aad1ac6600843390d91eab91d139de503d33f97229c3e1d1385f398323d707
|
||||
|
Loading…
Reference in New Issue
Block a user