testing/gdm: install stub PAM policy, init script, create gdm user for the user selection UI

This commit is contained in:
William Pitcock 2017-07-02 00:31:41 +00:00
parent 738f3de160
commit b7fdc39c62
4 changed files with 51 additions and 4 deletions

View File

@ -1,12 +1,12 @@
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=gdm
pkgver=3.24.2
pkgrel=0
pkgrel=1
pkgdesc="GNOME display manager"
url="https://wiki.gnome.org/Projects/GDM"
arch="all"
license="GPL"
depends="dconf"
depends="dconf linux-pam"
depends_dev=""
makedepends="dconf-dev gnome-desktop-dev accountsservice-dev libcanberra-dev intltool itstool libxml2-utils consolekit-dev linux-pam-dev autoconf automake libtool $depends_dev"
install=""
@ -14,8 +14,13 @@ subpackages="$pkgname-dev $pkgname-lang"
source="http://ftp.gnome.org/pub/GNOME/sources/gdm/${pkgver%.*}/gdm-$pkgver.tar.xz
0001-gdm-session-record-alpine-does-not-have-utmp.patch
0002-configure-Alpine-does-not-use-PAM.patch
0003-reintroduce-ConsoleKit-support.patch"
0003-reintroduce-ConsoleKit-support.patch
gdm-launch-environment.pam
gdm.initd"
builddir="$srcdir/gdm-$pkgver"
users="gdm"
groups="gdm"
prepare() {
default_prepare
@ -42,9 +47,14 @@ build() {
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
install -m755 -D "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
install -m644 -D "$srcdir"/gdm-launch-environment.pam "$pkgdir"/etc/pam.d/gdm-launch-environment
}
sha512sums="6e2649bce5520532a2976bac8a47629fc4c852d7127b913c29a9c43a7dba26d75472a083cbfff7b64bab56deb38ed13d8387d4d302d55f263c80120255a4a270 gdm-3.24.2.tar.xz
57ced6bf01ec45a0ab6147cd5235230c6e75f10b25c50bd046b6cec1668fa03db93404185394d61a83d5f144d325de36f9b62ebdfa67dcdda91757c1711852c3 0001-gdm-session-record-alpine-does-not-have-utmp.patch
6b75dde1370aa03de1f6c47d2a3fd07610392d8e82e94128be0af7eb06be01b7c365d6c406b77ca7c239a80d086f247c6693e8398d9196ab104b237892346598 0002-configure-Alpine-does-not-use-PAM.patch
b94ab78874ef7cfe67cc5dc6c9c4fbc746c1c83e7c44199c4d9a500ec4b042fd4aac767e7bb84070da31959ed80c7c79b6095546d3e71559dc8c4319df716f55 0003-reintroduce-ConsoleKit-support.patch"
b94ab78874ef7cfe67cc5dc6c9c4fbc746c1c83e7c44199c4d9a500ec4b042fd4aac767e7bb84070da31959ed80c7c79b6095546d3e71559dc8c4319df716f55 0003-reintroduce-ConsoleKit-support.patch
3ae36b4ef67205f1fddcf35486b60adb5d026fcd86af5cef7aeb09894467ca119218487a05b82e0b823af46ca226369303d32151d9b2c2c5118f744e03afd6be gdm-launch-environment.pam
3345a7af4cd794d29eaa7ff31f5f7351af0ae99653167dce4f288a8a295e007b2856c92402927bc86daac56f3b98775605164932268d8947b340caaa438c0a53 gdm.initd"

View File

@ -0,0 +1,13 @@
# PAM stubs for GDM environment.
auth required pam_succeed_if.so audit quiet_success user = gdm
auth required pam_env.so
auth optional pam_permit.so
account required pam_succeed_if.so audit quiet_success user = gdm
account include base-account
password required pam_deny.so
session required pam_succeed_if.so audit quiet_success user = gdm
session optional pam_permit.so

18
testing/gdm/gdm.initd Normal file
View File

@ -0,0 +1,18 @@
#!/sbin/openrc-run
GDM_LOG_FILE="/var/log/${SVCNAME}.log"
description="GNOME display manager"
command=/usr/sbin/${SVCNAME}
command_args="${gdm_opts}"
command_background="true"
start_stop_daemon_args="-w 100 --user ${SVCNAME}:${SVCNAME} --stdout $GDM_LOG_FILE --stderr $GDM_LOG_FILE"
pidfile="/run/${SVCNAME}.pid"
start_pre() {
checkpath -f -m 0644 -o ${SVCNAME}:${SVCNAME} "$GDM_LOG_FILE"
}
depend() {
need net
}

View File

@ -0,0 +1,6 @@
#!/bin/sh
addgroup -S gdm 2>/dev/null
adduser -S -D -H -h /dev/null -s /sbin/nologin -G gdm -g gdm gdm 2>/dev/null
exit 0