From 9fe2b6135b6fc3dc460c8717ccbcf7f7359f0bd0 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 2 Aug 2019 11:07:34 +0200 Subject: [PATCH 1/4] build: fix meson warning about invalid 'depends' keyword Fix this: libnm/meson.build:215: WARNING: Passed invalid keyword argument "depends". WARNING: This will become a hard error in the future. --- libnm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnm/meson.build b/libnm/meson.build index 3aa182dd4..2e65d3beb 100644 --- a/libnm/meson.build +++ b/libnm/meson.build @@ -224,7 +224,7 @@ if enable_introspection extra_args: cflags, header: 'NetworkManager.h', install: true, - depends: libnm_dep, + dependencies: libnm_dep, ) generate_plugin_docs = join_paths(meson.current_source_dir(), 'generate-plugin-docs.pl') From 00bb6cdb4f93f17cbc3f70068d99491eb0fc7726 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 2 Aug 2019 11:18:17 +0200 Subject: [PATCH 2/4] build: fix meson warning about path separator in target Fix the following: WARNING: Target "nm-utils/tests/test-shared-general" has a path separator in its name. This is not supported, it can cause unexpected failures and will become a hard error in the future. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/217 --- shared/meson.build | 24 +++--------------------- shared/nm-utils/tests/meson.build | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 shared/nm-utils/tests/meson.build diff --git a/shared/meson.build b/shared/meson.build index af903d3c8..d542804eb 100644 --- a/shared/meson.build +++ b/shared/meson.build @@ -330,24 +330,6 @@ libnm_systemd_shared_no_logging_dep = declare_dependency( ], ) -############################################################################### - -exe = executable( - 'nm-utils/tests/test-shared-general', - [ 'nm-utils/tests/test-shared-general.c' ], - c_args: [ - '-DNETWORKMANAGER_COMPILATION_TEST', - '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)', - ], - dependencies: [ - shared_nm_glib_aux_dep, - libnm_systemd_shared_no_logging_dep, - shared_c_siphash_dep, - ], -) - -test( - 'shared/nm-utils/tests/test-shared-general', - test_script, - args: test_args + [exe.full_path()] -) +if enable_tests + subdir('nm-utils/tests') +endif diff --git a/shared/nm-utils/tests/meson.build b/shared/nm-utils/tests/meson.build new file mode 100644 index 000000000..e0560f296 --- /dev/null +++ b/shared/nm-utils/tests/meson.build @@ -0,0 +1,22 @@ +test_unit = 'test-shared-general' + +exe = executable( + test_unit, + test_unit + '.c', + c_args: [ + '-DNETWORKMANAGER_COMPILATION_TEST', + '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)', + ], + dependencies: [ + shared_nm_glib_aux_dep, + libnm_systemd_shared_no_logging_dep, + shared_c_siphash_dep, + ], +) + +test( + 'shared/nm-utils/' + test_unit, + test_script, + args: test_args + [exe.full_path()], + timeout: default_test_timeout, +) From 91b9b08e333bb9bb639803bc133fa2d7e48f3ba0 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 2 Aug 2019 11:37:32 +0200 Subject: [PATCH 3/4] build: fix meson warning about wrong custom target argument src/meson.build:294: WARNING: Custom target input 'NetworkManager' can't be converted to File object(s). This will become a hard error in the future. --- src/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index f3f5ee581..a9e7601de 100644 --- a/src/meson.build +++ b/src/meson.build @@ -293,10 +293,9 @@ network_manager_sym = executable( # this uses symbols from nm-full-symbols instead of libNetworkManager.a ver_script = custom_target( symbol_map_name, - input: meson.source_root(), output: symbol_map_name, depends: [ network_manager_sym, core_plugins ], - command: [create_exports_networkmanager, '--called-from-build', '@INPUT@'], + command: [create_exports_networkmanager, '--called-from-build', meson.source_root()], ) ldflags = ['-rdynamic', '-Wl,--version-script,@0@'.format(ver_script.full_path())] From 7c2317a55765f17f6d4213c663728252e0d631af Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 2 Aug 2019 11:59:24 +0200 Subject: [PATCH 4/4] build: fix meson warning about 'install' arg in 'configure_file' WARNING: Project targetting '>= 0.44.0' but tried to use feature introduced in '0.50.0': install arg in configure_file From the documentation: "install (added 0.50.0) When true, this generated file is installed during the install step, and install_dir must be set and not empty. When false, this generated file is not installed regardless of the value of install_dir. When omitted it defaults to true when install_dir is set and not empty, false otherwise." The parameter can be omitted because install_dir is set. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/216 --- data/meson.build | 2 -- dispatcher/meson.build | 1 - 2 files changed, 3 deletions(-) diff --git a/data/meson.build b/data/meson.build index f496bf013..9025eae45 100644 --- a/data/meson.build +++ b/data/meson.build @@ -11,7 +11,6 @@ server = 'server.conf' configure_file( input: server + '.in', output: server, - install: true, install_dir: join_paths(nm_datadir, 'doc', nm_name, 'examples'), configuration: data_conf, ) @@ -32,7 +31,6 @@ if install_systemd_unit_dir configure_file( input: service + '.in', output: service, - install: true, install_dir: systemd_system_unit_dir, configuration: data_conf, ) diff --git a/dispatcher/meson.build b/dispatcher/meson.build index da9ac7f29..0706ab07a 100644 --- a/dispatcher/meson.build +++ b/dispatcher/meson.build @@ -13,7 +13,6 @@ service = 'org.freedesktop.nm_dispatcher.service' configure_file( input: service + '.in', output: service, - install: true, install_dir: dbus_sys_dir, configuration: service_conf, )