]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Tweaks
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 16 Jul 2024 07:18:57 +0000 (09:18 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 16 Jul 2024 07:18:57 +0000 (09:18 +0200)
pdns/recursordist/meson.build
pdns/recursordist/meson_options.txt
pdns/recursordist/settings/generate.py
pdns/recursordist/settings/rust/build_settings
pdns/recursordist/settings/rust/meson.build

index 2c47ffb350c28341ae0f4a591f238fbf7f29a02e..9c92a53b545a3eb7c777af2a9b533a527eb30029 100644 (file)
@@ -48,7 +48,6 @@ subdir('meson' / 'libdecaf')                # Libdecaf-based signers
 subdir('meson' / 'libcrypto')               # OpenSSL-based signers
 subdir('meson' / 'libssl')                  # OpenSSL libssl
 subdir('meson' / 'libsnmp')                 # SNMP
-subdir('meson' / 'gnutls')                  # GnuTLS
 subdir('meson' / 'dot')                     # DNS over TLS
 subdir('meson' / 'clock-gettime')           # Clock_gettime
 subdir('meson' / 'boost')                   # Boost
@@ -208,7 +207,7 @@ config_h = configure_file(configuration: conf, output: 'config.h')
 sh_program = find_program('sh')
 dep_no_config_in_source_check = custom_target(
     input: [],
-    output: ['config.h file in source directory check'],
+    output: ['check absense of config.h file in source directory'],
     command: [sh_program, '-c', 'test ! -e @SOURCE_ROOT@/config.h'],
     build_always_stale: true,
 )
@@ -262,7 +261,6 @@ deps = [
   dep_libsnmp,
   dep_libsodium,
   dep_libssl,
-  dep_gnutls,
   dep_lua,
   dep_protozero,
   dep_yahttp,
@@ -273,31 +271,31 @@ deps = [
 
 # Conditional sources that need to be separated into standalone libraries for special
 # linking without implicitly getting rid of symbols.
-libpdns_signers_sodium = dependency('', required: false)
+librec_signers_sodium = dependency('', required: false)
 if dep_libsodium.found()
-  libpdns_signers_sodium = declare_dependency(
+  librec_signers_sodium = declare_dependency(
     link_whole: static_library(
-      'pdns-signers-sodium',
+      'rec-signers-sodium',
       sources: files(src_dir / 'sodiumsigners.cc'),
       dependencies: [dep_boost, dep_libsodium],
     )
   )
 endif
 
-libpdns_signers_decaf = dependency('', required: false)
+librec_signers_decaf = dependency('', required: false)
 if dep_libdecaf.found()
-  libpdns_signers_decaf = declare_dependency(
+  librec_signers_decaf = declare_dependency(
     link_whole: static_library(
-      'pdns-signers-decaf',
+      'rec-signers-decaf',
       sources: files(src_dir / 'decafsigners.cc'),
       dependencies: [dep_boost, dep_libdecaf],
     )
   )
 endif
 
-libpdns_signers_openssl = declare_dependency(
+librec_signers_openssl = declare_dependency(
   link_whole: static_library(
-    'pdns-signers-openssl',
+    'rec-signers-openssl',
     sources: files(src_dir / 'opensslsigners.cc'),
     dependencies: [dep_boost, dep_libssl],
   )
@@ -327,9 +325,9 @@ dep_pubsuffix = declare_dependency(
   sources: pubsuffix_cc
 )
 
-libpdns_dnslabeltext_source = src_dir / 'dnslabeltext.rl'
-libpdns_dnslabeltext_gen    = src_dir / 'dnslabeltext.cc'
-if not fs.is_file(libpdns_dnslabeltext_gen)
+librec_dnslabeltext_source = src_dir / 'dnslabeltext.rl'
+librec_dnslabeltext_gen    = src_dir / 'dnslabeltext.cc'
+if not fs.is_file(librec_dnslabeltext_gen)
   ragel = find_program('ragel', required: true)
 
   summary('Ragel', ragel.found(), bool_yn: ragel.found(), section: 'DNS Labels')
@@ -342,25 +340,25 @@ if not fs.is_file(libpdns_dnslabeltext_gen)
     arguments: ['@INPUT@', '-o', '@OUTPUT@'],
   )
 
-  libpdns_dnslabeltext_gen = ragel_generator.process(libpdns_dnslabeltext_source)
+  librec_dnslabeltext_gen = ragel_generator.process(librec_dnslabeltext_source)
 endif
 
-libpdns_dnslabeltext = declare_dependency(
+librec_dnslabeltext = declare_dependency(
   link_with: static_library(
-    'pdns-dnslabeltext',
-    libpdns_dnslabeltext_gen,
+    'rec-dnslabeltext',
+    librec_dnslabeltext_gen,
     dependencies: deps,
   )
 )
 
-libpdns_common = declare_dependency(
+librec_common = declare_dependency(
   link_with: static_library(
-    'pdns-common',
+    'rec-common',
     common_sources,
     config_h,
     dependencies: [
       deps,
-      libpdns_dnslabeltext,
+      librec_dnslabeltext,
     ],
   )
 )
@@ -388,15 +386,15 @@ tools = {
       dep_settings,
       dep_rust_settings,
       dep_systemd,
-      libpdns_signers_openssl,
-      libpdns_signers_decaf,
-      libpdns_signers_sodium,
+      librec_signers_openssl,
+      librec_signers_decaf,
+      librec_signers_sodium,
       dep_pubsuffix,
     ],
   },
   'rec_control': {
     'main': src_dir / 'rec_control.cc',
-    'manpages': ['pdns_control.1'],
+    'manpages': ['rec_control.1'],
     'deps-extra': [
       dep_boost,
       dep_settings,
@@ -474,9 +472,9 @@ if get_option('unit-tests')
           dep_nod,
           dep_settings,
           dep_rust_settings,
-          libpdns_signers_openssl,
-          libpdns_signers_decaf,
-          libpdns_signers_sodium,
+          librec_signers_openssl,
+          librec_signers_decaf,
+          librec_signers_sodium,
       ],
     )
   )
@@ -513,7 +511,7 @@ foreach tool, info: tools
       files_extra,
       export_dynamic: export_dynamic,
       dependencies: [
-        libpdns_common,
+        librec_common,
         deps_extra,
       ],
     )
index 41d0e7f53dbc310612f580f9ad72b5097d75c5db..52ba9f3acd0a7ce2347bbbbac02f8683d7d65794 100644 (file)
@@ -9,13 +9,14 @@ option('signers-libdecaf', type: 'feature', value: 'auto', description: 'Enable
 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('tls-gnutls', type: 'feature', value: 'auto', description: 'GnuTLS-based TLS')
 option('dns-over-tls', type: 'boolean', value: false, description: 'DNS over TLS (requires GnuTLS or OpenSSL)')
 option('unit-tests', type: 'boolean', value: false, description: 'Build and run unit tests')
-# not relevant for rec, but access by boost meson.build
+# 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('reproducible', type: 'boolean', value: false, description: 'Reproducible builds (for distro maintainers, makes debugging difficult)')
 option('systemd', type: 'feature', value: 'auto', description: 'Systemd notification (requires libsystemd)')
+option('systemd-service-user', type: 'string', value: 'pdns', description: 'Systemd service user (setuid and unit file; user is not created)')
+option('systemd-service-group', type: 'string', value: 'pdns', description: 'Systemd service group (setgid and unit file; group is not created)')
 option('auto-var-init', type: 'combo', value: 'disabled', choices: ['zero', 'pattern', 'disabled'], description: 'Enable initialization of automatic variables')
 option('malloc-trace', type: 'boolean', value: false, description: 'Enable malloc-trace')
 option('socket-dir', type: 'string', value: '/var/run', description: 'Where the control socket lives')
index 94c8015b2af26bb31b7c58a7d4ae5789bac23404..f6d85ea483c94f6acae7a97fee95e91a74466680 100644 (file)
@@ -766,9 +766,8 @@ def generate():
     """Read table, validate and generate C++, Rst and .rst files"""
     srcdir = '.'
     gendir = '.'
-    print(len(sys.argv))
     if len(sys.argv) == 3:
-        print("Using srcdir and gendir from argumens")
+        print("Generate: using srcdir and gendir from argumens")
         srcdir = sys.argv[1]
         gendir = sys.argv[2]
 
@@ -776,7 +775,6 @@ def generate():
     print("Generate srcdir: " + srcdir + " = " + os.path.realpath(srcdir))
     print("Generate gendir: " + gendir + " = " + os.path.realpath(gendir))
 
-    #os.makedirs(gendir + '/rust/src', exist_ok=True)
     # read table
     with open(srcdir + '/table.py', mode='r', encoding="utf-8") as file:
         entries = eval(file.read())
index 8f89dc8d3fc502529a27cef00710a5d93f5ee513..831323850a6004a4c465c7feab9c33ed3849c8c0 100755 (executable)
@@ -1,8 +1,8 @@
-#!/bin/sh -xe
+#!/bin/sh -e
 
-echo "PWD=$PWD"
-echo "srcdir=$srcdir"
-echo "builddir=$builddir"
+#echo "PWD=$PWD"
+#echo "srcdir=$srcdir"
+#echo "builddir=$builddir"
 
 $CARGO build --release $RUST_TARGET --target-dir=$builddir/target --manifest-path $srcdir/Cargo.toml
 
index a7682107a2fa3bf05d6faeccb3aadb55eba7832d..014ca29273233835c2df7552763e1fb3a9f2f5cc 100644 (file)
@@ -27,10 +27,11 @@ lib_settings = custom_target('libsettings.a',
   ],
   depends: settings,
   env: env,
+  console: true,
 )
 
 dep_rust_settings = declare_dependency(
   link_with: lib_settings[0],
   sources: lib_settings[1],
-  include_directories: [include_directories('.'), include_directories('src')]
+  include_directories: [include_directories('.'), include_directories('src')],
 )