Skip to content
Snippets Groups Projects
Unverified Commit c129e956 authored by Caleb Connolly's avatar Caleb Connolly :penguin: Committed by clayton craft
Browse files

systemd/gdm: new aport


gdm integrates tightly with systemd, fork from aports to rebuild against
systemd.

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
parent d017467c
Branches
No related tags found
Loading
From a12b01f4f71d7ca1ed528ea11f99520c10b0d93c Mon Sep 17 00:00:00 2001
From: Newbyte <newbie13xd@gmail.com>
Date: Tue, 14 Mar 2023 19:37:17 +0100
Subject: [PATCH 1/2] DOWNSTREAM: use /bin/touch instead of /usr/bin/touch
as that's the path here in Alpine.
---
data/61-gdm.rules.in | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
index a4f841bdf..481c5b4dd 100644
--- a/data/61-gdm.rules.in
+++ b/data/61-gdm.rules.in
@@ -2,13 +2,13 @@ SUBSYSTEM!="pci", GOTO="gdm_pci_device_end"
ACTION!="bind", ACTION!="add", GOTO="gdm_pci_device_end"
# cirrus
-ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
# virtio
-ATTR{vendor}=="0x1af4", ATTR{device}=="0x1050", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
+ATTR{vendor}=="0x1af4", ATTR{device}=="0x1050", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
# qxl
-ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
+ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", RUN+="/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
# 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"
+ATTR{vendor}=="0x1234", ATTR{device}=="0x1111", RUN+="/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"
@@ -36,7 +36,7 @@ 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"
+ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}!="1", RUN+="/bin/touch /run/udev/gdm-machine-has-hardware-gpu"
IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland"
LABEL="gdm_nomodeset_end"
@@ -46,7 +46,7 @@ LABEL="gdm_nomodeset_end"
KERNEL!="nvidia", GOTO="gdm_nvidia_end"
SUBSYSTEM!="module", GOTO="gdm_nvidia_end"
ACTION!="add", GOTO="gdm_nvidia_end"
-RUN+="/usr/bin/touch /run/udev/gdm-machine-has-vendor-nvidia-driver"
+RUN+="/bin/touch /run/udev/gdm-machine-has-vendor-nvidia-driver"
# Check if suspend/resume services necessary for working wayland support is available
TEST{0711}!="/usr/bin/nvidia-sleep.sh", GOTO="gdm_disable_wayland"
@@ -68,7 +68,7 @@ LABEL="gdm_nvidia_end"
KERNEL!="card[0-9]-eDP-*", GOTO="gdm_laptop_check_end"
SUBSYSTEM!="drm", GOTO="gdm_laptop_check_end"
ACTION!="add", GOTO="gdm_laptop_check_end"
-RUN+="/usr/bin/touch /run/udev/gdm-machine-is-laptop"
+RUN+="/bin/touch /run/udev/gdm-machine-is-laptop"
GOTO="gdm_hybrid_nvidia_laptop_check"
LABEL="gdm_laptop_check_end"
@@ -79,7 +79,7 @@ SUBSYSTEM!="drm", GOTO="gdm_hybrid_graphics_check_end"
ACTION!="add", GOTO="gdm_hybrid_graphics_check_end"
IMPORT{program}="/bin/sh -c \"echo GDM_NUMBER_OF_GRAPHICS_CARDS=`ls -1d /sys/class/drm/card[0-9] | wc -l`\""
ENV{GDM_NUMBER_OF_GRAPHICS_CARDS}=="1", RUN+="/usr/bin/rm -f /run/udev/gdm-machine-has-hybrid-graphics"
-ENV{GDM_NUMBER_OF_GRAPHICS_CARDS}!="1", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-hybrid-graphics"
+ENV{GDM_NUMBER_OF_GRAPHICS_CARDS}!="1", RUN+="/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
--
2.39.2
diff --git a/data/pam-openembedded/gdm-autologin.pam b/data/pam-openembedded/gdm-autologin.pam
index a9f4354..3e0708b 100644
--- a/data/pam-openembedded/gdm-autologin.pam
+++ b/data/pam-openembedded/gdm-autologin.pam
@@ -1,5 +1,5 @@
#%PAM-1.0
-auth required pam_permit.so
-account include common-account
-password include common-auth
-session include common-session
+auth required pam_rootok.so
+account include base-account
+password include base-auth
+session include base-session
diff --git a/data/pam-openembedded/gdm-launch-environment.pam b/data/pam-openembedded/gdm-launch-environment.pam
index a9f4354..6f095e7 100644
--- a/data/pam-openembedded/gdm-launch-environment.pam
+++ b/data/pam-openembedded/gdm-launch-environment.pam
@@ -1,5 +1,5 @@
#%PAM-1.0
-auth required pam_permit.so
-account include common-account
-password include common-auth
-session include common-session
+auth required pam_rootok.so
+account include base-account
+password include base-auth
+session include base-session
diff --git a/data/pam-openembedded/gdm-password.pam b/data/pam-openembedded/gdm-password.pam
index 758464d..dd324f8 100644
--- a/data/pam-openembedded/gdm-password.pam
+++ b/data/pam-openembedded/gdm-password.pam
@@ -1,5 +1,8 @@
#%PAM-1.0
-auth include common-auth
-account include common-account
-password include common-password
-session include common-session
+auth include base-auth
+auth optional pam_gnome_keyring.so
+account include base-account
+password include base-password
+password optional pam_gnome_keyring.so use_authtok
+session include base-session
+session optional pam_gnome_keyring.so auto_start
# Forked from Alpine INSERT-REASON-HERE (CHANGEME!)
pkgname=gdm
pkgver=9999
_pkgver=45.0.1
pkgrel=0
pkgdesc="GNOME display manager"
url="https://wiki.gnome.org/Projects/GDM"
# blocked by gnome-shell
arch="all !armhf !s390x"
license="GPL-2.0-or-later"
depends="
dbus
gnome-session
gnome-settings-daemon
gnome-shell
gsettings-desktop-schemas
linux-pam>=1.4
xrdb
xwayland
"
makedepends="
accountsservice-dev
dconf
eudev-dev
gettext
glib-dev
gtk+3.0-dev
itstool
libcanberra-dev
libgudev-dev
libsm-dev
libx11-dev
libxau-dev
libxcb-dev
libxdmcp-dev
linux-pam-dev
meson
systemd-dev
"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-service"
options="!check" # Causes circular dep with gnome-shell
source="https://download.gnome.org/sources/gdm/${_pkgver%%.*}/gdm-$_pkgver.tar.xz
0001-DOWNSTREAM-use-bin-touch-instead-of-usr-bin-touch.patch
0003-pam-rename-common-to-base.patch
Xsession
"
install="gdm.pre-install"
builddir="$srcdir/gdm-$_pkgver"
build() {
abuild-meson \
-Db_lto=true \
-Ddefault-pam-config=openembedded \
-Dgdm-xsession=false \
-Dpam-mod-dir=/usr/lib/security \
-Dselinux=disabled \
-Dlibaudit=disabled \
-Dsystemdsystemunitdir=/usr/lib/systemd/system \
-Dsystemduserunitdir=/usr/lib/systemd/user \
. output
meson compile -C output
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
# install -Dm644 /dev/stdin usr/lib/sysusers.d/gdm.conf <<END
#g gdm 120 -
#u gdm 120 "Gnome Display Manager" /var/lib/gdm
#END
#sed -i "s/pam_systemd\.so/pam_elogind.so/" "$pkgdir"/etc/pam.d/*
install -m755 -D "$srcdir/Xsession" "$pkgdir"/etc/gdm
}
sha512sums="
f0c667dd5df034087e284c2ec1131b55a85cd9e832c15c2aff1637e1e36d4d62a7d86528a2e524bb2782ca7d7cc7cb9c34a9ce9bba688ad222af409e2eb69abe gdm-45.0.1.tar.xz
f91ad0ccae448649e4a7c707b83c796988968a698718db0aedbf2b7c2b9aec0d0cfb12fb4bb7f5de99d3cf337bf4528608625d701872bad8bdc98f8020f0ea95 0001-DOWNSTREAM-use-bin-touch-instead-of-usr-bin-touch.patch
eef64cbc347a2ce894a84f7d1d7612af71b6731492ab67f78a17c9ab37db9cfa0f9d6e8415e58821404eb15336eedd263ca14bfc542b808b62bf684b1594e0fe 0003-pam-rename-common-to-base.patch
f836cf0acdf148f2ae09ac28251b5126ce597f08254c43b1ec77596f75e1a3229926116c13f98554625be763e8d28415b27bd679b0a5de9f86bdca7857054c82 Xsession
"
#!/bin/sh
exec "$@"
#!/sbin/openrc-run
supervisor=supervise-daemon
name="Display Manager"
description="GNOME Display Manager"
command=/usr/sbin/gdm
command_args="$GDM_OPTS"
depend() {
provide display-manager
need net dbus
}
#!/bin/sh
addgroup -S gdm 2>/dev/null
adduser -S -D -H -h /var/lib/gdm -s /sbin/nologin -G gdm -g gdm gdm 2>/dev/null
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment