Commit Graph

39338 Commits

Author SHA1 Message Date
Nicki Křížek
2a0c3c8c14 Make system tests compatible with pytest 8.0.0+
The pytest collection mechanism has been overhauled in pytest 8.0.0,
resulting in a different node tree when collecting the tests. Ensure the
paths / names we're using that are derived from the node tree are
consistent across different pytest versions.

Particularly, this has affected the convenience symlink name (which is
supposed to be in the form of e.g. dns64_sh_dns64 for the dns64 module
and tests_sh_dns64.py module) and the test name that's logged at the
start of the test, which is supposed to include the system test
directory relative to the root system test directory as well as the
module name (e.g. dns64/tests_sh_dns64.py).

Related https://github.com/pytest-dev/pytest/issues/7777

(cherry picked from commit 7118cbed98)
2024-10-24 13:57:41 +02:00
Matthijs Mekking
a25918c9f5 chg: nil: Add inline-signing warning for upgrading to 9.20
For dynamic zones that do not set inline-signing explicitly, add a warning that the default value for inline-signing has changed. Dynamic zones that want to be able to reuse the zone (and not trigger a full resign) should
explicitly configure "inline-signing no;".

Merge branch 'matthijs-warn-if-inline-signing-not-set-for-dynamic-zone-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9646
2024-10-23 13:19:30 +00:00
Matthijs Mekking
e5c711fd43 Add inline-signing warning for upgrading to 9.20
For dynamic zones that do not set inline-signing explicitly, add a
warning that the default value for inline-signing has changed. Dynamic
zones that want to be able to reuse the zone (and not trigger a full
resign) should explicitly configure "inline-signing no;".
2024-10-23 10:34:49 +00:00
Michal Nowak
fa16eb402e [9.18] chg: test: Rewrite verify system test to pytest
Backport of MR !9249

