From ff8b209595fb77a89a43a741e65a0b2c490d4143 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 21 Jun 2018 01:29:49 +0900 Subject: [PATCH] meson: make DNS-over-TLS support optional This adds dns-over-tls option to meson. If set to 'false', systemd-resolved is not linked with libgnutls. --- meson.build | 23 ++++++++++++++++------- meson_options.txt | 2 ++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index a9cf647ed..b176232eb 100644 --- a/meson.build +++ b/meson.build @@ -1298,12 +1298,23 @@ conf.set10('HAVE_DBUS', have) # 'DNSSEC_' + default_dnssec.underscorify().to_upper()) # substs.set('DEFAULT_DNSSEC_MODE', default_dnssec) # +# dns_over_tls = get_option('dns-over-tls') +# if dns_over_tls != 'false' +# have = conf.get('HAVE_GNUTLS') == 1 +# if dns_over_tls == 'true' and not have +# error('DNS-over-TLS support was requested, but dependencies are not available') +# endif +# else +# have = false +# endif +# conf.set10('ENABLE_DNS_OVER_TLS', have) +# # default_dns_over_tls = get_option('default-dns-over-tls') # if fuzzer_build # default_dns_over_tls = 'no' # endif -# if default_dns_over_tls != 'no' and conf.get('HAVE_GNUTLS') == 0 -# message('default-dns-over-tls cannot be set to strict or opportunistic when gnutls is disabled. Setting default-dns-over-tls to no.') +# if default_dns_over_tls != 'no' and conf.get('ENABLE_DNS_OVER_TLS') == 0 +# message('default-dns-over-tls cannot be set to opportunistic when DNS-over-TLS support is disabled. Setting default-dns-over-tls to no.') # default_dns_over_tls = 'no' # endif # conf.set('DEFAULT_DNS_OVER_TLS_MODE', @@ -1805,11 +1816,7 @@ test_dlopen = executable( # link_with : [libshared, # libbasic_gcrypt, # libsystemd_resolve_core], -# dependencies : [threads, -# libgnutls, -# libgpg_error, -# libm, -# libidn], +# dependencies : systemd_resolved_dependencies, # install_rpath : rootlibexecdir, # install : true, # install_dir : rootlibexecdir) @@ -1946,6 +1953,7 @@ executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', +executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', user_runtime_dir_sources, include_directories : includes, @@ -3312,6 +3320,7 @@ foreach tuple : [ # ['localed'], # ['networkd'], # ['resolve'], +# ['DNS-over-TLS'], # ['coredump'], #endif // 0 ['polkit'], diff --git a/meson_options.txt b/meson_options.txt index 3ff9e5d28..487c43c55 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -249,6 +249,8 @@ option('gshadow', type : 'boolean', # description : 'default DNS-over-TLS mode', # choices : ['opportunistic', 'no'], # value : 'no') +# option('dns-over-tls', type : 'combo', choices : ['auto', 'true', 'false'], +# description : 'DNS-over-TLS support') # option('dns-servers', type : 'string', # description : 'space-separated list of default DNS servers', # value : '8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844') -- 2.30.2