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



commit 4c3a5f8ccd809b013f1ccaadd2a4f07153a15168
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.

 data/gnome-login.session.in |  1 +
 data/meson.build            | 13 +++++++++++++
 data/session.conf           | 18 ++++++++++++++++++
 meson_options.txt           |  1 +
 4 files changed, 33 insertions(+)
---
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/meson.build b/data/meson.build
index 02353422..b24f7c0b 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -150,6 +150,13 @@ else
   systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
 endif
 
+if get_option('systemduserunitdir') != ''
+  systemd_userunitdir = get_option('systemduserunitdir')
+else
+  systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
+                                                           define_variable: ['prefix', get_option('prefix')])
+endif
+
 configure_file(
   input: 'gdm.service.in',
   output: '@BASENAME@',
@@ -158,6 +165,12 @@ configure_file(
   format: 'cmake'
 )
 
+install_data(
+  'session.conf',
+  rename: join_paths('gnome-session@gnome-login.target.d', 'session.conf'),
+  install_dir: systemd_userunitdir,
+)
+
 # XSession
 if get_option('gdm-xsession')
   configure_file(
diff --git a/data/session.conf b/data/session.conf
new file mode 100644
index 00000000..f96c5fa7
--- /dev/null
+++ b/data/session.conf
@@ -0,0 +1,18 @@
+[Unit]
+# Keep in sync with gnome-login.session
+Wants=org.gnome.SettingsDaemon.A11ySettings.target
+Wants=org.gnome.SettingsDaemon.Color.target
+Wants=org.gnome.SettingsDaemon.Datetime.target
+Wants=org.gnome.SettingsDaemon.Housekeeping.target
+Wants=org.gnome.SettingsDaemon.Keyboard.target
+Wants=org.gnome.SettingsDaemon.MediaKeys.target
+Wants=org.gnome.SettingsDaemon.Power.target
+Wants=org.gnome.SettingsDaemon.PrintNotifications.target
+Wants=org.gnome.SettingsDaemon.Rfkill.target
+Wants=org.gnome.SettingsDaemon.ScreensaverProxy.target
+Wants=org.gnome.SettingsDaemon.Sharing.target
+Wants=org.gnome.SettingsDaemon.Smartcard.target
+Wants=org.gnome.SettingsDaemon.Sound.target
+Wants=org.gnome.SettingsDaemon.Wacom.target
+
+Requires=org.gnome.Shell.target
diff --git a/meson_options.txt b/meson_options.txt
index 2de7ca52..040fe383 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -29,6 +29,7 @@ option('split-authentication', type: 'boolean', value: true, description: 'Enabl
 option('sysconfsubdir', type: 'string', value: 'gdm', description: 'Directory name used under sysconfdir.')
 option('systemd-journal', type: 'boolean', value: false, description: 'Add journald support.')
 option('systemdsystemunitdir', type: 'string', value: '', description: 'Directory for systemd service 
files.')
+option('systemduserunitdir', type: 'string', value: '', description: 'Directory for systemd user service 
files.')
 option('tcp-wrappers', type: 'boolean', value: false, description: 'Use TCP wrappers.')
 option('udev-dir', type: 'string', value: '', description: 'Directory for udev rules file.')
 option('user', type: 'string', value: 'gdm', description: 'GDM\'s username.')


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