]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: make nod a feature instead of a boolean 15373/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 24 Mar 2025 08:35:29 +0000 (09:35 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 28 Mar 2025 09:12:39 +0000 (10:12 +0100)
meson/nod/meson.build
pdns/recursordist/meson_options.txt
tasks.py

index ad0c2f418a7c7fb75605d0e7fbd585380641a847..a54a2414db08a8cadc443d7fe8b0a7e4b6f14ced 100644 (file)
@@ -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')
index 75460b80d5d2bc67106c724f6e5863984000c385..9e2931579a74faa2025afd663152cadc0cadfbd0 100644 (file)
@@ -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')
index 5382115724ef4176600743cf7301c96e5da6e05b..efdd8460e7c3a5fe0755cf1996b373f4dcfe64c1 100644 (file)
--- 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",