Merge pull request #28611 from yuwata/meson-use-template

meson: use template (part 4)
This commit is contained in:
Yu Watanabe 2023-08-01 21:32:48 +09:00 committed by GitHub
commit e581074b9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 500 additions and 552 deletions

View file

@ -2370,23 +2370,34 @@ subdir('src/journal')
# systemd-networkd requires 'libsystemd_network'
subdir('src/libsystemd-network')
subdir('src/ac-power')
subdir('src/analyze')
subdir('src/backlight')
subdir('src/battery-check')
subdir('src/binfmt')
subdir('src/boot')
subdir('src/boot/efi')
subdir('src/busctl')
subdir('src/cgroups-agent')
subdir('src/coredump')
subdir('src/creds')
subdir('src/cryptenroll')
subdir('src/cryptsetup')
subdir('src/debug-generator')
subdir('src/delta')
subdir('src/detect-virt')
subdir('src/dissect')
subdir('src/environment-d-generator')
subdir('src/escape')
subdir('src/firstboot')
subdir('src/fsck')
subdir('src/fstab-generator')
subdir('src/getty-generator')
subdir('src/gpt-auto-generator')
subdir('src/hibernate-resume')
subdir('src/home')
subdir('src/hostname')
subdir('src/id128')
subdir('src/import')
subdir('src/integritysetup')
subdir('src/journal-remote')
@ -2394,7 +2405,9 @@ subdir('src/kernel-install')
subdir('src/locale')
subdir('src/login')
subdir('src/machine')
subdir('src/machine-id-setup')
subdir('src/network')
subdir('src/notify')
subdir('src/nspawn')
subdir('src/nss-myhostname')
subdir('src/nss-mymachines')
@ -2402,15 +2415,20 @@ subdir('src/nss-resolve')
subdir('src/nss-systemd')
subdir('src/oom')
subdir('src/partition')
subdir('src/path')
subdir('src/portable')
subdir('src/pstore')
subdir('src/random-seed')
subdir('src/rc-local-generator')
subdir('src/remount-fs')
subdir('src/resolve')
subdir('src/rfkill')
subdir('src/rpm')
subdir('src/run-generator')
subdir('src/shutdown')
subdir('src/sleep')
subdir('src/socket-activate')
subdir('src/sysctl')
subdir('src/sysext')
subdir('src/system-update-generator')
subdir('src/systemctl')
@ -2421,7 +2439,9 @@ subdir('src/timesync')
subdir('src/tmpfiles')
subdir('src/user-sessions')
subdir('src/userdb')
subdir('src/vconsole')
subdir('src/veritysetup')
subdir('src/volatile-root')
subdir('src/xdg-autostart-generator')
subdir('src/systemd')
@ -2581,482 +2601,9 @@ meson.add_install_script(meson_make_symlink,
bindir / 'udevadm',
libexecdir / 'systemd-udevd')
if conf.get('ENABLE_MACHINED') == 1
dbus_programs += executable(
'systemd-machined',
systemd_machined_sources,
include_directories : includes,
link_with : [libmachine_core,
libshared],
dependencies : userspace,
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += executable(
'machinectl',
'src/machine/machinectl.c',
include_directories : includes,
link_with : [libshared],
dependencies : [liblz4,
libxz,
libzstd,
threads,
userspace],
install_rpath : pkglibdir,
install : true)
endif
if conf.get('ENABLE_IMPORTD') == 1
dbus_programs += executable(
'systemd-importd',
systemd_importd_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [threads,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_pull = executable(
'systemd-pull',
systemd_pull_sources,
include_directories : includes,
link_with : [libshared,
lib_import_common],
dependencies : [lib_openssl_or_gcrypt,
libbzip2,
libcurl,
libxz,
libz,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_import = executable(
'systemd-import',
systemd_import_sources,
include_directories : includes,
link_with : [libshared,
lib_import_common],
dependencies : [libbzip2,
libcurl,
libxz,
libz,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_import_fs = executable(
'systemd-import-fs',
systemd_import_fs_sources,
include_directories : includes,
link_with : [libshared,
lib_import_common],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_export = executable(
'systemd-export',
systemd_export_sources,
include_directories : includes,
link_with : [libshared,
lib_import_common],
dependencies : [libbzip2,
libcurl,
libxz,
libz,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += [systemd_pull, systemd_import, systemd_import_fs, systemd_export]
endif
if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1
public_programs += executable(
'systemd-journal-upload',
systemd_journal_upload_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [libcurl,
libgnutls,
liblz4,
libxz,
libzstd,
threads,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
endif
if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
public_programs += executable(
'systemd-journal-remote',
systemd_journal_remote_sources,
include_directories : journal_includes,
link_with : [libshared,
libsystemd_journal_remote],
dependencies : [libgnutls,
liblz4,
libmicrohttpd,
libxz,
libzstd,
threads,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += executable(
'systemd-journal-gatewayd',
systemd_journal_gatewayd_sources,
include_directories : journal_includes,
link_with : [libshared],
dependencies : [libgnutls,
liblz4,
libmicrohttpd,
libxz,
libzstd,
threads,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
endif
if conf.get('ENABLE_COREDUMP') == 1
executable(
'systemd-coredump',
systemd_coredump_sources,
include_directories : includes,
link_with : [libshared,
libbasic_compress],
dependencies : [libacl,
liblz4,
libxz,
libzstd,
threads,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += executable(
'coredumpctl',
coredumpctl_sources,
include_directories : includes,
link_with : [libshared,
libbasic_compress],
dependencies : [liblz4,
libxz,
libzstd,
threads,
userspace],
install_rpath : pkglibdir,
install : true)
endif
if conf.get('ENABLE_PSTORE') == 1
executable(
'systemd-pstore',
systemd_pstore_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [libacl,
liblz4,
libxz,
libzstd,
threads,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
endif
if conf.get('ENABLE_OOMD') == 1
dbus_programs += executable('systemd-oomd',
systemd_oomd_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [libatomic,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += executable(
'oomctl',
oomctl_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
endif
if conf.get('ENABLE_BINFMT') == 1
public_programs += executable(
'systemd-binfmt',
'src/binfmt/binfmt.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
meson.add_install_script('sh', '-c',
mkdir_p.format(binfmtdir))
if install_sysconfdir
meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir / 'binfmt.d'))
endif
endif
if conf.get('ENABLE_SYSUPDATE') == 1
exe = executable(
'systemd-sysupdate',
systemd_sysupdate_sources,
include_directories : includes,
link_with : [libshared,
libshared_fdisk],
dependencies : [libblkid,
libfdisk,
libopenssl,
threads,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += exe
endif
if conf.get('ENABLE_VCONSOLE') == 1
executable(
'systemd-vconsole-setup',
'src/vconsole/vconsole-setup.c',
include_directories : includes,
link_with : [libshared],
dependencies : userspace,
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
endif
if conf.get('ENABLE_RANDOMSEED') == 1
executable(
'systemd-random-seed',
'src/random-seed/random-seed.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
endif
if conf.get('ENABLE_FIRSTBOOT') == 1
public_programs += executable(
'systemd-firstboot',
'src/firstboot/firstboot.c',
include_directories : includes,
link_with : [libshared],
dependencies : [libcrypt,
userspace],
install_rpath : pkglibdir,
install : true)
endif
executable(
'systemd-remount-fs',
'src/remount-fs/remount-fs.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
executable(
'systemd-machine-id-setup',
'src/machine-id-setup/machine-id-setup-main.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
executable(
'systemd-fsck',
'src/fsck/fsck.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
executable(
'systemd-growfs',
'src/partition/growfs.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
executable(
'systemd-makefs',
'src/partition/makefs.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
executable(
'systemd-sleep',
'src/sleep/sleep.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
if install_sysconfdir_samples
install_data('src/sleep/sleep.conf',
install_dir : pkgsysconfdir)
endif
public_programs += executable(
'systemd-sysctl',
'src/sysctl/sysctl.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += executable(
'systemd-ac-power',
'src/ac-power/ac-power.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
public_programs += executable(
'systemd-detect-virt',
'src/detect-virt/detect-virt.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
public_programs += executable(
'systemd-delta',
'src/delta/delta.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
public_programs += executable(
'systemd-escape',
'src/escape/escape.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
public_programs += executable(
'systemd-notify',
'src/notify/notify.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
public_programs += executable(
'systemd-creds',
'src/creds/creds.c',
include_directories : includes,
link_with : [libshared],
dependencies : [threads,
libopenssl,
userspace],
install_rpath : pkglibdir,
install : true)
public_programs += executable(
'systemd-battery-check',
'src/battery-check/battery-check.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install_dir : libexecdir,
install : true)
# Protecting files from the distro in /usr doesn't make sense since they can be trivially accessed otherwise,
# so don't restrict the access mode in /usr. That doesn't apply to /etc, so we do restrict the access mode
# there.
meson.add_install_script('sh', '-c', mkdir_p.format(credstoredir))
if install_sysconfdir
# Keep in sync with tmpfiles.d/credstore.conf
meson.add_install_script('sh', '-c', mkdir_p_mode.format(sysconfdir / 'credstore', '0700'))
meson.add_install_script('sh', '-c', mkdir_p_mode.format(sysconfdir / 'credstore.encrypted', '0700'))
endif
executable(
'systemd-volatile-root',
'src/volatile-root/volatile-root.c',
include_directories : includes,
link_with : [libshared],
dependencies : userspace,
install_rpath : pkglibdir,
install : conf.get('ENABLE_INITRD') == 1,
install_dir : libexecdir)
executable(
'systemd-cgroups-agent',
'src/cgroups-agent/cgroups-agent.c',
include_directories : includes,
link_with : [libshared],
dependencies : userspace,
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_id128 = executable(
'systemd-id128',
'src/id128/id128.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
public_programs += systemd_id128
if want_tests != 'false'
systemctl = executables_by_name.get('systemctl')
systemd_id128 = executables_by_name.get('systemd-id128')
test('test-systemctl-enable',
test_systemctl_enable_sh,
# https://github.com/mesonbuild/meson/issues/2681
@ -3064,15 +2611,6 @@ if want_tests != 'false'
systemd_id128.full_path()])
endif
public_programs += executable(
'systemd-path',
'src/path/path.c',
include_directories : includes,
link_with : [libshared],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true)
public_programs += executable(
'systemd-ask-password',
'src/ask-password/ask-password.c',
@ -3320,45 +2858,6 @@ if want_tests != 'false'
args : ['verify', '--resolve-names=never', all_rules])
endif
if conf.get('ENABLE_REPART') == 1
exe = executable(
'systemd-repart',
systemd_repart_sources,
include_directories : includes,
link_with : [libshared,
libshared_fdisk],
dependencies : [libblkid,
libfdisk,
libopenssl,
threads,
userspace],
install_rpath : pkglibdir,
install : true)
public_programs += exe
exe = executable(
'systemd-repart.standalone',
systemd_repart_sources,
include_directories : includes,
c_args : '-DSTANDALONE',
link_with : [libshared_static,
libbasic,
libbasic_gcrypt,
libsystemd_static,
libshared_fdisk],
dependencies : [libblkid,
libfdisk,
libopenssl,
threads,
userspace],
build_by_default: have_standalone_binaries,
install_rpath : pkglibdir,
install : have_standalone_binaries)
if have_standalone_binaries
public_programs += exe
endif
endif
executable(
'systemd-shutdown',
systemd_shutdown_sources,

9
src/ac-power/meson.build Normal file
View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-ac-power',
'public' : true,
'sources' : files('ac-power.c'),
},
]

View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-battery-check',
'public' : true,
'sources' : files('battery-check.c'),
},
]

19
src/binfmt/meson.build Normal file
View file

@ -0,0 +1,19 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-binfmt',
'public' : true,
'conditions' : ['ENABLE_BINFMT'],
'sources' : files('binfmt.c'),
},
]
if conf.get('ENABLE_BINFMT') == 1
meson.add_install_script('sh', '-c',
mkdir_p.format(binfmtdir))
if install_sysconfdir
meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir / 'binfmt.d'))
endif
endif

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-cgroups-agent',
'sources' : files('cgroups-agent.c'),
},
]

View file

@ -5,7 +5,35 @@ systemd_coredump_sources = files(
'coredump-vacuum.c',
)
coredumpctl_sources = files('coredumpctl.c')
common_link_with = [
libshared,
libbasic_compress,
]
common_dependencies = [
liblz4,
libxz,
libzstd,
threads,
]
executables += [
libexec_template + {
'name' : 'systemd-coredump',
'conditions' : ['ENABLE_COREDUMP'],
'sources' : systemd_coredump_sources,
'link_with' : common_link_with,
'dependencies' : common_dependencies + [libacl],
},
executable_template + {
'name' : 'coredumpctl',
'public' : true,
'conditions' : ['ENABLE_COREDUMP'],
'sources' : files('coredumpctl.c'),
'link_with' : common_link_with,
'dependencies' : common_dependencies,
},
]
if conf.get('ENABLE_COREDUMP') == 1 and install_sysconfdir_samples
install_data('coredump.conf',

23
src/creds/meson.build Normal file
View file

@ -0,0 +1,23 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-creds',
'public' : true,
'sources' : files('creds.c'),
'dependencies' : [
libopenssl,
threads,
],
},
]
# Protecting files from the distro in /usr doesn't make sense since they can be trivially accessed otherwise,
# so don't restrict the access mode in /usr. That doesn't apply to /etc, so we do restrict the access mode
# there.
meson.add_install_script('sh', '-c', mkdir_p.format(credstoredir))
if install_sysconfdir
# Keep in sync with tmpfiles.d/credstore.conf
meson.add_install_script('sh', '-c', mkdir_p_mode.format(sysconfdir / 'credstore', '0700'))
meson.add_install_script('sh', '-c', mkdir_p_mode.format(sysconfdir / 'credstore.encrypted', '0700'))
endif

9
src/delta/meson.build Normal file
View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-delta',
'public' : true,
'sources' : files('delta.c'),
},
]

View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-detect-virt',
'public' : true,
'sources' : files('detect-virt.c'),
},
]

9
src/escape/meson.build Normal file
View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-escape',
'public' : true,
'sources' : files('escape.c'),
},
]

11
src/firstboot/meson.build Normal file
View file

@ -0,0 +1,11 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-firstboot',
'public' : true,
'conditions' : ['ENABLE_FIRSTBOOT'],
'sources' : files('firstboot.c'),
'dependencies' : libcrypt,
},
]

8
src/fsck/meson.build Normal file
View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-fsck',
'sources' : files('fsck.c'),
},
]

9
src/id128/meson.build Normal file
View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-id128',
'public' : true,
'sources' : files('id128.c'),
},
]

View file

@ -1,7 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
systemd_importd_sources = files(
'importd.c')
'importd.c',
)
systemd_pull_sources = files(
'pull.c',
@ -19,7 +20,8 @@ systemd_import_sources = files(
)
systemd_import_fs_sources = files(
'import-fs.c')
'import-fs.c',
)
systemd_export_sources = files(
'export.c',
@ -27,19 +29,80 @@ systemd_export_sources = files(
'export-raw.c',
)
if conf.get('ENABLE_IMPORTD') == 1
lib_import_common = static_library(
'import-common',
'import-common.c',
'import-compress.c',
'qcow2-util.c',
include_directories : includes,
dependencies : [libbzip2,
libxz,
libz,
userspace],
build_by_default : false)
importd_common_sources = files(
'import-common.c',
'import-compress.c',
'qcow2-util.c',
)
lib_import_common = static_library(
'import-common',
sources : importd_common_sources,
include_directories : includes,
dependencies : [
libbzip2,
libxz,
libz,
userspace,
],
build_by_default : false)
common_libs = [
lib_import_common,
libshared,
]
common_deps = [
libbzip2,
libcurl,
libxz,
libz,
]
executables += [
libexec_template + {
'name' : 'systemd-importd',
'dbus' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_importd_sources,
'dependencies' : threads,
},
libexec_template + {
'name' : 'systemd-pull',
'public' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_pull_sources,
'link_with' : common_libs,
'dependencies' : common_deps + [
lib_openssl_or_gcrypt,
],
},
libexec_template + {
'name' : 'systemd-import',
'public' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_import_sources,
'link_with' : common_libs,
'dependencies' : common_deps,
},
libexec_template + {
'name' : 'systemd-import-fs',
'public' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_import_fs_sources,
'link_with' : common_libs,
},
libexec_template + {
'name' : 'systemd-export',
'public' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_export_sources,
'link_with' : common_libs,
'dependencies' : common_deps,
},
]
if conf.get('ENABLE_IMPORTD') == 1
install_data('org.freedesktop.import1.conf',
install_dir : dbuspolicydir)
install_data('org.freedesktop.import1.service',

View file

@ -37,6 +37,52 @@ systemd_journal_gatewayd_sources = files(
'microhttpd-util.c',
)
common_deps = [
libgnutls,
liblz4,
libxz,
libzstd,
threads,
]
executables += [
libexec_template + {
'name' : 'systemd-journal-upload',
'public' : true,
'conditions' : [
'ENABLE_REMOTE',
'HAVE_LIBCURL',
],
'sources' : systemd_journal_upload_sources,
'dependencies' : common_deps + [libcurl],
},
libexec_template + {
'name' : 'systemd-journal-remote',
'public' : true,
'conditions' : [
'ENABLE_REMOTE',
'HAVE_MICROHTTPD',
],
'sources' : systemd_journal_remote_sources,
'include_directories' : journal_includes,
'link_with' : [
libshared,
libsystemd_journal_remote,
],
'dependencies' : common_deps + [libmicrohttpd],
},
libexec_template + {
'name' : 'systemd-journal-gatewayd',
'public' : true,
'conditions' : [
'ENABLE_REMOTE',
'HAVE_MICROHTTPD',
],
'sources' : systemd_journal_gatewayd_sources,
'dependencies' : common_deps + [libmicrohttpd],
},
]
in_files = [
['journal-upload.conf',
conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1 and install_sysconfdir_samples],

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-machine-id-setup',
'sources' : files('machine-id-setup-main.c'),
},
]

View file

@ -1,9 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
systemd_machined_sources = files(
'machined.c',
)
libmachine_core_sources = files(
'image-dbus.c',
'machine-dbus.c',
@ -22,6 +18,31 @@ libmachine_core = static_library(
userspace],
build_by_default : false)
executables += [
libexec_template + {
'name' : 'systemd-machined',
'dbus' : true,
'conditions' : ['ENABLE_MACHINED'],
'sources' : files('machined.c'),
'link_with' : [
libmachine_core,
libshared,
],
},
executable_template + {
'name' : 'machinectl',
'public' : true,
'conditions' : ['ENABLE_MACHINED'],
'sources' : files('machinectl.c'),
'dependencies' : [
liblz4,
libxz,
libzstd,
threads,
],
},
]
if conf.get('ENABLE_MACHINED') == 1
install_data('org.freedesktop.machine1.conf',
install_dir : dbuspolicydir)

9
src/notify/meson.build Normal file
View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-notify',
'public' : true,
'sources' : files('notify.c'),
},
]

View file

@ -7,7 +7,21 @@ systemd_oomd_sources = files(
'oomd.c',
)
oomctl_sources = files('oomctl.c')
executables += [
libexec_template + {
'name' : 'systemd-oomd',
'dbus' : true,
'conditions' : ['ENABLE_OOMD'],
'sources' : systemd_oomd_sources,
'dependencies' : libatomic,
},
executable_template + {
'name' : 'oomctl',
'public' : true,
'conditions' : ['ENABLE_OOMD'],
'sources' : files('oomctl.c'),
},
]
if conf.get('ENABLE_OOMD') == 1
install_data('org.freedesktop.oom1.conf',

View file

@ -1,3 +1,50 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
systemd_repart_sources = files('repart.c')
executables += [
libexec_template + {
'name' : 'systemd-growfs',
'sources' : files('growfs.c'),
},
libexec_template + {
'name' : 'systemd-makefs',
'sources' : files('makefs.c'),
},
executable_template + {
'name' : 'systemd-repart',
'public' : true,
'conditions' : ['ENABLE_REPART'],
'sources' : files('repart.c'),
'link_with' : [
libshared,
libshared_fdisk,
],
'dependencies' : [
libblkid,
libfdisk,
libopenssl,
threads,
],
},
executable_template + {
'name' : 'systemd-repart.standalone',
'public' : have_standalone_binaries,
'conditions' : ['ENABLE_REPART'],
'sources' : files('repart.c'),
'c_args' : '-DSTANDALONE',
'link_with' : [
libbasic,
libbasic_gcrypt,
libshared_fdisk,
libshared_static,
libsystemd_static,
],
'dependencies' : [
libblkid,
libfdisk,
libopenssl,
threads,
],
'build_by_default' : have_standalone_binaries,
'install' : have_standalone_binaries,
},
]

9
src/path/meson.build Normal file
View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-path',
'public' : true,
'sources' : files('path.c'),
},
]

View file

@ -1,6 +1,19 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
systemd_pstore_sources = files('pstore.c')
executables += [
libexec_template + {
'name' : 'systemd-pstore',
'conditions' : ['ENABLE_PSTORE'],
'sources' : files('pstore.c'),
'dependencies' : [
libacl,
liblz4,
libxz,
libzstd,
threads,
],
},
]
if conf.get('ENABLE_PSTORE') == 1 and install_sysconfdir_samples
install_data('pstore.conf',

View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-random-seed',
'conditions' : ['ENABLE_RANDOMSEED'],
'sources' : files('random-seed.c'),
},
]

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-remount-fs',
'sources' : files('remount-fs.c'),
},
]

13
src/sleep/meson.build Normal file
View file

@ -0,0 +1,13 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-sleep',
'sources' : files('sleep.c'),
},
]
if install_sysconfdir_samples
install_data('sleep.conf',
install_dir : pkgsysconfdir)
endif

9
src/sysctl/meson.build Normal file
View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-sysctl',
'public' : true,
'sources' : files('sysctl.c'),
},
]

View file

@ -2,19 +2,30 @@
systemd_sysupdate_sources = files(
'sysupdate-cache.c',
'sysupdate-cache.h',
'sysupdate-instance.c',
'sysupdate-instance.h',
'sysupdate-partition.c',
'sysupdate-partition.h',
'sysupdate-pattern.c',
'sysupdate-pattern.h',
'sysupdate-resource.c',
'sysupdate-resource.h',
'sysupdate-transfer.c',
'sysupdate-transfer.h',
'sysupdate-update-set.c',
'sysupdate-update-set.h',
'sysupdate.c',
'sysupdate.h',
)
executables += [
libexec_template + {
'name' : 'systemd-sysupdate',
'public' : true,
'conditions' : ['ENABLE_SYSUPDATE'],
'sources' : systemd_sysupdate_sources,
'link_with' : [
libshared,
libshared_fdisk,
],
'dependencies' : [
libblkid,
libfdisk,
libopenssl,
threads,
],
},
]

9
src/vconsole/meson.build Normal file
View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-vconsole-setup',
'conditions' : ['ENABLE_VCONSOLE'],
'sources' : files('vconsole-setup.c'),
},
]

View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-volatile-root',
'conditions' : ['ENABLE_INITRD'],
'sources' : files('volatile-root.c'),
},
]