From 67b1c943cb490cee79fb926deefaa337733b4c30 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 20 Jun 2023 06:05:53 +0900 Subject: [PATCH 1/5] meson: add dependency for udev runner to test --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 5d98f742e6..ed4b093e4e 100644 --- a/meson.build +++ b/meson.build @@ -4555,12 +4555,12 @@ if want_tests != 'false' and static_libudev_pic endif if want_tests != 'false' - udev_rule_runner = TESTS['udev-rule-runner'].full_path() - + exe = TESTS.get('udev-rule-runner') test('test-udev', test_udev_py, args : ['-v'], - env : ['UDEV_RULE_RUNNER=@0@'.format(udev_rule_runner)], + env : ['UDEV_RULE_RUNNER=' + exe.full_path()], + depends : exe, timeout : 180) endif From d37dee7450c67e94c2afdeafe13afeba8ebb48af Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 20 Jun 2023 06:08:17 +0900 Subject: [PATCH 2/5] meson: also build symbol tests for static-libsystemd=no-pic --- meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index ed4b093e4e..8525b104dd 100644 --- a/meson.build +++ b/meson.build @@ -4519,10 +4519,10 @@ exe = executable( threads, userspace, ], - build_by_default : want_tests != 'false' and static_libsystemd_pic, - install : install_tests and static_libsystemd_pic, + build_by_default : want_tests != 'false' and static_libsystemd != 'false', + install : install_tests and static_libsystemd != 'false', install_dir : unittestsdir) -if want_tests != 'false' and static_libsystemd_pic +if want_tests != 'false' and static_libsystemd != 'false' test('test-libsystemd-static-sym', exe) endif @@ -4547,10 +4547,10 @@ exe = executable( c_args : ['-Wno-deprecated-declarations'] + test_cflags, link_with : [install_libudev_static], dependencies : userspace, - build_by_default : want_tests != 'false' and static_libudev_pic, - install : install_tests and static_libudev_pic, + build_by_default : want_tests != 'false' and static_libudev != 'false', + install : install_tests and static_libudev != 'false', install_dir : unittestsdir) -if want_tests != 'false' and static_libudev_pic +if want_tests != 'false' and static_libudev != 'false' test('test-libudev-static-sym', exe) endif From e04e42312d28d20d30b721f2827f6bc20ea8aab7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 20 Jun 2023 06:28:56 +0900 Subject: [PATCH 3/5] meson: drop wrong and redundant assignment Follow-up for b62ee354dd68349812f0526622c4e164b4a89f5f. --- meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/meson.build b/meson.build index 8525b104dd..ec77294360 100644 --- a/meson.build +++ b/meson.build @@ -4248,9 +4248,6 @@ executable( install_rpath : rootpkglibdir, install : have_standalone_binaries, install_dir : rootlibexecdir) -if have_standalone_binaries - public_programs += exe -endif executable( 'systemd-update-done', From 1782534bb1db597d28bfa9dbcb74b3052c733915 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 20 Jun 2023 08:06:43 +0900 Subject: [PATCH 4/5] meson: shorten code a bit --- meson.build | 8 ++------ src/kernel-install/meson.build | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index ec77294360..5e26f7a7e7 100644 --- a/meson.build +++ b/meson.build @@ -1842,9 +1842,6 @@ else endif conf.set10('ENABLE_IMPORTD', have) -want_kernel_install = get_option('kernel-install') -conf.set10('ENABLE_KERNEL_INSTALL', want_kernel_install) - want_homed = get_option('homed') if want_homed != 'false' have = (conf.get('HAVE_OPENSSL') == 1 and @@ -1861,9 +1858,6 @@ conf.set10('ENABLE_HOMED', have) have = have and conf.get('HAVE_PAM') == 1 conf.set10('ENABLE_PAM_HOME', have) -have = get_option('oomd') -conf.set10('ENABLE_OOMD', have) - want_remote = get_option('remote') if want_remote != 'false' have_deps = [conf.get('HAVE_MICROHTTPD') == 1, @@ -1896,6 +1890,7 @@ foreach term : ['analyze', 'idn', 'ima', 'initrd', + 'kernel-install', 'ldconfig', 'localed', 'logind', @@ -1904,6 +1899,7 @@ foreach term : ['analyze', 'nscd', 'nss-myhostname', 'nss-systemd', + 'oomd', 'portabled', 'pstore', 'quotacheck', diff --git a/src/kernel-install/meson.build b/src/kernel-install/meson.build index 6d568966d6..29a3d2c5f6 100644 --- a/src/kernel-install/meson.build +++ b/src/kernel-install/meson.build @@ -1,5 +1,7 @@ # SPDX-License-Identifier: LGPL-2.1-or-later +want_kernel_install = conf.get('ENABLE_KERNEL_INSTALL') == 1 + ukify_install = custom_target( '60-ukify.install', input : '60-ukify.install.in', From c20d291416c1fa76a03dccfc0fa2c2440bcd70cb Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 20 Jun 2023 08:20:12 +0900 Subject: [PATCH 5/5] meson: fix test dependency Follow-up for daf4e78e4841a527ba62da48fd00e2e6b8805193. --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 5e26f7a7e7..dc614dcd52 100644 --- a/meson.build +++ b/meson.build @@ -4447,11 +4447,11 @@ foreach test : tests versiondep, ] - name = fs.stem(sources[0]) + name = fs.name(sources[0]) if not name.endswith('.cc') deps += [userspace] endif - name = name.split('.')[0] + name = fs.stem(name) suite = fs.name(fs.parent(sources[0])).replace('sd-', '')