From: Otto Moerbeek Date: Tue, 16 Jul 2024 07:18:57 +0000 (+0200) Subject: Tweaks X-Git-Tag: rec-5.2.0-alpha1~173^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9dbef7eb42746fa175d80c447aae761a3d35ab76;p=thirdparty%2Fpdns.git Tweaks --- diff --git a/pdns/recursordist/meson.build b/pdns/recursordist/meson.build index 2c47ffb350..9c92a53b54 100644 --- a/pdns/recursordist/meson.build +++ b/pdns/recursordist/meson.build @@ -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, ], ) diff --git a/pdns/recursordist/meson_options.txt b/pdns/recursordist/meson_options.txt index 41d0e7f53d..52ba9f3acd 100644 --- a/pdns/recursordist/meson_options.txt +++ b/pdns/recursordist/meson_options.txt @@ -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') diff --git a/pdns/recursordist/settings/generate.py b/pdns/recursordist/settings/generate.py index 94c8015b2a..f6d85ea483 100644 --- a/pdns/recursordist/settings/generate.py +++ b/pdns/recursordist/settings/generate.py @@ -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()) diff --git a/pdns/recursordist/settings/rust/build_settings b/pdns/recursordist/settings/rust/build_settings index 8f89dc8d3f..831323850a 100755 --- a/pdns/recursordist/settings/rust/build_settings +++ b/pdns/recursordist/settings/rust/build_settings @@ -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 diff --git a/pdns/recursordist/settings/rust/meson.build b/pdns/recursordist/settings/rust/meson.build index a7682107a2..014ca29273 100644 --- a/pdns/recursordist/settings/rust/meson.build +++ b/pdns/recursordist/settings/rust/meson.build @@ -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')], )