diff options
author | Bob Funk <bobfunk11@gmail.com> | 2022-05-25 13:53:24 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-05-28 09:11:37 +0700 |
commit | 30abca33a92aef870d83e4dfee34511a52fd1f9e (patch) | |
tree | 3faf12b7c3445c2fac3fc3356a44f96f671b1c4e /desktop/gnome-session | |
parent | 15146aca9adc0c0a81e9d4c9998d392fe3e61f39 (diff) |
desktop/gnome-session: Added (GNOME Session Manager)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/gnome-session')
-rw-r--r-- | desktop/gnome-session/0001-meson-add-elogind-support.patch | 193 | ||||
-rw-r--r-- | desktop/gnome-session/README | 2 | ||||
-rw-r--r-- | desktop/gnome-session/doinst.sh | 5 | ||||
-rw-r--r-- | desktop/gnome-session/gnome-session.SlackBuild | 123 | ||||
-rw-r--r-- | desktop/gnome-session/gnome-session.info | 10 | ||||
-rw-r--r-- | desktop/gnome-session/slack-desc | 19 | ||||
-rw-r--r-- | desktop/gnome-session/xinitrc.gnome | 31 |
7 files changed, 383 insertions, 0 deletions
diff --git a/desktop/gnome-session/0001-meson-add-elogind-support.patch b/desktop/gnome-session/0001-meson-add-elogind-support.patch new file mode 100644 index 0000000000000..04ab42d2a5edc --- /dev/null +++ b/desktop/gnome-session/0001-meson-add-elogind-support.patch @@ -0,0 +1,193 @@ +From ab8893f12c925050aceea4e31dd84aef674c6e9f Mon Sep 17 00:00:00 2001 +From: Dudemanguy <random342@airmail.cc> +Date: Wed, 7 Oct 2020 10:08:33 -0500 +Subject: [PATCH 1/1] meson: add elogind support + +systemd session management (AKA logind) works with elogind. Just add an +option to enable elogind and modify the defines a little bit to get it +to build with systemd session management support. +--- + data/meson.build | 2 +- + gnome-session/gsm-autostart-app.c | 2 +- + gnome-session/gsm-manager.c | 4 ++-- + gnome-session/gsm-systemd.c | 2 +- + gnome-session/gsm-util.c | 4 ++-- + gnome-session/gsm-util.h | 2 +- + gnome-session/main.c | 4 ++-- + meson.build | 15 +++++++++++++-- + meson_options.txt | 1 + + 9 files changed, 24 insertions(+), 12 deletions(-) + +diff --git a/data/meson.build b/data/meson.build +index f6d264f8..ad04e6bc 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -120,7 +120,7 @@ install_data( + install_dir: join_paths(session_datadir, 'GConf', 'gsettings') + ) + +-if enable_systemd_session ++if enable_systemd_session and enable_systemd + unit_conf = configuration_data() + unit_conf.set('libexecdir', session_libexecdir) + +diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c +index 8204d4f1..244a325f 100644 +--- a/gnome-session/gsm-autostart-app.c ++++ b/gnome-session/gsm-autostart-app.c +@@ -31,7 +31,7 @@ + #define GNOME_DESKTOP_USE_UNSTABLE_API + #include <libgnome-desktop/gnome-systemd.h> + +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + #ifdef ENABLE_SYSTEMD_JOURNAL + #include <systemd/sd-journal.h> + #endif +diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c +index 1b88b266..8dfd23fe 100644 +--- a/gnome-session/gsm-manager.c ++++ b/gnome-session/gsm-manager.c +@@ -974,7 +974,7 @@ _client_stop (const char *id, + return FALSE; + } + +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + static void + maybe_restart_user_bus (GsmManager *manager) + { +@@ -1020,7 +1020,7 @@ do_phase_exit (GsmManager *manager) + NULL); + } + +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + if (!priv->systemd_managed) + maybe_restart_user_bus (manager); + #endif +diff --git a/gnome-session/gsm-systemd.c b/gnome-session/gsm-systemd.c +index cf30a4bd..d25ca83c 100644 +--- a/gnome-session/gsm-systemd.c ++++ b/gnome-session/gsm-systemd.c +@@ -21,7 +21,7 @@ + #include "config.h" + #include "gsm-systemd.h" + +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + + #include <errno.h> + #include <string.h> +diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c +index f1e6489d..607395c8 100644 +--- a/gnome-session/gsm-util.c ++++ b/gnome-session/gsm-util.c +@@ -626,7 +626,7 @@ gsm_util_export_activation_environment (GError **error) + return environment_updated; + } + +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + gboolean + gsm_util_export_user_environment (GError **error) + { +@@ -839,7 +839,7 @@ gsm_util_setenv (const char *variable, + g_clear_error (&error); + } + +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + /* If this fails, the system user session won't get the updated environment + */ + if (!gsm_util_update_user_environment (variable, value, &error)) { +diff --git a/gnome-session/gsm-util.h b/gnome-session/gsm-util.h +index bc26a21e..97289c02 100644 +--- a/gnome-session/gsm-util.h ++++ b/gnome-session/gsm-util.h +@@ -53,7 +53,7 @@ const char * const * gsm_util_listenv (void); + const char * const * gsm_util_get_variable_blacklist(void); + + gboolean gsm_util_export_activation_environment (GError **error); +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + gboolean gsm_util_export_user_environment (GError **error); + gboolean gsm_util_start_systemd_unit (const char *unit, + const char *mode, +diff --git a/gnome-session/main.c b/gnome-session/main.c +index a460a849..65bc9721 100644 +--- a/gnome-session/main.c ++++ b/gnome-session/main.c +@@ -541,7 +541,7 @@ main (int argc, char **argv) + + session_name = opt_session_name; + +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + gsm_util_export_user_environment (&error); + if (error && !g_getenv ("RUNNING_UNDER_GDM")) { + g_warning ("Failed to upload environment to systemd: %s", error->message); +@@ -624,7 +624,7 @@ main (int argc, char **argv) + + gsm_main (); + +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + gsm_util_export_user_environment (NULL); + #endif + +diff --git a/meson.build b/meson.build +index f56aa316..b29860b1 100644 +--- a/meson.build ++++ b/meson.build +@@ -119,7 +119,8 @@ enable_systemd_session = get_option('systemd_session') != 'disable' + use_systemd_session = get_option('systemd_session') == 'default' + enable_systemd_journal = get_option('systemd_journal') + enable_consolekit = get_option('consolekit') +-if enable_systemd or enable_consolekit ++enable_elogind = get_option('elogind') ++if enable_systemd or enable_consolekit or enable_elogind + session_bin_deps += dependency('gio-unix-2.0', version: glib_req_version) + + # Check for systemd +@@ -161,14 +162,24 @@ if enable_systemd or enable_consolekit + session_tracking = 'ConsoleKit' + endif + endif ++ ++ # Check for elogind ++ if enable_elogind ++ elogind_dep = dependency('libelogind', version: '>= 209') ++ session_bin_deps += elogind_dep ++ ++ session_tracking = 'elogind' ++ endif ++ + endif + if enable_systemd_session +- assert(enable_systemd, 'Systemd support must be enabled when using systemd session management') ++ assert(enable_systemd or enable_elogind, 'Systemd or elogind support must be enabled when using systemd session management') + endif + config_h.set('HAVE_SYSTEMD', enable_systemd) + config_h.set('ENABLE_SYSTEMD_SESSION', enable_systemd_session) + config_h.set('ENABLE_SYSTEMD_JOURNAL', enable_systemd_journal) + config_h.set('HAVE_CONSOLEKIT', enable_consolekit) ++config_h.set('HAVE_ELOGIND', enable_elogind) + config_h.set10('USE_SYSTEMD_SESSION', use_systemd_session) + + configure_file( +diff --git a/meson_options.txt b/meson_options.txt +index 4c05dc6e..4a27c7fd 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -3,6 +3,7 @@ option('session_selector', type: 'boolean', value: false, description: 'enable b + option('systemd', type: 'boolean', value: true, description: 'Use systemd') + option('systemd_session', type: 'combo', choices: ['disable', 'enable', 'default'], value: 'default', description: 'Whether to include systemd session support and use it by default') + option('systemd_journal', type: 'boolean', value:'true', description: 'Send log to systemd-journal') ++option('elogind', type: 'boolean', value: false, description: 'Use elogind') + option('consolekit', type: 'boolean', value: false, description: 'Use consolekit') + option('docbook', type: 'boolean', value: true, description: 'build documentation') + option('man', type: 'boolean', value: true, description: 'build documentation (requires xmlto)') +-- +2.34.1 + diff --git a/desktop/gnome-session/README b/desktop/gnome-session/README new file mode 100644 index 0000000000000..27c57d25d0ee8 --- /dev/null +++ b/desktop/gnome-session/README @@ -0,0 +1,2 @@ +gnome-session contains the GNOME session manager, as well as a +configuration program to choose applications starting on login. diff --git a/desktop/gnome-session/doinst.sh b/desktop/gnome-session/doinst.sh new file mode 100644 index 0000000000000..6922dbb756df8 --- /dev/null +++ b/desktop/gnome-session/doinst.sh @@ -0,0 +1,5 @@ +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 + fi +fi diff --git a/desktop/gnome-session/gnome-session.SlackBuild b/desktop/gnome-session/gnome-session.SlackBuild new file mode 100644 index 0000000000000..80983afd747de --- /dev/null +++ b/desktop/gnome-session/gnome-session.SlackBuild @@ -0,0 +1,123 @@ +#!/bin/bash + +# Slackware build script for gnome-session (GNOME Session Manager) + +# Copyright 2022 Bob Funk Winnipeg, Canada +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=gnome-session +VERSION=${VERSION:-42.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Patch gnome-session so it can be built with elogind: +patch -Np1 -i $CWD/0001-meson-add-elogind-support.patch + +mkdir build +cd build + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + meson .. \ + --buildtype=release \ + --infodir=/usr/info \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ + --mandir=/usr/man \ + --prefix=/usr \ + --sysconfdir=/etc \ + -Dstrip=true \ + -Ddocbook=false \ + -Dsystemd=false \ + -Delogind=true \ + -Dsystemd_journal=false + "${NINJA:=ninja}" + DESTDIR=$PKG $NINJA install +cd .. + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/etc/X11/xinit +cat $CWD/xinitrc.gnome > $PKG/etc/X11/xinit/xinitrc.gnome + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS HACKING NEWS COPYING MAINTAINERS README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/desktop/gnome-session/gnome-session.info b/desktop/gnome-session/gnome-session.info new file mode 100644 index 0000000000000..169d32dd8c1b0 --- /dev/null +++ b/desktop/gnome-session/gnome-session.info @@ -0,0 +1,10 @@ +PRGNAM="gnome-session" +VERSION="42.0" +HOMEPAGE="https://gitlab.gnome.org/GNOME/gnome-session" +DOWNLOAD="https://download.gnome.org/sources/gnome-session/42/gnome-session-42.0.tar.xz" +MD5SUM="ab47b2cd924fb74d4dbc2edab886c32a" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="gnome-desktop" +MAINTAINER="Bob Funk" +EMAIL="bobfunk11@gmail.com" diff --git a/desktop/gnome-session/slack-desc b/desktop/gnome-session/slack-desc new file mode 100644 index 0000000000000..0659fbd3ba778 --- /dev/null +++ b/desktop/gnome-session/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +gnome-session: gnome-session (GNOME Session Manager) +gnome-session: +gnome-session: gnome-session contains the GNOME session manager, as well as a +gnome-session: configuration program to choose applications starting on login. +gnome-session: +gnome-session: +gnome-session: +gnome-session: +gnome-session: +gnome-session: https://gitlab.gnome.org/GNOME/gnome-session +gnome-session: diff --git a/desktop/gnome-session/xinitrc.gnome b/desktop/gnome-session/xinitrc.gnome new file mode 100644 index 0000000000000..66db981989d9a --- /dev/null +++ b/desktop/gnome-session/xinitrc.gnome @@ -0,0 +1,31 @@ +#!/bin/sh +# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $ + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f $userresources ]; then + xrdb -merge $userresources +fi + +if [ -f $usermodmap ]; then + xmodmap $usermodmap +fi + +# This nag screen isn't going to save anybody. +export NAUTILUS_OK_TO_RUN_AS_ROOT=1 + +# Start the window manager: +exec dbus-launch --exit-with-session gnome-session
\ No newline at end of file |