Commit graph

2488 commits

Author SHA1 Message Date
Ondřej Surý
ad0ab84835 Remove libdns section in ARM
When we made BIND 9 libraries private to BIND 9, we forgot to remove the
libdns section on "export" libraries from the ARM.

(cherry picked from commit 3637c466c9)
2020-06-04 11:00:16 +02:00
Michał Kępień
b594b1c95f Add Danger Python to GitLab CI
Certain rules of the BIND development process are not codified anywhere
and/or are used inconsistently.  In an attempt to improve this
situation, add a GitLab CI job which uses Danger Python to add comments
to merge requests when certain expectations are not met.  Two categories
of feedback are used, only one of which - fail() - causes the GitLab CI
job to fail.  Exclude dangerfile.py from Python QA checks as the way the
contents of that file are evaluated triggers a lot of Flake8 and PyLint
warnings.

(cherry picked from commit 36bb45a8b6)
2020-06-01 13:45:35 +02:00
Suzanne Goldlust
d56c44579e Grammar, clarity, and content fixes in reference.rst
Also converted logging-categories.rst from a table to text and adjusted
the util/check-categories.sh script.

(cherry picked from commit 1e067c4d0b)
2020-06-01 09:58:29 +02:00
Evan Hunt
714b559902 fix doxygen build 2020-06-01 09:58:29 +02:00
Evan Hunt
93bdf74804 clean up doc checks
- Update util/check-categories.sh for logging-categories.rst, call from CI
- remove xmllint of .html files
2020-06-01 09:58:29 +02:00
Evan Hunt
5a855f6754 convert release notes to RST 2020-06-01 09:58:25 +02:00
Evan Hunt
b580eb2fb3 add support for building sphinx documentation 2020-06-01 09:54:46 +02:00
Ondřej Surý
58e20fa746 Convert the documentation to Sphinx documentation format
The ARM and the manpages have been converted into Sphinx documentation
format.

Sphinx uses reStructuredText as its markup language, and many of its
strengths come from the power and straightforwardness of
reStructuredText and its parsing and translating suite, the Docutils.

(cherry picked from commit 9fb6d11abb)
2020-06-01 09:54:45 +02:00
Mark Andrews
9d787ab6f0 Check that a 'BADTIME' response with 'QR=0' is handled as a request 2020-05-19 13:57:07 +02:00
Michal Nowak
b5fdddd593
Collect TXT and HTML reports produced by ABI checker
Although in util/api-checker.sh we create textual reports, we don't
preserve them in job artifacts, but we should.

We don't want to keep all HTML pages present in the project root, but
just those produced by ABI checker.

(cherry picked from commit b5ccf95b0a)
2020-05-15 11:31:02 +02:00
Mark Andrews
2e02c6f9a7 Add release note entry
(cherry picked from commit 88615006c5)
2020-05-13 10:31:53 +10:00
Mark Andrews
eed4fab37b Report Extended DNS Error codes
(cherry picked from commit b144ae1bb0)
2020-05-13 10:26:39 +10:00
Ondřej Surý
75e76b072a Rewrite the statschannel traffic tests to pytest
(cherry picked from commit 1202fd912a)
2020-05-12 14:12:03 +02:00
Ondřej Surý
09a1c051ec Add tests for zone timers using the pytest testing framework
(cherry picked from commit 6aa6d7be58)
2020-05-12 14:12:03 +02:00
Ondřej Surý
af1b56240f Resolve the overlinking of the system libraries
Originally, every library and binaries got linked to everything, which
creates unnecessary overlinking.  This wasn't as straightforward as it
should be as we still support configuration without libtool for 9.16.

