diff options
author | Bob Funk <bobfunk11@gmail.com> | 2022-08-12 11:41:47 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-08-13 10:40:37 +0700 |
commit | 6b65bd42d32fb0610bd79251822a7f0fa77cc86e (patch) | |
tree | 1e58410124c651839f5d39adb45aa777c894db81 /desktop | |
parent | c99a9518cab09d6bab3cecd4b0ca4c4b10640126 (diff) |
desktop/gdm: Updated for version 42.0.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/gdm/0003-add-wayland-session-script.patch | 18 | ||||
-rw-r--r-- | desktop/gdm/0004-fix-Xsession-language-in-gnome.patch | 14 | ||||
-rw-r--r-- | desktop/gdm/README | 5 | ||||
-rw-r--r-- | desktop/gdm/doinst.sh | 3 | ||||
-rw-r--r-- | desktop/gdm/gdm.SlackBuild | 7 | ||||
-rw-r--r-- | desktop/gdm/gdm.info | 2 | ||||
-rw-r--r-- | desktop/gdm/wayland-session | 62 |
7 files changed, 106 insertions, 5 deletions
diff --git a/desktop/gdm/0003-add-wayland-session-script.patch b/desktop/gdm/0003-add-wayland-session-script.patch new file mode 100644 index 0000000000000..c2fcc20df7a90 --- /dev/null +++ b/desktop/gdm/0003-add-wayland-session-script.patch @@ -0,0 +1,18 @@ +diff -Naur gdm-42.0/daemon/gdm-wayland-session.c gdm-42.0-patched/daemon/gdm-wayland-session.c +--- gdm-42.0/daemon/gdm-wayland-session.c 2022-08-08 23:41:59.415766201 -0500 ++++ gdm-42.0-patched/daemon/gdm-wayland-session.c 2022-08-08 23:54:05.595800828 -0500 +@@ -356,9 +356,11 @@ + g_subprocess_launcher_setenv (launcher, "DBUS_SESSION_BUS_ADDRESS", state->bus_address, TRUE); + } + +- subprocess = g_subprocess_launcher_spawnv (launcher, +- (const char * const *) argv, +- &error); ++ subprocess = g_subprocess_launcher_spawn (launcher, ++ &error, ++ GDMCONFDIR "/wayland-session", ++ state->session_command, ++ NULL); + g_strfreev (argv); + + if (subprocess == NULL) { diff --git a/desktop/gdm/0004-fix-Xsession-language-in-gnome.patch b/desktop/gdm/0004-fix-Xsession-language-in-gnome.patch new file mode 100644 index 0000000000000..895fc234b1c2c --- /dev/null +++ b/desktop/gdm/0004-fix-Xsession-language-in-gnome.patch @@ -0,0 +1,14 @@ +diff -Naur gdm-42.0/data/Xsession.in gdm-42.0-patched/data/Xsession.in +--- gdm-42.0/data/Xsession.in 2022-03-21 13:12:40.487113700 -0500 ++++ gdm-42.0-patched/data/Xsession.in 2022-08-09 21:19:33.559221580 -0500 +@@ -45,6 +45,10 @@ + fi + test -f "$HOME/.xprofile" && . "$HOME/.xprofile" + ++# Get the AccountsService value for LANG over the system dbus. This is the user setting in GNOME: ++gnome_lang_usr="$(busctl get-property org.freedesktop.Accounts /org/freedesktop/Accounts/User$(id -u) org.freedesktop.Accounts.User Language | cut -d\" -f2)" ++[ "$DESKTOP_SESSION" = "gnome-xorg" ] && [ -n "$gnome_lang_usr" ] && export LANG=$gnome_lang_usr ++ + # Translation stuff + if [ -x "@libexecdir@/gdmtranslate" ] ; then + gdmtranslate="@libexecdir@/gdmtranslate" diff --git a/desktop/gdm/README b/desktop/gdm/README index 1a20b774114bc..ad7f01b10dad8 100644 --- a/desktop/gdm/README +++ b/desktop/gdm/README @@ -30,5 +30,6 @@ Additional Notes: - Slackware comes with the 'gdm' group and user already configured, so nothing needs to be done there. -- GDM can be built without 'gnome-session' and 'gnome-shell' installed, -but 'gdm' will be unusable at runtime without them. +- The blocaled dependency is used to provide custom keymap support for + 'gdm'. + diff --git a/desktop/gdm/doinst.sh b/desktop/gdm/doinst.sh index 6922dbb756df8..b49d6a4e6536c 100644 --- a/desktop/gdm/doinst.sh +++ b/desktop/gdm/doinst.sh @@ -1,3 +1,6 @@ +# Set the wayland-session script executable: +( cd etc/gdm ; chmod 0755 wayland-session ) + if [ -e usr/share/glib-2.0/schemas ]; then if [ -x /usr/bin/glib-compile-schemas ]; then /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1 diff --git a/desktop/gdm/gdm.SlackBuild b/desktop/gdm/gdm.SlackBuild index c9dc47d6b0b61..aa5221034ac6a 100644 --- a/desktop/gdm/gdm.SlackBuild +++ b/desktop/gdm/gdm.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=gdm VERSION=${VERSION:-42.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -79,6 +79,8 @@ find -L . \ # A couple patches taken from Artix Linux: patch -Np1 -i $CWD/0001-Xsession-Don-t-start-ssh-agent-by-default.patch patch -Np1 -i $CWD/0002-meson-allow-building-with-elogind.patch +patch -Np1 -i $CWD/0003-add-wayland-session-script.patch +patch -Np1 -i $CWD/0004-fix-Xsession-language-in-gnome.patch mkdir build cd build @@ -103,7 +105,7 @@ cd build -Dsystemd-journal=false \ -Dsystemdsystemunitdir=no \ -Dsystemduserunitdir=no \ - -Dsysconfsubdir=/etc/X11/gdm \ + -Dsysconfsubdir=/etc/gdm \ -Dinitial-vt=7 "${NINJA:=ninja}" DESTDIR=$PKG $NINJA install @@ -116,6 +118,7 @@ mkdir -p $PKG/etc/pam.d cat $CWD/gdm-autologin.pam > $PKG/etc/pam.d/gdm-autologin cat $CWD/gdm-password.pam > $PKG/etc/pam.d/gdm-password cat $CWD/gdm-launch-environment.pam > $PKG/etc/pam.d/gdm-launch-environment +cat $CWD/wayland-session > $PKG/etc/gdm/wayland-session mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ diff --git a/desktop/gdm/gdm.info b/desktop/gdm/gdm.info index 06406e3e72e14..4f16140fd26e4 100644 --- a/desktop/gdm/gdm.info +++ b/desktop/gdm/gdm.info @@ -5,6 +5,6 @@ DOWNLOAD="https://download.gnome.org/sources/gdm/42/gdm-42.0.tar.xz" MD5SUM="8fb99fd6032127fe6f57462c696607e5" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="%README% gnome-session gnome-shell" +REQUIRES="blocaled gnome-session gnome-shell" MAINTAINER="Bob Funk" EMAIL="bobfunk11@gmail.com" diff --git a/desktop/gdm/wayland-session b/desktop/gdm/wayland-session new file mode 100644 index 0000000000000..6df487582149a --- /dev/null +++ b/desktop/gdm/wayland-session @@ -0,0 +1,62 @@ +#!/bin/sh + +# Get the AccountsService value for LANG over the system dbus. This is the user setting in GNOME: +gnome_lang_usr="$(busctl get-property org.freedesktop.Accounts /org/freedesktop/Accounts/User$(id -u) org.freedesktop.Accounts.User Language | cut -d\" -f2)" + +# The rest of this code is based on KDE's wayland-session script, +# with some modifications to suit GDM. +# Copyright (C) 2022 Bob Funk <bobfunk11@gmail.com> +# This code was copied from KDE's "wayland-session" script. +# Copyright (C) 2015-2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> +# This file is extracted from kde-workspace (kdm/kfrontend/genkdmconf.c) +# Copyright (C) 2001-2005 Oswald Buddenhagen <ossi@kde.org> + +case $SHELL in + */bash) + [ -z "$BASH" ] && exec $SHELL $0 "$@" + set +o posix + [ -f /etc/profile ] && . /etc/profile + if [ -f $HOME/.bash_profile ]; then + . $HOME/.bash_profile + elif [ -f $HOME/.bash_login ]; then + . $HOME/.bash_login + elif [ -f $HOME/.profile ]; then + . $HOME/.profile + fi + [ "$DESKTOP_SESSION" = "gnome" ] && [ -n "$gnome_lang_usr" ] && export LANG=$gnome_lang_usr + ;; + */zsh) + [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@" + [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc + zhome=${ZDOTDIR:-$HOME} + # zshenv is always sourced automatically. + [ -f $zdir/zprofile ] && . $zdir/zprofile + [ -f $zhome/.zprofile ] && . $zhome/.zprofile + [ -f $zdir/zlogin ] && . $zdir/zlogin + [ -f $zhome/.zlogin ] && . $zhome/.zlogin + [ "$DESKTOP_SESSION" = "gnome" ] && [ -n "$gnome_lang_usr" ] && export LANG=$gnome_lang_usr + emulate -R sh + ;; + */csh|*/tcsh) + # [t]cshrc is always sourced automatically. + # Note that sourcing csh.login after .cshrc is non-standard. + wlsess_tmp=`mktemp /tmp/wlsess-env-XXXXXX` + $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c 'export -p' >! $wlsess_tmp" + . $wlsess_tmp + rm -f $wlsess_tmp + ;; + */fish) + xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX` + $SHELL --login -c "/bin/sh -c 'export -p' > $xsess_tmp" + . $xsess_tmp + rm -f $xsess_tmp + ;; + *) # Plain sh, ksh, and anything we do not know. + [ -f /etc/profile ] && . /etc/profile + [ -f $HOME/.profile ] && . $HOME/.profile + [ "$DESKTOP_SESSION" = "gnome" ] && [ -n "$gnome_lang_usr" ] && export LANG=$gnome_lang_usr + ;; +esac + +# We have to use eval here: +eval exec "$@" |