diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe42603371..a4ad6a697e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -429,11 +429,14 @@ stages: - find -name 'tsan.*' -exec "$PYTHON" "$CI_PROJECT_DIR"/bind9-qa/ci/parse_tsan.py {} \; .check_readline_setup: &check_readline_setup - - if [[ -n "${WITHOUT_LIBEDIT}" ]]; then - ! grep "^#define HAVE_LIBEDIT" build/config.h; - elif [[ -n "${WITH_LIBEDIT}" ]]; then - grep -e "^#define HAVE_LIBEDIT" build/config.h; - fi + # WITH_LIBEDIT/WITHOUT_LIBEDIT are always-set global variables, so inspect + # the actual per-job configure flags to decide what to assert. + - case " ${EXTRA_CONFIGURE} " in + *" -Dline=disabled "*) + ! grep -e "^#define HAVE_LIBEDIT" build/config.h;; + *" -Dline=enabled "*) + grep -e "^#define HAVE_LIBEDIT" build/config.h;; + esac .list_installed_package_versions: &list_installed_package_versions - echo -e "\e[0Ksection_start:`date +%s`:installed_packages_section[collapsed=true]\r\e[0KHeader of the installed packages collapsible section" diff --git a/bin/tests/system/isctest/vars/.build_vars/meson.build b/bin/tests/system/isctest/vars/.build_vars/meson.build index 8958b3820a..06a351f46b 100644 --- a/bin/tests/system/isctest/vars/.build_vars/meson.build +++ b/bin/tests/system/isctest/vars/.build_vars/meson.build @@ -47,7 +47,7 @@ foreach name, prog : { endforeach # Run a script to copy required files to the source directory in order to make -# pytest work and find the compiled files. This is executed on every incovation +# pytest work and find the compiled files. This is executed on every invocation # of the compile command, so the latest build is always used for system tests. custom_target( 'system-test-init', diff --git a/bin/tools/meson.build b/bin/tools/meson.build index 5909cc2d35..a5eac21996 100644 --- a/bin/tools/meson.build +++ b/bin/tools/meson.build @@ -22,7 +22,6 @@ manrst_srcset.add(when: 'HAVE_DNSTAP', if_true: files('dnstap-read.rst')) manrst_srcset.add( files( 'arpaname.rst', - 'dnstap-read.rst', 'mdig.rst', 'named-journalprint.rst', 'named-makejournal.rst', diff --git a/ci/sanitizer_default_check.py b/ci/sanitizer_default_check.py index 9a72a00387..f6960f8e47 100755 --- a/ci/sanitizer_default_check.py +++ b/ci/sanitizer_default_check.py @@ -56,7 +56,7 @@ with (build / "meson-info" / "intro-targets.json").open() as f: ["nm", target["filename"][0]], stdin=None, stdout=subprocess.PIPE, - timeout=1, + timeout=60, check=True, shell=False, ) diff --git a/doc/man/meson.build b/doc/man/meson.build index b915f80bd4..6d8136bb09 100644 --- a/doc/man/meson.build +++ b/doc/man/meson.build @@ -91,6 +91,7 @@ if fs.is_file('arpaname.1.in') 'rndc-confgen.8.in', 'rndc.8.in', 'rndc.conf.5.in', + 'synthrecord.8.in', 'tsig-keygen.8.in', ), ) diff --git a/lib/dns/rdata/generic/meson.build b/lib/dns/rdata/generic/meson.build index 83c2245d20..4e318bc3da 100644 --- a/lib/dns/rdata/generic/meson.build +++ b/lib/dns/rdata/generic/meson.build @@ -16,6 +16,8 @@ dns_header_depfiles += files( 'amtrelay_260.h', 'avc_258.c', 'avc_258.h', + 'brid_68.c', + 'brid_68.h', 'caa_257.c', 'caa_257.h', 'cdnskey_60.c', @@ -38,12 +40,16 @@ dns_header_depfiles += files( 'doa_259.h', 'ds_43.c', 'ds_43.h', + 'dsync_66.c', + 'dsync_66.h', 'eui48_108.c', 'eui48_108.h', 'eui64_109.c', 'eui64_109.h', 'gpos_27.c', 'gpos_27.h', + 'hhit_67.c', + 'hhit_67.h', 'hinfo_13.c', 'hinfo_13.h', 'hip_55.c', @@ -136,6 +142,8 @@ dns_header_depfiles += files( 'txt_16.h', 'uri_256.c', 'uri_256.h', + 'wallet_262.c', + 'wallet_262.h', 'x25_19.c', 'x25_19.h', 'zonemd_63.c', diff --git a/meson.build b/meson.build index 3a326a4704..15bca2e015 100644 --- a/meson.build +++ b/meson.build @@ -273,13 +273,12 @@ env = environment( ) # Meson defines these variables in unit tests when not set -test_env = environment( - { - 'ASAN_OPTIONS': asan_options, - 'TSAN_OPTIONS': tsan_options, - 'UBSAN_OPTIONS': ubsan_options, - }, -) +test_env_vars = { + 'ASAN_OPTIONS': asan_options, + 'TSAN_OPTIONS': tsan_options, + 'UBSAN_OPTIONS': ubsan_options, +} +test_env = environment(test_env_vars) ### Configuration config = configuration_data() @@ -461,7 +460,7 @@ if cpu_family in ['arm', 'aarch64'] instruction_test.format('yield'), name: 'usage of yield instruction', ) - config.set('HAVE_SPARC_PAUSE', 1) + config.set('HAVE_ARM_YIELD', 1) endif elif cpu_family in ['sparc', 'sparc64'] if cc.compiles( @@ -726,7 +725,7 @@ endif # not add it automatically - we need to add it explicitly in such case. if urcu_dep[1].version().version_compare('<0.13.0') - urcu_dep += cc.find_library('liburcu-common') + urcu_dep += cc.find_library('urcu-common') endif foreach h : [ @@ -956,7 +955,7 @@ dtrace_header = generator( arguments: ['-s', '@INPUT@', '-h', '-o', '@OUTPUT@'], ) -# Acutally, dtrace probes are still built with macOS. +# Actually, dtrace probes are still built with macOS. # macOS flavored dtrace doesn't recognize the -G option and # only uses headers. # @@ -964,8 +963,7 @@ dtrace_header = generator( # to be able to disable it. You can just not use the probes. config.set( 'HAVE_DTRACE', - dtrace.full_path() != dtrace_shim - and build_machine.system() != 'darwin', + dtrace.full_path() != dtrace_shim and host_machine.system() != 'darwin', ) cc.has_header('sys/sdt.h', required: tracing_opt) assert( @@ -1993,8 +1991,8 @@ if doc_opt.allowed() rst_epilog = f'''.. |rndc_conf| replace:: ``@sysconfdir@/rndc.conf`` .. |rndc_key| replace:: ``@sysconfdir@/rndc.key`` -.. |named_conf| replace:: ``@sysconfdir@/named.key`` -.. |named_pid| replace:: ``@runstatedir@/named.key`` +.. |named_conf| replace:: ``@sysconfdir@/named.conf`` +.. |named_pid| replace:: ``@runstatedir@/named.pid`` .. |session_key| replace:: ``@runstatedir@/session.key`` ''' diff --git a/tests/isc/meson.build b/tests/isc/meson.build index 7790181941..ca9933de39 100644 --- a/tests/isc/meson.build +++ b/tests/isc/meson.build @@ -100,16 +100,21 @@ foreach unit : isc_test suites = ['isc', 'cmocka'] timeout = 300 + unit_env = test_env if unit in flaky_isc_test suites += 'flaky' - # Pass FLAKY and TIMEOUT to the test wrapper so it can retry appropriately - test_env.set('FLAKY', '1') - test_env.set('TIMEOUT', timeout.to_string()) + # Pass FLAKY and TIMEOUT to the test wrapper so it can retry + # appropriately. Build a fresh environment instead of mutating the + # shared test_env, which meson stores by reference and would otherwise + # leak these variables into every other test. + unit_env = environment( + test_env_vars + {'FLAKY': '1', 'TIMEOUT': timeout.to_string()}, + ) endif test( unit, test_bin, - env: test_env, + env: unit_env, suite: suites, timeout: timeout, workdir: meson.current_source_dir(), diff --git a/util/meson-dist-package.sh b/util/meson-dist-package.sh index 5ecabaa1b7..9eaf78ddf1 100644 --- a/util/meson-dist-package.sh +++ b/util/meson-dist-package.sh @@ -13,7 +13,7 @@ set -e -if [ -z "$MESON_DIST_ROOT" ] || [ -z "$MESON_SOURCE_ROOT" ]; then +if [ -z "$MESON_DIST_ROOT" ] || [ -z "$MESON_SOURCE_ROOT" ] || [ -z "$MESON_BUILD_ROOT" ]; then echo "meson-dist-package.sh must be run inside meson dist!" exit 1 fi @@ -41,19 +41,19 @@ generate_man_pages() { "${MESON_SOURCE_ROOT}/doc/man" \ "${MESON_BUILD_ROOT}/dist-man" - for man in ${MESON_BUILD_ROOT}/dist-man/man1/*; do + for man in "${MESON_BUILD_ROOT}"/dist-man/man1/*; do [ -f "${man}" ] || continue - cp $man "${MESON_DIST_ROOT}/doc/man/${man##*/}.in" + cp "$man" "${MESON_DIST_ROOT}/doc/man/${man##*/}.in" done - for man in ${MESON_BUILD_ROOT}/dist-man/man5/*; do + for man in "${MESON_BUILD_ROOT}"/dist-man/man5/*; do [ -f "${man}" ] || continue - cp $man "${MESON_DIST_ROOT}/doc/man/${man##*/}.in" + cp "$man" "${MESON_DIST_ROOT}/doc/man/${man##*/}.in" done - for man in ${MESON_BUILD_ROOT}/dist-man/man8/*; do + for man in "${MESON_BUILD_ROOT}"/dist-man/man8/*; do [ -f "${man}" ] || continue - cp $man "${MESON_DIST_ROOT}/doc/man/${man##*/}.in" + cp "$man" "${MESON_DIST_ROOT}/doc/man/${man##*/}.in" done } diff --git a/util/meson-glob.sh b/util/meson-glob.sh index bd5f6d4968..3dcf35bf29 100755 --- a/util/meson-glob.sh +++ b/util/meson-glob.sh @@ -28,8 +28,9 @@ done echo "files(" -pushd ${dir:-.} >/dev/null -for file in ./*.${extension:-c}; do +shopt -s nullglob +pushd "${dir:-.}" >/dev/null +for file in ./*."${extension:-c}"; do echo " '${file:2}'," done popd >/dev/null diff --git a/util/meson-system-test-init.sh b/util/meson-system-test-init.sh index 07ff6f5b28..5841854b54 100644 --- a/util/meson-system-test-init.sh +++ b/util/meson-system-test-init.sh @@ -16,5 +16,5 @@ if [ -z "$BIND_SOURCE_ROOT" ] || [ -z "$BIND_BUILD_ROOT" ]; then exit 1 fi -cp $BIND_BUILD_ROOT/bin/tests/system/isctest/vars/.build_vars/TOP_BUILDDIR $BIND_SOURCE_ROOT/bin/tests/system/isctest/vars/.build_vars/TOP_BUILDDIR -cp $BIND_BUILD_ROOT/bin/tests/system/ifconfig.sh $BIND_SOURCE_ROOT/bin/tests/system/ifconfig.sh +cp "$BIND_BUILD_ROOT/bin/tests/system/isctest/vars/.build_vars/TOP_BUILDDIR" "$BIND_SOURCE_ROOT/bin/tests/system/isctest/vars/.build_vars/TOP_BUILDDIR" +cp "$BIND_BUILD_ROOT/bin/tests/system/ifconfig.sh" "$BIND_SOURCE_ROOT/bin/tests/system/ifconfig.sh"