summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2020-04-30 19:52:28 +0000
committerRay Strode <halfline@gmail.com>2020-04-30 19:52:28 +0000
commitfb0c97485d90a37ecd870810d2152c7442a9e84c (patch)
tree3fb017a34a89bd236d9b30cb72dbc1a7b80e1c1c /data
parentde884de7b69647bead3081222aa1c2be443e351f (diff)
downloadgdm-fb0c97485d90a37ecd870810d2152c7442a9e84c.tar.gz
data: switch gdm.service.in to use cmake format
We're going to be switching to meson, and meson doesn't deal too well with an @ in the configuration file that's not part of a substitution variable. This commit switches the gdm service over to use a cmake style of substitution variables, so we can later tell meson to use configure in cmake mode and workaround the @ confusion.
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am8
-rw-r--r--data/applications/meson.build16
-rw-r--r--data/autostart/meson.build12
-rw-r--r--data/dconf/meson.build25
-rw-r--r--data/gdm.service.in14
-rw-r--r--data/meson.build172
6 files changed, 236 insertions, 11 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index bda91604..d55f3e6b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -200,10 +200,10 @@ systemdsystemunit =
gdm.service: $(srcdir)/gdm.service.in
$(AM_V_GEN)sed \
- -e 's,[@]sbindir[@],$(sbindir),g' \
- -e 's,[@]GDM_INITIAL_VT[@],$(GDM_INITIAL_VT),g' \
- -e 's,[@]LANG_CONFIG_FILE[@],$(LANG_CONFIG_FILE),g' \
- -e 's,[@]PLYMOUTH_QUIT_SERVICE[@],$(PLYMOUTH_QUIT_SERVICE),g' \
+ -e 's,[$$]{sbindir},$(sbindir),g' \
+ -e 's,[$$]{GDM_INITIAL_VT},$(GDM_INITIAL_VT),g' \
+ -e 's,[$$]{LANG_CONFIG_FILE},$(LANG_CONFIG_FILE),g' \
+ -e 's,[$$]{PLYMOUTH_QUIT_SERVICE},$(PLYMOUTH_QUIT_SERVICE),g' \
-e 's, *$$,,g' \
< $< > $@
systemdsystemunit += gdm.service
diff --git a/data/applications/meson.build b/data/applications/meson.build
new file mode 100644
index 00000000..48a2f099
--- /dev/null
+++ b/data/applications/meson.build
@@ -0,0 +1,16 @@
+desktop_conf = {
+ 'LIBDIR': gdm_prefix / get_option('libdir'),
+ 'LIBEXECDIR': gdm_prefix / get_option('libexecdir'),
+ 'LOCALSTATEDIR': gdm_prefix / get_option('localstatedir'),
+ 'SBINDIR': gdm_prefix / get_option('sbindir'),
+ 'SYSCONFDIR': gdm_prefix / get_option('sysconfdir'),
+}
+
+foreach desktop_file : [ 'mime-dummy-handler.desktop', 'mimeapps.list' ]
+ configure_file(
+ input: desktop_file,
+ output: desktop_file,
+ configuration: desktop_conf,
+ install_dir: get_option('datadir') / 'gdm' / 'greeter' / 'applications',
+ )
+endforeach
diff --git a/data/autostart/meson.build b/data/autostart/meson.build
new file mode 100644
index 00000000..348a6c69
--- /dev/null
+++ b/data/autostart/meson.build
@@ -0,0 +1,12 @@
+autostart_files_conf = {
+ 'LIBEXECDIR': gdm_prefix / get_option('libexecdir'),
+}
+
+foreach autostart_file : [ 'orca-autostart.desktop' ]
+ configure_file(
+ input: autostart_file,
+ output: autostart_file,
+ configuration: autostart_files_conf,
+ install_dir: get_option('datadir') / 'gdm' / 'greeter' / 'autostart',
+ )
+endforeach
diff --git a/data/dconf/meson.build b/data/dconf/meson.build
new file mode 100644
index 00000000..8ce18d69
--- /dev/null
+++ b/data/dconf/meson.build
@@ -0,0 +1,25 @@
+gdm_dconf = configure_file(
+ input: 'gdm.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'DATADIR': gdm_prefix / get_option('datadir'),
+ 'PACKAGE': meson.project_name(),
+ },
+ install_dir: get_option('datadir') / 'dconf' / 'profile',
+)
+
+greeter_dconf_defaults = custom_target('greeter-dconf-defaults',
+ output: 'greeter-dconf-defaults',
+ input: files(
+ 'defaults/00-upstream-settings',
+ 'defaults/locks/00-upstream-settings-locks',
+ ),
+ command: [
+ find_program('dconf'),
+ 'compile',
+ '@OUTPUT@',
+ meson.current_source_dir() / 'defaults',
+ ],
+ install: true,
+ install_dir: get_option('datadir') / meson.project_name(),
+)
diff --git a/data/gdm.service.in b/data/gdm.service.in
index 57d60ada..fbbfb529 100644
--- a/data/gdm.service.in
+++ b/data/gdm.service.in
@@ -2,15 +2,15 @@
Description=GNOME Display Manager
# replaces the getty
-Conflicts=getty@tty@GDM_INITIAL_VT@.service
-After=getty@tty@GDM_INITIAL_VT@.service
+Conflicts=getty@tty${GDM_INITIAL_VT}.service
+After=getty@tty${GDM_INITIAL_VT}.service
# replaces plymouth-quit since it quits plymouth on its own
-Conflicts=@PLYMOUTH_QUIT_SERVICE@
-After=@PLYMOUTH_QUIT_SERVICE@
+Conflicts=${PLYMOUTH_QUIT_SERVICE}
+After=${PLYMOUTH_QUIT_SERVICE}
# Needs all the dependencies of the services it's replacing
-# pulled from getty@.service and @PLYMOUTH_QUIT_SERVICE@
+# pulled from getty@.service and ${PLYMOUTH_QUIT_SERVICE}
# (except for plymouth-quit-wait.service since it waits until
# plymouth is quit, which we do)
After=rc-local.service plymouth-start.service systemd-user-sessions.service
@@ -20,14 +20,14 @@ After=rc-local.service plymouth-start.service systemd-user-sessions.service
OnFailure=plymouth-quit.service
[Service]
-ExecStart=@sbindir@/gdm
+ExecStart=${sbindir}/gdm
KillMode=mixed
Restart=always
IgnoreSIGPIPE=no
BusName=org.gnome.DisplayManager
StandardOutput=syslog
StandardError=inherit
-EnvironmentFile=-@LANG_CONFIG_FILE@
+EnvironmentFile=-${LANG_CONFIG_FILE}
ExecReload=/bin/kill -SIGHUP $MAINPID
KeyringMode=shared
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 00000000..02353422
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,172 @@
+subdir('applications')
+subdir('autostart')
+subdir('dconf')
+
+# XPath configs
+foreach file : [ 'Init', 'PreSession', 'PostSession' ]
+ generated_file = configure_file(
+ input: '@0@.in'.format(file),
+ output: file,
+ configuration: { 'X_PATH': x_path },
+ )
+
+ install_data(generated_file,
+ install_dir: gdmconfdir / file,
+ install_mode: 'rwxr-xr-x',
+ rename: 'Default'
+ )
+endforeach
+
+install_data('PostLogin',
+ rename: 'Default.sample',
+ install_mode: 'rwxr-xr-x',
+ install_dir: gdmconfdir / 'PostLogin',
+)
+
+# gdm.conf
+configure_file(
+ input: 'gdm.conf.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'GDM_USERNAME': get_option('user')
+ },
+ install_dir: dbus_sys_dir,
+)
+configure_file(
+ input: 'gdm.conf-custom.in',
+ output: 'custom.conf',
+ copy: true,
+ install_mode: 'rw-r--r--',
+ install_dir: gdmconfdir,
+)
+
+# GSettings schema
+install_data('org.gnome.login-screen.gschema.xml',
+ install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
+)
+compiled_gschema = gnome.compile_schemas()
+
+# gdm.schema
+gdm_schema = configure_file(
+ input: 'gdm.schemas.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'GDM_USERNAME': get_option('user'),
+ 'GDM_GROUPNAME': get_option('group'),
+ 'gdmconfdir': gdmconfdir,
+ },
+ install_dir: get_option('datadir') / 'gdm',
+)
+
+install_data('locale.alias',
+ install_dir: get_option('datadir') / 'gdm',
+)
+configure_file(
+ input: 'gnome-login.session.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'libexecdir': gdm_prefix / get_option('libexecdir'),
+ 'check_accelerated_dir': check_accelerated_dir,
+ },
+ install_dir: get_option('datadir') / 'gnome-session' / 'sessions',
+)
+
+# PAM
+pam_data_files_map = {
+ 'redhat': [
+ 'gdm-autologin',
+ 'gdm-launch-environment',
+ 'gdm-fingerprint',
+ 'gdm-smartcard',
+ 'gdm-password',
+ 'gdm-pin',
+ ],
+ 'openembedded': [
+ 'gdm-autologin',
+ 'gdm-launch-environment',
+ 'gdm-password',
+ 'gdm-pin',
+ ],
+ 'exherbo': [
+ 'gdm-autologin',
+ 'gdm-launch-environment',
+ 'gdm-fingerprint',
+ 'gdm-smartcard',
+ 'gdm-password',
+ 'gdm-pin',
+ ],
+ 'lfs': [
+ 'gdm-autologin',
+ 'gdm-launch-environment',
+ 'gdm-fingerprint',
+ 'gdm-smartcard',
+ 'gdm-password',
+ 'gdm-pin',
+ ],
+ 'arch': [
+ 'gdm-autologin',
+ 'gdm-launch-environment',
+ 'gdm-fingerprint',
+ 'gdm-smartcard',
+ 'gdm-password',
+ 'gdm-pin',
+ ],
+ 'none': [],
+ # We should no longer have 'autodetect' at this point
+}
+
+pam_data_files = pam_data_files_map[default_pam_config]
+pam_prefix = (get_option('pam-prefix') != '')? get_option('pam-prefix') : get_option('sysconfdir')
+foreach _pam_filename : pam_data_files
+ install_data('pam-@0@/@1@.pam'.format(default_pam_config, _pam_filename),
+ rename: _pam_filename,
+ install_dir: pam_prefix / 'pam.d',
+ )
+endforeach
+
+gdm_rules = configure_file(
+ input: '61-gdm.rules.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'libexecdir': gdm_prefix / get_option('libexecdir'),
+ },
+ install_dir: udev_dir,
+)
+
+# DBus service files
+service_config = configuration_data()
+service_config.set('sbindir', gdm_prefix / get_option('sbindir'))
+service_config.set('GDM_INITIAL_VT', get_option('initial-vt'))
+service_config.set('LANG_CONFIG_FILE', lang_config_file)
+if plymouth_dep.found()
+ service_config.set('PLYMOUTH_QUIT_SERVICE', 'plymouth-quit.service')
+else
+ service_config.set('PLYMOUTH_QUIT_SERVICE', '')
+endif
+
+if get_option('systemdsystemunitdir') != ''
+ systemd_systemunitdir = get_option('systemdsystemunitdir')
+else
+ systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
+endif
+
+configure_file(
+ input: 'gdm.service.in',
+ output: '@BASENAME@',
+ configuration: service_config,
+ install_dir: systemd_systemunitdir,
+ format: 'cmake'
+)
+
+# XSession
+if get_option('gdm-xsession')
+ configure_file(
+ input: 'XSession.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'libexecdir': gdm_prefix / get_option('libexecdir'),
+ 'XSESSION_SHELL': get_option('solaris')? '/bin/ksh' : '/bin/sh',
+ },
+ install_dir: gdmconfdir,
+ )
+endif