mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
a6d1760024
When using "capture : true" in custom_target()s the mode of the source file is not preserved when the generated file is not installed and so needs to be tweaked manually. Switch from output capture to creating the target file and copy the permissions from the input file. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
40 lines
1.4 KiB
Meson
40 lines
1.4 KiB
Meson
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
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-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]
|
|
custom_target(
|
|
file,
|
|
input : file + '.in',
|
|
output: file,
|
|
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
|
install : tuple[1],
|
|
install_dir : sysusersdir)
|
|
endforeach
|