summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2022-09-07 13:45:53 +0000
committerJan Rybar <jrybar@redhat.com>2022-09-07 13:45:53 +0000
commit91597f08929ddf1bc3a90a7122f9e23ea96d6e11 (patch)
tree508051ae599729d06d2681db3a763b2ed8e022a0
parent8e555982e5801e540925235beec42a2782911ea0 (diff)
downloadpolkit-91597f08929ddf1bc3a90a7122f9e23ea96d6e11.tar.gz
meson: support -Dos_type=lfs and /etc/lfs-release autodetection
-rw-r--r--meson.build8
-rw-r--r--meson_options.txt2
2 files changed, 9 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 8ffc2ce..8bab9ce 100644
--- a/meson.build
+++ b/meson.build
@@ -276,6 +276,7 @@ if os_type == ''
['debian', '/etc/debian_version'],
['gentoo', '/etc/gentoo-release'],
['pardus', '/etc/pardus-release'],
+ ['lfs', '/etc/lfs-release'],
]
foreach os_path: os_paths
@@ -306,6 +307,13 @@ if pam_include == ''
'PAM_FILE_INCLUDE_PASSWORD': 'system',
'PAM_FILE_INCLUDE_SESSION': 'system',
}
+ elif os_type == 'lfs'
+ pam_conf = {
+ 'PAM_FILE_INCLUDE_AUTH': 'system-auth',
+ 'PAM_FILE_INCLUDE_ACCOUNT': 'system-account',
+ 'PAM_FILE_INCLUDE_PASSWORD': 'system-password',
+ 'PAM_FILE_INCLUDE_SESSION': 'system-session',
+ }
#if ['redhat', 'gentoo', 'pardus'].contains(os_type)
else
pam_conf = {
diff --git a/meson_options.txt b/meson_options.txt
index 76aa311..d648148 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,7 +4,7 @@ option('systemdsystemunitdir', type: 'string', value: '', description: 'custom d
option('polkitd_user', type: 'string', value: 'polkitd', description: 'User for running polkitd (polkitd)')
option('authfw', type: 'combo', choices: ['pam', 'shadow', 'bsdauth'], value: 'pam', description: 'Authentication framework (pam/shadow)')
-option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pardus', 'solaris', 'netbsd', ''], value: '', description: 'distribution or OS')
+option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pardus', 'solaris', 'netbsd', 'lfs', ''], value: '', description: 'distribution or OS')
option('pam_include', type: 'string', value: '', description: 'pam file to include')
option('pam_module_dir', type: 'string', value: '', description: 'directory to install PAM security module')