Couple of smaller issues related to include headers and an issue where
sanitizer overload dlopen and dlclose symbols, so we were getting false
negatives in the autoconf test.
2020-05-11 09:49:54 +02:00
Mark Andrews
2270e28fde have CI call util/check-categories.sh 2020-05-11 10:57:44 +10:00
Michał Kępień
299954d006 Make dnstap work reliably with netmgr
The introduction of netmgr doubled the number of threads from which
dnstap data may be logged: previously, it could only happen from within
taskmgr worker threads; with netmgr, it can happen both from taskmgr
worker threads and from network threads.  Since the argument passed to
fstrm_iothr_options_set_num_input_queues() was not updated to reflect
this change, some calls to fstrm_iothr_get_input_queue() can now return
NULL, effectively preventing some dnstap data from being logged.
Whether this bug is triggered or not depends on thread scheduling order
and packet distribution between network threads, but will almost
certainly be triggered on any recursive resolver sooner or later.  Fix
by requesting the correct number of dnstap input queues to be allocated.

(cherry picked from commit 77dc091855)
2020-05-01 16:29:18 +02:00
Aaron Thompson
8607580599 Update to PKCS#11 v3.0 EdDSA macros.
(cherry picked from commit 3e685fe01a)
2020-05-01 06:54:26 +02:00
Mark Andrews
8578ea9c8a pylint cleanups
(cherry picked from commit d7618f6954)
2020-04-30 17:33:38 +10:00
Ondřej Surý
5948a29463 Stop leaking OpenSSL types and defines in the isc/safe.h
The two "functions" that isc/safe.h declared before were actually simple
defines to matching OpenSSL functions.  The downside of the approach was
enforcing all users of the libisc library to explicitly list the include
path to OpenSSL and link with -lcrypto.  By hiding the specific
implementation into the private namespace changing the defines into
simple functions, we no longer enforce this.  In the long run, this
might also allow us to switch cryptographic library implementation
without affecting the downstream users.

(cherry picked from commit ab827ab5bf)
2020-04-28 16:27:39 +02:00
Michal Nowak
313518dd3d
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.

