import gnome-session-40.1.1-7.el9
This commit is contained in:
parent
70092981d7
commit
769205d114
@ -0,0 +1,126 @@
|
||||
From 51949dd2b944604742406a7464eb945cb5b610e9 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Berg <bberg@redhat.com>
|
||||
Date: Mon, 15 Nov 2021 14:56:14 +0100
|
||||
Subject: [PATCH 1/2] main: Lower fallback warning when running in GDM
|
||||
|
||||
It is currently expected for the fallback to happen. So hide the errors,
|
||||
but still log a single message to inform users about it.
|
||||
---
|
||||
gnome-session/main.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gnome-session/main.c b/gnome-session/main.c
|
||||
index 443bc045..45ec6597 100644
|
||||
--- a/gnome-session/main.c
|
||||
+++ b/gnome-session/main.c
|
||||
@@ -512,100 +512,103 @@ main (int argc, char **argv)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
env_override_autostart_dirs = g_getenv ("GNOME_SESSION_AUTOSTART_DIR");
|
||||
|
||||
if (env_override_autostart_dirs != NULL && env_override_autostart_dirs[0] != '\0') {
|
||||
env_override_autostart_dirs_v = g_strsplit (env_override_autostart_dirs, ":", 0);
|
||||
gsm_util_set_autostart_dirs (env_override_autostart_dirs_v);
|
||||
} else {
|
||||
gsm_util_set_autostart_dirs (override_autostart_dirs);
|
||||
|
||||
/* Export the override autostart dirs parameter to the environment
|
||||
* in case we are running on systemd. */
|
||||
if (override_autostart_dirs) {
|
||||
g_autofree char *autostart_dirs = NULL;
|
||||
autostart_dirs = g_strjoinv (":", override_autostart_dirs);
|
||||
g_setenv ("GNOME_SESSION_AUTOSTART_DIR", autostart_dirs, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
gsm_util_export_activation_environment (&error);
|
||||
if (error) {
|
||||
g_warning ("Failed to upload environment to DBus: %s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
session_name = opt_session_name;
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
gsm_util_export_user_environment (&error);
|
||||
- if (error) {
|
||||
+ if (error && !g_getenv ("RUNNING_UNDER_GDM")) {
|
||||
g_warning ("Failed to upload environment to systemd: %s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SYSTEMD_SESSION
|
||||
if (use_systemd && !systemd_service) {
|
||||
g_autofree gchar *gnome_session_target;
|
||||
const gchar *session_type;
|
||||
|
||||
session_type = g_getenv ("XDG_SESSION_TYPE");
|
||||
|
||||
/* We really need to resolve the session name at this point,
|
||||
* which requires talking to GSettings internally. */
|
||||
if (IS_STRING_EMPTY (session_name)) {
|
||||
session_name = _gsm_manager_get_default_session (NULL);
|
||||
}
|
||||
|
||||
/* Reset all failed units; we are going to start a lof ot things and
|
||||
* really do not want to run into errors because units have failed
|
||||
* in a previous session
|
||||
*/
|
||||
gsm_util_systemd_reset_failed (&error);
|
||||
- if (error) {
|
||||
+ if (error && !g_getenv ("RUNNING_UNDER_GDM")) {
|
||||
g_warning ("Failed to reset failed state of units: %s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
/* We don't escape the name (i.e. we leave any '-' intact). */
|
||||
gnome_session_target = g_strdup_printf ("gnome-session-%s@%s.target", session_type, session_name);
|
||||
if (gsm_util_start_systemd_unit (gnome_session_target, "fail", &error)) {
|
||||
/* We started the unit, open fifo and sleep forever. */
|
||||
systemd_leader_run ();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* We could not start the unit, fall back. */
|
||||
- g_warning ("Falling back to non-systemd startup procedure due to error: %s", error->message);
|
||||
- g_clear_error (&error);
|
||||
+ if (g_getenv ("RUNNING_UNDER_GDM"))
|
||||
+ g_message ("Falling back to non-systemd startup procedure. This is expected to happen for GDM sessions.");
|
||||
+ else
|
||||
+ g_warning ("Falling back to non-systemd startup procedure due to error: %s", error->message);
|
||||
+ g_clear_error (&error);
|
||||
}
|
||||
#endif /* ENABLE_SYSTEMD_SESSION */
|
||||
|
||||
{
|
||||
gchar *ibus_path;
|
||||
|
||||
ibus_path = g_find_program_in_path("ibus-daemon");
|
||||
|
||||
if (ibus_path) {
|
||||
const gchar *p;
|
||||
p = g_getenv ("QT_IM_MODULE");
|
||||
if (!p || !*p)
|
||||
p = "ibus";
|
||||
gsm_util_setenv ("QT_IM_MODULE", p);
|
||||
p = g_getenv ("XMODIFIERS");
|
||||
if (!p || !*p)
|
||||
p = "@im=ibus";
|
||||
gsm_util_setenv ("XMODIFIERS", p);
|
||||
}
|
||||
|
||||
g_free (ibus_path);
|
||||
}
|
||||
|
||||
/* We want to use the GNOME menus which has the designed categories.
|
||||
*/
|
||||
gsm_util_setenv ("XDG_MENU_PREFIX", "gnome-");
|
||||
|
||||
/* Talk to logind before acquiring a name, since it does synchronous
|
||||
* calls at initialization time that invoke a main loop and if we
|
||||
* already owned a name, then we would service too early during
|
||||
--
|
||||
2.35.1
|
||||
|
115
SOURCES/0002-main-Also-clear-error-when-running-under-GDM.patch
Normal file
115
SOURCES/0002-main-Also-clear-error-when-running-under-GDM.patch
Normal file
@ -0,0 +1,115 @@
|
||||
From d39c345191f83ba37d24c07a831c9bb91cdde079 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Berg <bberg@redhat.com>
|
||||
Date: Sun, 17 Apr 2022 15:58:13 +0200
|
||||
Subject: [PATCH 2/2] main: Also clear error when running under GDM
|
||||
|
||||
Commit 0349a77ad875 ("main: Lower fallback warning when running in GDM")
|
||||
removed error logging when running under GDM. However, the error was not
|
||||
cleared afterwards, leaking it to later operations and causing other
|
||||
issues.
|
||||
|
||||
Closes: #105
|
||||
---
|
||||
gnome-session/main.c | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gnome-session/main.c b/gnome-session/main.c
|
||||
index 45ec6597..6a683ae0 100644
|
||||
--- a/gnome-session/main.c
|
||||
+++ b/gnome-session/main.c
|
||||
@@ -512,88 +512,86 @@ main (int argc, char **argv)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
env_override_autostart_dirs = g_getenv ("GNOME_SESSION_AUTOSTART_DIR");
|
||||
|
||||
if (env_override_autostart_dirs != NULL && env_override_autostart_dirs[0] != '\0') {
|
||||
env_override_autostart_dirs_v = g_strsplit (env_override_autostart_dirs, ":", 0);
|
||||
gsm_util_set_autostart_dirs (env_override_autostart_dirs_v);
|
||||
} else {
|
||||
gsm_util_set_autostart_dirs (override_autostart_dirs);
|
||||
|
||||
/* Export the override autostart dirs parameter to the environment
|
||||
* in case we are running on systemd. */
|
||||
if (override_autostart_dirs) {
|
||||
g_autofree char *autostart_dirs = NULL;
|
||||
autostart_dirs = g_strjoinv (":", override_autostart_dirs);
|
||||
g_setenv ("GNOME_SESSION_AUTOSTART_DIR", autostart_dirs, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
gsm_util_export_activation_environment (&error);
|
||||
if (error) {
|
||||
g_warning ("Failed to upload environment to DBus: %s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
session_name = opt_session_name;
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
gsm_util_export_user_environment (&error);
|
||||
- if (error && !g_getenv ("RUNNING_UNDER_GDM")) {
|
||||
+ if (error && !g_getenv ("RUNNING_UNDER_GDM"))
|
||||
g_warning ("Failed to upload environment to systemd: %s", error->message);
|
||||
- g_clear_error (&error);
|
||||
- }
|
||||
+ g_clear_error (&error);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SYSTEMD_SESSION
|
||||
if (use_systemd && !systemd_service) {
|
||||
g_autofree gchar *gnome_session_target;
|
||||
const gchar *session_type;
|
||||
|
||||
session_type = g_getenv ("XDG_SESSION_TYPE");
|
||||
|
||||
/* We really need to resolve the session name at this point,
|
||||
* which requires talking to GSettings internally. */
|
||||
if (IS_STRING_EMPTY (session_name)) {
|
||||
session_name = _gsm_manager_get_default_session (NULL);
|
||||
}
|
||||
|
||||
/* Reset all failed units; we are going to start a lof ot things and
|
||||
* really do not want to run into errors because units have failed
|
||||
* in a previous session
|
||||
*/
|
||||
gsm_util_systemd_reset_failed (&error);
|
||||
- if (error && !g_getenv ("RUNNING_UNDER_GDM")) {
|
||||
+ if (error && !g_getenv ("RUNNING_UNDER_GDM"))
|
||||
g_warning ("Failed to reset failed state of units: %s", error->message);
|
||||
- g_clear_error (&error);
|
||||
- }
|
||||
+ g_clear_error (&error);
|
||||
|
||||
/* We don't escape the name (i.e. we leave any '-' intact). */
|
||||
gnome_session_target = g_strdup_printf ("gnome-session-%s@%s.target", session_type, session_name);
|
||||
if (gsm_util_start_systemd_unit (gnome_session_target, "fail", &error)) {
|
||||
/* We started the unit, open fifo and sleep forever. */
|
||||
systemd_leader_run ();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* We could not start the unit, fall back. */
|
||||
if (g_getenv ("RUNNING_UNDER_GDM"))
|
||||
g_message ("Falling back to non-systemd startup procedure. This is expected to happen for GDM sessions.");
|
||||
else
|
||||
g_warning ("Falling back to non-systemd startup procedure due to error: %s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
#endif /* ENABLE_SYSTEMD_SESSION */
|
||||
|
||||
{
|
||||
gchar *ibus_path;
|
||||
|
||||
ibus_path = g_find_program_in_path("ibus-daemon");
|
||||
|
||||
if (ibus_path) {
|
||||
const gchar *p;
|
||||
p = g_getenv ("QT_IM_MODULE");
|
||||
if (!p || !*p)
|
||||
p = "ibus";
|
||||
gsm_util_setenv ("QT_IM_MODULE", p);
|
||||
p = g_getenv ("XMODIFIERS");
|
||||
--
|
||||
2.35.1
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
Name: gnome-session
|
||||
Version: 40.1.1
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: GNOME session manager
|
||||
|
||||
License: GPLv2+
|
||||
@ -35,6 +35,10 @@ Patch50001: subscription-manager-support.patch
|
||||
|
||||
Patch60001: 0001-gnome-session-don-t-validate-shell-before-using-it.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2044212
|
||||
Patch70001: 0001-main-Lower-fallback-warning-when-running-in-GDM.patch
|
||||
Patch70002: 0002-main-Also-clear-error-when-running-under-GDM.patch
|
||||
|
||||
BuildRequires: meson
|
||||
BuildRequires: gcc
|
||||
BuildRequires: pkgconfig(egl)
|
||||
@ -147,6 +151,10 @@ cp $RPM_SOURCE_DIR/gnome-xorg.desktop $RPM_BUILD_ROOT%{_datadir}/xsessions/gnome
|
||||
%{_userunitdir}/gnome-launched-.scope.d/
|
||||
|
||||
%changelog
|
||||
* Tue Dec 13 2022 Ray Strode <rstrode@redhat.com> - 40.1.1-7
|
||||
- Demote expected log messages from warnings to debug level
|
||||
Resolves: #2044212
|
||||
|
||||
* Fri Dec 3 2021 Ray Strode <rstrode@redhat.com> - 40.1.1-6
|
||||
- Add weak req on system-backgrounds now that it's split from system-logos
|
||||
Resolves: #2012244
|
||||
|
Loading…
Reference in New Issue
Block a user