From 88b51ff97441041f5e0b94e60dd330964e27a2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Jul 2026 12:07:02 +0200 Subject: [PATCH 1/6] meson: move 'conditions' to the end --- src/report/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/report/meson.build b/src/report/meson.build index 8a4716ec21..cc2cea521e 100644 --- a/src/report/meson.build +++ b/src/report/meson.build @@ -39,13 +39,13 @@ executables += [ }, libexec_template + { 'name' : 'systemd-report-sign-plain', - 'conditions' : [ - 'HAVE_OPENSSL', - ], 'sources' : files( 'report-sign-plain.c', ), 'dependencies' : libopenssl_cflags, + 'conditions' : [ + 'HAVE_OPENSSL', + ], }, libexec_template + { 'name' : 'systemd-report-sign-tsm', From f00ccf93b75e0b434554d0690ec0e57dd5c71d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Jul 2026 12:30:09 +0200 Subject: [PATCH 2/6] meson: rename extract+objects to export+import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have two concepts: a list of files that should be extracted from an intermediate build artifact to be used in a later build artifact, and for a given artifact, a list "donors". The first list was called "extract", because it is passed to the .extract_objects() meson function, and the second was called "objects", because that is the meson parameter to specify pre-built objects files (6350d2dbd97746440b9c8303ddc140ffda568732). But this naming is confusing: we don't care about the 'extract' step, this is something internal to the build machinery. And 'objects' is a very generic term. Let's use 'export' for the stuff that is "exported" for other binaries to use, and 'import' to say where to import from. Those terms are symmetrical and the association between them should be intuitive. (If you think the terms are actually assymetrical, there are precedents for confusing the import with the import sources. E.g. in modern English, turkeys are called so because they were imported from the Americas and guineafowls were imported from Africa via Türkiye and all that foreign stuff is alike.) --- meson.build | 20 ++++++++++---------- src/analyze/meson.build | 4 ++-- src/busctl/meson.build | 4 ++-- src/coredump/meson.build | 4 ++-- src/hibernate-resume/meson.build | 4 ++-- src/home/meson.build | 10 +++++----- src/imds/meson.build | 6 +++--- src/import/meson.build | 16 ++++++++-------- src/integritysetup/meson.build | 4 ++-- src/journal-remote/meson.build | 10 +++++----- src/journal/meson.build | 12 ++++++------ src/libsystemd-network/meson.build | 6 +++--- src/locale/meson.build | 4 ++-- src/login/meson.build | 4 ++-- src/machine/meson.build | 4 ++-- src/network/meson.build | 10 +++++----- src/nspawn/meson.build | 4 ++-- src/nsresourced/meson.build | 6 +++--- src/oom/meson.build | 4 ++-- src/repart/meson.build | 4 ++-- src/resolve/meson.build | 8 ++++---- src/shutdown/meson.build | 4 ++-- src/sleep/meson.build | 4 ++-- src/ssh-generator/meson.build | 4 ++-- src/systemctl/meson.build | 4 ++-- src/sysupdate/meson.build | 6 +++--- src/sysusers/meson.build | 4 ++-- src/test/meson.build | 10 +++++----- src/timesync/meson.build | 6 +++--- src/tmpfiles/meson.build | 4 ++-- src/udev/meson.build | 10 +++++----- src/vmspawn/meson.build | 6 +++--- src/xdg-autostart-generator/meson.build | 6 +++--- 33 files changed, 108 insertions(+), 108 deletions(-) diff --git a/meson.build b/meson.build index 1ce4c95368..0c54ef2408 100644 --- a/meson.build +++ b/meson.build @@ -1815,7 +1815,7 @@ catalogs = [] modules = [] # nss, pam, and other plugins executables = [] executables_by_name = {} -objects_by_name = {} +exported_by_name = {} fuzzer_exes = [] sources = [] @@ -2276,7 +2276,7 @@ foreach dict : executables continue endif - exe_sources = dict.get('sources', []) + dict.get('extract', []) + exe_sources = dict.get('sources', []) + dict.get('export', []) foreach bpf_name : dict.get('bpf_programs', []) if bpf_name in bpf_programs_by_name @@ -2287,7 +2287,7 @@ foreach dict : executables kwargs = {} foreach key, val : dict if key in ['name', 'dbus', 'public', 'conditions', 'type', 'suite', - 'timeout', 'parallel', 'objects', 'sources', 'extract', + 'timeout', 'parallel', 'sources', 'import', 'export', 'include_directories', 'build_by_default', 'install', 'bpf_programs'] continue @@ -2305,9 +2305,9 @@ foreach dict : executables include_directories += fs.parent(exe_sources[0]) endif - foreach val : dict.get('objects', []) - obj = objects_by_name[val] - kwargs += { 'objects' : kwargs.get('objects', []) + obj['objects'] } + foreach val : dict.get('import', []) + obj = exported_by_name[val] + kwargs += { 'objects' : kwargs.get('objects', []) + obj['exported'] } include_directories += obj['include_directories'] endforeach @@ -2354,11 +2354,11 @@ foreach dict : executables sources += exe_sources endif - if dict.has_key('extract') - objects_by_name += { + if dict.has_key('export') + exported_by_name += { name : { - 'objects' : exe.extract_objects(dict['extract']), - 'include_directories' : fs.parent(dict['extract'][0]), + 'exported' : exe.extract_objects(dict['export']), + 'include_directories' : fs.parent(dict['export'][0]), } } endif diff --git a/src/analyze/meson.build b/src/analyze/meson.build index a8232eb851..bd8dc7ccdd 100644 --- a/src/analyze/meson.build +++ b/src/analyze/meson.build @@ -49,7 +49,7 @@ executables += [ 'name' : 'systemd-analyze', 'public' : conf.get('ENABLE_ANALYZE') == 1, 'sources' : systemd_analyze_sources, - 'extract' : systemd_analyze_extract_sources, + 'export' : systemd_analyze_extract_sources, 'include_directories' : core_includes, 'link_with' : [ libcore, @@ -63,6 +63,6 @@ executables += [ }, core_test_template + { 'sources' : files('test-verify.c'), - 'objects' : ['systemd-analyze'], + 'import' : ['systemd-analyze'], }, ] diff --git a/src/busctl/meson.build b/src/busctl/meson.build index 9aee5b0d25..d878bf5186 100644 --- a/src/busctl/meson.build +++ b/src/busctl/meson.build @@ -12,10 +12,10 @@ executables += [ 'name' : 'busctl', 'public' : true, 'sources' : busctl_sources, - 'extract' : busctl_extract_sources, + 'export' : busctl_extract_sources, }, test_template + { 'sources' : files('test-busctl-introspect.c'), - 'objects' : ['busctl'], + 'import' : ['busctl'], }, ] diff --git a/src/coredump/meson.build b/src/coredump/meson.build index b1286f80ff..b8f6e4d97b 100644 --- a/src/coredump/meson.build +++ b/src/coredump/meson.build @@ -36,7 +36,7 @@ executables += [ libexec_template + { 'name' : 'systemd-coredump', 'sources' : systemd_coredump_sources, - 'extract' : systemd_coredump_extract_sources, + 'export' : systemd_coredump_extract_sources, 'link_with' : [libshared], 'dependencies' : [ common_dependencies, @@ -52,7 +52,7 @@ executables += [ }, test_template + { 'sources' : files('test-coredump-vacuum.c'), - 'objects' : ['systemd-coredump'], + 'import' : ['systemd-coredump'], 'type' : 'manual', }, ] diff --git a/src/hibernate-resume/meson.build b/src/hibernate-resume/meson.build index e18f60e3b4..b864d9fd84 100644 --- a/src/hibernate-resume/meson.build +++ b/src/hibernate-resume/meson.build @@ -8,11 +8,11 @@ executables += [ libexec_template + { 'name' : 'systemd-hibernate-resume', 'sources' : files('hibernate-resume.c'), - 'extract' : files('hibernate-resume-config.c'), + 'export' : files('hibernate-resume-config.c'), }, generator_template + { 'name' : 'systemd-hibernate-resume-generator', 'sources' : files('hibernate-resume-generator.c'), - 'objects' : ['systemd-hibernate-resume'], + 'import' : ['systemd-hibernate-resume'], }, ] diff --git a/src/home/meson.build b/src/home/meson.build index 2713b04635..693a5e706f 100644 --- a/src/home/meson.build +++ b/src/home/meson.build @@ -66,13 +66,13 @@ executables += [ 'name' : 'systemd-homed', 'dbus' : true, 'sources' : systemd_homed_sources, - 'extract' : systemd_homed_extract_sources, + 'export' : systemd_homed_extract_sources, 'dependencies' : libopenssl_cflags, }, libexec_template + { 'name' : 'systemd-homework', 'sources' : systemd_homework_sources, - 'objects' : ['systemd-homed'], + 'import' : ['systemd-homed'], 'dependencies' : [ libblkid_cflags, libcryptsetup_cflags, @@ -86,8 +86,8 @@ executables += [ 'name' : 'homectl', 'public' : true, 'sources' : homectl_sources, - 'extract' : homectl_extract, - 'objects' : ['systemd-homed'], + 'export' : homectl_extract, + 'import' : ['systemd-homed'], 'dependencies' : [ libfido2_cflags, libopenssl_cflags, @@ -96,7 +96,7 @@ executables += [ }, test_template + { 'sources' : files('test-homectl-prompts.c'), - 'objects' : ['homectl'], + 'import' : ['homectl'], 'type' : 'manual', }, test_template + { diff --git a/src/imds/meson.build b/src/imds/meson.build index 9167600b65..ca54acd3f3 100644 --- a/src/imds/meson.build +++ b/src/imds/meson.build @@ -9,7 +9,7 @@ executables += [ 'name' : 'systemd-imdsd', 'public' : true, 'sources' : files('imdsd.c'), - 'extract' : files('imds-util.c'), + 'export' : files('imds-util.c'), 'dependencies' : [ libcurl_cflags, ], @@ -20,12 +20,12 @@ executables += [ 'sources' : files( 'imds-tool.c', 'imds-tool-metrics.c'), - 'objects' : ['systemd-imdsd'], + 'import' : ['systemd-imdsd'], }, generator_template + { 'name' : 'systemd-imds-generator', 'sources' : files('imds-generator.c'), - 'objects' : ['systemd-imdsd'], + 'import' : ['systemd-imdsd'], }, ] diff --git a/src/import/meson.build b/src/import/meson.build index e141ffb975..54caa928dc 100644 --- a/src/import/meson.build +++ b/src/import/meson.build @@ -12,7 +12,7 @@ executables += [ 'importd.c', 'oci-util.c', ), - 'extract' : files( + 'export' : files( 'oci-util.c', 'import-common.c', 'qcow2-util.c', @@ -33,7 +33,7 @@ executables += [ 'pull-raw.c', 'pull-tar.c', ), - 'objects' : ['systemd-importd'], + 'import' : ['systemd-importd'], 'dependencies' : [ libcurl_cflags, libopenssl_cflags, @@ -47,7 +47,7 @@ executables += [ 'import-raw.c', 'import-tar.c', ), - 'objects' : ['systemd-importd'], + 'import' : ['systemd-importd'], }, libexec_template + { 'name' : 'systemd-import-fs', @@ -55,7 +55,7 @@ executables += [ 'sources' : files( 'import-fs.c', ), - 'objects' : ['systemd-importd'], + 'import' : ['systemd-importd'], }, libexec_template + { 'name' : 'systemd-export', @@ -65,13 +65,13 @@ executables += [ 'export-tar.c', 'export-raw.c', ), - 'objects' : ['systemd-importd'], + 'import' : ['systemd-importd'], }, executable_template + { 'name' : 'importctl', 'public' : true, 'sources' : files('importctl.c'), - 'objects': ['systemd-importd'], + 'import' : ['systemd-importd'], }, generator_template + { 'name' : 'systemd-import-generator', @@ -86,12 +86,12 @@ executables += [ }, test_template + { 'sources' : files('test-qcow2.c'), - 'objects' : ['systemd-importd'], + 'import' : ['systemd-importd'], 'type' : 'manual', }, test_template + { 'sources' : files('test-oci-util.c'), - 'objects': ['systemd-importd'], + 'import' : ['systemd-importd'], }, ] diff --git a/src/integritysetup/meson.build b/src/integritysetup/meson.build index 4f3601e681..7f29c031b8 100644 --- a/src/integritysetup/meson.build +++ b/src/integritysetup/meson.build @@ -8,12 +8,12 @@ executables += [ libexec_template + { 'name' : 'systemd-integritysetup', 'sources' : files('integritysetup.c'), - 'extract' : files('integrity-util.c'), + 'export' : files('integrity-util.c'), 'dependencies' : libcryptsetup_cflags, }, generator_template + { 'name' : 'systemd-integritysetup-generator', 'sources' : files('integritysetup-generator.c'), - 'objects' : ['systemd-integritysetup'], + 'import' : ['systemd-integritysetup'], }, ] diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build index 1338a3e673..a69858665f 100644 --- a/src/journal-remote/meson.build +++ b/src/journal-remote/meson.build @@ -46,7 +46,7 @@ executables += [ # Instead, we make sure we don't install it when the remote feature is disabled. 'install' : conf.get('ENABLE_REMOTE') == 1, 'sources' : systemd_journal_remote_sources, - 'extract' : systemd_journal_remote_extract_sources, + 'export' : systemd_journal_remote_extract_sources, 'dependencies' : common_deps + [libmicrohttpd_cflags], }, libexec_template + { @@ -57,8 +57,8 @@ executables += [ 'HAVE_LIBCURL', ], 'sources' : systemd_journal_upload_sources, - 'extract' : systemd_journal_upload_extract_sources, - 'objects' : ['systemd-journal-remote'], + 'export' : systemd_journal_upload_extract_sources, + 'import' : ['systemd-journal-remote'], 'dependencies' : [ common_deps, libcurl_cflags, @@ -67,11 +67,11 @@ executables += [ test_template + { 'sources' : files('test-journal-header-util.c'), 'conditions' : ['ENABLE_REMOTE', 'HAVE_LIBCURL'], - 'objects' : ['systemd-journal-upload'], + 'import' : ['systemd-journal-upload'], }, fuzz_template + { 'sources' : files('fuzz-journal-remote.c'), - 'objects' : ['systemd-journal-remote'], + 'import' : ['systemd-journal-remote'], 'dependencies' : common_deps + [libmicrohttpd_cflags], }, ] diff --git a/src/journal/meson.build b/src/journal/meson.build index 41561deb8b..703e9c9fe4 100644 --- a/src/journal/meson.build +++ b/src/journal/meson.build @@ -78,11 +78,11 @@ else endif journal_test_template = test_template + { - 'objects' : ['systemd-journald'], + 'import' : ['systemd-journald'], } journal_fuzz_template = fuzz_template + { - 'objects' : [ + 'import' : [ 'fuzz-journald-audit', 'systemd-journald', ], @@ -93,7 +93,7 @@ executables += [ libexec_template + { 'name' : 'systemd-journald', 'sources' : systemd_journald_sources, - 'extract' : systemd_journald_extract_sources, + 'export' : systemd_journald_extract_sources, 'dependencies' : [ libacl_cflags, libaudit_cflags, @@ -117,7 +117,7 @@ executables += [ 'name' : 'systemd-cat', 'public' : true, 'sources' : files('cat.c'), - 'objects' : ['systemd-journald'], + 'import' : ['systemd-journald'], }, executable_template + { 'name' : 'journalctl', @@ -168,8 +168,8 @@ executables += [ fuzz_template + { 'sources' : files('fuzz-journald-audit.c'), # fuzz-journald-util.c is shared with the other fuzzers below. - 'extract' : files('fuzz-journald-util.c'), - 'objects' : ['systemd-journald'], + 'export' : files('fuzz-journald-util.c'), + 'import' : ['systemd-journald'], }, journal_fuzz_template + { 'sources' : files('fuzz-journald-kmsg.c'), diff --git a/src/libsystemd-network/meson.build b/src/libsystemd-network/meson.build index 7340bed038..2ac7d29fff 100644 --- a/src/libsystemd-network/meson.build +++ b/src/libsystemd-network/meson.build @@ -116,11 +116,11 @@ executables += [ }, network_test_template + { 'sources' : files('test-ndisc-ra.c'), - 'extract' : files('icmp6-test-util.c'), + 'export' : files('icmp6-test-util.c'), }, network_test_template + { 'sources' : files('test-ndisc-rs.c'), - 'objects' : ['test-ndisc-ra'], + 'import' : ['test-ndisc-ra'], }, network_test_template + { 'sources' : files('test-ndisc-send.c'), @@ -146,6 +146,6 @@ executables += [ }, network_fuzz_template + { 'sources' : files('fuzz-ndisc-rs.c'), - 'objects' : ['test-ndisc-ra'], + 'import' : ['test-ndisc-ra'], }, ] diff --git a/src/locale/meson.build b/src/locale/meson.build index 2f99bb8d80..fa3651ace0 100644 --- a/src/locale/meson.build +++ b/src/locale/meson.build @@ -29,7 +29,7 @@ executables += [ 'name' : 'systemd-localed', 'dbus' : true, 'sources' : systemd_localed_sources, - 'extract' : systemd_localed_extract_sources, + 'export' : systemd_localed_extract_sources, 'dependencies' : libxkbcommon_deps, }, executable_template + { @@ -39,7 +39,7 @@ executables += [ }, test_template + { 'sources' : files('test-localed-util.c'), - 'objects' : ['systemd-localed'], + 'import' : ['systemd-localed'], 'dependencies' : libxkbcommon_deps, }, ] diff --git a/src/login/meson.build b/src/login/meson.build index effb44c3a8..e718e1f44f 100644 --- a/src/login/meson.build +++ b/src/login/meson.build @@ -47,7 +47,7 @@ executables += [ 'name' : 'systemd-logind', 'dbus' : true, 'sources' : systemd_logind_sources, - 'extract' : systemd_logind_extract_sources, + 'export' : systemd_logind_extract_sources, 'dependencies' : [ libacl_cflags, ], @@ -77,7 +77,7 @@ executables += [ }, test_template + { 'sources' : files('test-login-tables.c'), - 'objects' : ['systemd-logind'], + 'import' : ['systemd-logind'], }, test_template + { 'sources' : files('test-session-properties.c'), diff --git a/src/machine/meson.build b/src/machine/meson.build index fc16e9f5c5..40cab032ec 100644 --- a/src/machine/meson.build +++ b/src/machine/meson.build @@ -26,7 +26,7 @@ executables += [ 'name' : 'systemd-machined', 'dbus' : true, 'sources' : systemd_machined_sources, - 'extract' : systemd_machined_extract_sources, + 'export' : systemd_machined_extract_sources, }, executable_template + { 'name' : 'machinectl', @@ -40,7 +40,7 @@ executables += [ }, test_template + { 'sources' : files('test-machine-tables.c'), - 'objects' : ['systemd-machined'], + 'import' : ['systemd-machined'], }, ] diff --git a/src/network/meson.build b/src/network/meson.build index b620e512df..53e2fa1496 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -178,7 +178,7 @@ network_test_template = test_template + { networkd_link_with, libsystemd_network, ], - 'objects' : ['systemd-networkd'], + 'import' : ['systemd-networkd'], 'include_directories' : network_includes, } @@ -188,7 +188,7 @@ network_fuzz_template = fuzz_template + { networkd_link_with, libsystemd_network, ], - 'objects' : ['systemd-networkd'], + 'import' : ['systemd-networkd'], 'include_directories' : network_includes, } @@ -198,7 +198,7 @@ executables += [ 'dbus' : true, 'conditions' : ['ENABLE_NETWORKD'], 'sources' : systemd_networkd_sources, - 'extract' : systemd_networkd_extract_sources, + 'export' : systemd_networkd_extract_sources, 'include_directories' : network_includes, 'link_with' : [ libsystemd_network, @@ -235,12 +235,12 @@ executables += [ libexec_template + { 'name' : 'systemd-network-generator', 'sources' : files('generator/network-generator-main.c'), - 'extract' : files('generator/network-generator.c'), + 'export' : files('generator/network-generator.c'), 'link_with' : networkd_link_with, }, test_template + { 'sources' : files('generator/test-network-generator.c'), - 'objects' : ['systemd-network-generator'], + 'import' : ['systemd-network-generator'], 'suite' : 'network', }, network_test_template + { diff --git a/src/nspawn/meson.build b/src/nspawn/meson.build index 95bc461cc5..c362aff4ac 100644 --- a/src/nspawn/meson.build +++ b/src/nspawn/meson.build @@ -31,7 +31,7 @@ nspawn_extract_sources += nspawn_gperf_c nspawn_common_template = { 'dependencies' : libseccomp_cflags, - 'objects' : ['systemd-nspawn'], + 'import' : ['systemd-nspawn'], } nspawn_test_template = test_template + nspawn_common_template nspawn_fuzz_template = fuzz_template + nspawn_common_template @@ -41,7 +41,7 @@ executables += [ 'name' : 'systemd-nspawn', 'public' : true, 'sources' : nspawn_sources, - 'extract' : nspawn_extract_sources, + 'export' : nspawn_extract_sources, 'include_directories' : [ include_directories('.'), executable_template['include_directories'], diff --git a/src/nsresourced/meson.build b/src/nsresourced/meson.build index 2037d06bc8..1e950250bb 100644 --- a/src/nsresourced/meson.build +++ b/src/nsresourced/meson.build @@ -23,7 +23,7 @@ executables += [ libexec_template + { 'name' : 'systemd-nsresourced', 'sources' : systemd_nsresourced_sources, - 'extract' : systemd_nsresourced_extract_sources, + 'export' : systemd_nsresourced_extract_sources, 'dependencies' : [ libbpf_cflags, ], @@ -32,13 +32,13 @@ executables += [ libexec_template + { 'name' : 'systemd-nsresourcework', 'sources' : systemd_nsresourcework_sources, - 'objects' : ['systemd-nsresourced'], + 'import' : ['systemd-nsresourced'], 'bpf_programs': ['userns-restrict'], }, test_template + { 'sources' : test_userns_restrict_sources, 'conditions' : ['HAVE_VMLINUX_H'], - 'objects' : ['systemd-nsresourced'], + 'import' : ['systemd-nsresourced'], 'bpf_programs': ['userns-restrict'], }, ] diff --git a/src/oom/meson.build b/src/oom/meson.build index 95541e5542..96ab9bd823 100644 --- a/src/oom/meson.build +++ b/src/oom/meson.build @@ -19,7 +19,7 @@ executables += [ 'name' : 'systemd-oomd', 'dbus' : true, 'sources' : systemd_oomd_sources, - 'extract' : systemd_oomd_extract_sources, + 'export' : systemd_oomd_extract_sources, 'dependencies' : libatomic, }, executable_template + { @@ -29,7 +29,7 @@ executables += [ }, test_template + { 'sources' : files('test-oomd-util.c'), - 'objects' : ['systemd-oomd'], + 'import' : ['systemd-oomd'], 'dependencies' : libatomic, }, ] diff --git a/src/repart/meson.build b/src/repart/meson.build index 721fe73b9a..d7c2edf0d5 100644 --- a/src/repart/meson.build +++ b/src/repart/meson.build @@ -8,7 +8,7 @@ executables += [ executable_template + { 'name' : 'systemd-repart', 'public' : true, - 'extract' : files( + 'export' : files( 'iso9660.c', 'repart.c', 'repart-list-candidate-devices.c', @@ -25,7 +25,7 @@ executables += [ executable_template + { 'name' : 'systemd-repart.standalone', 'public' : true, - 'objects' : ['systemd-repart'], + 'import' : ['systemd-repart'], 'link_with' : [ libc_wrapper_static, libbasic_static, diff --git a/src/resolve/meson.build b/src/resolve/meson.build index 019c4b7bb0..1e0e7e30f3 100644 --- a/src/resolve/meson.build +++ b/src/resolve/meson.build @@ -74,15 +74,15 @@ resolve_common_template = { ], } -resolve_test_template = test_template + resolve_common_template + {'objects' : ['systemd-resolved']} -resolve_fuzz_template = fuzz_template + resolve_common_template + {'objects' : ['systemd-resolved']} +resolve_test_template = test_template + resolve_common_template + {'import' : ['systemd-resolved']} +resolve_fuzz_template = fuzz_template + resolve_common_template + {'import' : ['systemd-resolved']} executables += [ libexec_template + resolve_common_template + { 'name' : 'systemd-resolved', 'dbus' : true, 'sources' : systemd_resolved_sources, - 'extract' : systemd_resolved_extract_sources, + 'export' : systemd_resolved_extract_sources, }, executable_template + resolve_common_template + { 'name' : 'resolvectl', @@ -91,7 +91,7 @@ executables += [ 'resolvconf-compat.c', 'resolvectl.c', ), - 'objects' : ['systemd-resolved'], + 'import' : ['systemd-resolved'], }, resolve_test_template + { 'sources' : files('test-resolve-tables.c'), diff --git a/src/shutdown/meson.build b/src/shutdown/meson.build index 709b0fa692..98669bfdf3 100644 --- a/src/shutdown/meson.build +++ b/src/shutdown/meson.build @@ -12,7 +12,7 @@ shutdown_detach_sources = files( executables += [ libexec_template + { 'name' : 'systemd-shutdown', - 'extract' : files( + 'export' : files( 'detach-dm.c', 'detach-loopback.c', 'detach-md.c', @@ -22,7 +22,7 @@ executables += [ }, libexec_template + { 'name' : 'systemd-shutdown.standalone', - 'objects' : ['systemd-shutdown'], + 'import' : ['systemd-shutdown'], 'link_with' : [ libc_wrapper_static, libbasic_static, diff --git a/src/sleep/meson.build b/src/sleep/meson.build index 7411aa1ceb..663a36e038 100644 --- a/src/sleep/meson.build +++ b/src/sleep/meson.build @@ -4,11 +4,11 @@ executables += [ libexec_template + { 'name' : 'systemd-sleep', 'sources' : files('sleep.c'), - 'extract' : files('battery-capacity.c'), + 'export' : files('battery-capacity.c'), }, test_template + { 'sources' : files('test-battery-capacity.c'), - 'objects' : ['systemd-sleep'], + 'import' : ['systemd-sleep'], }, ] diff --git a/src/ssh-generator/meson.build b/src/ssh-generator/meson.build index f6babb47d3..65e34cfba8 100644 --- a/src/ssh-generator/meson.build +++ b/src/ssh-generator/meson.build @@ -4,7 +4,7 @@ executables += [ generator_template + { 'name' : 'systemd-ssh-generator', 'sources' : files('ssh-generator.c'), - 'extract' : files('ssh-util.c'), + 'export' : files('ssh-util.c'), }, libexec_template + { 'name' : 'systemd-ssh-proxy', @@ -13,7 +13,7 @@ executables += [ libexec_template + { 'name' : 'systemd-ssh-issue', 'sources' : files('ssh-issue.c'), - 'objects' : ['systemd-ssh-generator'], + 'import' : ['systemd-ssh-generator'], }, ] diff --git a/src/systemctl/meson.build b/src/systemctl/meson.build index c287f8a490..150435989d 100644 --- a/src/systemctl/meson.build +++ b/src/systemctl/meson.build @@ -52,7 +52,7 @@ executables += [ 'name' : 'systemctl', 'public' : true, 'sources' : systemctl_sources, - 'extract' : systemctl_extract_sources, + 'export' : systemctl_extract_sources, 'link_with' : systemctl_link_with, 'dependencies' : [ liblz4_cflags, @@ -63,7 +63,7 @@ executables += [ }, fuzz_template + { 'sources' : files('fuzz-systemctl-parse-argv.c'), - 'objects' : ['systemctl'], + 'import' : ['systemctl'], 'link_with' : systemctl_link_with, 'dependencies' : [ libselinux_cflags, diff --git a/src/sysupdate/meson.build b/src/sysupdate/meson.build index ec87326904..f13e70b49f 100644 --- a/src/sysupdate/meson.build +++ b/src/sysupdate/meson.build @@ -29,7 +29,7 @@ executables += [ 'public' : true, 'conditions' : ['ENABLE_SYSUPDATE'], 'sources' : systemd_sysupdate_sources, - 'extract' : systemd_sysupdate_extract_sources, + 'export' : systemd_sysupdate_extract_sources, 'dependencies' : [ libfdisk_cflags, libopenssl_cflags, @@ -45,12 +45,12 @@ executables += [ 'name' : 'updatectl', 'public' : true, 'sources' : systemd_updatectl_sources, - 'objects' : ['systemd-sysupdate'], + 'import' : ['systemd-sysupdate'], 'conditions' : ['ENABLE_SYSUPDATED'], }, test_template + { 'sources' : files('test-sysupdate-util.c'), - 'objects' : ['systemd-sysupdate'], + 'import' : ['systemd-sysupdate'], 'conditions' : ['ENABLE_SYSUPDATE'], }, ] diff --git a/src/sysusers/meson.build b/src/sysusers/meson.build index b74ac6aa1a..9ff149d72d 100644 --- a/src/sysusers/meson.build +++ b/src/sysusers/meson.build @@ -8,13 +8,13 @@ executables += [ executable_template + { 'name' : 'systemd-sysusers', 'public' : true, - 'extract' : files('sysusers.c'), + 'export' : files('sysusers.c'), 'dependencies' : libaudit_cflags, }, executable_template + { 'name' : 'systemd-sysusers.standalone', 'public' : true, - 'objects' : ['systemd-sysusers'], + 'import' : ['systemd-sysusers'], 'link_with' : [ libc_wrapper_static, libbasic_static, diff --git a/src/test/meson.build b/src/test/meson.build index d7353ce8e2..2cb18a798a 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -438,14 +438,14 @@ executables += [ }, test_template + { 'sources' : files('test-nss-hosts.c'), - 'extract' : files('nss-test-util.c'), + 'export' : files('nss-test-util.c'), 'dependencies' : libseccomp_cflags, 'conditions' : ['ENABLE_NSS'], 'timeout' : 120, }, test_template + { 'sources' : files('test-nss-users.c'), - 'objects' : ['test-nss-hosts'], + 'import' : ['test-nss-hosts'], 'conditions' : ['ENABLE_NSS'], }, test_template + { @@ -463,7 +463,7 @@ executables += [ }, test_template + { 'sources' : files('test-qmp-client-qemu.c'), - 'objects' : ['systemd-vmspawn'], + 'import' : ['systemd-vmspawn'], 'conditions' : ['ENABLE_VMSPAWN'], }, test_template + { @@ -517,12 +517,12 @@ executables += [ }, test_template + { 'sources' : files('test-varlink-idl-machine.c'), - 'objects' : ['systemd-machined'], + 'import' : ['systemd-machined'], 'conditions' : ['ENABLE_MACHINED'], }, test_template + { 'sources' : files('test-varlink-idl-login.c'), - 'objects' : ['systemd-logind'], + 'import' : ['systemd-logind'], 'conditions' : ['ENABLE_LOGIND'], }, test_template + { diff --git a/src/timesync/meson.build b/src/timesync/meson.build index c42fcd3e70..d52b16ef7a 100644 --- a/src/timesync/meson.build +++ b/src/timesync/meson.build @@ -33,19 +33,19 @@ executables += [ libexec_template + { 'name' : 'systemd-timesyncd', 'sources' : timesyncd_sources, - 'extract' : timesyncd_extract_sources, + 'export' : timesyncd_extract_sources, 'link_with' : timesyncd_link_with, 'dependencies' : libm, }, libexec_template + { 'name' : 'systemd-time-wait-sync', 'sources' : files('wait-sync.c'), - 'objects' : ['systemd-timesyncd'], + 'import' : ['systemd-timesyncd'], 'dependencies' : libm, }, test_template + { 'sources' : files('test-timesync.c'), - 'objects' : ['systemd-timesyncd'], + 'import' : ['systemd-timesyncd'], 'dependencies' : libm, }, ] diff --git a/src/tmpfiles/meson.build b/src/tmpfiles/meson.build index fcf2749e4b..5f661c1925 100644 --- a/src/tmpfiles/meson.build +++ b/src/tmpfiles/meson.build @@ -10,7 +10,7 @@ executables += [ executable_template + { 'name' : 'systemd-tmpfiles', 'public' : true, - 'extract' : files('tmpfiles.c') + + 'export' : files('tmpfiles.c') + offline_passwd_c, 'dependencies' : [ libacl_cflags, @@ -20,7 +20,7 @@ executables += [ executable_template + { 'name' : 'systemd-tmpfiles.standalone', 'public' : true, - 'objects' : ['systemd-tmpfiles'], + 'import' : ['systemd-tmpfiles'], 'link_with' : [ libc_wrapper_static, libbasic_static, diff --git a/src/udev/meson.build b/src/udev/meson.build index 6c2232c74c..da386ae9c1 100644 --- a/src/udev/meson.build +++ b/src/udev/meson.build @@ -135,7 +135,7 @@ udev_plugin_template = executable_template + { } udev_common_template = { - 'objects' : ['udevadm'], + 'import' : ['udevadm'], 'dependencies' : [ libacl_cflags, libblkid_cflags, @@ -150,7 +150,7 @@ udev_binaries_dict = [ 'public' : true, 'sources' : udevadm_sources + keyboard_keys_from_name_inc, - 'extract' : udevadm_extract_sources, + 'export' : udevadm_extract_sources, 'include_directories' : [ include_directories('.', 'net'), libexec_template['include_directories'], @@ -176,7 +176,7 @@ udev_binaries_dict = [ udev_plugin_template + { 'name' : 'fido_id', 'sources' : files('fido_id/fido_id.c'), - 'extract' : files('fido_id/fido_id_desc.c'), + 'export' : files('fido_id/fido_id_desc.c'), }, udev_plugin_template + { 'name' : 'iocost', @@ -211,7 +211,7 @@ executables += udev_binaries_dict executables += [ test_template + { 'sources' : files('fido_id/test-fido-id-desc.c'), - 'objects' : ['fido_id'], + 'import' : ['fido_id'], 'suite' : 'udev', }, udev_test_template + { @@ -245,7 +245,7 @@ executables += [ }, fuzz_template + { 'sources' : files('fido_id/fuzz-fido-id-desc.c'), - 'objects' : ['fido_id'], + 'import' : ['fido_id'], }, udev_fuzz_template + { 'sources' : files('net/fuzz-link-parser.c'), diff --git a/src/vmspawn/meson.build b/src/vmspawn/meson.build index 76617cc6d4..f804ff8926 100644 --- a/src/vmspawn/meson.build +++ b/src/vmspawn/meson.build @@ -23,14 +23,14 @@ executables += [ 'name' : 'systemd-vmspawn', 'public' : true, 'sources' : vmspawn_sources, - 'extract' : vmspawn_extract_sources, + 'export' : vmspawn_extract_sources, }, test_template + { 'sources' : files('test-vmspawn-util.c'), - 'objects' : ['systemd-vmspawn'], + 'import' : ['systemd-vmspawn'], }, test_template + { 'sources' : files('test-vmspawn-qemu-config.c'), - 'objects' : ['systemd-vmspawn'], + 'import' : ['systemd-vmspawn'], }, ] diff --git a/src/xdg-autostart-generator/meson.build b/src/xdg-autostart-generator/meson.build index 752ee9f8ab..110fe3971d 100644 --- a/src/xdg-autostart-generator/meson.build +++ b/src/xdg-autostart-generator/meson.build @@ -8,7 +8,7 @@ executables += [ executable_template + { 'name' : 'systemd-xdg-autostart-generator', 'sources' : files('xdg-autostart-generator.c'), - 'extract' : files('xdg-autostart-service.c'), + 'export' : files('xdg-autostart-service.c'), 'install_dir' : usergeneratordir, }, libexec_template + { @@ -17,10 +17,10 @@ executables += [ }, test_template + { 'sources' : files('test-xdg-autostart.c'), - 'objects' : ['systemd-xdg-autostart-generator'], + 'import' : ['systemd-xdg-autostart-generator'], }, fuzz_template + { 'sources' : files('fuzz-xdg-desktop.c'), - 'objects' : ['systemd-xdg-autostart-generator'], + 'import' : ['systemd-xdg-autostart-generator'], }, ] From aad1e6101029b0a6f9fb47fb66a918beec2d5475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Jul 2026 13:41:53 +0200 Subject: [PATCH 3/6] meson: adjust naming of '*extract*' variables --- src/analyze/meson.build | 4 ++-- src/busctl/meson.build | 4 ++-- src/coredump/meson.build | 4 ++-- src/home/meson.build | 8 ++++---- src/journal-remote/meson.build | 8 ++++---- src/journal/meson.build | 8 ++++---- src/locale/meson.build | 4 ++-- src/login/meson.build | 6 +++--- src/machine/meson.build | 4 ++-- src/network/meson.build | 6 +++--- src/nspawn/meson.build | 6 +++--- src/nsresourced/meson.build | 4 ++-- src/oom/meson.build | 4 ++-- src/resolve/meson.build | 8 ++++---- src/systemctl/meson.build | 4 ++-- src/sysupdate/meson.build | 4 ++-- src/timesync/meson.build | 6 +++--- src/udev/meson.build | 14 +++++++------- src/vmspawn/meson.build | 4 ++-- 19 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/analyze/meson.build b/src/analyze/meson.build index bd8dc7ccdd..2b8b260c47 100644 --- a/src/analyze/meson.build +++ b/src/analyze/meson.build @@ -40,7 +40,7 @@ systemd_analyze_sources = files( 'analyze-verify.c', 'analyze.c', ) -systemd_analyze_extract_sources = files( +systemd_analyze_export_sources = files( 'analyze-verify-util.c' ) @@ -49,7 +49,7 @@ executables += [ 'name' : 'systemd-analyze', 'public' : conf.get('ENABLE_ANALYZE') == 1, 'sources' : systemd_analyze_sources, - 'export' : systemd_analyze_extract_sources, + 'export' : systemd_analyze_export_sources, 'include_directories' : core_includes, 'link_with' : [ libcore, diff --git a/src/busctl/meson.build b/src/busctl/meson.build index d878bf5186..5395e1420f 100644 --- a/src/busctl/meson.build +++ b/src/busctl/meson.build @@ -3,7 +3,7 @@ busctl_sources = files( 'busctl.c', ) -busctl_extract_sources = files( +busctl_export_sources = files( 'busctl-introspect.c', ) @@ -12,7 +12,7 @@ executables += [ 'name' : 'busctl', 'public' : true, 'sources' : busctl_sources, - 'export' : busctl_extract_sources, + 'export' : busctl_export_sources, }, test_template + { 'sources' : files('test-busctl-introspect.c'), diff --git a/src/coredump/meson.build b/src/coredump/meson.build index b8f6e4d97b..2ae293ae99 100644 --- a/src/coredump/meson.build +++ b/src/coredump/meson.build @@ -14,7 +14,7 @@ systemd_coredump_sources = files( 'coredump-send.c', 'coredump-submit.c', ) -systemd_coredump_extract_sources = files( +systemd_coredump_export_sources = files( 'coredump-vacuum.c', ) @@ -36,7 +36,7 @@ executables += [ libexec_template + { 'name' : 'systemd-coredump', 'sources' : systemd_coredump_sources, - 'export' : systemd_coredump_extract_sources, + 'export' : systemd_coredump_export_sources, 'link_with' : [libshared], 'dependencies' : [ common_dependencies, diff --git a/src/home/meson.build b/src/home/meson.build index 693a5e706f..668a4f7774 100644 --- a/src/home/meson.build +++ b/src/home/meson.build @@ -16,7 +16,7 @@ systemd_homed_sources = files( 'homed.c', 'user-record-sign.c', ) -systemd_homed_extract_sources = files( +systemd_homed_export_sources = files( 'home-util.c', 'user-record-password-quality.c', 'user-record-util.c', @@ -51,7 +51,7 @@ homectl_sources = files( 'homectl.c', ) -homectl_extract = files( +homectl_export_sources = files( 'homectl-prompts.c', ) @@ -66,7 +66,7 @@ executables += [ 'name' : 'systemd-homed', 'dbus' : true, 'sources' : systemd_homed_sources, - 'export' : systemd_homed_extract_sources, + 'export' : systemd_homed_export_sources, 'dependencies' : libopenssl_cflags, }, libexec_template + { @@ -86,7 +86,7 @@ executables += [ 'name' : 'homectl', 'public' : true, 'sources' : homectl_sources, - 'export' : homectl_extract, + 'export' : homectl_export_sources, 'import' : ['systemd-homed'], 'dependencies' : [ libfido2_cflags, diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build index a69858665f..ecd7e6dc4c 100644 --- a/src/journal-remote/meson.build +++ b/src/journal-remote/meson.build @@ -5,7 +5,7 @@ systemd_journal_gatewayd_sources = files( ) systemd_journal_remote_sources = files('journal-remote-main.c') -systemd_journal_remote_extract_sources = files( +systemd_journal_remote_export_sources = files( 'journal-compression-util.c', 'journal-remote-parse.c', 'journal-remote-write.c', @@ -16,7 +16,7 @@ systemd_journal_upload_sources = files( 'journal-upload-journal.c', 'journal-upload.c', ) -systemd_journal_upload_extract_sources = files( +systemd_journal_upload_export_sources = files( 'journal-header-util.c', ) @@ -46,7 +46,7 @@ executables += [ # Instead, we make sure we don't install it when the remote feature is disabled. 'install' : conf.get('ENABLE_REMOTE') == 1, 'sources' : systemd_journal_remote_sources, - 'export' : systemd_journal_remote_extract_sources, + 'export' : systemd_journal_remote_export_sources, 'dependencies' : common_deps + [libmicrohttpd_cflags], }, libexec_template + { @@ -57,7 +57,7 @@ executables += [ 'HAVE_LIBCURL', ], 'sources' : systemd_journal_upload_sources, - 'export' : systemd_journal_upload_extract_sources, + 'export' : systemd_journal_upload_export_sources, 'import' : ['systemd-journal-remote'], 'dependencies' : [ common_deps, diff --git a/src/journal/meson.build b/src/journal/meson.build index 703e9c9fe4..4ddc92484a 100644 --- a/src/journal/meson.build +++ b/src/journal/meson.build @@ -3,7 +3,7 @@ systemd_journald_sources = files( 'journald.c', ) -systemd_journald_extract_sources = files( +systemd_journald_export_sources = files( 'audit-type.c', 'journald-audit.c', 'journald-client.c', @@ -28,7 +28,7 @@ journald_gperf_c = custom_target( command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) generated_sources += journald_gperf_c -systemd_journald_extract_sources += journald_gperf_c +systemd_journald_export_sources += journald_gperf_c generate_audit_type_list = files('generate-audit_type-list.sh') generate_audit_type_command = [env, 'bash', generate_audit_type_list, cpp] @@ -53,7 +53,7 @@ audit_type_to_name = custom_target( capture : true) generated_sources += audit_type_to_name -systemd_journald_extract_sources += audit_type_to_name +systemd_journald_export_sources += audit_type_to_name journalctl_sources = files( 'journalctl.c', @@ -93,7 +93,7 @@ executables += [ libexec_template + { 'name' : 'systemd-journald', 'sources' : systemd_journald_sources, - 'export' : systemd_journald_extract_sources, + 'export' : systemd_journald_export_sources, 'dependencies' : [ libacl_cflags, libaudit_cflags, diff --git a/src/locale/meson.build b/src/locale/meson.build index fa3651ace0..04fd5b1d5d 100644 --- a/src/locale/meson.build +++ b/src/locale/meson.build @@ -7,7 +7,7 @@ endif systemd_localed_sources = files( 'localed.c' ) -systemd_localed_extract_sources = files( +systemd_localed_export_sources = files( 'localed-util.c', 'xkbcommon-util.c', ) @@ -29,7 +29,7 @@ executables += [ 'name' : 'systemd-localed', 'dbus' : true, 'sources' : systemd_localed_sources, - 'export' : systemd_localed_extract_sources, + 'export' : systemd_localed_export_sources, 'dependencies' : libxkbcommon_deps, }, executable_template + { diff --git a/src/login/meson.build b/src/login/meson.build index e718e1f44f..bfb09a2093 100644 --- a/src/login/meson.build +++ b/src/login/meson.build @@ -7,7 +7,7 @@ endif systemd_logind_sources = files( 'logind.c', ) -systemd_logind_extract_sources = files( +systemd_logind_export_sources = files( 'logind-action.c', 'logind-brightness.c', 'logind-button.c', @@ -35,7 +35,7 @@ logind_gperf_c = custom_target( command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) generated_sources += logind_gperf_c -systemd_logind_extract_sources += [logind_gperf_c] +systemd_logind_export_sources += [logind_gperf_c] loginctl_sources = files( 'loginctl.c', @@ -47,7 +47,7 @@ executables += [ 'name' : 'systemd-logind', 'dbus' : true, 'sources' : systemd_logind_sources, - 'export' : systemd_logind_extract_sources, + 'export' : systemd_logind_export_sources, 'dependencies' : [ libacl_cflags, ], diff --git a/src/machine/meson.build b/src/machine/meson.build index 40cab032ec..71dd5042de 100644 --- a/src/machine/meson.build +++ b/src/machine/meson.build @@ -7,7 +7,7 @@ endif systemd_machined_sources = files( 'machined.c' ) -systemd_machined_extract_sources = files( +systemd_machined_export_sources = files( 'image.c', 'image-dbus.c', 'image-varlink.c', @@ -26,7 +26,7 @@ executables += [ 'name' : 'systemd-machined', 'dbus' : true, 'sources' : systemd_machined_sources, - 'export' : systemd_machined_extract_sources, + 'export' : systemd_machined_export_sources, }, executable_template + { 'name' : 'machinectl', diff --git a/src/network/meson.build b/src/network/meson.build index 53e2fa1496..8baa80556f 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -3,7 +3,7 @@ systemd_networkd_sources = files( 'networkd.c' ) -systemd_networkd_extract_sources = files( +systemd_networkd_export_sources = files( 'netdev/bareudp.c', 'netdev/batadv.c', 'netdev/bond.c', @@ -161,7 +161,7 @@ netdev_gperf_c = custom_target( command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) generated_sources += [networkd_gperf_c, networkd_network_gperf_c, netdev_gperf_c] -systemd_networkd_extract_sources += [networkd_gperf_c, networkd_network_gperf_c, netdev_gperf_c] +systemd_networkd_export_sources += [networkd_gperf_c, networkd_network_gperf_c, netdev_gperf_c] if get_option('link-networkd-shared') networkd_link_with = [libshared] @@ -198,7 +198,7 @@ executables += [ 'dbus' : true, 'conditions' : ['ENABLE_NETWORKD'], 'sources' : systemd_networkd_sources, - 'export' : systemd_networkd_extract_sources, + 'export' : systemd_networkd_export_sources, 'include_directories' : network_includes, 'link_with' : [ libsystemd_network, diff --git a/src/nspawn/meson.build b/src/nspawn/meson.build index c362aff4ac..ddf859c63d 100644 --- a/src/nspawn/meson.build +++ b/src/nspawn/meson.build @@ -13,7 +13,7 @@ nspawn_sources = files( 'nspawn-setuid.c', 'nspawn-stub-pid1.c', ) -nspawn_extract_sources = files( +nspawn_export_sources = files( 'nspawn-expose-ports.c', 'nspawn-mount.c', 'nspawn-network.c', @@ -27,7 +27,7 @@ nspawn_gperf_c = custom_target( command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) generated_sources += nspawn_gperf_c -nspawn_extract_sources += nspawn_gperf_c +nspawn_export_sources += nspawn_gperf_c nspawn_common_template = { 'dependencies' : libseccomp_cflags, @@ -41,7 +41,7 @@ executables += [ 'name' : 'systemd-nspawn', 'public' : true, 'sources' : nspawn_sources, - 'export' : nspawn_extract_sources, + 'export' : nspawn_export_sources, 'include_directories' : [ include_directories('.'), executable_template['include_directories'], diff --git a/src/nsresourced/meson.build b/src/nsresourced/meson.build index 1e950250bb..13f6427749 100644 --- a/src/nsresourced/meson.build +++ b/src/nsresourced/meson.build @@ -8,7 +8,7 @@ systemd_nsresourced_sources = files( 'nsresourced-manager.c', 'nsresourced.c', ) -systemd_nsresourced_extract_sources = files( +systemd_nsresourced_export_sources = files( 'userns-restrict.c', 'userns-registry.c', ) @@ -23,7 +23,7 @@ executables += [ libexec_template + { 'name' : 'systemd-nsresourced', 'sources' : systemd_nsresourced_sources, - 'export' : systemd_nsresourced_extract_sources, + 'export' : systemd_nsresourced_export_sources, 'dependencies' : [ libbpf_cflags, ], diff --git a/src/oom/meson.build b/src/oom/meson.build index 96ab9bd823..2c29ff1ee7 100644 --- a/src/oom/meson.build +++ b/src/oom/meson.build @@ -10,7 +10,7 @@ systemd_oomd_sources = files( 'oomd-manager.c', 'oomd-manager-bus.c', ) -systemd_oomd_extract_sources = files( +systemd_oomd_export_sources = files( 'oomd-util.c', ) @@ -19,7 +19,7 @@ executables += [ 'name' : 'systemd-oomd', 'dbus' : true, 'sources' : systemd_oomd_sources, - 'export' : systemd_oomd_extract_sources, + 'export' : systemd_oomd_export_sources, 'dependencies' : libatomic, }, executable_template + { diff --git a/src/resolve/meson.build b/src/resolve/meson.build index 1e0e7e30f3..3181ace1cb 100644 --- a/src/resolve/meson.build +++ b/src/resolve/meson.build @@ -7,7 +7,7 @@ endif systemd_resolved_sources = files( 'resolved.c', ) -systemd_resolved_extract_sources = files( +systemd_resolved_export_sources = files( 'resolved-bus.c', 'resolved-conf.c', 'resolved-dns-browse-services.c', @@ -59,10 +59,10 @@ resolved_dns_delegate_gperf_c = custom_target( command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) generated_sources += [resolved_gperf_c, resolved_dnssd_gperf_c, resolved_dns_delegate_gperf_c] -systemd_resolved_extract_sources += [resolved_gperf_c, resolved_dnssd_gperf_c, resolved_dns_delegate_gperf_c] +systemd_resolved_export_sources += [resolved_gperf_c, resolved_dnssd_gperf_c, resolved_dns_delegate_gperf_c] if conf.get('ENABLE_DNS_OVER_TLS') == 1 - systemd_resolved_extract_sources += files( + systemd_resolved_export_sources += files( 'resolved-dnstls.c', ) endif @@ -82,7 +82,7 @@ executables += [ 'name' : 'systemd-resolved', 'dbus' : true, 'sources' : systemd_resolved_sources, - 'export' : systemd_resolved_extract_sources, + 'export' : systemd_resolved_export_sources, }, executable_template + resolve_common_template + { 'name' : 'resolvectl', diff --git a/src/systemctl/meson.build b/src/systemctl/meson.build index 150435989d..7b75eef43c 100644 --- a/src/systemctl/meson.build +++ b/src/systemctl/meson.build @@ -30,7 +30,7 @@ systemctl_sources = files( 'systemctl-trivial-method.c', 'systemctl-whoami.c', ) -systemctl_extract_sources = files( +systemctl_export_sources = files( 'systemctl-compat-halt.c', 'systemctl-compat-shutdown.c', 'systemctl-daemon-reload.c', @@ -52,7 +52,7 @@ executables += [ 'name' : 'systemctl', 'public' : true, 'sources' : systemctl_sources, - 'export' : systemctl_extract_sources, + 'export' : systemctl_export_sources, 'link_with' : systemctl_link_with, 'dependencies' : [ liblz4_cflags, diff --git a/src/sysupdate/meson.build b/src/sysupdate/meson.build index f13e70b49f..664f439f79 100644 --- a/src/sysupdate/meson.build +++ b/src/sysupdate/meson.build @@ -14,7 +14,7 @@ systemd_sysupdate_sources = files( 'sysupdate-update-set.c', 'sysupdate.c', ) -systemd_sysupdate_extract_sources = files( +systemd_sysupdate_export_sources = files( 'sysupdate-update-set-flags.c', 'sysupdate-util.c', ) @@ -29,7 +29,7 @@ executables += [ 'public' : true, 'conditions' : ['ENABLE_SYSUPDATE'], 'sources' : systemd_sysupdate_sources, - 'export' : systemd_sysupdate_extract_sources, + 'export' : systemd_sysupdate_export_sources, 'dependencies' : [ libfdisk_cflags, libopenssl_cflags, diff --git a/src/timesync/meson.build b/src/timesync/meson.build index d52b16ef7a..896a51c191 100644 --- a/src/timesync/meson.build +++ b/src/timesync/meson.build @@ -8,7 +8,7 @@ timesyncd_sources = files( 'timesyncd.c', 'timesyncd-bus.c', ) -timesyncd_extract_sources = files( +timesyncd_export_sources = files( 'timesyncd-conf.c', 'timesyncd-manager.c', 'timesyncd-server.c', @@ -20,7 +20,7 @@ timesyncd_gperf_c = custom_target( command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) generated_sources += timesyncd_gperf_c -timesyncd_extract_sources += timesyncd_gperf_c +timesyncd_export_sources += timesyncd_gperf_c if get_option('link-timesyncd-shared') timesyncd_link_with = [libshared] @@ -33,7 +33,7 @@ executables += [ libexec_template + { 'name' : 'systemd-timesyncd', 'sources' : timesyncd_sources, - 'export' : timesyncd_extract_sources, + 'export' : timesyncd_export_sources, 'link_with' : timesyncd_link_with, 'dependencies' : libm, }, diff --git a/src/udev/meson.build b/src/udev/meson.build index da386ae9c1..cfbf958ed3 100644 --- a/src/udev/meson.build +++ b/src/udev/meson.build @@ -17,7 +17,7 @@ udevadm_sources = files( 'udevadm.c', 'udevd.c', ) -udevadm_extract_sources = files( +udevadm_export_sources = files( 'net/link-config.c', 'udev-builtin.c', 'udev-builtin-btrfs.c', @@ -48,19 +48,19 @@ udevadm_extract_sources = files( ) if conf.get('HAVE_KMOD') == 1 - udevadm_extract_sources += files('udev-builtin-kmod.c') + udevadm_export_sources += files('udev-builtin-kmod.c') endif if conf.get('HAVE_BLKID') == 1 - udevadm_extract_sources += files('udev-builtin-blkid.c') + udevadm_export_sources += files('udev-builtin-blkid.c') endif if conf.get('HAVE_ACL') == 1 - udevadm_extract_sources += files('udev-builtin-uaccess.c') + udevadm_export_sources += files('udev-builtin-uaccess.c') endif if conf.get('HAVE_TPM2') == 1 - udevadm_extract_sources += files('udev-builtin-tpm2_id.c') + udevadm_export_sources += files('udev-builtin-tpm2_id.c') endif ############################################################ @@ -101,7 +101,7 @@ link_config_gperf_c = custom_target( output : 'link-config-gperf.c', command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) -udevadm_extract_sources += link_config_gperf_c +udevadm_export_sources += link_config_gperf_c generated_sources += link_config_gperf_c ############################################################ @@ -150,7 +150,7 @@ udev_binaries_dict = [ 'public' : true, 'sources' : udevadm_sources + keyboard_keys_from_name_inc, - 'export' : udevadm_extract_sources, + 'export' : udevadm_export_sources, 'include_directories' : [ include_directories('.', 'net'), libexec_template['include_directories'], diff --git a/src/vmspawn/meson.build b/src/vmspawn/meson.build index f804ff8926..8838939229 100644 --- a/src/vmspawn/meson.build +++ b/src/vmspawn/meson.build @@ -13,7 +13,7 @@ vmspawn_sources = files( 'vmspawn-scope.c', 'vmspawn-mount.c', ) -vmspawn_extract_sources = files( +vmspawn_export_sources = files( 'vmspawn-util.c', 'vmspawn-qemu-config.c', ) @@ -23,7 +23,7 @@ executables += [ 'name' : 'systemd-vmspawn', 'public' : true, 'sources' : vmspawn_sources, - 'export' : vmspawn_extract_sources, + 'export' : vmspawn_export_sources, }, test_template + { 'sources' : files('test-vmspawn-util.c'), From 9155c0a5b9e65153b86b738682d2827f1c8761a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Jul 2026 13:28:36 +0200 Subject: [PATCH 4/6] meson: build .standalone versions of the report binaries The goal is to be allow the use of those binaries on systemd with older systemd. The report stuff is generally independent of the running systemd version. When built with -Dinstall-tests=true -Dstandalone-binaries=true -Dbuildtype=release -Db_lto=true, gcc-16.1.1-2.fc44.x86_64, the sizes are quite reasonable: $ ls -lG build-lto/*.standalone -rwxr-xr-x 1 zbyszek 713200 Jul 3 13:16 build-lto/systemd-report.standalone -rwxr-xr-x 1 zbyszek 662936 Jul 3 13:16 build-lto/systemd-report-basic.standalone -rwxr-xr-x 1 zbyszek 567424 Jul 3 13:16 build-lto/systemd-report-cgroup.standalone -rwxr-xr-x 1 zbyszek 592856 Jul 3 13:16 build-lto/systemd-report-files.standalone -rwxr-xr-x 1 zbyszek 589864 Jul 3 13:16 build-lto/systemd-report-sign-plain.standalone -rwxr-xr-x 1 zbyszek 548624 Jul 3 13:16 build-lto/systemd-report-sign-tsm.standalone --- src/report/meson.build | 56 ++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/src/report/meson.build b/src/report/meson.build index cc2cea521e..2c49a97fbf 100644 --- a/src/report/meson.build +++ b/src/report/meson.build @@ -1,10 +1,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -executables += [ - libexec_template + { +report_executables = [ + { 'name' : 'systemd-report', 'public' : true, - 'sources' : files( + 'export' : files( 'report.c', 'report-generate.c', 'report-sign.c', @@ -14,43 +14,63 @@ executables += [ libcurl_cflags, ], }, - - libexec_template + { + { 'name' : 'systemd-report-basic', 'public' : true, - 'sources' : files( - 'report-basic-server.c', + 'export' : files( 'report-basic.c', + 'report-basic-server.c', ), }, - libexec_template + { + { 'name' : 'systemd-report-cgroup', - 'sources' : files( + 'export' : files( 'report-cgroup.c', 'report-cgroup-server.c', ), }, - libexec_template + { + { 'name' : 'systemd-report-files', - 'sources' : files( + 'export' : files( 'report-files.c', 'report-files-server.c', ), }, - libexec_template + { + { 'name' : 'systemd-report-sign-plain', - 'sources' : files( + 'export' : files( 'report-sign-plain.c', ), 'dependencies' : libopenssl_cflags, - 'conditions' : [ - 'HAVE_OPENSSL', - ], + 'conditions' : ['HAVE_OPENSSL'], }, - libexec_template + { + { 'name' : 'systemd-report-sign-tsm', - 'sources' : files( + 'export' : files( 'report-sign-tsm.c', ), }, ] + +foreach exe : report_executables + exe2 = { + 'name' : exe['name'] + '.standalone', + 'import' : [exe['name']], + 'link_with' : [ + libc_wrapper_static, + libbasic_static, + libshared_static, + libsystemd_static, + ] + } + foreach optional : ['public', 'dependencies', 'conditions'] + if optional in exe + exe2 += { optional : exe[optional] } + endif + endforeach + + executables += [ + libexec_template + exe, + libexec_template + exe2, + ] +endforeach From f731334d8491de2ca7948ad798574a12cd303fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Jul 2026 15:32:02 +0200 Subject: [PATCH 5/6] meson: use modern syntax for dict checks --- meson.build | 4 ++-- test/meson.build | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 0c54ef2408..81bf99f415 100644 --- a/meson.build +++ b/meson.build @@ -2354,7 +2354,7 @@ foreach dict : executables sources += exe_sources endif - if dict.has_key('export') + if 'export' in dict exported_by_name += { name : { 'exported' : exe.extract_objects(dict['export']), @@ -2718,7 +2718,7 @@ if meson.version().version_compare('>=1.4.0') uniq = {} foreach source : sources - if uniq.has_key(source.full_path()) + if source.full_path() in uniq continue endif uniq += {source.full_path(): source} diff --git a/test/meson.build b/test/meson.build index fd3dba3a60..f3a8541f8e 100644 --- a/test/meson.build +++ b/test/meson.build @@ -98,7 +98,7 @@ endif ############################################################ test_compare_versions_sh = files('test-compare-versions.sh') -if want_tests != 'false' and executables_by_name.has_key('systemd-analyze') +if want_tests != 'false' and 'systemd-analyze' in executables_by_name exe = executables_by_name.get('systemd-analyze') test('test-compare-versions', test_compare_versions_sh, @@ -156,7 +156,7 @@ endif ############################################################ test_fstab_generator_sh = files('test-fstab-generator.sh') -if want_tests != 'false' and executables_by_name.has_key('systemd-fstab-generator') +if want_tests != 'false' and 'systemd-fstab-generator' in executables_by_name exe = executables_by_name.get('systemd-fstab-generator') test('test-fstab-generator', test_fstab_generator_sh, From e785d81c1b4b62394a07f83429a7852fbdb37629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 7 Jul 2026 18:37:12 +0200 Subject: [PATCH 6/6] mkosi: update fedora commit reference to 57cbcf979ce2dd872a871c59e87d2c65dfa996e6 * 57cbcf979c Also enable report-standalone for OBS builds * d69c17b165 Enable report-standalone for upstream builds --- .packit.yml | 2 +- mkosi/mkosi.pkgenv/mkosi.conf.d/centos-fedora.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.packit.yml b/.packit.yml index 95a19c60bd..482997c376 100644 --- a/.packit.yml +++ b/.packit.yml @@ -51,7 +51,7 @@ jobs: trigger: pull_request fmf_url: https://src.fedoraproject.org/rpms/systemd # This is automatically updated by tools/fetch-distro.py --update fedora - fmf_ref: 45c16dd369c961b70664e473552def34d5469664 + fmf_ref: 57cbcf979ce2dd872a871c59e87d2c65dfa996e6 targets: - fedora-rawhide-x86_64 # testing-farm in the Fedora repository is explicitly configured to use testing-farm bare metal runners as diff --git a/mkosi/mkosi.pkgenv/mkosi.conf.d/centos-fedora.conf b/mkosi/mkosi.pkgenv/mkosi.conf.d/centos-fedora.conf index 221ad4d441..1f919d5676 100644 --- a/mkosi/mkosi.pkgenv/mkosi.conf.d/centos-fedora.conf +++ b/mkosi/mkosi.pkgenv/mkosi.conf.d/centos-fedora.conf @@ -9,5 +9,5 @@ Profiles=!hyperscale Environment= GIT_URL=https://src.fedoraproject.org/rpms/systemd.git GIT_BRANCH=rawhide - GIT_COMMIT=45c16dd369c961b70664e473552def34d5469664 + GIT_COMMIT=57cbcf979ce2dd872a871c59e87d2c65dfa996e6 PKG_SUBDIR=fedora