From 87b5f7b54d29d59b3e4946c94bbb59ab92bb96cb Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 21 Mar 2024 09:23:57 +0000 Subject: [PATCH 1/8] Update to 46.0 --- .gitignore | 1 + gdm.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f576f45..cab8bd2 100644 --- a/.gitignore +++ b/.gitignore @@ -148,3 +148,4 @@ gdm-2.30.2.tar.bz2 /gdm-45.beta.tar.xz /gdm-45.0.1.tar.xz /gdm-46.alpha.tar.xz +/gdm-46.0.tar.xz diff --git a/gdm.spec b/gdm.spec index 75f25e5..6972ae4 100644 --- a/gdm.spec +++ b/gdm.spec @@ -6,7 +6,7 @@ Name: gdm Epoch: 1 -Version: 46.alpha +Version: 46.0 Release: %autorelease Summary: The GNOME Display Manager diff --git a/sources b/sources index 49f83de..67a04cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gdm-46.alpha.tar.xz) = d9a3147ba985e0f110decf905916a74a8c4d3bc8e28dafc27c22d38f0487d7b60587d702da14d026176c47801b22a2bd4cb87800ce1b1f108a664250bff5ebed +SHA512 (gdm-46.0.tar.xz) = baca2635a4f99f7a13123bc65c38d7c6f6ec58b0311f289a42e8455b612929f1711d108eeb9b0b64ff93da2bc7d759fcb3aba8a2a356cf0351c1da637b44b396 From 44856ba40d2170d946ccec07112feb26c609b972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 8 Apr 2024 12:49:37 +0200 Subject: [PATCH 2/8] Add headless session helper files Originating from script and service file linked to in https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/merge_requests/215. --- 0001-Add-headless-session-files.patch | 219 ++++++++++++++++++++++++++ gdm.spec | 4 + 2 files changed, 223 insertions(+) create mode 100644 0001-Add-headless-session-files.patch diff --git a/0001-Add-headless-session-files.patch b/0001-Add-headless-session-files.patch new file mode 100644 index 0000000..9ea57eb --- /dev/null +++ b/0001-Add-headless-session-files.patch @@ -0,0 +1,219 @@ +From a8a0d952293337544da4681f0c896052eafd9d0f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Fri, 5 Apr 2024 16:44:07 +0200 +Subject: [PATCH] Add headless session files + +It consists of a python script for running the session, and a systemd +system service template. +--- + data/gnome-headless-session@.service | 6 + + data/meson.build | 4 + + utils/gdm-headless-login-session | 157 +++++++++++++++++++++++++++ + utils/meson.build | 5 + + 4 files changed, 172 insertions(+) + create mode 100644 data/gnome-headless-session@.service + create mode 100644 utils/gdm-headless-login-session + +diff --git a/data/gnome-headless-session@.service b/data/gnome-headless-session@.service +new file mode 100644 +index 000000000..269d16288 +--- /dev/null ++++ b/data/gnome-headless-session@.service +@@ -0,0 +1,6 @@ ++[Unit] ++Description=Headless desktop session ++ ++[Service] ++ExecStart=/usr/libexec/gdm-headless-login-session --user=%i ++Restart=on-failure +diff --git a/data/meson.build b/data/meson.build +index 2211e98b5..2df07cd32 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -221,3 +221,7 @@ if get_option('gdm-xsession') + install_dir: gdmconfdir, + ) + endif ++ ++headless_session_service = install_data('gnome-headless-session@.service', ++ install_dir: systemd_systemunitdir, ++ ) +diff --git a/utils/gdm-headless-login-session b/utils/gdm-headless-login-session +new file mode 100644 +index 000000000..e108be523 +--- /dev/null ++++ b/utils/gdm-headless-login-session +@@ -0,0 +1,157 @@ ++#!/usr/bin/env python3 ++ ++import argparse ++import pam ++import pwd ++import os ++import signal ++import sys ++ ++import gi ++gi.require_version('AccountsService', '1.0') ++from gi.repository import AccountsService, GLib ++ ++def run_desktop_in_new_session(pam_environment, user, session_desktop, tty_input, tty_output): ++ keyfile = GLib.KeyFile() ++ keyfile.load_from_data_dirs(f'wayland-sessions/{session_desktop}.desktop', ++ GLib.KeyFileFlags.NONE) ++ ++ try: ++ can_run_headless = keyfile.get_boolean(GLib.KEY_FILE_DESKTOP_GROUP, ++ 'X-GDM-CanRunHeadless') ++ except GLib.GError: ++ raise Exception(f"Session {session_desktop} can't run headlessly") ++ ++ if not can_run_headless: ++ raise Exception(f"Session {session_desktop} can't run headlessly") ++ ++ executable = keyfile.get_string(GLib.KEY_FILE_DESKTOP_GROUP, ++ GLib.KEY_FILE_DESKTOP_KEY_TRY_EXEC) ++ if GLib.find_program_in_path(executable) is None: ++ raise Exception(f"Invalid session {session_desktop}") ++ ++ command = keyfile.get_string(GLib.KEY_FILE_DESKTOP_GROUP, ++ GLib.KEY_FILE_DESKTOP_KEY_EXEC) ++ [success, args] = GLib.shell_parse_argv(command) ++ ++ pam_handle = pam.pam() ++ ++ for key, value in pam_environment.items(): ++ pam_handle.putenv(f'{key}={value}') ++ ++ if not pam_handle.authenticate(user, '', service='gdm-autologin', call_end=False): ++ raise Exception("Authentication failed") ++ ++ for key, value in pam_environment.items(): ++ pam_handle.putenv(f'{key}={value}') ++ ++ if pam_handle.open_session() != pam.PAM_SUCCESS: ++ raise Exception("Failed to open PAM session") ++ ++ session_environment = os.environ.copy() ++ session_environment.update(pam_handle.getenvlist()) ++ ++ user_info = pwd.getpwnam(user) ++ uid = user_info.pw_uid ++ gid = user_info.pw_gid ++ ++ old_tty_output = os.fdopen(os.dup(2), 'w') ++ ++ pid = os.fork() ++ if pid == 0: ++ try: ++ os.setsid() ++ except OSError as e: ++ print(f"Could not create new pid session: {e}", file=old_tty_output) ++ ++ try: ++ os.dup2(tty_input.fileno(), 0) ++ os.dup2(tty_output.fileno(), 1) ++ os.dup2(tty_output.fileno(), 2) ++ except OSError as e: ++ print(f"Could not set up standard i/o: {e}", file=old_tty_output) ++ ++ try: ++ os.initgroups(user, gid) ++ os.setgid(gid) ++ os.setuid(uid); ++ except OSError as e: ++ print(f"Could not become user {user} (uid={uid}): {e}", file=old_tty_output) ++ ++ try: ++ os.execvpe(args[0], args, session_environment) ++ except OSError as e: ++ print(f"Could not run program \"{' '.join(arguments)}\": {e}", file=old_tty_output) ++ os._exit(1) ++ ++ ++ def signal_handler(sig, frame): ++ os.kill(pid, sig) ++ ++ signal.signal(signal.SIGTERM, signal_handler) ++ ++ try: ++ (_, exit_code) = os.waitpid(pid, 0); ++ except KeyboardInterrupt: ++ os.kill(pid, signal.SIGTERM) ++ except OSError as e: ++ print(f"Could not wait for program to finish: {e}", file=old_tty_output) ++ ++ if os.WIFEXITED(exit_code): ++ exit_code = os.WEXITSTATUS(exit_code) ++ else: ++ os.kill(os.getpid(), os.WTERMSIG(exit_code)) ++ old_tty_output.close() ++ ++ if pam_handle.close_session() != pam.PAM_SUCCESS: ++ raise Exception("Failed to close PAM session") ++ ++ pam_handle.end() ++ ++ return exit_code ++ ++def wait_for_user_data(user): ++ main_context = GLib.MainContext.default() ++ while not user.is_loaded(): ++ main_context.iteration(True) ++ ++def main(): ++ parser = argparse.ArgumentParser(description='Run a desktop session in a PAM session as a specified user.') ++ parser.add_argument('--user', help='Username for which to run the session') ++ ++ args = parser.parse_args() ++ ++ if args.user is None: ++ parser.print_usage() ++ sys.exit(1) ++ ++ try: ++ tty_path = '/dev/null' ++ ++ tty_input = open(tty_path, 'r') ++ tty_output = open(tty_path, 'w') ++ except OSError as e: ++ raise Exception(f"Error opening /dev/null as tty associated with VT {vt}: {e}") ++ ++ user_manager = AccountsService.UserManager().get_default() ++ user = user_manager.get_user(args.user) ++ wait_for_user_data(user) ++ session_desktop = user.get_session() ++ if not session_desktop: ++ session_desktop = 'gnome' ++ ++ pam_environment = {} ++ pam_environment['XDG_SESSION_TYPE'] = 'wayland' ++ pam_environment['XDG_SESSION_CLASS'] = 'user' ++ pam_environment['XDG_SESSION_DESKTOP'] = session_desktop ++ ++ try: ++ result = run_desktop_in_new_session(pam_environment, args.user, session_desktop, tty_input, tty_output) ++ except Exception as e: ++ raise Exception(f"Error running desktop session \"{session_desktop}\": {e}") ++ tty_input.close() ++ tty_output.close() ++ sys.exit(result) ++ ++if __name__ == '__main__': ++ main() +diff --git a/utils/meson.build b/utils/meson.build +index e4141fb13..57dd6519f 100644 +--- a/utils/meson.build ++++ b/utils/meson.build +@@ -65,3 +65,8 @@ if distro != 'none' + install_dir: get_option('libexecdir'), + ) + endif ++ ++gdm_headless_login_session = install_data('gdm-headless-login-session', ++ install_mode: 'rwxr-xr-x', ++ install_dir: get_option('libexecdir'), ++ ) +-- +2.44.0 + diff --git a/gdm.spec b/gdm.spec index 6972ae4..386993c 100644 --- a/gdm.spec +++ b/gdm.spec @@ -25,6 +25,7 @@ Patch: 0001-udev-Stick-with-wayland-on-hybrid-nvidia-with-vendor.patch Patch: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch Patch: 0001-data-add-system-dconf-databases-to-gdm-profile.patch Patch: 0001-xorg-detect.patch +Patch: 0001-Add-headless-session-files.patch BuildRequires: dconf BuildRequires: desktop-file-utils @@ -72,6 +73,7 @@ Requires: systemd >= 186 Requires: system-logos Requires: xhost xmodmap xrdb Requires: xorg-x11-xinit +Requires: python3-pam # Until the greeter gets dynamic user support, it can't # use a user bus @@ -242,6 +244,7 @@ fi %{_libexecdir}/gdm-simple-chooser %{_libexecdir}/gdm-wayland-session %{_libexecdir}/gdm-x-session +%{_libexecdir}/gdm-headless-login-session %{_sbindir}/gdm %{_bindir}/gdmflexiserver %{_bindir}/gdm-config @@ -273,6 +276,7 @@ fi %{_sysconfdir}/pam.d/gdm-launch-environment %{_udevrulesdir}/61-gdm.rules %{_unitdir}/gdm.service +%{_unitdir}/gnome-headless-session@.service %dir %{_userunitdir}/gnome-session@gnome-login.target.d/ %{_userunitdir}/gnome-session@gnome-login.target.d/session.conf %{_sysusersdir}/%{name}.conf From d7de68637c5977599f811353578e830f1b17e81c Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 30 May 2024 13:30:41 +0100 Subject: [PATCH 3/8] Update to 46.2 --- .gitignore | 1 + gdm.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cab8bd2..d59ce84 100644 --- a/.gitignore +++ b/.gitignore @@ -149,3 +149,4 @@ gdm-2.30.2.tar.bz2 /gdm-45.0.1.tar.xz /gdm-46.alpha.tar.xz /gdm-46.0.tar.xz +/gdm-46.2.tar.xz diff --git a/gdm.spec b/gdm.spec index 386993c..71fe931 100644 --- a/gdm.spec +++ b/gdm.spec @@ -6,7 +6,7 @@ Name: gdm Epoch: 1 -Version: 46.0 +Version: 46.2 Release: %autorelease Summary: The GNOME Display Manager diff --git a/sources b/sources index 67a04cd..a1925cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gdm-46.0.tar.xz) = baca2635a4f99f7a13123bc65c38d7c6f6ec58b0311f289a42e8455b612929f1711d108eeb9b0b64ff93da2bc7d759fcb3aba8a2a356cf0351c1da637b44b396 +SHA512 (gdm-46.2.tar.xz) = 29cb00b42b64313f63cbf33a0caf9ecaf43f38699983017966fba951b867742129ef150cd927d02add5f7c1c20049ba1301e5ee094caa54835dc12cf29c86210 From 1f59144b9291c302aaedf6c2999694105f64e93d Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 8 Jul 2024 20:54:42 -0400 Subject: [PATCH 4/8] Drop rules for falling back in X11 The Fedora GNOME experience provided by Workstation no longer includes GNOME X11 on the media, so realistically there is nothing to fall back to anymore. Reference: https://fedoraproject.org/wiki/Changes/WaylandOnlyGNOMEWorkstationMedia --- ...ata-Drop-unused-gdm_prefer_xorg-rule.patch | 28 +++++ ...wayland-on-hybrid-nvidia-with-vendor.patch | 38 ------- 0002-data-Drop-X11-fallback-rules.patch | 100 ++++++++++++++++++ gdm.spec | 3 +- 4 files changed, 130 insertions(+), 39 deletions(-) create mode 100644 0001-data-Drop-unused-gdm_prefer_xorg-rule.patch delete mode 100644 0001-udev-Stick-with-wayland-on-hybrid-nvidia-with-vendor.patch create mode 100644 0002-data-Drop-X11-fallback-rules.patch diff --git a/0001-data-Drop-unused-gdm_prefer_xorg-rule.patch b/0001-data-Drop-unused-gdm_prefer_xorg-rule.patch new file mode 100644 index 0000000..2040608 --- /dev/null +++ b/0001-data-Drop-unused-gdm_prefer_xorg-rule.patch @@ -0,0 +1,28 @@ +From a1a145b4d56be57166dc593d80bfe190e37e080e Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Mon, 8 Jul 2024 20:31:48 -0400 +Subject: [PATCH 1/2] data: Drop unused gdm_prefer_xorg rule + +This rule is not used for anything. +--- + data/61-gdm.rules.in | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in +index aa1a0e06c..354277bfe 100644 +--- a/data/61-gdm.rules.in ++++ b/data/61-gdm.rules.in +@@ -109,10 +109,6 @@ LABEL="gdm_nvidia_drm_end" + + GOTO="gdm_end" + +-LABEL="gdm_prefer_xorg" +-RUN+="@libexecdir@/gdm-runtime-config set daemon PreferredDisplayServer xorg" +-GOTO="gdm_end" +- + LABEL="gdm_disable_wayland" + RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false" + GOTO="gdm_end" +-- +2.45.2 + diff --git a/0001-udev-Stick-with-wayland-on-hybrid-nvidia-with-vendor.patch b/0001-udev-Stick-with-wayland-on-hybrid-nvidia-with-vendor.patch deleted file mode 100644 index 3ea7d79..0000000 --- a/0001-udev-Stick-with-wayland-on-hybrid-nvidia-with-vendor.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 32cabdadde5e272a8f045208fe4af1d47e4c3854 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Tue, 27 Sep 2022 10:00:11 -0400 -Subject: [PATCH] udev: Stick with wayland on hybrid nvidia with vendor driver - -F36 defaulted to wayland for users with hybrid graphics that -use the vendor nvidia driver. - -We shouldn't change behavior so close to f37 release, so this -commit brings that behavior back. ---- - data/61-gdm.rules.in | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in -index a4f841bdf..addfc3119 100644 ---- a/data/61-gdm.rules.in -+++ b/data/61-gdm.rules.in -@@ -82,12 +82,14 @@ ENV{GDM_NUMBER_OF_GRAPHICS_CARDS}=="1", RUN+="/usr/bin/rm -f /run/udev/gdm-machi - ENV{GDM_NUMBER_OF_GRAPHICS_CARDS}!="1", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-hybrid-graphics" - LABEL="gdm_hybrid_graphics_check_end" - --# If this is a hybrid graphics laptop with vendor nvidia driver, disable wayland -+# If this is a hybrid graphics laptop with vendor nvidia driver default to wayland -+# It gives poor performance for multi-monitor, but Xorg fails some multi-monitor -+# setups too, and this is what we did in F36. - LABEL="gdm_hybrid_nvidia_laptop_check" - TEST!="/run/udev/gdm-machine-is-laptop", GOTO="gdm_hybrid_nvidia_laptop_check_end" - TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_hybrid_nvidia_laptop_check_end" - TEST!="/run/udev/gdm-machine-has-vendor-nvidia-driver", GOTO="gdm_hybrid_nvidia_laptop_check_end" --GOTO="gdm_disable_wayland" -+GOTO="gdm_end" - LABEL="gdm_hybrid_nvidia_laptop_check_end" - - # Disable wayland in situation where we're in a guest with a virtual gpu and host passthrough gpu --- -2.40.0 - diff --git a/0002-data-Drop-X11-fallback-rules.patch b/0002-data-Drop-X11-fallback-rules.patch new file mode 100644 index 0000000..91edd44 --- /dev/null +++ b/0002-data-Drop-X11-fallback-rules.patch @@ -0,0 +1,100 @@ +From 91608626f360638c0dbffa1dbad58c426c8fc733 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Mon, 8 Jul 2024 20:35:28 -0400 +Subject: [PATCH 2/2] data: Drop X11 fallback rules + +We expect Wayland to work on all conceivable configurations. +--- + data/61-gdm.rules.in | 60 -------------------------------------------- + 1 file changed, 60 deletions(-) + +diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in +index 354277bfe..eb9eedbf5 100644 +--- a/data/61-gdm.rules.in ++++ b/data/61-gdm.rules.in +@@ -10,22 +10,8 @@ ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", RUN+="/usr/bin/touch /run/udev/g + # vga + ATTR{vendor}=="0x1234", ATTR{device}=="0x1111", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end" + +-# disable Wayland on Hi1710 chipsets +-ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", GOTO="gdm_disable_wayland" +- + LABEL="gdm_pci_device_end" + +-# disable Wayland if modesetting is disabled +-KERNEL!="card[0-9]*", GOTO="gdm_nomodeset_end" +-KERNEL=="card[0-9]-*", GOTO="gdm_nomodeset_end" +-SUBSYSTEM!="drm", GOTO="gdm_nomodeset_end" +-# but keep it enabled for simple framebuffer drivers +-DRIVERS=="simple-framebuffer", GOTO="gdm_nomodeset_end" +-IMPORT{parent}="GDM_MACHINE_HAS_VIRTUAL_GPU" +-ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}!="1", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-hardware-gpu" +-IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland" +-LABEL="gdm_nomodeset_end" +- + # The vendor nvidia driver has multiple modules that need to be loaded before GDM can make an + # informed choice on which way to proceed, so force GDM to wait until NVidia's modules are + # loaded before starting up. +@@ -41,17 +27,6 @@ IMPORT{program}="/bin/sh -c \"sed -e 's/: /=/g' -e 's/\([^[:upper:]]\)\([[:upper + # If it is, there's no need to check for the suspend/resume services + ENV{NVIDIA_ENABLE_S0IX_POWER_MANAGEMENT}=="1", GOTO="gdm_nvidia_suspend_end" + +-# Check if suspend/resume services necessary for working wayland support is available +-TEST{0711}!="/usr/bin/nvidia-sleep.sh", GOTO="gdm_disable_wayland" +-TEST{0711}!="/usr/lib/systemd/system-sleep/nvidia", GOTO="gdm_disable_wayland" +- +-ENV{NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS}!="1", GOTO="gdm_disable_wayland" +-IMPORT{program}="/bin/sh -c 'echo NVIDIA_HIBERNATE=`systemctl is-enabled nvidia-hibernate`'" +-ENV{NVIDIA_HIBERNATE}!="enabled", GOTO="gdm_disable_wayland" +-IMPORT{program}="/bin/sh -c 'echo NVIDIA_RESUME=`systemctl is-enabled nvidia-resume`'" +-ENV{NVIDIA_RESUME}!="enabled", GOTO="gdm_disable_wayland" +-IMPORT{program}="/bin/sh -c 'echo NVIDIA_SUSPEND=`systemctl is-enabled nvidia-suspend`'" +-ENV{NVIDIA_SUSPEND}!="enabled", GOTO="gdm_disable_wayland" + LABEL="gdm_nvidia_suspend_end" + LABEL="gdm_nvidia_end" + +@@ -76,41 +51,6 @@ ENV{GDM_NUMBER_OF_GRAPHICS_CARDS}=="1", RUN+="/usr/bin/rm -f /run/udev/gdm-machi + ENV{GDM_NUMBER_OF_GRAPHICS_CARDS}!="1", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-hybrid-graphics" + LABEL="gdm_hybrid_graphics_check_end" + +-# If this is a hybrid graphics laptop with vendor nvidia driver, disable wayland +-LABEL="gdm_hybrid_nvidia_laptop_check" +-TEST!="/run/udev/gdm-machine-is-laptop", GOTO="gdm_hybrid_nvidia_laptop_check_end" +-TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_hybrid_nvidia_laptop_check_end" +-TEST!="/run/udev/gdm-machine-has-vendor-nvidia-driver", GOTO="gdm_hybrid_nvidia_laptop_check_end" +-GOTO="gdm_disable_wayland" +-LABEL="gdm_hybrid_nvidia_laptop_check_end" +- +-# Disable wayland in situation where we're in a guest with a virtual gpu and host passthrough gpu +-LABEL="gdm_virt_passthrough_check" +-TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_virt_passthrough_check_end" +-TEST!="/run/udev/gdm-machine-has-virtual-gpu", GOTO="gdm_virt_passthrough_check_end" +-TEST!="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_passthrough_check_end" +-GOTO="gdm_disable_wayland" +-LABEL="gdm_virt_passthrough_check_end" +- +-# Disable wayland when there are multiple virtual gpus +-LABEL="gdm_virt_multi_gpu_check" +-TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_virt_multi_gpu_check_end" +-TEST!="/run/udev/gdm-machine-has-virtual-gpu", GOTO="gdm_virt_multi_gpu_check_end" +-TEST=="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_multi_gpu_check_end" +-LABEL="gdm_virt_multi_gpu_check_end" +- +-# Disable wayland when nvidia modeset is disabled +-KERNEL!="nvidia_drm", GOTO="gdm_nvidia_drm_end" +-SUBSYSTEM!="module", GOTO="gdm_nvidia_drm_end" +-ACTION!="add", GOTO="gdm_nvidia_drm_end" +-# disable wayland if nvidia-drm modeset is not enabled +-ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland" +-LABEL="gdm_nvidia_drm_end" +- +-GOTO="gdm_end" +- +-LABEL="gdm_disable_wayland" +-RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false" + GOTO="gdm_end" + + LABEL="gdm_end" +-- +2.45.2 + diff --git a/gdm.spec b/gdm.spec index 71fe931..b3b4fff 100644 --- a/gdm.spec +++ b/gdm.spec @@ -21,7 +21,8 @@ Source5: default.pa-for-gdm Source6: gdm.sysusers # Downstream patches -Patch: 0001-udev-Stick-with-wayland-on-hybrid-nvidia-with-vendor.patch +Patch: 0001-data-Drop-unused-gdm_prefer_xorg-rule.patch +Patch: 0002-data-Drop-X11-fallback-rules.patch Patch: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch Patch: 0001-data-add-system-dconf-databases-to-gdm-profile.patch Patch: 0001-xorg-detect.patch From 75fc90f11c7556c908b8efee1e64b32b84f38d91 Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Tue, 9 Jul 2024 10:45:05 +0200 Subject: [PATCH 5/8] Remove setxkbmap dependency Paraphrasing Peter Hutterer's investigation: > Two uses of setxkbmap in gdm upstream that I can see: > > `data/Xsession.in`: converted to `/etc/gdm/Xsession` but behind the > meson option `gdm-xsession`, which defaults to false. > > `data/Init.in`: uses setxkbmap to "move the xkb configuration from the > GDM_PARENT_DISPLAY", that's behind a `which setxkbmap` change so > removing setxkbmap shouldn't result in any failures --- gdm.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/gdm.spec b/gdm.spec index b3b4fff..b14d432 100644 --- a/gdm.spec +++ b/gdm.spec @@ -69,7 +69,6 @@ Requires: iso-codes Requires: libXau >= 1.0.4-4 Requires: pam Requires: /sbin/nologin -Requires: setxkbmap Requires: systemd >= 186 Requires: system-logos Requires: xhost xmodmap xrdb From 6a29fd81818747ce87f5aafeb3e1113c4ef056f1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 00:19:31 +0000 Subject: [PATCH 6/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 9c3cea8074ddb13999c09dc0ea03543af196755e Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 22 Jul 2024 10:27:28 -0400 Subject: [PATCH 7/8] Update to 47.alpha --- .gitignore | 1 + gdm.spec | 4 ++-- sources | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d59ce84..e832986 100644 --- a/.gitignore +++ b/.gitignore @@ -150,3 +150,4 @@ gdm-2.30.2.tar.bz2 /gdm-46.alpha.tar.xz /gdm-46.0.tar.xz /gdm-46.2.tar.xz +/gdm-47.alpha.tar.xz diff --git a/gdm.spec b/gdm.spec index b14d432..50b2c0b 100644 --- a/gdm.spec +++ b/gdm.spec @@ -6,13 +6,13 @@ Name: gdm Epoch: 1 -Version: 46.2 +Version: 47~alpha Release: %autorelease Summary: The GNOME Display Manager License: GPL-2.0-or-later URL: https://wiki.gnome.org/Projects/GDM -Source0: https://download.gnome.org/sources/gdm/46/gdm-%{tarball_version}.tar.xz +Source0: https://download.gnome.org/sources/gdm/47/gdm-%{tarball_version}.tar.xz Source1: org.gnome.login-screen.gschema.override # moved here from pulseaudio-gdm-hooks-11.1-16 diff --git a/sources b/sources index a1925cd..5d2ad50 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gdm-46.2.tar.xz) = 29cb00b42b64313f63cbf33a0caf9ecaf43f38699983017966fba951b867742129ef150cd927d02add5f7c1c20049ba1301e5ee094caa54835dc12cf29c86210 +SHA512 (gdm-47.alpha.tar.xz) = 768931fc80b09754135ea0f8014bd3ba24ab2f74428efcfafb09720915264644186fbbcfd59004ca76df8ff29c8f41a224afb1d3ccaead47fae1e77ab4e7ae2e From fb193607e1c498c16f62ae1ede1c7ccb6a6aafdf Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 17 Sep 2024 13:20:37 -0400 Subject: [PATCH 8/8] Update to 47.0, drop X11 support --- gdm.spec | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/gdm.spec b/gdm.spec index 50b2c0b..c068fc7 100644 --- a/gdm.spec +++ b/gdm.spec @@ -6,7 +6,7 @@ Name: gdm Epoch: 1 -Version: 47~alpha +Version: 47.0 Release: %autorelease Summary: The GNOME Display Manager @@ -21,17 +21,14 @@ Source5: default.pa-for-gdm Source6: gdm.sysusers # Downstream patches -Patch: 0001-data-Drop-unused-gdm_prefer_xorg-rule.patch -Patch: 0002-data-Drop-X11-fallback-rules.patch Patch: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch Patch: 0001-data-add-system-dconf-databases-to-gdm-profile.patch -Patch: 0001-xorg-detect.patch Patch: 0001-Add-headless-session-files.patch BuildRequires: dconf BuildRequires: desktop-file-utils BuildRequires: gettext-devel -BuildRequires: libXdmcp-devel +BuildRequires: git-core BuildRequires: meson BuildRequires: pam-devel BuildRequires: pkgconfig(accountsservice) >= 0.6.3 @@ -71,8 +68,6 @@ Requires: pam Requires: /sbin/nologin Requires: systemd >= 186 Requires: system-logos -Requires: xhost xmodmap xrdb -Requires: xorg-x11-xinit Requires: python3-pam # Until the greeter gets dynamic user support, it can't @@ -89,9 +84,7 @@ functionality for logging in a user and unlocking the user's session after it's been locked. GDM also provides functionality for initiating user-switching, so more than one user can be logged in at the same time. It handles graphical session registration with the system for both local and remote -sessions (in the latter case, via the XDMCP protocol). In cases where the -session doesn't provide it's own display server, GDM can start the display -server on behalf of the session. +sessions (in the latter case, via GNOME Remote Desktop and the RDP protocol). %package devel Summary: Development files for gdm @@ -112,18 +105,21 @@ files that are helpful to PAM modules wishing to support GDM specific authentication features. %prep -%autosetup -p1 -n gdm-%{tarball_version} +%autosetup -S git -p1 -n gdm-%{tarball_version} %build %meson -Dpam-prefix=%{_sysconfdir} \ -Drun-dir=/run/gdm \ - -Dudev-dir=%{_udevrulesdir} \ -Ddefault-path=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin \ -Ddefault-pam-config=redhat \ -Ddistro=redhat \ -Dprofiling=true \ -Dplymouth=enabled \ - -Dselinux=enabled + -Dselinux=enabled\ + -Dwayland-support=true \ + -Dx11-support=false \ + -Dxdmcp=disabled + %meson_build @@ -146,8 +142,6 @@ rm -rf %{buildroot}/%{_prefix}/doc # create log dir mkdir -p %{buildroot}/var/log/gdm -(cd %{buildroot}%{_sysconfdir}/gdm; ln -sf ../X11/xinit/Xsession .) - mkdir -p %{buildroot}%{_datadir}/gdm/autostart/LoginWindow mkdir -p %{buildroot}/run/gdm @@ -227,7 +221,6 @@ fi %config %{_sysconfdir}/pam.d/gdm-autologin %config %{_sysconfdir}/pam.d/gdm-password # not config files -%{_sysconfdir}/gdm/Xsession %{_datadir}/gdm/gdm.schemas %{_sysconfdir}/dbus-1/system.d/gdm.conf %dir %{_sysconfdir}/gdm/Init @@ -238,17 +231,13 @@ fi %dir %{_sysconfdir}/dconf/db/gdm.d/locks %{_datadir}/glib-2.0/schemas/org.gnome.login-screen.gschema.xml %{_datadir}/glib-2.0/schemas/org.gnome.login-screen.gschema.override -%{_libexecdir}/gdm-host-chooser %{_libexecdir}/gdm-runtime-config %{_libexecdir}/gdm-session-worker -%{_libexecdir}/gdm-simple-chooser %{_libexecdir}/gdm-wayland-session -%{_libexecdir}/gdm-x-session %{_libexecdir}/gdm-headless-login-session %{_sbindir}/gdm %{_bindir}/gdmflexiserver %{_bindir}/gdm-config -%{_bindir}/gdm-screenshot %dir %{_datadir}/dconf %dir %{_datadir}/dconf/profile %{_datadir}/dconf/profile/gdm @@ -274,7 +263,6 @@ fi %config %{_sysconfdir}/pam.d/gdm-smartcard %config %{_sysconfdir}/pam.d/gdm-fingerprint %{_sysconfdir}/pam.d/gdm-launch-environment -%{_udevrulesdir}/61-gdm.rules %{_unitdir}/gdm.service %{_unitdir}/gnome-headless-session@.service %dir %{_userunitdir}/gnome-session@gnome-login.target.d/