summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-02-24 11:52:51 +0100
committerThomas Haller <thaller@redhat.com>2021-02-28 10:42:04 +0100
commit309dccf5f91fc45d8a12e1f8724e38ef41954276 (patch)
tree57d35da59fdf340c6c92f7d77d0168fee92b71fc
parent2665b91288fb98130dc81c778dbba546d4209eac (diff)
build/meson: cleanup libnm-glib-aux dependencies
Avoid dependencies but explicitly link the static library where it is used. This also fixes that we linked libnm-log-core into libnm-settings-plugin-ifcfg-rh.so, which duplicated the symbols while it should used them from NetworkManager.
-rw-r--r--clients/cli/meson.build14
-rw-r--r--clients/cloud-setup/meson.build9
-rw-r--r--clients/cloud-setup/tests/meson.build7
-rw-r--r--clients/common/tests/meson.build16
-rw-r--r--clients/meson.build7
-rw-r--r--clients/tui/meson.build9
-rw-r--r--dispatcher/meson.build9
-rw-r--r--dispatcher/tests/meson.build11
-rw-r--r--src/core/initrd/meson.build3
-rw-r--r--src/core/meson.build9
-rw-r--r--src/core/ppp/meson.build6
-rw-r--r--src/libnm-base/meson.build13
-rw-r--r--src/libnm-client-impl/meson.build6
-rw-r--r--src/libnm-client-impl/tests/meson.build4
-rw-r--r--src/libnm-client-test/meson.build1
-rw-r--r--src/libnm-core-aux-extern/meson.build2
-rw-r--r--src/libnm-core-aux-intern/meson.build1
-rw-r--r--src/libnm-core-impl/meson.build3
-rw-r--r--src/libnm-glib-aux/meson.build19
-rw-r--r--src/libnm-glib-aux/tests/meson.build26
-rw-r--r--src/libnm-log-core/meson.build3
-rw-r--r--src/libnm-platform/meson.build3
-rw-r--r--src/libnm-platform/tests/meson.build10
23 files changed, 131 insertions, 60 deletions
diff --git a/clients/cli/meson.build b/clients/cli/meson.build
index 8feaefd8e4..5111250423 100644
--- a/clients/cli/meson.build
+++ b/clients/cli/meson.build
@@ -28,9 +28,14 @@ executable(
libnm_core_aux_extern_dep_link,
libnm_core_aux_intern_dep_link,
libnm_base_dep_link,
- libnm_glib_aux_dep_link,
+ glib_dep,
readline_dep,
],
+ link_with: [
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
+ ],
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
install: true,
@@ -50,7 +55,12 @@ generate_docs_nm_settings_nmcli = executable(
libnm_core_aux_extern_dep_link,
libnm_core_aux_intern_dep_link,
libnm_base_dep_link,
- libnm_glib_aux_dep_link,
+ glib_dep,
+ ],
+ link_with: [
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
diff --git a/clients/cloud-setup/meson.build b/clients/cloud-setup/meson.build
index e8b74b7a03..3872aa875e 100644
--- a/clients/cloud-setup/meson.build
+++ b/clients/cloud-setup/meson.build
@@ -55,10 +55,15 @@ executable(
libnmc_dep,
libnm_core_aux_intern_dep_link,
libnm_core_aux_extern_dep_link,
- libnm_glib_aux_dep_link,
libcurl_dep,
+ glib_dep,
+ ],
+ link_with: [
+ libnm_log_null,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
- link_with: libnm_log_null,
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
install: true,
diff --git a/clients/cloud-setup/tests/meson.build b/clients/cloud-setup/tests/meson.build
index 2f7255401a..65d8d48f9a 100644
--- a/clients/cloud-setup/tests/meson.build
+++ b/clients/cloud-setup/tests/meson.build
@@ -7,7 +7,12 @@ exe = executable(
libnm_cloud_setup_core_dep,
libnmc_base_dep,
libnmc_dep,
- libnm_glib_aux_dep_link,
+ glib_dep,
+ ],
+ link_with: [
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
)
diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build
index ef74e97dff..67bad1802e 100644
--- a/clients/common/tests/meson.build
+++ b/clients/common/tests/meson.build
@@ -8,8 +8,13 @@ exe = executable(
libnmc_dep,
libnm_core_aux_intern_dep_link,
libnm_core_aux_extern_dep_link,
- libnm_glib_aux_dep_link,
libnm_base_dep_link,
+ glib_dep,
+ ],
+ link_with: [
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
)
@@ -26,9 +31,14 @@ exe = executable(
libnm_dep,
libnm_core_aux_extern_dep_link,
libnm_nm_default_dep,
- libnm_glib_aux_dep_link,
+ glib_dep,
+ ],
+ link_with: [
+ libnm_log_null,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
- link_with: libnm_log_null,
)
test(
diff --git a/clients/meson.build b/clients/meson.build
index 3d360e0f1a..7a677cc25e 100644
--- a/clients/meson.build
+++ b/clients/meson.build
@@ -7,7 +7,12 @@ executable(
libnm_dep,
libnm_nm_default_dep,
libnm_client_aux_extern_dep,
- libnm_glib_aux_dep_link,
+ glib_dep,
+ ],
+ link_with: [
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
diff --git a/clients/tui/meson.build b/clients/tui/meson.build
index d421238869..bd2bc9011a 100644
--- a/clients/tui/meson.build
+++ b/clients/tui/meson.build
@@ -54,9 +54,14 @@ executable(
libnm_core_aux_extern_dep_link,
libnm_core_aux_intern_dep_link,
libnm_base_dep_link,
- libnm_glib_aux_dep_link,
+ glib_dep,
+ ],
+ link_with: [
+ libnm_log_null,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
- link_with: libnm_log_null,
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
install: true,
diff --git a/dispatcher/meson.build b/dispatcher/meson.build
index 0bfa4590a5..722da874c9 100644
--- a/dispatcher/meson.build
+++ b/dispatcher/meson.build
@@ -38,9 +38,14 @@ executable(
libnm_dep,
libnm_nm_default_dep,
libnm_core_aux_extern_dep_link,
- libnm_glib_aux_dep_link,
+ glib_dep,
+ ],
+ link_with: [
+ libnm_dispatcher_core,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
- link_with: libnm_dispatcher_core,
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
install: true,
diff --git a/dispatcher/tests/meson.build b/dispatcher/tests/meson.build
index 29ef657883..45e7cc23e5 100644
--- a/dispatcher/tests/meson.build
+++ b/dispatcher/tests/meson.build
@@ -6,13 +6,18 @@ exe = executable(
'test-dispatcher-envp.c',
nmdbus_dispatcher_sources,
],
- include_directories: dispatcher_inc,
dependencies: [
libnm_nm_default_dep,
- libnm_glib_aux_dep_link,
+ glib_dep,
],
+ include_directories: dispatcher_inc,
c_args: introspection_extra_cflags,
- link_with: libnm_dispatcher_core,
+ link_with: [
+ libnm_dispatcher_core,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
+ ],
)
test(
diff --git a/src/core/initrd/meson.build b/src/core/initrd/meson.build
index 6544fe8e25..b15b260c1b 100644
--- a/src/core/initrd/meson.build
+++ b/src/core/initrd/meson.build
@@ -19,6 +19,9 @@ executable(
libnmi_core,
libnm_core_impl,
libnm_base,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
diff --git a/src/core/meson.build b/src/core/meson.build
index 6296e38e00..6425ca7797 100644
--- a/src/core/meson.build
+++ b/src/core/meson.build
@@ -208,8 +208,8 @@ executable(
dl_dep,
libndp_dep,
libudev_dep,
- libnm_glib_aux_dep_link,
libnm_core_impl_dep_link,
+ glib_dep,
],
link_with: [
libNetworkManagerBase,
@@ -217,6 +217,7 @@ executable(
libnm_systemd_shared,
libnm_base,
libnm_glib_aux,
+ libnm_std_aux,
libn_acd,
libn_dhcp4,
libc_rbtree,
@@ -252,6 +253,8 @@ if enable_tests
libNetworkManagerTest,
libnm_base,
libnm_core_impl,
+ libnm_glib_aux,
+ libnm_std_aux,
libn_acd,
libn_dhcp4,
libc_siphash,
@@ -293,6 +296,8 @@ NetworkManager_all_sym = executable(
libNetworkManagerBase,
libnm_core_impl,
libnm_base,
+ libnm_glib_aux,
+ libnm_std_aux,
libn_acd,
libn_dhcp4,
libc_rbtree,
@@ -323,6 +328,8 @@ NetworkManager = executable(
libNetworkManagerBase,
libnm_core_impl,
libnm_base,
+ libnm_glib_aux,
+ libnm_std_aux,
libn_acd,
libn_dhcp4,
libc_rbtree,
diff --git a/src/core/ppp/meson.build b/src/core/ppp/meson.build
index 348d056abe..0f36a17c2f 100644
--- a/src/core/ppp/meson.build
+++ b/src/core/ppp/meson.build
@@ -6,9 +6,13 @@ nm_pppd_plugin = shared_module(
sources: 'nm-pppd-plugin.c',
dependencies: [
libnm_core_impl_dep_link,
- libnm_glib_aux_dep_link,
glib_dep,
],
+ link_with: [
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
+ ],
install: true,
install_dir: pppd_plugin_dir,
)
diff --git a/src/libnm-base/meson.build b/src/libnm-base/meson.build
index 3bcaa781c6..2a8c76881b 100644
--- a/src/libnm-base/meson.build
+++ b/src/libnm-base/meson.build
@@ -9,14 +9,19 @@ libnm_base = static_library(
sources: files(
'nm-ethtool-base.c',
),
- dependencies: libnm_glib_aux_dep_link,
+ dependencies: glib_dep,
)
libnm_base_dep = declare_dependency(
- dependencies: libnm_glib_aux_dep,
+ dependencies: glib_dep,
)
libnm_base_dep_link = declare_dependency(
- dependencies: libnm_glib_aux_dep_link,
- link_with: libnm_base,
+ dependencies: glib_dep,
+ link_with: [
+ libnm_base,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
+ ],
)
diff --git a/src/libnm-client-impl/meson.build b/src/libnm-client-impl/meson.build
index 000f19db33..94125d6b99 100644
--- a/src/libnm-client-impl/meson.build
+++ b/src/libnm-client-impl/meson.build
@@ -89,10 +89,12 @@ libnm = shared_library(
link_whole: [
libnm_client_impl,
libnm_core_impl,
- libnmdbus,
+ libnm_base,
libnm_log_null,
libnm_glib_aux,
- libnm_base,
+ libnm_std_aux,
+ libnmdbus,
+ libc_siphash,
],
link_args: '-Wl,--version-script,@0@'.format(linker_script),
link_depends: linker_script,
diff --git a/src/libnm-client-impl/tests/meson.build b/src/libnm-client-impl/tests/meson.build
index 58e0bbb98a..a82796e496 100644
--- a/src/libnm-client-impl/tests/meson.build
+++ b/src/libnm-client-impl/tests/meson.build
@@ -17,11 +17,15 @@ foreach test_unit: test_units
dependencies: [
libnm_core_impl_dep_link,
libnm_nm_default_dep,
+ glib_dep,
],
link_with: [
libnm_client_impl,
libnm_client_test,
libnm_base,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
libnmdbus,
],
)
diff --git a/src/libnm-client-test/meson.build b/src/libnm-client-test/meson.build
index acf7c39e9e..65686b0ad6 100644
--- a/src/libnm-client-test/meson.build
+++ b/src/libnm-client-test/meson.build
@@ -14,7 +14,6 @@ libnm_client_test = static_library(
dependencies: [
libnm_core_aux_intern_dep,
libnm_core_public_dep,
- libnm_glib_aux_dep,
glib_dep,
],
)
diff --git a/src/libnm-core-aux-extern/meson.build b/src/libnm-core-aux-extern/meson.build
index 89a030f9f3..4e1001adc7 100644
--- a/src/libnm-core-aux-extern/meson.build
+++ b/src/libnm-core-aux-extern/meson.build
@@ -8,7 +8,6 @@ libnm_core_aux_extern = static_library(
dependencies: [
libnm_core_aux_intern_dep,
libnm_core_public_dep,
- libnm_glib_aux_dep,
glib_dep,
],
)
@@ -20,7 +19,6 @@ libnm_core_aux_extern_dep = declare_dependency(
dependencies: [
libnm_core_aux_intern_dep,
libnm_core_public_dep,
- libnm_glib_aux_dep,
glib_dep,
],
)
diff --git a/src/libnm-core-aux-intern/meson.build b/src/libnm-core-aux-intern/meson.build
index 37baa61ef9..8720d1ee3b 100644
--- a/src/libnm-core-aux-intern/meson.build
+++ b/src/libnm-core-aux-intern/meson.build
@@ -8,7 +8,6 @@ libnm_core_aux_intern = static_library(
),
dependencies: [
libnm_core_public_dep,
- libnm_glib_aux_dep,
glib_dep,
],
)
diff --git a/src/libnm-core-impl/meson.build b/src/libnm-core-impl/meson.build
index df283dd607..2fdd064a48 100644
--- a/src/libnm-core-impl/meson.build
+++ b/src/libnm-core-impl/meson.build
@@ -7,7 +7,6 @@ libnm_crypto_nss = static_library(
sources: 'nm-crypto-nss.c',
dependencies: [
libnm_core_public_dep,
- libnm_glib_aux_dep_link,
crypto_nss_dep,
],
)
@@ -17,7 +16,6 @@ libnm_crypto_gnutls = static_library(
sources: 'nm-crypto-gnutls.c',
dependencies: [
libnm_core_public_dep,
- libnm_glib_aux_dep_link,
crypto_gnutls_dep,
],
)
@@ -114,7 +112,6 @@ libnm_core_impl = static_library(
libnm_systemd_shared_dep,
libnm_core_public_dep,
libnm_core_intern_dep,
- libnm_glib_aux_dep_link,
uuid_dep,
],
link_with: [
diff --git a/src/libnm-glib-aux/meson.build b/src/libnm-glib-aux/meson.build
index e9c8544c38..39eccbdfca 100644
--- a/src/libnm-glib-aux/meson.build
+++ b/src/libnm-glib-aux/meson.build
@@ -23,23 +23,4 @@ libnm_glib_aux = static_library(
top_inc,
],
dependencies: glib_dep,
- link_with: [
- libc_siphash,
- libnm_std_aux,
- ],
-)
-
-libnm_glib_aux_dep = declare_dependency(
- include_directories: [
- src_inc,
- top_inc,
- ],
- dependencies: [
- glib_dep,
- ],
-)
-
-libnm_glib_aux_dep_link = declare_dependency(
- dependencies: libnm_glib_aux_dep,
- link_with: libnm_glib_aux,
)
diff --git a/src/libnm-glib-aux/tests/meson.build b/src/libnm-glib-aux/tests/meson.build
index 38dfff0c6c..58b9a29b08 100644
--- a/src/libnm-glib-aux/tests/meson.build
+++ b/src/libnm-glib-aux/tests/meson.build
@@ -3,8 +3,17 @@
exe = executable(
'test-shared-general',
'test-shared-general.c',
- dependencies: libnm_glib_aux_dep_link,
- link_with: libnm_log_null,
+ dependencies: glib_dep,
+ include_directories: [
+ src_inc,
+ top_inc,
+ ],
+ link_with: [
+ libnm_log_null,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
+ ],
)
test(
@@ -19,11 +28,20 @@ if jansson_dep.found()
'test-json-aux',
'test-json-aux.c',
dependencies: [
- libnm_glib_aux_dep_link,
+ glib_dep,
jansson_dep,
dl_dep,
],
- link_with: libnm_log_null,
+ include_directories: [
+ src_inc,
+ top_inc,
+ ],
+ link_with: [
+ libnm_log_null,
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
+ ],
)
test(
diff --git a/src/libnm-log-core/meson.build b/src/libnm-log-core/meson.build
index 3eb9145703..6ec5391b68 100644
--- a/src/libnm-log-core/meson.build
+++ b/src/libnm-log-core/meson.build
@@ -14,8 +14,5 @@ libnm_log_core = static_library(
)
libnm_log_core_dep = declare_dependency(
- dependencies: [
- libnm_glib_aux_dep_link,
- ],
link_with: libnm_log_core,
)
diff --git a/src/libnm-platform/meson.build b/src/libnm-platform/meson.build
index 3300e8f674..2d69d5288f 100644
--- a/src/libnm-platform/meson.build
+++ b/src/libnm-platform/meson.build
@@ -20,8 +20,5 @@ libnm_platform_dep = declare_dependency(
include_directories: [
src_inc,
],
- dependencies: [
- libnm_glib_aux_dep_link,
- ],
link_with: libnm_platform,
)
diff --git a/src/libnm-platform/tests/meson.build b/src/libnm-platform/tests/meson.build
index dd9c3f58ee..ad487f01fb 100644
--- a/src/libnm-platform/tests/meson.build
+++ b/src/libnm-platform/tests/meson.build
@@ -6,6 +6,16 @@ exe = executable(
dependencies: [
libnm_log_core_dep,
libnm_platform_dep,
+ glib_dep,
+ ],
+ include_directories: [
+ src_inc,
+ top_inc,
+ ],
+ link_with: [
+ libnm_glib_aux,
+ libnm_std_aux,
+ libc_siphash,
],
)