summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-04-03 19:52:20 -0500
committerRay Strode <halfline@gmail.com>2023-04-28 19:44:52 +0000
commit9257ef1f6e106bdedc40e34588b31bec39d6b5b1 (patch)
tree027ab3552bcfc28683f6300a80eb1e7ceab9a27f /data
parent396a61fbeab9b37fed03c1fa35ea9dced0951426 (diff)
downloadgdm-9257ef1f6e106bdedc40e34588b31bec39d6b5b1.tar.gz
meson: allow building with elogind
Currently, the GDM meson build has a hard dependency on systemd. However, GDM can function just fine if one is using elogind. This allows a user to build GDM against libelogind and also disable the systemd system and user units.
Diffstat (limited to 'data')
-rw-r--r--data/meson.build62
-rw-r--r--data/pam-arch/gdm-launch-environment.pam1
2 files changed, 38 insertions, 25 deletions
diff --git a/data/meson.build b/data/meson.build
index 2dec4c23..c3452e1c 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -164,41 +164,53 @@ 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')
+systemdsystemunitdir = get_option('systemdsystemunitdir')
+if systemdsystemunitdir != 'no'
+ assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd system unit dir or disable it')
+ if get_option('systemdsystemunitdir') != ''
+ systemd_systemunitdir = get_option('systemdsystemunitdir')
+ else
+ systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
+ endif
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')])
+systemduserunitdir = get_option('systemduserunitdir')
+if systemduserunitdir != 'no'
+ assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
+ 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
endif
-configure_file(
- input: 'gdm.service.in',
- output: '@BASENAME@',
- configuration: service_config,
- install_dir: systemd_systemunitdir,
- format: 'cmake'
-)
+if systemdsystemunitdir != 'no'
+ configure_file(
+ input: 'gdm.service.in',
+ output: '@BASENAME@',
+ configuration: service_config,
+ install_dir: systemd_systemunitdir,
+ format: 'cmake'
+ )
+endif
gdm_gnome_session_wanted_targets = []
foreach component: gdm_gnome_user_session_wanted_components
gdm_gnome_session_wanted_targets += 'Wants=@0@.target'.format(component)
endforeach
-configure_file(
- input: 'session.conf.in',
- output: 'session.conf',
- configuration: {
- 'requires_component': gdm_gnome_shell_component,
- 'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
- },
- install_dir: systemd_userunitdir / 'gnome-session@gnome-login.target.d',
-)
+if systemduserunitdir != 'no'
+ configure_file(
+ input: 'session.conf.in',
+ output: 'session.conf',
+ configuration: {
+ 'requires_component': gdm_gnome_shell_component,
+ 'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
+ },
+ install_dir: systemd_userunitdir / 'gnome-session@gnome-login.target.d',
+ )
+endif
# XSession
if get_option('gdm-xsession')
diff --git a/data/pam-arch/gdm-launch-environment.pam b/data/pam-arch/gdm-launch-environment.pam
index 3c4ad407..9d05e516 100644
--- a/data/pam-arch/gdm-launch-environment.pam
+++ b/data/pam-arch/gdm-launch-environment.pam
@@ -14,4 +14,5 @@ session optional pam_keyinit.so force revoke
session required pam_succeed_if.so audit quiet_success user in gdm:gnome-initial-setup
session optional pam_permit.so
-session optional pam_systemd.so
+-session optional pam_elogind.so
session required pam_env.so