From 966e9b2253e472db9d068edd8b44d13f0761f6bf Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 10 May 2022 02:59:42 -0400 Subject: [PATCH] import gdm-40.0-23.el8 --- ...sion-type-from-desktop-file-if-user-.patch | 87 ++++++++++++++++++ ...ctory-Provide-more-flexibility-for-c.patch | 2 +- ...ctory-pause-for-a-few-seconds-before.patch | 92 ------------------- ...et-session_vt-0-out-of-pam-uninitial.patch | 84 +++++++++++++++++ ...d-user-settings-for-program-sessions.patch | 14 +-- SOURCES/0002-libgdm-Sort-session-list.patch | 2 +- ...new-accountsservice-Session-and-Sess.patch | 24 ++--- ...n-save-os-release-in-accountsservice.patch | 6 +- ...ctory-Set-supported-session-types-fo.patch | 2 +- ...4-daemon-handle-upgrades-from-RHEL-7.patch | 8 +- ...ctory-Don-t-crash-if-Xorg-and-Waylan.patch | 2 +- SOURCES/default.pa-for-gdm | 1 - SPECS/gdm.spec | 61 ++++++++---- 13 files changed, 244 insertions(+), 141 deletions(-) create mode 100644 SOURCES/0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch delete mode 100644 SOURCES/0001-local-display-factory-pause-for-a-few-seconds-before.patch create mode 100644 SOURCES/0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch diff --git a/SOURCES/0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch b/SOURCES/0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch new file mode 100644 index 0000000..5c4e4c7 --- /dev/null +++ b/SOURCES/0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch @@ -0,0 +1,87 @@ +From ff689b18fd0a5fd03e5941723cb2adff3b7e4b24 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 29 Sep 2021 11:03:41 -0400 +Subject: [PATCH] daemon: Infer session type from desktop file if user has no + saved session type + +The accountsservice user cache file can specify a session type +associated with the saved session. This is optional though. If one +isn't specified GDM needs to figure out the session type based on the +list of preferred session types for the system and the session file +itself. + +It was failing to do the latter, though. This commit fixes that. +--- + daemon/gdm-session.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c +index 29459346..72afe7b2 100644 +--- a/daemon/gdm-session.c ++++ b/daemon/gdm-session.c +@@ -988,60 +988,62 @@ worker_on_saved_language_name_read (GdmDBusWorker *worker, + } + } + } + + static void + worker_on_saved_session_name_read (GdmDBusWorker *worker, + const char *session_name, + GdmSessionConversation *conversation) + { + GdmSession *self = conversation->session; + + if (! get_session_command_for_name (self, session_name, NULL)) { + /* ignore sessions that don't exist */ + g_debug ("GdmSession: not using invalid .dmrc session: %s", session_name); + g_free (self->saved_session); + self->saved_session = NULL; + update_session_type (self); + } else { + if (strcmp (session_name, + get_default_session_name (self)) != 0) { + g_free (self->saved_session); + self->saved_session = g_strdup (session_name); + + if (self->greeter_interface != NULL) { + gdm_dbus_greeter_emit_default_session_name_changed (self->greeter_interface, + session_name); + } + } + if (self->saved_session_type != NULL) + set_session_type (self, self->saved_session_type); ++ else ++ update_session_type (self); + } + + } + + static GdmSessionConversation * + find_conversation_by_pid (GdmSession *self, + GPid pid) + { + GHashTableIter iter; + gpointer key, value; + + g_hash_table_iter_init (&iter, self->conversations); + while (g_hash_table_iter_next (&iter, &key, &value)) { + GdmSessionConversation *conversation; + + conversation = (GdmSessionConversation *) value; + + if (conversation->worker_pid == pid) { + return conversation; + } + } + + return NULL; + } + + static gboolean + allow_worker_function (GDBusAuthObserver *observer, + GIOStream *stream, + GCredentials *credentials, + GdmSession *self) +-- +2.33.1 + diff --git a/SOURCES/0001-local-display-factory-Provide-more-flexibility-for-c.patch b/SOURCES/0001-local-display-factory-Provide-more-flexibility-for-c.patch index ad8458c..f539d6c 100644 --- a/SOURCES/0001-local-display-factory-Provide-more-flexibility-for-c.patch +++ b/SOURCES/0001-local-display-factory-Provide-more-flexibility-for-c.patch @@ -1,4 +1,4 @@ -From e5c58e1663845d46b368063f8137eab5f2e1c01b Mon Sep 17 00:00:00 2001 +From 8451325378ef2981304d96bb27844174dba930c5 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 16 Jul 2021 12:34:57 -0400 Subject: [PATCH 1/4] local-display-factory: Provide more flexibility for diff --git a/SOURCES/0001-local-display-factory-pause-for-a-few-seconds-before.patch b/SOURCES/0001-local-display-factory-pause-for-a-few-seconds-before.patch deleted file mode 100644 index 25d8588..0000000 --- a/SOURCES/0001-local-display-factory-pause-for-a-few-seconds-before.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 17297d7c33916d749375dd7d66f202551b708bf6 Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Mon, 29 Oct 2018 06:57:59 -0400 -Subject: [PATCH] local-display-factory: pause for a few seconds before falling - back to X - -logind currently gets confused if a session is started immediately as -one is shutting down. - -Workaround this problem by adding an artificial delay when falling -back to X. - -http://bugzilla.redhat.com/1643874 ---- - daemon/gdm-local-display-factory.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c -index c00e1c47..9461cc43 100644 ---- a/daemon/gdm-local-display-factory.c -+++ b/daemon/gdm-local-display-factory.c -@@ -664,60 +664,67 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory, - } - - ret = sd_seat_can_graphical (seat_id); - - if (ret < 0) { - g_critical ("Failed to query CanGraphical information for seat %s", seat_id); - return; - } - - if (ret == 0) { - g_debug ("GdmLocalDisplayFactory: System doesn't currently support graphics"); - seat_supports_graphics = FALSE; - } else { - g_debug ("GdmLocalDisplayFactory: System supports graphics"); - seat_supports_graphics = TRUE; - } - - if (g_strcmp0 (seat_id, "seat0") == 0) { - is_seat0 = TRUE; - - falling_back = factory->num_failures > 0; - session_types = gdm_local_display_factory_get_session_types (factory, falling_back); - - if (session_types == NULL) { - g_debug ("GdmLocalDisplayFactory: Both Wayland and Xorg are unavailable"); - seat_supports_graphics = FALSE; - } else { - g_debug ("GdmLocalDisplayFactory: New displays on seat0 will use %s%s", - session_types[0], falling_back? " fallback" : ""); - } -+ -+ if (falling_back) { -+ /* workaround logind race for now -+ * bug 1643874 -+ */ -+ g_usleep (2 * G_USEC_PER_SEC); -+ } - } else { - is_seat0 = FALSE; - - g_debug ("GdmLocalDisplayFactory: New displays on seat %s will use X11 fallback", seat_id); - /* Force legacy X11 for all auxiliary seats */ - seat_supports_graphics = TRUE; - session_types = g_strdupv ((char **) legacy_session_types); - } - - /* For seat0, we have a fallback logic to still try starting it after - * SEAT0_GRAPHICS_CHECK_TIMEOUT seconds. i.e. we simply continue even if - * CanGraphical is unset. - * This is ugly, but it means we'll come up eventually in some - * scenarios where no master device is present. - * Note that we'll force an X11 fallback even though there might be - * cases where an wayland capable device is present and simply not marked as - * master-of-seat. In these cases, this should likely be fixed in the - * udev rules. - * - * At the moment, systemd always sets CanGraphical for non-seat0 seats. - * This is because non-seat0 seats are defined by having master-of-seat - * set. This means we can avoid the fallback check for non-seat0 seats, - * which simplifies the code. - */ - if (is_seat0) { - if (!seat_supports_graphics) { - if (!factory->seat0_graphics_check_timed_out) { - if (factory->seat0_graphics_check_timeout_id == 0) { - g_debug ("GdmLocalDisplayFactory: seat0 doesn't yet support graphics. Waiting %d seconds to try again.", SEAT0_GRAPHICS_CHECK_TIMEOUT); - factory->seat0_graphics_check_timeout_id = g_timeout_add_seconds (SEAT0_GRAPHICS_CHECK_TIMEOUT, --- -2.34.1 - diff --git a/SOURCES/0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch b/SOURCES/0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch new file mode 100644 index 0000000..5a403d6 --- /dev/null +++ b/SOURCES/0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch @@ -0,0 +1,84 @@ +From 56d12ad9697d5695c780a5be0065d23fec6bd1a5 Mon Sep 17 00:00:00 2001 +From: Chingkai Chu <3013329+chuchingkai@users.noreply.github.com> +Date: Thu, 12 Aug 2021 10:34:01 +0800 +Subject: [PATCH] session-worker: Set session_vt=0 out of pam uninitialization + +MR GNOME/gdm!123 moved jump_to_vt and session_vt reseting to a +separate function, so we don't need to reset session_vt in pam +uninitialization. + +https://gitlab.gnome.org/GNOME/gdm/-/issues/719 +--- + daemon/gdm-session-worker.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c +index c1201b70..9cff53a5 100644 +--- a/daemon/gdm-session-worker.c ++++ b/daemon/gdm-session-worker.c +@@ -1076,62 +1076,60 @@ gdm_session_worker_set_state (GdmSessionWorker *worker, + + static void + gdm_session_worker_uninitialize_pam (GdmSessionWorker *worker, + int status) + { + g_debug ("GdmSessionWorker: uninitializing PAM"); + + if (worker->priv->pam_handle == NULL) + return; + + gdm_session_worker_get_username (worker, NULL); + + if (worker->priv->state >= GDM_SESSION_WORKER_STATE_SESSION_OPENED) { + pam_close_session (worker->priv->pam_handle, 0); + gdm_session_auditor_report_logout (worker->priv->auditor); + } else { + gdm_session_auditor_report_login_failure (worker->priv->auditor, + status, + pam_strerror (worker->priv->pam_handle, status)); + } + + if (worker->priv->state >= GDM_SESSION_WORKER_STATE_ACCREDITED) { + pam_setcred (worker->priv->pam_handle, PAM_DELETE_CRED); + } + + pam_end (worker->priv->pam_handle, status); + worker->priv->pam_handle = NULL; + + gdm_session_worker_stop_auditor (worker); + +- worker->priv->session_vt = 0; +- + g_debug ("GdmSessionWorker: state NONE"); + gdm_session_worker_set_state (worker, GDM_SESSION_WORKER_STATE_NONE); + } + + static char * + _get_tty_for_pam (const char *x11_display_name, + const char *display_device) + { + #ifdef __sun + return g_strdup (display_device); + #else + return g_strdup (x11_display_name); + #endif + } + + #ifdef PAM_XAUTHDATA + static struct pam_xauth_data * + _get_xauth_for_pam (const char *x11_authority_file) + { + FILE *fh; + Xauth *auth = NULL; + struct pam_xauth_data *retval = NULL; + gsize len = sizeof (*retval) + 1; + + fh = fopen (x11_authority_file, "r"); + if (fh) { + auth = XauReadAuth (fh); + fclose (fh); + } + if (auth) { +-- +2.31.1 + diff --git a/SOURCES/0001-worker-don-t-load-user-settings-for-program-sessions.patch b/SOURCES/0001-worker-don-t-load-user-settings-for-program-sessions.patch index 3d8c7ce..82ba705 100644 --- a/SOURCES/0001-worker-don-t-load-user-settings-for-program-sessions.patch +++ b/SOURCES/0001-worker-don-t-load-user-settings-for-program-sessions.patch @@ -1,4 +1,4 @@ -From 70eb29d5eedc2b66e617745be1dd145aac3e177e Mon Sep 17 00:00:00 2001 +From f0dce28fa02210caa445e96d9cbec1d150b79e80 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 15 Aug 2018 10:48:16 -0400 Subject: [PATCH 1/4] worker: don't load user settings for program sessions @@ -10,7 +10,7 @@ for its session name 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c -index 774298b9..88fe36c1 100644 +index 9b8e0d87..438348df 100644 --- a/daemon/gdm-session-worker.c +++ b/daemon/gdm-session-worker.c @@ -400,103 +400,108 @@ gdm_session_execute (const char *file, @@ -124,7 +124,7 @@ index 774298b9..88fe36c1 100644 worker->priv->service, question, answerp, -@@ -2600,87 +2605,89 @@ gdm_session_worker_get_property (GObject *object, +@@ -2598,87 +2603,89 @@ gdm_session_worker_get_property (GObject *object, g_value_set_boolean (value, self->priv->is_reauth_session); break; case PROP_STATE: @@ -218,7 +218,7 @@ index 774298b9..88fe36c1 100644 g_free (session_name); } -@@ -2758,110 +2765,113 @@ do_authorize (GdmSessionWorker *worker) +@@ -2756,110 +2763,113 @@ do_authorize (GdmSessionWorker *worker) g_dbus_method_invocation_take_error (worker->priv->pending_invocation, error); } worker->priv->pending_invocation = NULL; @@ -336,7 +336,7 @@ index 774298b9..88fe36c1 100644 } gdm_dbus_worker_complete_open (GDM_DBUS_WORKER (worker), worker->priv->pending_invocation, session_id); -@@ -3105,155 +3115,161 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object, +@@ -3103,155 +3113,161 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object, if (g_strcmp0 (key, "service") == 0) { worker->priv->service = g_variant_dup_string (value, NULL); } else if (g_strcmp0 (key, "extensions") == 0) { @@ -498,7 +498,7 @@ index 774298b9..88fe36c1 100644 GDBusMethodInvocation *invocation, const char *service, const char *username, -@@ -3591,61 +3607,60 @@ static void +@@ -3589,61 +3605,60 @@ static void reauthentication_request_free (ReauthenticationRequest *request) { @@ -561,5 +561,5 @@ index 774298b9..88fe36c1 100644 g_return_if_fail (worker->priv != NULL); -- -2.27.0 +2.33.1 diff --git a/SOURCES/0002-libgdm-Sort-session-list.patch b/SOURCES/0002-libgdm-Sort-session-list.patch index 008a828..6ba1b6c 100644 --- a/SOURCES/0002-libgdm-Sort-session-list.patch +++ b/SOURCES/0002-libgdm-Sort-session-list.patch @@ -1,4 +1,4 @@ -From 9b3d81889d8497f029e860bd2f8288272333cae8 Mon Sep 17 00:00:00 2001 +From c00daca1579c47f3f62894ff2378c37e6cbebfd3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 20 Jul 2021 13:36:45 -0400 Subject: [PATCH 2/4] libgdm: Sort session list diff --git a/SOURCES/0002-session-support-new-accountsservice-Session-and-Sess.patch b/SOURCES/0002-session-support-new-accountsservice-Session-and-Sess.patch index 21ea92a..6cb961e 100644 --- a/SOURCES/0002-session-support-new-accountsservice-Session-and-Sess.patch +++ b/SOURCES/0002-session-support-new-accountsservice-Session-and-Sess.patch @@ -1,4 +1,4 @@ -From 96e78f519a4d5ce2e5b708035ae1f43eb7c1bbd2 Mon Sep 17 00:00:00 2001 +From 22b08727980cefd665b8805376710e9244523fe3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 14 Aug 2018 14:52:41 -0400 Subject: [PATCH 2/4] session: support new accountsservice Session and @@ -454,10 +454,10 @@ index 20946bff..db38ffc7 100644 G_END_DECLS #endif /* GDM_SESSION_SETTINGS_H */ diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c -index 88fe36c1..c1201b70 100644 +index 438348df..9cff53a5 100644 --- a/daemon/gdm-session-worker.c +++ b/daemon/gdm-session-worker.c -@@ -2664,60 +2664,74 @@ gdm_session_worker_handle_set_language_name (GdmDBusWorker *object, +@@ -2662,60 +2662,74 @@ gdm_session_worker_handle_set_language_name (GdmDBusWorker *object, gdm_dbus_worker_complete_set_language_name (object, invocation); return TRUE; } @@ -532,7 +532,7 @@ index 88fe36c1..c1201b70 100644 static void do_authenticate (GdmSessionWorker *worker) { -@@ -3127,158 +3141,172 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object, +@@ -3125,158 +3139,172 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object, } else if (g_strcmp0 (key, "x11-authority-file") == 0) { worker->priv->x11_authority_file = g_variant_dup_string (value, NULL); } else if (g_strcmp0 (key, "console") == 0) { @@ -754,7 +754,7 @@ index 4280fe09..a215779c 100644 diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c -index 29459346..43da024f 100644 +index 72afe7b2..f4d0bef9 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -61,60 +61,61 @@ @@ -1222,7 +1222,7 @@ index 29459346..43da024f 100644 static void set_pending_query (GdmSessionConversation *conversation, -@@ -969,83 +989,94 @@ worker_on_reauthenticated (GdmDBusWorker *worker, +@@ -969,85 +989,96 @@ worker_on_reauthenticated (GdmDBusWorker *worker, GdmSession *self = conversation->session; g_debug ("GdmSession: Emitting 'reauthenticated' signal "); g_signal_emit (self, signals[REAUTHENTICATED], 0, service_name); @@ -1273,6 +1273,8 @@ index 29459346..43da024f 100644 } if (self->saved_session_type != NULL) set_session_type (self, self->saved_session_type); + else + update_session_type (self); } } @@ -1318,7 +1320,7 @@ index 29459346..43da024f 100644 uid_t connecting_user; connecting_user = g_credentials_get_unix_user (credentials, NULL); -@@ -1125,60 +1156,63 @@ register_worker (GdmDBusWorkerManager *worker_manager_interface, +@@ -1127,60 +1158,63 @@ register_worker (GdmDBusWorkerManager *worker_manager_interface, g_dbus_method_invocation_return_value (invocation, NULL); conversation->worker_proxy = gdm_dbus_worker_proxy_new_sync (connection, @@ -1382,7 +1384,7 @@ index 29459346..43da024f 100644 g_debug ("GdmSession: Conversation started"); return TRUE; -@@ -1921,60 +1955,63 @@ free_conversation (GdmSessionConversation *conversation) +@@ -1923,60 +1957,63 @@ free_conversation (GdmSessionConversation *conversation) close_conversation (conversation); if (conversation->job != NULL) { @@ -1446,7 +1448,7 @@ index 29459346..43da024f 100644 error = NULL; if (!g_file_get_contents (config_file, &contents, &length, &error)) { g_debug ("Failed to parse '%s': %s", -@@ -2533,83 +2570,83 @@ gdm_session_send_environment (GdmSession *self, +@@ -2535,83 +2572,83 @@ gdm_session_send_environment (GdmSession *self, g_return_if_fail (GDM_IS_SESSION (self)); conversation = find_conversation_by_name (self, service_name); @@ -1532,7 +1534,7 @@ index 29459346..43da024f 100644 g_strdup (value)); } -@@ -3179,148 +3216,150 @@ gdm_session_get_conversation_session_id (GdmSession *self, +@@ -3181,148 +3218,150 @@ gdm_session_get_conversation_session_id (GdmSession *self, conversation = find_conversation_by_name (self, service_name); if (conversation == NULL) { @@ -1692,5 +1694,5 @@ index 29459346..43da024f 100644 self->display_seat_id); -- -2.27.0 +2.33.1 diff --git a/SOURCES/0003-daemon-save-os-release-in-accountsservice.patch b/SOURCES/0003-daemon-save-os-release-in-accountsservice.patch index b670407..e6dcb56 100644 --- a/SOURCES/0003-daemon-save-os-release-in-accountsservice.patch +++ b/SOURCES/0003-daemon-save-os-release-in-accountsservice.patch @@ -1,4 +1,4 @@ -From bd5153305b576f29ea3b8835bd2740a5eda2db0f Mon Sep 17 00:00:00 2001 +From de95917e0e9d142703a86f94961ef9fd4151739d Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 20 Aug 2018 14:30:59 -0400 Subject: [PATCH 3/4] daemon: save os-release in accountsservice @@ -401,7 +401,7 @@ index f2b1addd..a4b7f1a6 100644 return TRUE; } diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c -index 43da024f..c8e04c1b 100644 +index f4d0bef9..d1e2c301 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -351,72 +351,72 @@ supports_session_type (GdmSession *self, @@ -607,5 +607,5 @@ index 2e61b644..71c65039 100644 gdm_session_worker = executable('gdm-session-worker', -- -2.27.0 +2.33.1 diff --git a/SOURCES/0003-xdmcp-display-factory-Set-supported-session-types-fo.patch b/SOURCES/0003-xdmcp-display-factory-Set-supported-session-types-fo.patch index 9d24ad7..f119615 100644 --- a/SOURCES/0003-xdmcp-display-factory-Set-supported-session-types-fo.patch +++ b/SOURCES/0003-xdmcp-display-factory-Set-supported-session-types-fo.patch @@ -1,4 +1,4 @@ -From 7d5b0ed505ec38c4aef51d125d01a2733f4a237f Mon Sep 17 00:00:00 2001 +From b5472a30b1a71aec537ac309e2985cbac61b3136 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 14 Sep 2021 11:00:33 -0400 Subject: [PATCH 3/4] xdmcp-display-factory: Set supported session types for diff --git a/SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch b/SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch index 6d56e3c..8b6fe88 100644 --- a/SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch +++ b/SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch @@ -1,4 +1,4 @@ -From b7c0541ffccf43994a3e418c4012b17a6dd8b630 Mon Sep 17 00:00:00 2001 +From 738a10ca78e154ad4c3df9a1298eaad01516457e Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 20 Aug 2018 14:30:59 -0400 Subject: [PATCH 4/4] daemon: handle upgrades from RHEL 7 @@ -135,10 +135,10 @@ index a4b7f1a6..a84b2ffa 100644 settings); } diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c -index c8e04c1b..3103e9df 100644 +index d1e2c301..d4a46d87 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c -@@ -3205,98 +3205,95 @@ gdm_session_get_session_id (GdmSession *self) +@@ -3207,98 +3207,95 @@ gdm_session_get_session_id (GdmSession *self) return conversation->session_id; } @@ -246,5 +246,5 @@ index c8e04c1b..3103e9df 100644 if (!session_registers && error != NULL && -- -2.27.0 +2.33.1 diff --git a/SOURCES/0004-local-display-factory-Don-t-crash-if-Xorg-and-Waylan.patch b/SOURCES/0004-local-display-factory-Don-t-crash-if-Xorg-and-Waylan.patch index d7d9db3..d17dece 100644 --- a/SOURCES/0004-local-display-factory-Don-t-crash-if-Xorg-and-Waylan.patch +++ b/SOURCES/0004-local-display-factory-Don-t-crash-if-Xorg-and-Waylan.patch @@ -1,4 +1,4 @@ -From 83ba20c428c3839e8ce974ffa13712f92d5980ea Mon Sep 17 00:00:00 2001 +From dfca67899ea33da08d3aa9e84c1b4487991adad0 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 7 Oct 2021 15:34:27 -0400 Subject: [PATCH 4/4] local-display-factory: Don't crash if Xorg and Wayland diff --git a/SOURCES/default.pa-for-gdm b/SOURCES/default.pa-for-gdm index d633aee..145bd31 100644 --- a/SOURCES/default.pa-for-gdm +++ b/SOURCES/default.pa-for-gdm @@ -3,7 +3,6 @@ load-module module-card-restore load-module module-udev-detect load-module module-native-protocol-unix load-module module-default-device-restore -load-module module-rescue-streams load-module module-always-sink load-module module-intended-roles load-module module-suspend-on-idle diff --git a/SPECS/gdm.spec b/SPECS/gdm.spec index f93bb3e..d6fd59d 100644 --- a/SPECS/gdm.spec +++ b/SPECS/gdm.spec @@ -12,7 +12,7 @@ Name: gdm Epoch: 1 Version: 40.0 -Release: 15%{?dist}.3 +Release: 23%{?dist} Summary: The GNOME Display Manager License: GPLv2+ @@ -43,12 +43,17 @@ Patch70001: 0001-Revert-gdm-wayland-x-session-don-t-overwrite-user-en.patch # Crash fix Patch80001: 0001-local-display-factory-Don-t-try-to-respawn-displays-.patch +# VT handling fix from upstream +Patch90001: 0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch + +# Wayland fix from upstream +Patch100001: 0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch + # Fix DisallowTcp=false from upstream Patch110001: 0001-meson-Fix-detection-of-Xorg-versions-that-need-liste.patch Patch110002: 0002-daemon-Support-X-servers-built-with-Dlisten_tcp-true.patch # Non-upstreamable workarounds -Patch66610001: 0001-local-display-factory-pause-for-a-few-seconds-before.patch Patch66620001: 0001-data-reap-gdm-sessions-on-shutdown.patch # Non-upstreamable integration patches @@ -65,6 +70,7 @@ Patch99930001: 0001-data-add-system-dconf-databases-to-gdm-profile.patch Patch99940001: 0001-data-disable-wayland-on-certain-hardware.patch + BuildRequires: accountsservice-devel BuildRequires: audit-libs-devel >= %{libauditver} BuildRequires: dconf @@ -122,7 +128,7 @@ Requires: libXau >= 1.0.4-4 Requires: pam >= 0:%{pam_version} Requires: /sbin/nologin Requires: setxkbmap -Requires: systemd >= 186 +Requires: systemd >= 239-50 Requires: system-logos Requires: xorg-x11-server-utils Requires: xorg-x11-xinit @@ -343,7 +349,7 @@ fi %{_libdir}/girepository-1.0/Gdm-1.0.typelib %{_libdir}/security/pam_gdm.so %{_libdir}/libgdm*.so* -%dir %{_localstatedir}/log/gdm +%attr(0711, root, gdm) %dir %{_localstatedir}/log/gdm %attr(1770, gdm, gdm) %dir %{_localstatedir}/lib/gdm %attr(0700, gdm, gdm) %dir %{_localstatedir}/lib/gdm/.config %attr(0700, gdm, gdm) %dir %{_localstatedir}/lib/gdm/.config/pulse @@ -369,28 +375,45 @@ fi %{_libdir}/pkgconfig/gdm-pam-extensions.pc %changelog -* Wed Mar 30 2022 Ray Strode - 40.0-15.3 -- Rebuild - Related: #2029202 - -* Tue Mar 29 2022 Ray Strode - 40.0-15.2 -- Fix DisallowTCP - Resolves: #2029202 - -* Thu Jan 27 2022 Ray Strode - 40.0-15.1 +* Thu Jan 27 2022 Ray Strode - 40.0-23 - Fix crash when neither Xorg nor wayland is working great - Resolves: #2036584 + Resolves: #2032180 -* Wed Sep 15 2021 Ray Strode - 40.0-14 +* Wed Dec 22 2021 Ray Strode - 40.1-22 +- Fix DisallowTCP + Resolves: #2025768 + +* Tue Dec 21 2021 Ray Strode - 40.1-21 +- Fix Xorg/Wayland selection in some cases + Resolves: #2009045 + +* Mon Oct 25 2021 Ray Strode - 40.1-20 +- Remove module-rescue-stream from default.pa + Resolves: #1969846 + +* Mon Oct 25 2021 Ray Strode - 40.0-19 +- Synchronize permission and group ownership for log dir between + rpm file manifest and daemon expectations. + Resolves: #1878119 + +* Mon Oct 25 2021 Ray Strode - 40.0-18 +- Drop usleep workaround for problem that's now fixed properly in systemd + Resolves: #1921732 + +* Wed Oct 13 2021 Ray Strode - 40.0-17 +- Properly switch VTs when jumping to multi-user target + Related: #1988958 + +* Wed Sep 15 2021 Ray Strode - 40.0-16 - Fix XDMCP - Resolves: #2004170 + Resolves: #2005011 - Fix crash at shutdown - Related: #2004170 + Related: #2005011 -* Wed Sep 01 2021 Ray Strode - 40.0-13 +* Wed Sep 01 2021 Ray Strode - 40.0-14 - Disable Wayland on HyperV - Fix Xorg fallback - Related: #1998989 + Related: #2000904 * Thu Aug 19 2021 Ray Strode - 40.0-12 - Redisable on server chips since rebase