1. 30 Jul, 2020 1 commit
    • Michal Nowak's avatar
      Drop $SYSTEMTESTTOP from bin/tests/system/ · 093af1c0
      Michal Nowak authored
      The $SYSTEMTESTTOP shell variable if often set to .. in various shell
      scripts inside bin/tests/system/, but most of the time it is only
      used one line later, while sourcing conf.sh. This hardly improves
      code readability.
      $SYSTEMTESTTOP is also used for the purpose of referencing
      scripts/files living in bin/tests/system/, but given that the
      variable is always set to a short, relative path, we can drop it and
      replace all of its occurrences with the relative path without adversely
      affecting code readability.
  2. 21 Apr, 2020 1 commit
    • Ondřej Surý's avatar
      Complete rewrite the BIND 9 build system · 978c7b2e
      Ondřej Surý authored
      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
      - 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
      - `make distcheck` doesn't yet work (because of system tests oot run is not yet
      - 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
  3. 10 Dec, 2019 1 commit
    • Michał Kępień's avatar
      Only use LC_ALL=C where intended · 2ee7ff23
      Michał Kępień authored
      The LC_ALL=C assignments in the "idna" system test, which were only
      meant to affect a certain subset of checks, in fact persist throughout
      all the subsequent checks in that system test.  That affects the test's
      behavior and is misleading.
      When the "VARIABLE=value command ..." syntax is used in a shell script,
      in order for the variable assignment to only apply to "command", the
      latter must be an external binary; otherwise, the VARIABLE=value
      assignment persists for all subsequent commands in a script:
          $ cat foo.sh
          foo() {
              /bin/sh bar.sh
          BAR="baz1" /bin/sh bar.sh
          echo "foo: BAR=${BAR}"
          BAR="baz2" foo
          echo "foo: BAR=${BAR}"
          $ cat bar.sh
          echo "bar: BAR=${BAR}"
          $ /bin/sh foo.sh
          bar: BAR=baz1
          foo: BAR=baz0
          bar: BAR=baz2
          foo: BAR=baz2
      Fix by saving the value of LC_ALL before the relevant set of checks in
      the "idna" system test, restoring it afterwards, and dropping the
      "LC_ALL=C command ..." syntax.
  4. 30 Sep, 2019 2 commits
  5. 26 Jun, 2019 1 commit
    • Michał Kępień's avatar
      Prevent "idna" test failures with libidn2 2.2.0+ · 60ce0ed4
      Michał Kępień authored
      libidn2 2.2.0+ parses Punycode more strictly than older versions and
      thus "dig +idnin +noidnout xn--19g" fails with libidn2 2.2.0+ but
      succeeds with older versions.
      We could preserve the old behavior by using the IDN2_NO_ALABEL_ROUNDTRIP
      flag available in libidn2 2.2.0+, but:
        - this change in behavior is considered a libidn2 bug fix [1],
        - we want to make sure dig behaves as expected, not libidn2,
        - implementing that would require additional configure.ac cruft.
      Removing the problematic check appears to be the simplest solution as it
      does not prevent the relevant block of checks in the "idna" system test
      from achieving its purpose, i.e. ensuring dig properly handles invalid
      [1] see upstream commit 241e8f486134793cb0f4a5b0e5817a97883401f5
  6. 06 Nov, 2018 1 commit
  7. 10 Jul, 2018 2 commits
    • Michał Kępień's avatar
      Improve error handling in idn_ace_to_locale() · b896fc49
      Michał Kępień authored
      While idn2_to_unicode_8zlz() takes a 'flags' argument, it is ignored and
      thus cannot be used to perform IDN checks on the output string.
      The bug in libidn2 versions before 2.0.5 was not that a call to
      idn2_to_unicode_8zlz() with certain flags set did not cause IDN checks
      to be performed.  The bug was that idn2_to_unicode_8zlz() did not check
      whether a conversion can be performed between UTF-8 and the current
      locale's character encoding.  In other words, with libidn2 version
      2.0.5+, if the current locale's character encoding is ASCII, then
      idn2_to_unicode_8zlz() will fail when it is passed any Punycode string
      which decodes to a non-ASCII string, even if it is a valid IDNA2008
      Rework idn_ace_to_locale() so that invalid IDNA2008 names are properly
      and consistently detected for all libidn2 versions and locales.
      Update the "idna" system test accordingly.  Add checks for processing a
      server response containing Punycode which decodes to an invalid IDNA2008
      name.  Fix invalid subtest description.
    • Michał Kępień's avatar
      Remove IDNA2003 fallback from dig · 59cdaef4
      Michał Kępień authored
      Certain characters, like symbols, are allowed by IDNA2003, but not by
      IDNA2008.  Make dig reject such symbols when IDN input processing is
      enabled to ensure BIND only supports IDNA2008.  Update the "idna" system
      test so that it uses one of such symbols rather than one which is
      disallowed by both IDNA2003 and IDNA2008.
  8. 04 Apr, 2018 6 commits