From 11fa81bf77bef4b6e9852675cd4ded35d4cc571d Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 3 Mar 2023 14:33:52 +0900 Subject: [PATCH 1/5] meson: add missing man rules for new sd-login functions Follow-up for d71f5b1217986a18e8ddaef3191afddfe731b2d7, c4ef14dc2a0eaae6b93d41e5c82f50ee86e480a4, and d622fefc008ce1cd3bf62ced4a606d3b5277b9fa. --- man/rules/meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/man/rules/meson.build b/man/rules/meson.build index 1279004161..2bf5936d64 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -845,16 +845,19 @@ manpages = [ 'sd_session_get_remote_user', 'sd_session_get_seat', 'sd_session_get_service', + 'sd_session_get_start_time', 'sd_session_get_state', 'sd_session_get_tty', 'sd_session_get_type', 'sd_session_get_uid', + 'sd_session_get_username', 'sd_session_get_vt', 'sd_session_is_remote'], 'HAVE_PAM'], ['sd_uid_get_state', '3', ['sd_uid_get_display', + 'sd_uid_get_login_time', 'sd_uid_get_seats', 'sd_uid_get_sessions', 'sd_uid_is_on_seat'], From 26ab5ea69d7b7804d0e9a7f4773443902c76c654 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 3 Mar 2023 14:48:56 +0900 Subject: [PATCH 2/5] tools: fix the file name that "meson setup" generates --- tools/meson-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/meson-build.sh b/tools/meson-build.sh index ecd558f8d9..c8370a7e6a 100755 --- a/tools/meson-build.sh +++ b/tools/meson-build.sh @@ -10,7 +10,7 @@ CC="$5" CXX="$6" # shellcheck disable=SC2086 -[ -f "$dst/ninja.build" ] || CC="$CC" CXX="$CXX" meson "$src" "$dst" $options +[ -f "$dst/build.ninja" ] || CC="$CC" CXX="$CXX" meson "$src" "$dst" $options # Locate ninja binary, on CentOS 7 it is called ninja-build, so # use that name if available. From d2ec38e2b2d7baa374ffbd0f81f1183e78ce1ca6 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 3 Mar 2023 14:54:21 +0900 Subject: [PATCH 3/5] meson: rename conflicting target names The update-man-rules and update-dbus-docs targets are both declared in the main meson.build and man/meson.build, so we cannot build the target with 'meson compile' command: ==== $ meson compile update-man-rules INFO: autodetecting backend as ninja ERROR: Can't invoke target `update-man-rules`: ambiguous name.Add target type and/or path: - ./man/update-man-rules:custom - ./update-man-rules:run ==== Let's rename the targets declared in man/meson.build. --- man/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/meson.build b/man/meson.build index b7725ce5f0..23819d03f5 100644 --- a/man/meson.build +++ b/man/meson.build @@ -218,7 +218,7 @@ configure_file( ############################################################ update_dbus_docs = custom_target( - 'update-dbus-docs', + 'update-dbus-docs-impl', output : 'update-dbus-docs', command : [update_dbus_docs_py, '--build-dir', project_build_root, '@INPUT@'], input : dbus_docs) @@ -232,7 +232,7 @@ if conf.get('BUILD_MODE_DEVELOPER') == 1 endif update_man_rules = custom_target( - 'update-man-rules', + 'update-man-rules-impl', output : 'update-man-rules', command : [update_man_rules_py, '@0@/man/*.xml'.format(project_source_root), From e3b2f7c056551fa50ba6ed13703b8e63ba8303c7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 3 Mar 2023 20:06:09 +0900 Subject: [PATCH 4/5] tools: explicitly specify "setup" subcommand As invoking meson without subcommand is deprecated since 0.64.0. --- tools/meson-build.sh | 2 +- tools/oss-fuzz.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/meson-build.sh b/tools/meson-build.sh index c8370a7e6a..2ef60cfa8e 100755 --- a/tools/meson-build.sh +++ b/tools/meson-build.sh @@ -10,7 +10,7 @@ CC="$5" CXX="$6" # shellcheck disable=SC2086 -[ -f "$dst/build.ninja" ] || CC="$CC" CXX="$CXX" meson "$src" "$dst" $options +[ -f "$dst/build.ninja" ] || CC="$CC" CXX="$CXX" meson setup "$src" "$dst" $options # Locate ninja binary, on CentOS 7 it is called ninja-build, so # use that name if available. diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh index 7e9312b833..2e64475c6d 100755 --- a/tools/oss-fuzz.sh +++ b/tools/oss-fuzz.sh @@ -73,7 +73,7 @@ else fi fi -if ! meson "$build" "-D$fuzzflag" -Db_lundef=false; then +if ! meson setup "$build" "-D$fuzzflag" -Db_lundef=false; then cat "$build/meson-logs/meson-log.txt" exit 1 fi From 695253466b6108dbed85af05360adc293e81cee7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 3 Mar 2023 20:15:07 +0900 Subject: [PATCH 5/5] meson: show options about tests in the summary --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 2576153536..5e7cb92a83 100644 --- a/meson.build +++ b/meson.build @@ -4608,6 +4608,8 @@ foreach tuple : [ ['debug mmap cache'], ['debug siphash'], ['trace logging', conf.get('LOG_TRACE') == 1], + ['slow tests', slow_tests], + ['fuzz tests', fuzz_tests], ['install tests', install_tests], ['link-udev-shared', get_option('link-udev-shared')], ['link-systemctl-shared', get_option('link-systemctl-shared')],