(cherry picked from commit 8e3e2836b0)
2020-04-23 09:38:25 +02:00
Ondřej Surý
250d16b9c2 Make merge_copyrights ignore hidden files
(cherry picked from commit 6d46082d82)
2020-04-23 08:00:40 +02:00
Mark Andrews
06e53c9e14 Check that bad message id's are caught by named 2020-04-20 19:13:48 +10:00
Mark Andrews
8d04b6b93a Add empty release notes for BIND 9.16.3 2020-04-17 10:23:50 +10:00
Ondřej Surý
4c4af11e5b Make the python code pylint and flake8 compliant
(cherry picked from commit 1e4ff9d485)
2020-04-15 07:43:35 +02:00
Ondřej Surý
4586a10327 Add pylint and flake8 tests to GitLab CI
Our python code didn't adhere to any coding standard.  In this commit, we add
flame8 (https://pypi.org/project/flake8/), and pylint (https://www.pylint.org/).

There's couple of exceptions:

- ans.py scripts are not checked, nor fixed as part of this MR
- pylint's missing-*-docstring and duplicate-code checks have
  been disabled via .pylintrc

Both exceptions should be removed in due time.

(cherry picked from commit ee534592e3)
2020-04-15 07:43:35 +02:00
Matthijs Mekking
c923532b77 Remove kasp Windows prereq check
Now that the timing issue is fixed, we can enable the kasp test
again on Windows.

(cherry picked from commit 87c05fa62f)
2020-04-08 09:47:36 +02:00
Mark Andrews
657ad6de31 add empty release notes for 9.16.2
(cherry picked from commit 503e2dff64)
2020-03-31 17:12:03 +11:00
Witold Kręcicki
7ab77d009d Add a quota attach function with a callback, some code cleanups.
We introduce a isc_quota_attach_cb function - if ISC_R_QUOTA is returned
at the time the function is called, then a callback will be called when
there's quota available (with quota already attached). The callbacks are
organized as a LIFO queue in the quota structure.
It's needed for TCP client quota -  with old networking code we had one
single place where tcp clients quota was processed so we could resume
accepting when the we had spare slots, but it's gone with netmgr - now
we need to notify the listener/accepter that there's quota available so
that it can resume accepting.

Remove unused isc_quota_force() function.

The isc_quote_reserve and isc_quota_release were used only internally
from the quota.c and the tests.  We should not expose API we are not
using.

(cherry picked from commit d151a10f30)
2020-03-30 10:29:33 +02:00
Mark Andrews
0cf72a9414 Check that dig/host/nslookup handle a UPDATE response.
Additionally check that "delete $qname SOA" in the update
reponse doesn't trigger a insertion in nslookup.

(cherry picked from commit 6593cf0b5a)
2020-03-13 11:47:10 +11:00
Matthijs Mekking
a22e881a97 Disable kasp test on Windows
The kasp system test is timing critical.  The test passes on all
Linux based machines, but fails frequently on Windows.  The test
takes a lot more time on Windows and at the final checks fail
because the expected next key event is too far off.  For example:

I:kasp:check next key event for zone step2.algorithm-roll.kasp (570)
I:kasp:error: bad next key event time 20909 for zone \
  step2.algorithm-roll.kasp (expect 21600)
I:kasp:failed

This is because the kasp system test calculates the time when the
next key event should occur based on the policy.  This assumes that
named is able to do key management within a minute.  But starting,
named, doing key management for other zones, and reconfiguring takes
much more time on Windows and thus the next key event on Windows is
much shorter than anticipated.

That this happens is a good thing because this means that the
correct next key event is used, but is not so nice for testing, as
it is hard to determine how much time named needed before finishing
the current key event.

Disable the kasp test on Windows now because it is blocking the
release.  We know the cause of these test failures, and it is clear
that this is a fault in the test, not the code.  Therefore we feel
comfortable disabling the test right now and work on a fix while
unblocking the release.

(cherry picked from commit 4e610b7f6b)
2020-03-10 16:04:13 +01:00
Michal Nowak
0cff4c4e4f
Add API Checker
ABI checker tools generate HTML and TXT API compatibility reports of
BIND libraries. Comparison is being done between two bind source trees
which hold built BIND.

In the CI one version is the reference version defined by
BIND_BASELINE_VERSION variable, the latter one is the HEAD of branch
under test.

(cherry picked from commit 49bc08e612)
2020-03-10 09:53:44 +01:00
Matthijs Mekking
f8b555a3a2 Add algorithm rollover test case
Add a test case for algorithm rollover.  This is triggered by
changing the dnssec-policy.  A new nameserver ns6 is introduced
for tests related to dnssec-policy changes.

This requires a slight change in check_next_key_event to only
check the last occurrence.  Also, change the debug log message in
lib/dns/zone.c to deal with checks when no next scheduled key event
exists (and default to loadkeys interval 3600).

(cherry picked from commit 88ebe9581b)
2020-03-09 14:42:53 +01:00
Mark Andrews
fc199384c5 test installed header files
(cherry picked from commit a278b6bd84)
2020-03-06 02:20:03 +00:00
Michal Nowak
53ca8cac14 Fix "pkcs11" system test
- Define the SLOT environment variable before starting the test.  This
    variable defaults to 0 and that does not work with SoftHSM 2.

  - The system test expects the PIN environment variable to be set to
    "1234" while bin/tests/prepare-softhsm2.sh sets it to "0000".
    Update bin/tests/prepare-softhsm2.sh so that it sets the PIN to
    "1234".

  - Move contents of bin/tests/system/pkcs11/prereq.sh to
    bin/tests/system/pkcs11/setup.sh as the former was creating a file
    called "supported" that was getting removed by the latter before
    bin/tests/system/pkcs11/tests.sh could access it.

  - Fix typo in "have_ecx".

(cherry picked from commit 100a230e80f01a777b917b135b4bae9a4ac0e8ae)
2020-03-05 07:00:50 +00:00
Evan Hunt
f827513c53 CHANGES
(cherry picked from commit d805fe821e)
2020-03-04 16:25:32 -08:00
Mark Andrews
3cdfa9758b Check inline master zones that are touched reload correctly.
(cherry picked from commit 50e079d6c3)
2020-03-04 09:11:46 +11:00
Mark Andrews
d768a69377 add release note entry
(cherry picked from commit 23ce0f32e5)
2020-03-03 16:50:56 +11:00
Evan Hunt
4926c232cd minor cosmetic fixes
- the configuration summary reported zlib compression was not
  supported even when it was.
- when bind.keys.h was regenerated it violated clang-format style.

(cherry picked from commit beda680f90)
2020-02-25 11:20:58 -08:00
Evan Hunt
11a0d771f9 fix spelling errors reported by Fossies.
(cherry picked from commit ba0313e649)
2020-02-21 07:05:31 +00:00
Ondřej Surý
829b461c54 Merge branch '46-enforce-clang-format-rules' into 'master'
Start enforcing the clang-format rules on changed files

Closes #46

See merge request isc-projects/bind9!3063

(cherry picked from commit a04cdde45d)

d2b5853b Start enforcing the clang-format rules on changed files
618947c6 Switch AlwaysBreakAfterReturnType from TopLevelDefinitions to All
654927c8 Add separate .clang-format files for headers
5777c44a Reformat using the new rules
60d29f69 Don't enforce copyrights on .clang-format
2020-02-14 08:45:59 +00:00
Ondřej Surý
cdef20bb66 Merge branch 'each-style-tweak' into 'master'
adjust clang-format options to get closer to ISC style

See merge request isc-projects/bind9!3061

(cherry picked from commit d3b49b6675)

0255a974 revise .clang-format and add a C formatting script in util
e851ed0b apply the modified style
2020-02-14 05:35:29 +00:00
Ondřej Surý
2e55baddd8 Merge branch '46-add-curly-braces' into 'master'
Add curly braces using uncrustify and then reformat with clang-format back

Closes #46

See merge request isc-projects/bind9!3057

(cherry picked from commit 67b68e06ad)

36c6105e Use coccinelle to add braces to nested single line statement
d14bb713 Add copy of run-clang-tidy that can fixup the filepaths
056e133c Use clang-tidy to add curly braces around one-line statements
2020-02-13 21:28:35 +00:00
Michał Kępień
5eded8d66e Prepare release notes for BIND 9.16.0
- Merge release notes from all 9.15.x releases, leaving only those
    which do not apply to BIND 9.14.

  - Add missing GitLab/RT issue identifiers.

  - Update "Introduction", "Note on Version Numbering", and "End of
    Life" sections with BIND 9.16 information.
2020-02-12 16:04:04 +01:00
Ondřej Surý
c931d8e417 Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master'
Reformat source code with clang-format

Closes #46

See merge request isc-projects/bind9!2156

(cherry picked from commit 7099e79a9b)

4c3b063e Import Linux kernel .clang-format with small modifications
f50b1e06 Use clang-format to reformat the source files
11341c76 Update the definition files for Windows
df6c1f76 Remove tkey_test (which is no-op anyway)
2020-02-12 14:51:18 +00:00
Ondřej Surý
341840c026 Run the check-cocci on the whole tree, allow passing extra arguments 2020-02-08 03:12:09 -08:00
Ondřej Surý
2868eafc46 Suppress unknownMacro directive which is currently broken with OpenSSL 2020-02-04 11:09:22 +01:00
Evan Hunt
dba0163dac Correctly handle catalog zone entries containing slashes
- Add quotes before and after zone name when generating "addzone"
  input so avoid "unexpected token" errors.
- Use a hex digest for zone filenames when the zone or view name
  contains a slash.
- Test with a domain name containing a slash.
- Incidentally added 'catzhash.py' to contrib/scripts to generate
  hash labels for catalog zones, as it was needed to write the test.
2020-02-03 16:08:20 -08:00
Witold Kręcicki
43279de8e6 pipelined test: we no longer have -Tdelay option, use a python proxy that delays packets as a workaround 2020-01-22 12:16:59 +01:00
Evan Hunt
95c76e537f Add empty release notes section for BIND 9.15.8 2020-01-16 08:32:34 +01:00