From a50529df17b3f57941bccecbf0191a4198f14c25 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 24 Mar 2025 09:35:29 +0100 Subject: [PATCH] rec: make nod a feature instead of a boolean --- meson/nod/meson.build | 21 +++++++++++++++------ pdns/recursordist/meson_options.txt | 8 +++----- tasks.py | 4 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/meson/nod/meson.build b/meson/nod/meson.build index ad0c2f418a..a54a2414db 100644 --- a/meson/nod/meson.build +++ b/meson/nod/meson.build @@ -1,13 +1,22 @@ opt_nod = get_option('nod') -if not dep_boost_filesystem.found() and opt_nod - error('NOD support was requested but boost filesystem module not found') +if opt_nod.enabled() + if not dep_boost_filesystem.found() + error('NOD support was requested but boost filesystem module not found') + endif + if not dep_probds.found() + error('NOD support was requested but probds not found') + endif endif -enable_nod = dep_boost_filesystem.found() and opt_nod -dep_nod = declare_dependency( - dependencies: [dep_boost_filesystem, dep_probds], -) +enable_nod = opt_nod.allowed() and dep_boost_filesystem.found() and dep_probds.found() +if enable_nod + dep_nod = declare_dependency( + dependencies: [dep_boost_filesystem, dep_probds], + ) +else + dep_nod = dependency('', required: false) +endif conf.set('NOD_ENABLED', enable_nod, description: 'NOD') summary('NOD', enable_nod, bool_yn: true, section: 'Configuration') diff --git a/pdns/recursordist/meson_options.txt b/pdns/recursordist/meson_options.txt index 75460b80d5..9e2931579a 100644 --- a/pdns/recursordist/meson_options.txt +++ b/pdns/recursordist/meson_options.txt @@ -3,15 +3,13 @@ option('hardening', type: 'feature', value: 'auto', description: 'Compiler secur option('hardening-experimental-cf', type: 'combo', choices: ['disabled', 'full', 'branch', 'return', 'check'], value: 'disabled', description: 'Control Flow hardening') option('hardening-experimental-scp', type: 'feature', value: 'disabled', description: 'Stack Clash Protection') option('hardening-fortify-source', type: 'combo', choices: ['auto', 'disabled', '1', '2', '3'], value: '2', description: 'Source fortification level') -#option('rng-kiss', type: 'boolean', value: false, description: 'Use the unsafe KISS RNG') option('signers-libsodium', type: 'feature', value: 'auto', description: 'Enable libsodium-based signers') option('signers-libcrypto', type: 'feature', value: 'auto', description: 'Enable OpenSSL libcrypto-based signers)') option('signers-libcrypto-path', type: 'string', value: '', description: 'Custom path to find OpenSSL libcrypto') option('tls-libssl', type: 'feature', value: 'auto', description: 'OpenSSL-based TLS') -option('dns-over-tls', type: 'feature', value: 'auto', description: 'DNS over TLS (requires GnuTLS or OpenSSL)') +option('dns-over-tls', type: 'feature', value: 'auto', description: 'DNS over TLS (requires OpenSSL)') option('unit-tests', type: 'boolean', value: false, description: 'Build and run unit tests') -# not relevant for rec, but accessed by boost meson.build -option('unit-tests-backends', type: 'boolean', value: false, description: 'Build and run backend unit tests') +option('unit-tests-backends', type: 'boolean', value: false, description: 'Not relevant for recursor') option('reproducible', type: 'boolean', value: false, description: 'Reproducible builds (for distro maintainers, makes debugging difficult)') option('systemd-service', type: 'feature', value: 'auto', description: 'Systemd integration (requires libsystemd)') option('systemd-service-user', type: 'string', value: 'pdns', description: 'Systemd service user (setuid and unit file; user is not created)') @@ -22,5 +20,5 @@ option('socket-dir', type: 'string', value: '/var/run', description: 'Where the option('snmp', type: 'feature', value: 'disabled', description: 'Enable SNMP') option('dnstap', type: 'feature', value: 'auto', description: 'Enable DNSTAP support through libfstrm') option('libcurl', type: 'feature', value: 'auto', description: 'Enable Curl support') -option('nod', type: 'boolean', value: true, description: 'Enable Newly Observed Domains') +option('nod', type: 'feature', value: 'enabled', description: 'Enable Newly Observed Domains') option('libcap', type: 'feature', value: 'auto', description: 'Enable libcap for capabilities handling') diff --git a/tasks.py b/tasks.py index 5382115724..efdd8460e7 100644 --- a/tasks.py +++ b/tasks.py @@ -594,7 +594,7 @@ def ci_rec_configure_meson(c, features, build_dir): get_base_configure_cmd_meson(build_dir), "-D prefix=/opt/pdns-recursor", "-D dns-over-tls=enabled", - "-D nod=true", + "-D nod=enabled", "-D libcap=enabled", "-D lua=luajit", "-D snmp=enabled", @@ -607,7 +607,7 @@ def ci_rec_configure_meson(c, features, build_dir): "-D prefix=/opt/pdns-recursor", "-D dns-over-tls=disabled", "-D dnstap=disabled", - "-D nod=false", + "-D nod=disabled", "-D systemd-service=disabled", "-D lua=luajit", "-D libcap=disabled", -- 2.47.2