From 2811184a0991290d50aef8cbacb2ba6cffd27de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 17 Dec 2018 23:19:06 +0100 Subject: [PATCH 1/4] systemctl: add comment why whitespace in message is needed --- src/systemctl/systemctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index dcea9d22a4..e22f349e43 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -6379,7 +6379,8 @@ static int enable_unit(int argc, char *argv[], void *userdata) { if (carries_install_info == 0 && !ignore_carries_install_info) log_notice("The unit files have no installation config (WantedBy=, RequiredBy=, Also=,\n" "Alias= settings in the [Install] section, and DefaultInstance= for template\n" - "units). This means they are not meant to be enabled using systemctl.\n \n" + "units). This means they are not meant to be enabled using systemctl.\n" + " \n" /* trick: the space is needed so that the line does not get stripped from output */ "Possible reasons for having this kind of units are:\n" "%1$s A unit may be statically enabled by being symlinked from another unit's\n" " .wants/ or .requires/ directory.\n" From 3fa3dc9e44b7a954c20dc7fbcd73347cd3514b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 17 Dec 2018 23:39:17 +0100 Subject: [PATCH 2/4] meson: rename two more variables from _c to _sources _c is misleading because .h files should be included in those lists too (this tells meson that the build outputs should be rebuilt if the header files change). Follow-up for 1437822638ff9468fa78c7cfe56f8f55f955a61d. --- src/libsystemd/meson.build | 6 +++--- src/udev/meson.build | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsystemd/meson.build b/src/libsystemd/meson.build index f441bb6972..337a7eba25 100644 --- a/src/libsystemd/meson.build +++ b/src/libsystemd/meson.build @@ -6,7 +6,7 @@ id128_sources = files(''' sd-id128/sd-id128.c '''.split()) -sd_daemon_c = files('sd-daemon/sd-daemon.c') +sd_daemon_sources = files('sd-daemon/sd-daemon.c') sd_event_sources = files(''' sd-event/event-source.h @@ -15,7 +15,7 @@ sd_event_sources = files(''' sd-event/sd-event.c '''.split()) -sd_login_c = files('sd-login/sd-login.c') +sd_login_sources = files('sd-login/sd-login.c') libsystemd_sources = files(''' sd-bus/bus-common-errors.c @@ -90,7 +90,7 @@ libsystemd_sources = files(''' sd-path/sd-path.c sd-resolve/sd-resolve.c sd-utf8/sd-utf8.c -'''.split()) + id128_sources + sd_daemon_c + sd_event_sources + sd_login_c +'''.split()) + id128_sources + sd_daemon_sources + sd_event_sources + sd_login_sources disable_mempool_c = files('disable-mempool.c') diff --git a/src/udev/meson.build b/src/udev/meson.build index 53d65f99f2..e378d9190c 100644 --- a/src/udev/meson.build +++ b/src/udev/meson.build @@ -54,7 +54,7 @@ endif if conf.get('HAVE_ACL') == 1 libudev_core_sources += ['udev-builtin-uaccess.c', logind_acl_c, - sd_login_c] + sd_login_sources] endif ############################################################ From c512dfb9ac948ddb1ced0dab07b9dac88b198293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 18 Dec 2018 00:02:11 +0100 Subject: [PATCH 3/4] meson: print EFI CC configuration nicely In 595343fb4c99c2679d347ef7c19debfbfed6342e it was converted to an array. This doesn't look good in the output. Let's convert it back to a string. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d8e35e618d..1bf1c892c5 100644 --- a/meson.build +++ b/meson.build @@ -3125,7 +3125,7 @@ if conf.get('ENABLE_EFI') == 1 if have_gnu_efi status += [ 'EFI machine type: @0@'.format(EFI_MACHINE_TYPE_NAME), - 'EFI CC @0@'.format(efi_cc), + 'EFI CC @0@'.format(' '.join(efi_cc)), 'EFI lib directory: @0@'.format(efi_libdir), 'EFI lds directory: @0@'.format(efi_ldsdir), 'EFI include directory: @0@'.format(efi_incdir)] From 568ef98723ce3cb803ae33affca97048da285a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 18 Dec 2018 08:53:48 +0100 Subject: [PATCH 4/4] test-mountpoint-util: more debug info --- src/test/test-mountpoint-util.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/test/test-mountpoint-util.c b/src/test/test-mountpoint-util.c index 767a9fbbef..6d8bee0d63 100644 --- a/src/test/test-mountpoint-util.c +++ b/src/test/test-mountpoint-util.c @@ -18,6 +18,8 @@ static void test_mount_propagation_flags(const char *name, int ret, unsigned long expected) { long unsigned flags; + log_info("/* %s(%s) */", __func__, name); + assert_se(mount_propagation_flags_from_string(name, &flags) == ret); if (ret >= 0) { @@ -41,6 +43,8 @@ static void test_mnt_id(void) { void *k; int r; + log_info("/* %s */", __func__); + assert_se(f = fopen("/proc/self/mountinfo", "re")); assert_se(h = hashmap_new(&trivial_hash_ops)); @@ -55,6 +59,8 @@ static void test_mnt_id(void) { assert_se(sscanf(line, "%i %*s %*s %*s %ms", &mnt_id, &path) == 2); + log_debug("mountinfo: %s → %i", path, mnt_id); + assert_se(hashmap_put(h, INT_TO_PTR(mnt_id), path) >= 0); path = NULL; } @@ -68,14 +74,16 @@ static void test_mnt_id(void) { continue; } - log_debug("mnt id of %s is %i\n", p, mnt_id2); + log_debug("mnt ids of %s are %i, %i\n", p, mnt_id, mnt_id2); if (mnt_id == mnt_id2) continue; - /* The ids don't match? If so, then there are two mounts on the same path, let's check if that's really - * the case */ - assert_se(path_equal_ptr(hashmap_get(h, INT_TO_PTR(mnt_id2)), p)); + /* The ids don't match? If so, then there are two mounts on the same path, let's check if + * that's really the case */ + char *t = hashmap_get(h, INT_TO_PTR(mnt_id2)); + log_debug("the other path for mnt id %i is %s\n", mnt_id2, t); + assert_se(path_equal(p, t)); } hashmap_free_free(h); @@ -88,6 +96,8 @@ static void test_path_is_mount_point(void) { _cleanup_free_ char *dir1 = NULL, *dir1file = NULL, *dirlink1 = NULL, *dirlink1file = NULL; _cleanup_free_ char *dir2 = NULL, *dir2file = NULL; + log_info("/* %s */", __func__); + assert_se(path_is_mount_point("/", NULL, AT_SYMLINK_FOLLOW) > 0); assert_se(path_is_mount_point("/", NULL, 0) > 0); assert_se(path_is_mount_point("//", NULL, AT_SYMLINK_FOLLOW) > 0);