summaryrefslogtreecommitdiff
path: root/sysusers.d/meson.build
diff options
context:
space:
mode:
authorChristoph Anton Mitterer <mail@christoph.anton.mitterer.name>2021-06-28 19:24:37 +0200
committerChristoph Anton Mitterer <mail@christoph.anton.mitterer.name>2021-07-11 18:00:25 +0200
commit564761fcaeda8c013210f7c6934847a6d0228ec9 (patch)
tree199b8395ba093ac21cfa4d7c87d3234ee513a3e8 /sysusers.d/meson.build
parentd6d1fd995f9a4789a26e7156254b981e507fa14c (diff)
downloadsystemd-564761fcaeda8c013210f7c6934847a6d0228ec9.tar.gz
sysusers: split up systemd.conf
This makes it easier have the respective users/groups only created when their respective packages are installed. Fixes #20044.
Diffstat (limited to 'sysusers.d/meson.build')
-rw-r--r--sysusers.d/meson.build30
1 files changed, 24 insertions, 6 deletions
diff --git a/sysusers.d/meson.build b/sysusers.d/meson.build
index 894d1840bc..132d8a187a 100644
--- a/sysusers.d/meson.build
+++ b/sysusers.d/meson.build
@@ -1,13 +1,31 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
-if enable_sysusers
- install_data('README', install_dir : sysusersdir)
+files = [['README', ''],
+ ['systemd-coredump.conf', 'ENABLE_COREDUMP'],
+ ['systemd-oom.conf', 'ENABLE_OOMD']]
+
+foreach pair : files
+ if not enable_sysusers
+ # do nothing
+ elif pair[1] == '' or conf.get(pair[1]) == 1
+ install_data(pair[0], install_dir : sysusersdir)
+ else
+ message('Not installing sysusers.d/@0@ because @1@ is @2@'
+ .format(pair[0], pair[1], conf.get(pair[1], 0)))
+ endif
+endforeach
+
+
+if enable_sysusers and conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
+ install_data('systemd-remote.conf', install_dir : sysusersdir)
endif
-in_files = [['basic.conf', enable_sysusers],
- ['systemd.conf', enable_sysusers],
- ['systemd-remote.conf', enable_sysusers and
- conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1]]
+
+in_files = [['basic.conf', enable_sysusers],
+ ['systemd-journal.conf', enable_sysusers],
+ ['systemd-network.conf', enable_sysusers and conf.get('ENABLE_NETWORKD') == 1],
+ ['systemd-resolve.conf', enable_sysusers and conf.get('ENABLE_RESOLVE') == 1],
+ ['systemd-timesync.conf', enable_sysusers and conf.get('ENABLE_TIMESYNCD') == 1]]
foreach tuple : in_files
file = tuple[0]