[gdm/benzea/systemd-3-36] data: Install systemd specification for gnome-login session



commit 9e84bfb7e389b068675482b2fcd39be4228706ce
Author: Benjamin Berg <bberg redhat com>
Date:   Tue Dec 17 16:00:40 2019 +0100

    data: Install systemd specification for gnome-login session
    
    GDM needs to ship the systemd definition for the custom GNOME session it
    starts.

 configure.ac                |  9 +++++++++
 data/Makefile.am            |  7 +++++++
 data/gnome-login.session.in |  1 +
 data/session.conf           | 19 +++++++++++++++++++
 4 files changed, 36 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index db85229f..c23e5eae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -263,6 +263,10 @@ AC_ARG_WITH([systemdsystemunitdir],
             AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
                            [Directory for systemd service files]),
                 [with_systemdsystemunitdir=$withval], [with_systemdsystemunitdir=$($PKG_CONFIG 
--variable=systemdsystemunitdir systemd)])
+AC_ARG_WITH([systemduserunitdir],
+            AS_HELP_STRING([--with-systemduserunitdir=DIR],
+                           [Directory for systemd user service files]),
+                [with_systemduserunitdir=$withval], [with_systemduserunitdir=$($PKG_CONFIG 
--define-variable=prefix=${prefix} --variable=systemduserunitdir systemd)])
 AC_ARG_ENABLE(systemd-journal,
             AS_HELP_STRING([--enable-systemd-journal],
                            [Add journald support @<:@default=auto@:>@]),
@@ -880,7 +884,12 @@ if test "x$with_systemdsystemunitdir" != xno; then
         AC_SUBST(SYSTEMD_SYSTEM_UNIT_DIR, [$with_systemdsystemunitdir])
 fi
 
+if test "x$with_systemduserunitdir" != xno; then
+        AC_SUBST(SYSTEMD_USER_UNIT_DIR, [$with_systemduserunitdir])
+fi
+
 AM_CONDITIONAL(INSTALL_SYSTEMD_UNITS, test x$with_systemdsystemunitdir != xno)
+AM_CONDITIONAL(INSTALL_SYSTEMD_USER_UNITS, test x$with_systemduserunitdir != xno)
 
 dnl ---------------------------------------------------------------------------
 dnl - Check for plymouth support
diff --git a/data/Makefile.am b/data/Makefile.am
index bda91604..07a464d4 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -91,6 +91,13 @@ localealias_DATA = locale.alias
 sessiondir = $(datadir)/gnome-session/sessions
 session_DATA =  gnome-login.session
 
+if INSTALL_SYSTEMD_USER_UNITS
+systemdsessiondir = $(SYSTEMD_USER_UNIT_DIR)/gnome-session@gnome-login.target.d
+systemdsession_DATA = session.conf
+endif
+
+EXTRA_DIST += session.conf
+
 pam_redhat_files = \
        pam-redhat/gdm-autologin.pam            \
        pam-redhat/gdm-launch-environment.pam   \
diff --git a/data/gnome-login.session.in b/data/gnome-login.session.in
index 618e76ce..fd9d45aa 100644
--- a/data/gnome-login.session.in
+++ b/data/gnome-login.session.in
@@ -1,3 +1,4 @@
 [GNOME Session]
 Name=Display Manager
+# Keep in sync with gnome-session@gnome-login.target.d/session.conf
 
RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;
diff --git a/data/session.conf b/data/session.conf
new file mode 100644
index 00000000..c69b5e5d
--- /dev/null
+++ b/data/session.conf
@@ -0,0 +1,19 @@
+[Unit]
+# Keep in sync with gnome-login.session
+Wants=gsd-a11y-settings.target
+Wants=gsd-keyboard.target
+Wants=gsd-rfkill.target
+Wants=gsd-sound.target
+Wants=gsd-color.target
+Wants=gsd-media-keys.target
+Wants=gsd-screensaver-proxy.target
+Wants=gsd-wacom.target
+Wants=gsd-datetime.target
+Wants=gsd-power.target
+Wanst=gsd-sharing.target
+Wants=gsd-wwan.target
+Wants=gsd-housekeeping.target
+Wants=gsd-print-notifications.target
+Wants=gsd-smartcard.target
+
+BindsTo=gnome-shell.target


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]