From 528462d6c2233ee7da7aae73d322506877efc5a4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 9 Nov 2021 04:53:26 -0500 Subject: [PATCH] import gnome-session-3.28.1-13.el8 --- ...t-grub-boot-flags-on-shutdown-reboot.patch | 90 +++++++++++++++++++ SOURCES/gnome-xorg.desktop | 22 ++--- SPECS/gnome-session.spec | 21 ++++- 3 files changed, 119 insertions(+), 14 deletions(-) create mode 100644 SOURCES/0001-Fedora-Set-grub-boot-flags-on-shutdown-reboot.patch diff --git a/SOURCES/0001-Fedora-Set-grub-boot-flags-on-shutdown-reboot.patch b/SOURCES/0001-Fedora-Set-grub-boot-flags-on-shutdown-reboot.patch new file mode 100644 index 0000000..2d0e830 --- /dev/null +++ b/SOURCES/0001-Fedora-Set-grub-boot-flags-on-shutdown-reboot.patch @@ -0,0 +1,90 @@ +From 15be30033e5b24a8c84a4d4338da0e8a3930303a Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 14 Aug 2018 14:49:59 +0200 +Subject: [PATCH] Fedora: Set grub boot-flags on shutdown / reboot + +Fedora's grub will automatically hide the boot-menu if the previous +boot has set the boot_success flag in grub's environment. This happens +automatically 30 seconds after login. + +But if the user shuts down or reboots from the system-menu before then +(e.g. directly from gdm) then the boot_success flag gets not set. If +a reboot / shutdown is initiated through gnome-session then the user +is successfully interacting with the system, so set the boot_success +flag from gnome_session for this case to fix reboot from gdm leading to +the boot-menu not being hidden. +--- + gnome-session/gsm-manager.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c +index 3cf421cd..924767af 100644 +--- a/gnome-session/gsm-manager.c ++++ b/gnome-session/gsm-manager.c +@@ -3629,51 +3629,63 @@ on_shutdown_prepared (GsmSystem *system, + gboolean success, + GsmManager *manager) + { + g_debug ("GsmManager: on_shutdown_prepared, success: %d", success); + g_signal_handlers_disconnect_by_func (system, on_shutdown_prepared, manager); + + if (success) { + /* move to end-session phase */ + g_assert (manager->priv->phase == GSM_MANAGER_PHASE_QUERY_END_SESSION); + manager->priv->phase++; + start_phase (manager); + } else { + disconnect_shell_dialog_signals (manager); + gsm_shell_close_end_session_dialog (manager->priv->shell); + /* back to running phase */ + cancel_end_session (manager); + } + } + + static gboolean + do_query_end_session_exit (GsmManager *manager) + { + gboolean reboot = FALSE; + gboolean shutdown = FALSE; + + switch (manager->priv->logout_type) { + case GSM_MANAGER_LOGOUT_LOGOUT: + break; + case GSM_MANAGER_LOGOUT_REBOOT: + case GSM_MANAGER_LOGOUT_REBOOT_INTERACT: ++ /* ++ * Fedora specific patch to make sure the boot-menu does not ++ * show when it is configured to auto-hide and a reboot is ++ * initiated directly from gdm. ++ */ ++ system("/usr/sbin/grub2-set-bootflag boot_success"); + reboot = TRUE; + break; + case GSM_MANAGER_LOGOUT_SHUTDOWN: + case GSM_MANAGER_LOGOUT_SHUTDOWN_INTERACT: ++ /* ++ * Fedora specific patch to make sure the boot-menu does not ++ * show when it is configured to auto-hide and a shutdown is ++ * initiated directly from gdm. ++ */ ++ system("/usr/sbin/grub2-set-bootflag boot_success"); + shutdown = TRUE; + break; + default: + g_warning ("Unexpected logout type %d in do_query_end_session_exit()", + manager->priv->logout_type); + break; + } + + if (reboot || shutdown) { + g_signal_connect (manager->priv->system, "shutdown-prepared", + G_CALLBACK (on_shutdown_prepared), manager); + gsm_system_prepare_shutdown (manager->priv->system, reboot); + return FALSE; /* don't leave query end session yet */ + } + + return TRUE; /* go to end session phase */ + } +-- +2.31.1 + diff --git a/SOURCES/gnome-xorg.desktop b/SOURCES/gnome-xorg.desktop index b315bdf..9751406 100644 --- a/SOURCES/gnome-xorg.desktop +++ b/SOURCES/gnome-xorg.desktop @@ -1,15 +1,15 @@ [Desktop Entry] -Name[de]=Standard (X11 Anzeige-Server) unter Xorg -Name[es]=Estándar (servidor gráfico X11) en Xorg -Name[fr]=Standard (serveur affichage X11) sur Xorg -Name[it]=Standard (server grafico X11) su Xorg -Name[ja]=Xorg 上でのスタンダード (X11 ディスプレイサーバー) -Name[ko]=Xorg 스탠다드 (X11 디스플레이 서버) -Name[pt_BR]=Padrão (servidor de exibição X11) no Xorg -Name[ru]=Стандартный (дисплейный сервер X11) на Xorg -Name[zh_CN]=Xorg 标准(X11 显示服务器) -Name[zh_TW]=Xorg上的標準(X11顯示服務器) -Name=Standard (X11 display server) on Xorg +Name[de]=Standard (X11 Anzeige-Server) +Name[es]=Estándar (servidor gráfico X11) +Name[fr]=Standard (serveur affichage X11) +Name[it]=Standard (server grafico X11) +Name[ja]=スタンダード (X11 ディスプレイサーバー) +Name[ko]=탠다드 (X11 디스플레이 서버) +Name[pt_BR]=Padrão (servidor de exibição X11) +Name[ru]=Стандартный (дисплейный сервер X11) +Name[zh_CN]=标准(X11 显示服务器) +Name[zh_TW]=標準(X11顯示服務器) +Name=Standard (X11 display server) Comment[de]=Diese Sitzung meldet Sie bei GNOME an Comment[es]=Esta sesión accede a GNOME Comment[fr]=Cette session vous connecte dans GNOME diff --git a/SPECS/gnome-session.spec b/SPECS/gnome-session.spec index 70ad176..59d0dd2 100644 --- a/SPECS/gnome-session.spec +++ b/SPECS/gnome-session.spec @@ -9,7 +9,7 @@ Name: gnome-session Version: 3.28.1 -Release: 10%{?dist}.1 +Release: 13%{?dist} Summary: GNOME session manager License: GPLv2+ @@ -34,6 +34,10 @@ Patch4: 0001-check-accelerated-gles-Use-eglGetPlatformDisplay-EXT.patch Patch10001: 0001-session-selector-show-cursor-explicitly.patch +# Downstream patch to provide better grub integration +# https://bugzilla.redhat.com/show_bug.cgi?id=1914925 +Patch20001: 0001-Fedora-Set-grub-boot-flags-on-shutdown-reboot.patch + BuildRequires: meson BuildRequires: gcc BuildRequires: pkgconfig(egl) @@ -121,6 +125,7 @@ Desktop file to add basic session used for setting up kiosk applications. # Rename GNOME to Standard cp $RPM_SOURCE_DIR/gnome.desktop $RPM_BUILD_ROOT%{_datadir}/wayland-sessions +cp $RPM_SOURCE_DIR/gnome.desktop $RPM_BUILD_ROOT%{_datadir}/wayland-sessions/gnome-wayland.desktop cp $RPM_SOURCE_DIR/gnome-xorg.desktop $RPM_BUILD_ROOT%{_datadir}/xsessions cp $RPM_SOURCE_DIR/gnome-xorg.desktop $RPM_BUILD_ROOT%{_datadir}/xsessions/gnome.desktop @@ -166,10 +171,20 @@ install -D $RPM_SOURCE_DIR/20-redhat-kiosk.conf -t $RPM_BUILD_ROOT%{_datadir}/X1 %{_datadir}/glib-2.0/schemas/org.gnome.SessionManager.gschema.xml %changelog -* Fri Jun 04 2021 Ray Strode - 3.28.1-10.1 +* Mon Jul 26 2021 Ray Strode - 3.28.1-13 +- Add patch to tell grub boot was successful when user is + able to explicitly request shutdown/reboot. + Resolves: #1914925 + +* Tue Jul 20 2021 Ray Strode - 3.28.1-12 +- Introduce gnome-wayland session to allow users that use + Xorg on the login screen to try wayland for the user session. + Related: #1962211 + +* Fri Jun 04 2021 Ray Strode - 3.28.1-11 - Exclude kiosk-session from xsession subpackage - Disable VT switching when kiosk-session is installed - Related: #1959505 + Related: #1955754 * Mon Jun 29 2020 Ray Strode - 3.28.1-10 - Show cursor explicitly from session selector