Merge branch 'backport-mnowak/pytest_rewrite_verify-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9675
2024-10-21 13:07:12 +00:00
Michal Nowak
82712ad7fc Rewrite verify system test to pytest
(cherry picked from commit 091968f5fa)
2024-10-21 14:11:46 +02:00
Michal Nowak
59e20811fc [9.18] fix: doc: All footnotes need to have unique name and be referenced
With Sphinx 8.1.0, footnotes can't stand on their own and have to be
referenced from somewhere, otherwise build fails, e.g.:

    doc/dnssec-guide/signing.rst:1470: WARNING: Footnote [#] is not referenced. [ref.footnote]

Backport of MR !9663

Merge branch 'backport-mnowak/fix-dnssec-guide-footnote-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9671
2024-10-21 09:15:55 +00:00
Michal Nowak
eb9061e7f1 All footnotes need to have unique name and be referenced
With Sphinx 8.1.0, footnotes can't stand on their own and have to be
referenced from somewhere, otherwise build fails, e.g.:

    doc/dnssec-guide/signing.rst:1470: WARNING: Footnote [#] is not referenced. [ref.footnote]

(cherry picked from commit bdf8859e2d)
2024-10-21 11:02:27 +02:00
Mark Andrews
002141af2e [9.18] fix: usr: Restore values when dig prints command line
Options of the form `[+-]option=<value>` failed to display the value on the printed command line. This has been fixed.

Closes #4993

Backport of MR !9653

Merge branch 'backport-4993-dig-restore-command-line-values-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9667
2024-10-18 02:59:14 +00:00
Mark Andrews
a05508b0c4 Correctly get final token
(cherry picked from commit df5b4ba894)
2024-10-18 02:10:39 +00:00
Mark Andrews
b22134fd74 Restore seperator values
strtok_r is destructive.  Restore the seperators so that the command
line can be properly displayed.

(cherry picked from commit 609d96aa12)
2024-10-18 02:10:38 +00:00
Mark Andrews
7bb817d1b6 [9.18] fix: dev: Remove unused <openssl/{hmac,engine}.h> headers from OpenSSL shims
The <openssl/{hmac,engine}.h> headers were unused and including the
<openssl/engine.h> header might cause build failure when OpenSSL
doesn't have Engines support enabled.

See https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine

Backport of MR !9593

Merge branch 'backport-bind-9.20-openssl-engine-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9645
2024-10-18 01:36:41 +00:00
Petr Menšík
e5ffa52c6d Remove unused <openssl/{hmac,engine}.h> headers from OpenSSL shims
The <openssl/{hmac,engine}.h> headers were unused and including the
<openssl/engine.h> header might cause build failure when OpenSSL
doesn't have Engines support enabled.

See https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine

(cherry picked from commit 75a50925f7)
2024-10-18 01:29:27 +00:00
Nicki Křížek
c5b6eb3619 [9.18] chg: test: Disable too-many/too-few pylint checks
Backport of MR !9626

Merge branch 'backport-nicki/pylint-disable-too-few-too-many-checks-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9657
2024-10-17 11:56:13 +00:00
Nicki Křížek
9ca6fcc4d5 Disable too-many/too-few pylint checks
Enforcing pylint standards and default for our test code seems
counter-productive. Since most of the newly added code are tests or is
test-related, encountering these checks rarely make us refactor the code
in other ways and we just disable these checks individually. Code that
is too complex or convoluted will be pointed out in reviews anyways.

(cherry picked from commit 7639c58c48)
2024-10-17 13:42:08 +02:00
Michal Nowak
68ac0194ee [9.18] chg: doc: Read the Docs should always source requirements.txt from "main"
HTTP URI of doc/arm/requirements.txt on the "main" branch is the source
of PyPI packages in CI base image. To make it consistent in all
maintained CI branches on RTD, use the HTTP URI as well.

This change is non-material on the "main" branch, but ensures the right
packages on stable branches where for RTD we currently leverage outdated
packages because we failed to update doc/arm/requirements.txt there.

Backport of MR !9630

Merge branch 'backport-mnowak/rtd-always-resource-requirements-txt-from-main-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9661
2024-10-17 11:23:12 +00:00
Michal Nowak
d189b8a432 Drop doc/arm/requirements.txt
doc/arm/requirements.txt is maintained only on the "main" branch.
2024-10-17 12:59:31 +02:00
Michal Nowak
03d068d168 Read the Docs should always source requirements.txt from "main"
HTTP URI of doc/arm/requirements.txt on the "main" branch is the source
of PyPI packages in CI base image. To make it consistent in all
maintained CI branches on RTD, use the HTTP URI as well.

This change is non-material on the "main" branch, but ensures the right
packages on stable branches where for RTD we currently leverage outdated
packages because we failed to update doc/arm/requirements.txt there.

(cherry picked from commit 8fb6115492)
2024-10-17 10:50:25 +00:00
Michal Nowak
9ddfe87a76 [9.18] chg: doc: Update Sphinx, docutils, and sphinx_rtd_theme packages
Backport of MR !9652

Merge branch 'backport-mnowak/doc-tools-october-2024-updates-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9659
2024-10-17 10:28:04 +00:00
Michal Nowak
2405885b05 Add RFCs referenced by footnotes
With Sphinx 8.1.0, footnotes can't stand on their own and have
referenced from somewhere:

    /builds/isc-projects/bind9/doc/arm/general.rst:439: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:441: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:445: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:457: WARNING: Footnote [#] is not referenced. [ref.footnote]

(cherry picked from commit 54410e034f)
2024-10-17 10:11:19 +00:00
Michal Nowak
992dd6f2e3 Update Sphinx, docutils, and sphinx_rtd_theme packages
(cherry picked from commit 755dd44ec5)
2024-10-17 10:11:19 +00:00
Michal Nowak
55c09a4d95 Merge tag 'v9.18.31' into bind-9.18 2024-10-16 17:54:38 +02:00
Michal Nowak
8ce45e2a72 [9.18] chg: test: Remove unused sbytes, stime, n, response, and rtime variables
Backport of MR !9617

Merge branch 'backport-mnowak/drop-unused-variables-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9644
2024-10-15 18:57:23 +00:00
Michal Nowak
5d7a32f5c4 Add vulture
(cherry picked from commit c0246ecef6)
2024-10-15 18:50:06 +00:00
Michal Nowak
03cf294d06 Remove unused sbytes, stime, n, response, and rtime variables
(cherry picked from commit 4857da271d)
2024-10-15 18:50:06 +00:00
Michal Nowak
e0ad4d5eb6 [9.18] chg: test: Rewrite tools system test to pytest
Backport of MR !9208

Merge branch 'backport-mnowak/pytest_rewrite_tools-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9642
2024-10-15 18:15:06 +00:00
Michal Nowak
eb8a56c90c Rewrite tools system test to pytest
(cherry picked from commit 3f8e59330d)
2024-10-15 17:28:42 +00:00
Michal Nowak
4bbb46ea84 [9.18] chg: doc: Update sphinx to 7.4.7
Backport of MR !9529.

Merge branch 'backport-mnowak/update-sphinx-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9639
2024-10-15 12:54:24 +00:00
Nicki Křížek
4f1e800f28 Update sphinx to 7.4.7
(cherry picked from commit 3d65fa2740)
2024-10-15 14:39:31 +02:00
Nicki Křížek
6cb3cc642b [9.18] chg: test: Support dnspython 2.7.0
Closes #4988

Backport of MR !9634

Merge branch 'backport-4988-dnspython-2.7.0-support-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9636
2024-10-15 11:09:16 +00:00
Nicki Křížek
ef508f5052 Support dnspython 2.7.0
CookieOption with new .server/.client attributes (rather than .data) was
added to dnspython. Adjust the code to use the new attributes if
available and fall back to the old code for dnspython<2.7.0
compatibility.

(cherry picked from commit 0d90b13646)
2024-10-15 10:30:02 +00:00
Mark Andrews
9d59c72798 [9.18] fix: usr: Fix NSEC3 closest encloser lookup for names with empty non-terminals
The performance improvement for finding the NSEC3 closest encloser when generating authoritative responses could cause servers to return incorrect NSEC3 records in some cases. This has been fixed.

Closes #4950

Backport of MR !9610

Merge branch 'backport-4950-bind-logs-expected-covering-nsec3-got-an-exact-match-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9632
2024-10-15 02:37:02 +00:00
Mark Andrews
74b6aa8dd2 Test that the correct NSEC3 closest encloser is returned
(cherry picked from commit b457f64d4a)
2024-10-15 11:00:03 +11:00
Mark Andrews
94f6655915 Use a binary search to find the NSEC3 closest encloser
maxlabels is the suffix length that corresponds to the latest
NXDOMAIN response.  minlabels is the suffix length that corresponds
to longest found existing name.

(cherry picked from commit 67f31c5046)
2024-10-14 23:55:13 +00:00
Matthijs Mekking
f60f153b8a [9.18] chg: usr: Harden key management when key files have become unavailabe
Prior to doing key management, BIND 9 will check if the key files on disk match the expected keys. If key files for previously observed keys have become unavailable, this will prevent the internal key manager from running.

Backport of MR !9337

Merge branch 'backport-4763-do-not-roll-if-key-files-are-missing-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9623
2024-10-14 14:29:05 +00:00
Matthijs Mekking
16fed98e20 Add new behavior to the ARM
Add text to the ARM that describes what we do in case key files have
become unavailable.

(cherry picked from commit 351c066d91)
2024-10-14 13:54:09 +00:00
Matthijs Mekking
39e4576341 Test removing DNSKEYs from other providers
In a multi-signer setup, removing DNSKEY records from the zone should
not be treated as a key that previously exists in the keyring, thus
blocking the keymgr. Add a test case to make sure.

(cherry picked from commit 5f552293d7)
2024-10-14 13:54:09 +00:00
Matthijs Mekking
fdeb456341 Small keymgr improvement
When a key is to be purged, don't run the key state machinery for it.

(cherry picked from commit af54e3dadc)
2024-10-14 13:54:09 +00:00
Matthijs Mekking
5be6acb63d Add additional test case with purged key
Test that if a key to be purged is in the keyring, it does not
prevent the keymgr from running. Normally a key that is in the keyring
should be available again on the next run, but that is not true for
a key that can be purged.

In addition, fix some wait_for_log calls, by adding the missing
'|| ret=1' parts.

(cherry picked from commit a2317425bc)
2024-10-14 13:54:09 +00:00
Matthijs Mekking
65cd5d5c32 Fix some system test cases
Some test cases were working but for the wrong reasons. These started
to fail when I implemented the first approach for #4763, where the
existence of a DNSKEY together with an empty keyring is suspicious and
would prevent the keymgr from running.

These are:

1. kasp: The multisigner-model2.kasp zone has ZSKs from other providers
   in the zone, but not yet its own keys. Pregenerate signing keys and
   add them to the unsigned zone as well.

2. kasp: The dynamic-signed-inline-signing.kasp zone has a key generated
   and added in the raw version of the zone. But the key file is stored
   outside the key-directory for the given zone. Add '-K keys' to the
   dnssec-keygen command.

(cherry picked from commit d1e263ef13)
2024-10-14 13:54:09 +00:00
Matthijs Mekking
4091177181 Verify new key files before running keymgr
Prior to running the keymgr, first make sure that existing keys
are present in the new keylist. If not, treat this as an operational
error where the keys are made offline (temporarily), possibly unwanted.

(cherry picked from commit 5fdad05a8a)
2024-10-14 13:54:09 +00:00
Matthijs Mekking
29be6a82f3 Add test for missing key files, don't roll
In this specific case the key files are temporary unavailable, for
example because of an operator error, or a mount failure). In such
cases, BIND should not try to roll over these keys.

(cherry picked from commit a3afbd9d6f)
2024-10-14 13:54:09 +00:00
Nicki Křížek
c0923c5a81 [9.18] chg: ci: Increase shotgun pipeline timeout
When running shotgun tests on tagged releases, the increased number of
jobs may cause the shotgun pipeline to take longer than 50 minutes to
finish.

Backport of MR !9599

Merge branch 'backport-nicki/increase-shotgun-pipeline-timeout-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9625
2024-10-14 11:33:00 +00:00
Nicki Křížek
cc76c1ee97 Increase shotgun pipeline timeout
When running shotgun tests on tagged releases, the increased number of
jobs may cause the shotgun pipeline to take longer than 50 minutes to
finish.

(cherry picked from commit 3b227e1161)
2024-10-14 11:06:08 +00:00
Artem Boldariev
7039949d49 [9.18] fix: dig - always set the default port when doing a UDP query
This change ensures that the port is set before attempting a UDP query. Before that a situation could appear when previous query have completed over a different transport (that uses a dedicated port) and then a UDP query will be attempted over the port of the previous transport.

Backport of !9618.

Merge branch 'artem-debian-bug-1059582-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9620
2024-10-10 20:08:04 +00:00
Artem Boldariev
cecd3a75ec dig: always set the default port when doing a UDP query
This commit ensures that the port is set before attempting a UDP
query. Before that a situation could appear when previous query have
completed over a different transport (that uses a dedicated port) and
then a UDP query will be attempted over the port of the previous
transport.

(cherry picked from commit e390ed4421)
2024-10-10 22:31:52 +03:00
Matthijs Mekking
03b5bde1d4 [9.18] chg: doc: Add release note for #4460
This release note was missing due to a malformed Merge Request title.

The text is not copied verbatim, but changed to something more release
note-like.

Backport of MR !9598

Merge branch 'backport-4460-add-missing-release-note-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9616
2024-10-10 14:12:34 +00:00
Matthijs Mekking
96e6d91887 Add release note for #4460
This release note was missing due to a malformed Merge Request title.

The text is not copied verbatim, but changed to something more release
note-like.

(manually picked from commit 5860bafc60)
2024-10-10 13:41:38 +00:00
Matthijs Mekking
257fd7eca0 [9.18] fix: dev: Revert "Improve performance when looking for the closest encloser"
Revert "fix: chg: Improve performance when looking for the closest encloser when returning NSEC3 proofs"

This reverts merge request !9436

Closes #4950

Backport of MR !9611

Merge branch 'backport-revert-78d48f7a-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9614
2024-10-10 12:26:51 +00:00
Matthijs Mekking
60bd3bc051 Revert "fix: chg: Improve performance when looking for the closest encloser"
The 9.18 code does not have the rbtdb refactoring. Rather than
backporting from MR !9611, this reverts directly from commit
5d81a258e3.
2024-10-10 14:26:13 +02:00
Michal Nowak
a3b61ad9ec chg: doc: Set up version for BIND 9.18.32
Merge branch 'mnowak/set-up-version-for-bind-9.18.32' into 'bind-9.18'

See merge request isc-projects/bind9!9597
2024-10-08 08:43:23 +00:00