gdm: 49.2 → 50.0
https://gitlab.gnome.org/GNOME/gdm/-/compare/49.2...50.0
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
|
||||
index ad2e65cf7..61fb78db8 100644
|
||||
--- a/daemon/gdm-local-display-factory.c
|
||||
+++ b/daemon/gdm-local-display-factory.c
|
||||
@@ -272,7 +272,7 @@ struct GdmDisplayServerConfiguration {
|
||||
{ "wayland", GDM_KEY_WAYLAND_ENABLE, NULL, "wayland" },
|
||||
#endif
|
||||
#ifdef ENABLE_X11_SUPPORT
|
||||
- { "xorg", GDM_KEY_XORG_ENABLE, "/usr/bin/Xorg", "x11" },
|
||||
+ { "xorg", GDM_KEY_XORG_ENABLE, "@xorgserver@/bin/Xorg", "x11" },
|
||||
#endif
|
||||
{ NULL, NULL, NULL },
|
||||
};
|
||||
diff --git a/common/gdm-common.c b/common/gdm-common.c
|
||||
index edf702ec5..3a75af430 100644
|
||||
--- a/common/gdm-common.c
|
||||
+++ b/common/gdm-common.c
|
||||
@@ -994,8 +994,8 @@ const char * const
|
||||
gdm_find_x_server (void)
|
||||
{
|
||||
const char * const x_servers[] = {
|
||||
- "/usr/bin/Xorg",
|
||||
- "/usr/bin/X",
|
||||
+ "@xorgserver@/bin/Xorg",
|
||||
+ "@xorgserver@/bin/X",
|
||||
};
|
||||
const char *override = NULL;
|
||||
|
||||
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
||||
index 457dcf88d..a71b89ba8 100644
|
||||
--- a/daemon/gdm-manager.c
|
||||
|
||||
@@ -1,40 +1,33 @@
|
||||
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
|
||||
index 88fe96f..b1b140a 100644
|
||||
index ed01fbe52..de3a6e647 100644
|
||||
--- a/daemon/gdm-x-session.c
|
||||
+++ b/daemon/gdm-x-session.c
|
||||
@@ -664,18 +664,34 @@ spawn_session (State *state,
|
||||
state->session_command,
|
||||
NULL);
|
||||
} else {
|
||||
+ char const *session_wrapper;
|
||||
+ char *eff_session_command;
|
||||
int ret;
|
||||
char **argv;
|
||||
@@ -670,12 +670,27 @@ spawn_session (State *state,
|
||||
g_subprocess_launcher_setenv (launcher, "WINDOWPATH", vt, TRUE);
|
||||
}
|
||||
|
||||
- ret = g_shell_parse_argv (state->session_command,
|
||||
+ session_wrapper = g_getenv("GDM_X_SESSION_WRAPPER");
|
||||
+ if (session_wrapper != NULL) {
|
||||
+ char *quoted_wrapper = g_shell_quote(session_wrapper);
|
||||
+ eff_session_command = g_strjoin(" ", quoted_wrapper, state->session_command, NULL);
|
||||
+ g_free(quoted_wrapper);
|
||||
+ } else {
|
||||
+ eff_session_command = state->session_command;
|
||||
+ }
|
||||
+ char const *session_wrapper;
|
||||
+ char *eff_session_command;
|
||||
+ session_wrapper = g_getenv ("GDM_X_SESSION_WRAPPER");
|
||||
+ if (session_wrapper != NULL) {
|
||||
+ char *quoted_wrapper = g_shell_quote (session_wrapper);
|
||||
+ eff_session_command = g_strjoin (" ", quoted_wrapper, state->session_command, NULL);
|
||||
+ g_free (quoted_wrapper);
|
||||
+ } else {
|
||||
+ eff_session_command = state->session_command;
|
||||
+ }
|
||||
+
|
||||
+ ret = g_shell_parse_argv (eff_session_command,
|
||||
NULL,
|
||||
&argv,
|
||||
&error);
|
||||
subprocess = g_subprocess_launcher_spawn (launcher,
|
||||
&error,
|
||||
GDMCONFDIR "/Xsession",
|
||||
- state->session_command,
|
||||
+ eff_session_command,
|
||||
NULL);
|
||||
|
||||
+ if (session_wrapper != NULL) {
|
||||
+ g_free(eff_session_command);
|
||||
+ }
|
||||
+ if (session_wrapper != NULL) {
|
||||
+ g_free (eff_session_command);
|
||||
+ }
|
||||
+
|
||||
if (!ret) {
|
||||
g_debug ("could not parse session arguments: %s", error->message);
|
||||
goto out;
|
||||
}
|
||||
+
|
||||
subprocess = g_subprocess_launcher_spawnv (launcher,
|
||||
(const char * const *) argv,
|
||||
&error);
|
||||
if (subprocess == NULL) {
|
||||
g_debug ("could not start session: %s", error->message);
|
||||
goto out;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
audit,
|
||||
gobject-introspection,
|
||||
plymouth,
|
||||
polkit,
|
||||
coreutils,
|
||||
xorg-server,
|
||||
dbus,
|
||||
@@ -43,7 +44,7 @@ in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gdm";
|
||||
version = "49.2";
|
||||
version = "50.0";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -52,14 +53,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gdm/${lib.versions.major finalAttrs.version}/gdm-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-mBNjH59fD4YOoUpDeGbmDvx77TAjt8O3Zcxd4d5ZegY=";
|
||||
hash = "sha256-ZG9T1o8tLRRxRv+uuFBH3ti4E9yxwQTY8Ow2ymCetb8=";
|
||||
};
|
||||
|
||||
mesonFlags = [
|
||||
"-Dgdm-xsession=true"
|
||||
# TODO: Setup a default-path? https://gitlab.gnome.org/GNOME/gdm/-/blob/6fc40ac6aa37c8ad87c32f0b1a5d813d34bf7770/meson_options.txt#L6
|
||||
"-Dinitial-vt=1"
|
||||
"-Dudev-dir=${placeholder "out"}/lib/udev/rules.d"
|
||||
"-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
||||
"-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
|
||||
"--sysconfdir=/etc"
|
||||
@@ -92,6 +92,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
libselinux
|
||||
pam
|
||||
plymouth
|
||||
polkit
|
||||
systemd
|
||||
];
|
||||
|
||||
@@ -133,11 +134,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Upstream checks some common paths to find an `X` binary. We already know it.
|
||||
echo #!/bin/sh > build-aux/find-x-server.sh
|
||||
echo "echo ${lib.getBin xorg-server}/bin/X" >> build-aux/find-x-server.sh
|
||||
patchShebangs build-aux/find-x-server.sh
|
||||
|
||||
# Reverts https://gitlab.gnome.org/GNOME/gdm/-/commit/b0f802e36ff948a415bfd2bccaa268b6990515b7
|
||||
# The gdm-auth-config tool is probably not too useful for NixOS, but we still want the dconf profile
|
||||
# installed (mostly just because .passthru.tests can make use of it).
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
diff --git a/daemon/gdm-wayland-session.c b/daemon/gdm-wayland-session.c
|
||||
index 3ca2d1496..cb9e96101 100644
|
||||
--- a/daemon/gdm-wayland-session.c
|
||||
+++ b/daemon/gdm-wayland-session.c
|
||||
@@ -285,6 +285,7 @@ spawn_session (State *state,
|
||||
@@ -287,6 +287,7 @@ spawn_session (State *state,
|
||||
"XAUTHORITY",
|
||||
"WAYLAND_DISPLAY",
|
||||
"WAYLAND_SOCKET",
|
||||
"GNOME_SHELL_SESSION_MODE",
|
||||
+ "__NIXOS_SET_ENVIRONMENT_DONE",
|
||||
NULL };
|
||||
|
||||
g_debug ("Running wayland session");
|
||||
/* The environment variables listed below are those we have set (or
|
||||
* received from our own execution environment) only as a fallback to
|
||||
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
|
||||
index ed01fbe52..06efac2df 100644
|
||||
--- a/daemon/gdm-x-session.c
|
||||
+++ b/daemon/gdm-x-session.c
|
||||
@@ -610,6 +610,7 @@ spawn_session (State *state,
|
||||
@@ -603,6 +603,7 @@ spawn_session (State *state,
|
||||
"XAUTHORITY",
|
||||
"WAYLAND_DISPLAY",
|
||||
"WAYLAND_SOCKET",
|
||||
"GNOME_SHELL_SESSION_MODE",
|
||||
+ "__NIXOS_SET_ENVIRONMENT_DONE",
|
||||
NULL };
|
||||
|
||||
g_debug ("Running X session");
|
||||
/* The environment variables listed below are those we have set (or
|
||||
* received from our own execution environment) only as a fallback to
|
||||
|
||||
Reference in New Issue
Block a user