2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-05 09:05:40 +00:00
Commit Graph

31467 Commits

Author SHA1 Message Date
Ondřej Surý
968523dd8d Use absolute path to PYTHON and PERL, so test -x works properly in system tests 2020-04-27 12:23:44 +02:00
Ondřej Surý
dd0faa1556 Store the output from yamlget.py into intermediate files for easier debugging 2020-04-27 11:43:30 +02:00
Ondřej Surý
52683934cd Refactor the script that gets/sets the ports for system tests
The current script used ephemeral port range which clashed with the
ports used by the tools (dig, ...), and the range always started with
the first port and there was 100 ports allocated for each system test.

In this commit, the first port has been randomized, the get_ports.sh
script outputs the variables (the output has to be eval'ed from run.sh)
and there's less waste in the port range.
2020-04-27 11:43:30 +02:00
Ondřej Surý
85d0b4bcf0 Run recheck in case some system test fails 2020-04-27 11:43:29 +02:00
Ondřej Surý
7286d4d634 Colorize the test-driver output by default 2020-04-24 17:00:16 +02:00
Ondřej Surý
5813818036 Improve the LOG_DRIVER and LOG_COMPILER for the system tests
There are several improvements over the default/previous behaviour of
the test log driver and log compiler:

 * The system-test-driver.sh was dropped (it was used incorrectly)
 * The run.sh script is now both log compiler and cli script to run
   individual tests
 * The custom-test-driver was added as extended version of the automake
   test-driver with capability to tee the test output to stdout when
   `--verbose yes` is passed to it (you can use LOG_DRIVER_FLAGS to
   add the option by default)
 * Makefile.am has been extended to honor V=1 for the system tests
   test-driver (e.g. V=1 adds `--verbose yes` to AM_LOG_DRIVER_FLAGS)
2020-04-24 16:59:43 +02:00
Ondřej Surý
d10294acb3 Remove the requirement for GNU getopt and parse long options using getopts 2020-04-24 16:11:20 +02:00
Michał Kępień
51188b33f8 Ensure fstrm_capture is looked for
fstrm_capture is not an essential utility, but its corresponding
Makefile token needs to substituted even if it is not found in PATH or
else the "dnstap" system test will consistently fail.
2020-04-24 16:11:20 +02:00
Michał Kępień
32247dc997 Build wire_test
The bin/tests/wire_test helper program is currently not included in any
Makefile.am file.  Move its source code to bin/tests/system and build it
along other helper tools when dnstap support is requested as the
"dnstap" system test needs this tool in order to pass.
2020-04-24 16:11:20 +02:00
Michał Kępień
ba0e9cb56c Silence PyYAML warning
Make yaml.load_all() use yaml.SafeLoader to address a warning currently
emitted when bin/tests/system/dnstap/ydump.py is run:

    ydump.py:28: YAMLLoadWarning: calling yaml.load_all() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      for l in yaml.load_all(f.stdout):
2020-04-24 16:11:20 +02:00
Ondřej Surý
0bc1b4804e Use $TOP_SRCDIR instead of $TOP of calling prepare-softhsm2 script 2020-04-24 16:11:20 +02:00
Ondřej Surý
e6d2777771 Use $TOP_BUILDDIR instead of $TOP of checking config.h values 2020-04-24 16:11:20 +02:00
Ondřej Surý
626409aac9 Properly fail the GitLab CI system test job when any system test fails 2020-04-24 16:11:20 +02:00
Ondřej Surý
e2dd8f48b1 Merge branch '1758-cleanup-libirs' into 'master'
Cleanup libirs APIs and slim down the library to just irs_resconf

Closes #1758

See merge request isc-projects/bind9!3416
2020-04-24 12:02:11 +00:00
Ondřej Surý
ed13f1b595 Add CHANGES note for GL #1758 2020-04-24 08:33:34 +02:00
Ondřej Surý
5f0efcbb3c Cleanup libirs APIs and slim down the library to just irs_resconf
The libirs contained own re-implementations of the getaddrinfo,
getnameinfo and gai_strerror + irs_context and irs_dnsconf API that was
unused anywhere in the BIND 9.

Keep just the irs_resonf API that is being extensively used to parse
/etc/resolv.conf by several of BIND 9 tools.
2020-04-24 08:33:34 +02:00
Ondřej Surý
19245f3ff4 Merge branch '178-remove-unused-dns-ecdb' into 'master'
Remove 'ephemeral' database implementation

Closes #178

See merge request isc-projects/bind9!3425
2020-04-23 19:40:23 +00:00
Ondřej Surý
6494665f08 Remove 'ephemeral' database implementation
The 'ephemeral' database implementation was used to provide a
lightweight database implemenation that doesn't cache results, and the
only place where it was really use is "samples" because delv is
overriding this to use "rbtdb" instead. Otherwise it was completely
unused.

 * The 'ephemeral' cache DB (ecdb) implementation.  An ecdb just provides
 * temporary storage for ongoing name resolution with the common DB interfaces.
 * It actually doesn't cache anything.  The implementation expects any stored
 * data is released within a short period, and does not care about the
 * scalability in terms of the number of nodes.
2020-04-23 18:05:53 +02:00
Ondřej Surý
bbb3dca443 Merge branch 'ondrej/add-missing-OPENSSL_CFLAGS' into 'master'
Add OPENSSL_CFLAGS to libdns tests that include dst_internal.h

See merge request isc-projects/bind9!3424
2020-04-23 14:22:44 +00:00
Ondřej Surý
6a6a9f7afa Add OPENSSL_CFLAGS to libdns tests that include dst_internal.h
The three libdns tests directly include ../dst_internal.h which
in turn directly include openssl headers, thus there was a missing
path and build failure on systems where OpenSSL is not in the default
include path.
2020-04-23 15:53:03 +02:00
Ondřej Surý
a9c0194009 Merge branch '178-remove-unused-isc_lfsr' into 'master'
Remove unused isc_lfsr API

Closes #178

See merge request isc-projects/bind9!3423
2020-04-23 13:33:00 +00:00
Ondřej Surý
bdca09aa8d Remove unused isc_lfsr API
The isc_lfsr API was used to generate message IDs in the past.
Currently, it's just cruft.
2020-04-23 12:16:22 +02:00
Michal Nowak
f6d15d5af8 Merge branch 'mnowak/1751-abi-check-does-not-know-which-source-is-older-newer' into 'master'
abi-check does not know which source is older, newer

Closes #1751

See merge request isc-projects/bind9!3374
2020-04-23 06:52:05 +00:00
Michal Nowak
8e3e2836b0 Ensure proper comparison order in "abi-check" jobs
Right before the release API version (LIBINTERFACE, LIBREVISION, LIBAGE)
for older and newer libraries tends to be the same. Given that, commit
hash can't be the determining factor here, Unix time of the commit
should suit us better and is placed after the API version. The commit
hash is preserved as it's useful to see it in the actual report.

'-nosymtbl' versions of libraries are not produced in Automake builds.
2020-04-23 08:49:29 +02:00
Ondřej Surý
7a0ebb14f3 Merge branch 'ondrej/make-merge_copyrights-ignore-hidden-files' into 'master'
Make merge_copyrights ignore hidden files

See merge request isc-projects/bind9!3417
2020-04-23 05:58:36 +00:00
Ondřej Surý
6d46082d82 Make merge_copyrights ignore hidden files 2020-04-23 07:57:29 +02:00
Ondřej Surý
a9fb6fa862 Merge branch 'ondrej/update-lgtm.com-configuration' into 'master'
Add configuration for LGTM.com static code analyzer

See merge request isc-projects/bind9!3415
2020-04-22 14:57:40 +00:00
Ondřej Surý
fea3fe9996 Add configuration for LGTM.com static code analyzer 2020-04-22 16:14:43 +02:00
Evan Hunt
8e85ce3d77 Merge branch '1779-lock-rpzs' into 'master'
acquire maintenance lock when running incremental RPZ updates

Closes #1779

See merge request isc-projects/bind9!3411
2020-04-21 23:59:37 +00:00
Evan Hunt
2cf3d4c700 CHANGES 2020-04-21 16:59:02 -07:00
Evan Hunt
286e8cd7ea acquire maintenance lock when running incremental RPZ updates
this addresses a race that could occur during shutdown or when
reconfiguring to remove RPZ zones.

this change should ensure that the rpzs structure and the incremental
updates don't interfere with each other: rpzs->zones entries cannot
be set to NULL while an update quantum is running, and the
task should be destroyed and its queue purged so that no subsequent
quanta will run.
2020-04-21 15:53:58 -07:00
Ondřej Surý
bb4515346a Merge branch '4-add-changes-and-release-notes' into 'master'
Add CHANGES and Release Notes for "Convert to modern autotools (autoconf + automake + libtool)"

See merge request isc-projects/bind9!3410
2020-04-21 13:38:21 +00:00
Ondřej Surý
5d0897ab15 Add release notes for #4 2020-04-21 15:36:47 +02:00
Ondřej Surý
4e9801e68d Add CHANGES for GL #4 2020-04-21 15:25:41 +02:00
Ondřej Surý
01b3495000 Merge branch '4-convert-to-modern-autotools-autoconf-automake-libtool' into 'master'
Convert to modern autotools (autoconf + automake + libtool)

Closes #4

See merge request isc-projects/bind9!985
2020-04-21 13:06:22 +00:00
Ondřej Surý
978c7b2e89 Complete rewrite the BIND 9 build system
The rewrite of BIND 9 build system is a large work and cannot be reasonable
split into separate merge requests.  Addition of the automake has a positive
effect on the readability and maintainability of the build system as it is more
declarative, it allows conditional and we are able to drop all of the custom
make code that BIND 9 developed over the years to overcome the deficiencies of
autoconf + custom Makefile.in files.

This squashed commit contains following changes:

- conversion (or rather fresh rewrite) of all Makefile.in files to Makefile.am
  by using automake

- the libtool is now properly integrated with automake (the way we used it
  was rather hackish as the only official way how to use libtool is via
  automake

- the dynamic module loading was rewritten from a custom patchwork to libtool's
  libltdl (which includes the patchwork to support module loading on different
  systems internally)

- conversion of the unit test executor from kyua to automake parallel driver

- conversion of the system test executor from custom make/shell to automake
  parallel driver

- The GSSAPI has been refactored, the custom SPNEGO on the basis that
  all major KRB5/GSSAPI (mit-krb5, heimdal and Windows) implementations
  support SPNEGO mechanism.

- The various defunct tests from bin/tests have been removed:
  bin/tests/optional and bin/tests/pkcs11

- The text files generated from the MD files have been removed, the
  MarkDown has been designed to be readable by both humans and computers

- The xsl header is now generated by a simple sed command instead of
  perl helper

- The <irs/platform.h> header has been removed

- cleanups of configure.ac script to make it more simpler, addition of multiple
  macros (there's still work to be done though)

- the tarball can now be prepared with `make dist`

- the system tests are partially able to run in oot build

Here's a list of unfinished work that needs to be completed in subsequent merge
requests:

- `make distcheck` doesn't yet work (because of system tests oot run is not yet
  finished)

- documentation is not yet built, there's a different merge request with docbook
  to sphinx-build rst conversion that needs to be rebased and adapted on top of
  the automake

- msvc build is non functional yet and we need to decide whether we will just
  cross-compile bind9 using mingw-w64 or fix the msvc build

- contributed dlz modules are not included neither in the autoconf nor automake
2020-04-21 14:19:48 +02:00
Ondřej Surý
4df5a5832c Remove files generated by autotools 2020-04-21 14:19:30 +02:00
Ondřej Surý
98b3b93791 Remove python based tools (dnssec-keymgr, dnssec-coverage, dnssec-checkds)
With the introduction of dnssec-policy, the aforementioned tools were
either rendered obsolete, or they will be replaced with dnssec-policy
based tools.  Remove the tools and the requirement to have Python
installed.  Python 3 is still being used for tests, so keep the autoconf
test, but make it much simpler.
2020-04-21 14:19:30 +02:00
Ondřej Surý
4b8e599855 Merge branch 'ondrej/enable-quota-test-in-Kyuatest' into 'master'
Enable quota_test in Kyuafile

See merge request isc-projects/bind9!3408
2020-04-21 12:18:07 +00:00
Witold Kręcicki
62f738ba48 Fix detaching the extra quotas in the quota_test 2020-04-21 14:17:20 +02:00
Ondřej Surý
54defc8b78 Enable quota_test in Kyuafile 2020-04-21 12:30:11 +02:00
Mark Andrews
6b98a58c58 Merge branch 'marka-placeholer' into 'master'
Marka placeholer

See merge request isc-projects/bind9!3407
2020-04-20 23:59:50 +00:00
Mark Andrews
4dd73e408f placeholder 2020-04-21 09:57:42 +10:00
Ondřej Surý
cbfd8aae94 Merge branch '1763-pkcs11-code-cleanups' into 'master'
Update to PKCS#11 v3.0 EdDSA macros and cleanup the PKCS#11 code

See merge request isc-projects/bind9!3391
2020-04-20 09:55:51 +00:00
Ondřej Surý
48473d464f Add CHANGES 2020-04-20 11:48:45 +02:00
Ondřej Surý
cf30e7d0d1 Use switch instead of if when evaluating curves
Previously, the code would do:

    REQUIRE(alg == CURVE1 || alg == CURVE2);

    [...]

    if (alg == CURVE1) { /* code for CURVE1 */ }
    else { /* code for CURVE2 */ }

This approach is less extensible and also more prone to errors in case
the initial REQUIRE() is forgotten.  The code has been refactored to
use:

    REQUIRE(alg == CURVE1 || alg == CURVE2);

    [...]

    switch (alg) {
    case CURVE1: /* code for CURVE1 */; break;
    case CURVE2: /* code for CURVE2 */; break;
    default: INSIST(0);
    }
2020-04-20 11:40:42 +02:00
Ondřej Surý
da38bd0e1d Refactor the code using the pk11 ECC constants.
The pk11/constants.h header contained static CK_BYTE arrays and
we had to use #defines to pull only those we need.  This commit
changes the constants to only define byte arrays with the content
and either use them directly or define the CK_BYTE arrays locally
where used.
2020-04-20 11:40:42 +02:00
Ondřej Surý
9d979d7cd6 Only print warning when PKCS#11 dnssec-keygen fails from Edwards curves 2020-04-20 11:40:42 +02:00
Aaron Thompson
541d7bafe6 Fix a segfault when a PKCS#11 token is not found. 2020-04-20 11:40:42 +02:00
Aaron Thompson
46cae09023 Fix bad syntax in pkcs11eddsa_link.c.
Introduced in 994e656977.
2020-04-20 11:40:41 +02:00