2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

43778 Commits

Author SHA1 Message Date
Michal Nowak
055bc118eb Add meson support to util/release-tarball-comparison.sh 2025-06-25 12:48:13 +02:00
Alessio Podda
32e86ed643 chg: dev: Use RCU for rad name
The RAD/agent domain is a functionality from RFC 9567 that provides
a suffix for reporting error messages. On every query context reset,
we need to check if a RAD is configured and, if so, copy it.

Since we allow the RAD to be changed by reconfiguring the zone,
this access is currently protected by a mutex, which causes contention.

This commit replaces the mutex with RCU to reduce contention. The
change results in a 3% performance improvement in the 1M delegation
test.

Merge branch 'alessio/rcu-rad' into 'main'

See merge request isc-projects/bind9!10616
2025-06-25 08:30:28 +00:00
Alessio Podda
19818aebf7 Use RCU for rad name
The RAD/agent domain is a functionality from RFC 9567 that provides
a suffix for reporting error messages. On every query context reset,
we need to check if a RAD is configured and, if so, copy it.

Since we allow the RAD to be changed by reconfiguring the zone,
this access is currently protected by a mutex, which causes contention.

This commit replaces the mutex with RCU to reduce contention. The
change results in a 3% performance improvement in the 1M delegation
test.
2025-06-25 09:55:02 +02:00
Mark Andrews
e20d44f658 new: ci: Update Clang to version 20
Merge branch 'mnowak/llvm-20' into 'main'

See merge request isc-projects/bind9!10565
2025-06-25 13:22:49 +10:00
Mark Andrews
d36b0f2b43 Ignore reformat sources with up-to-date clang-format-20 2025-06-25 12:47:02 +10:00
Mark Andrews
422b9118e8 Use clang-format-20 to update formatting 2025-06-25 12:44:22 +10:00
Mark Andrews
eeafcee7ad Preserve brackets around string concatenation
We need disable clang-format here to preserve the brackets around
the string concatenation to prevent -Wstring-concatenation -Werror
breaking the build.
2025-06-25 12:44:22 +10:00
Mark Andrews
3620db5ea6 Preserve brackets in DNS_SLABHEADER_GETATTR macro
We need to turn off clang-format to preserve the brackets as
'attribute' can be an expression and we need it to be evaluated
first.

Similarly we need the entire result to be evaluated independent of
the adjoining code.
2025-06-25 12:44:22 +10:00
Michal Nowak
31922536c0 Update Clang to version 20 2025-06-25 12:44:22 +10:00
Nicki Křížek
ea52887e7a chg: ci: Add newline for changelog CI job
In case the changelog file doesn't have an empty line at the end of the
file, the job may fail with the following error:

WARNING: Bullet list ends without a blank line; unexpected unindent.

This typically happens in MRs targeting the -S edition, as those
changelogs usually don't have an empty newline. This change ensures the
changelog job can pass and verify the title/desc contents even in those
cases.

Merge branch 'nicki/ci-changelog-add-missing-newline' into 'main'

See merge request isc-projects/bind9!10628
2025-06-24 17:30:12 +02:00
Nicki Křížek
ebf155ecc8 Add newline for changelog CI job
In case the changelog file doesn't have an empty line at the end of the
file, the job may fail with the following error:

WARNING: Bullet list ends without a blank line; unexpected unindent.

This typically happens in MRs targeting the -S edition, as those
changelogs usually don't have an empty newline. This change ensures the
changelog job can pass and verify the title/desc contents even in those
cases.
2025-06-24 17:29:26 +02:00
Michal Nowak
b611c43915 fix: ci: Fix release CI job with meson
Closes #5364

Merge branch '5364-fix-release-job-with-meson' into 'main'

See merge request isc-projects/bind9!10621
2025-06-24 17:00:48 +02:00
Michal Nowak
9809735195 Fix release CI job with meson
Fix documentation paths.
2025-06-24 17:00:05 +02:00
Michal Nowak
54ea6722e5 Create "srcid" file as part of release tarball
Change the name of the source ID file to what we used to deliver.
2025-06-24 17:00:05 +02:00
Michal Nowak
875c609424 Build epub ARM as part of docs jobs 2025-06-24 17:00:05 +02:00
Nicki Křížek
ecedefa40a chg: test: Make extra_artifacts check optional
There is an ongoing debate about the usefulness of the extra artifacts
check. While it might be useful to detect unexpected behaviour in some
tests, it feels extraneous in many cases. This change provides a middle
ground by making the artifact checking optional. This might be
especially useful for writing new tests, since the author gets to decide
whether the check is useful -- and can utilize it, or can skip it for
sake of brevity.

Merge branch 'nicki/make-extra-artifacts-check-optional' into 'main'

See merge request isc-projects/bind9!10622
2025-06-24 16:57:27 +02:00
Nicki Křížek
c06dc71cd5 Make extra_artifacts check optional
There is an ongoing debate about the usefulness of the extra artifacts
check. While it might be useful to detect unexpected behaviour in some
tests, it feels extraneous in many cases. This change provides a middle
ground by making the artifact checking optional. This might be
especially useful for writing new tests, since the author gets to decide
whether the check is useful -- and can utilize it, or can skip it for
sake of brevity.
2025-06-24 16:56:53 +02:00
Petr Špaček
c7d0c7dcb0 fix: nil: Do not include benchmark data in tarball
Related: #5379

Merge branch 'pspacek/do-not-distribute-benchmark-data' into 'main'

See merge request isc-projects/bind9!10619
2025-06-24 12:39:04 +00:00
Michal Nowak
b890ff46cc Drop empty directory bin/rndc/include/
It should have been removed as part of
90880522259a389c7e4e29a240370e676b7d2b25.
2025-06-24 12:38:37 +00:00
Michal Nowak
fcb2203431 Do not include empty directories cocci and .reuse in tarball 2025-06-24 12:38:37 +00:00
Michal Nowak
4ffab46059 Do not include cocci/ data in tarball 2025-06-24 12:38:37 +00:00
Petr Špaček
525c6ae983 Do not include benchmark data in tarball
names.csv file triples (compressed) tarball size.
meson dist respects .gitattributes so we don't need to add special magic
to meson.build.
2025-06-24 12:38:37 +00:00
Michal Nowak
414e13ce3e new: ci: Add Alpine Linux 3.22
Merge branch 'mnowak/alpine-3.22' into 'main'

See merge request isc-projects/bind9!10539
2025-06-24 14:02:54 +02:00
Michal Nowak
b20c71c2dc
Add Alpine Linux 3.22 2025-06-24 13:25:06 +02:00
Colin Vidal
b49f83a3e6 chg: dev: parse user configuration before exclusive mode
Previously, `named.conf` was parsed while the server was in exclusive (i.e., single-threaded) mode and unable to answer queries. This could cause an unnecessary delay in query processing when the file was large. We now delay entry into exclusive mode until after the configuration has been parsed, but before it is applied.

Merge branch 'colin/configparse-before-exclusive' into 'main'

See merge request isc-projects/bind9!10418
2025-06-24 10:52:11 +02:00
Colin Vidal
349cc060f4 wait for reload completed in emptyzones system test
The emptyzones system test ran two consecutive "rndc reload" commands
without waiting for the first one to complete. It used to work because
the commands were serialized, but now an rndc reconfig/reload command is
ignored if another one is already running, so the emptyzones test is
more likely to fail.

Fix this problem by waiting for the log message indicating that all the
zones are loaded before attempting the next reload.
2025-06-23 23:20:30 -07:00
Colin Vidal
209b30d563 log-based test for load/apply config
Add a new system test which checks named output when starting,
reconfiguring and reloading the server. It checks that the steps where
configuration is loaded, when named enters exclusive mode, and when the
configuration is applied are all logged, and that they occur in the
correct order. This adds a guard/warning to keep the parsing of the
named.conf outside of the exclusive mode.
2025-06-23 10:45:31 -07:00
Colin Vidal
d7416bb472 ignore reload request if in a reload process
Ignore an 'rndc reload' or 'rndc reconfig' command if received by named
while the server is currently reloading itself.
2025-06-23 10:45:14 -07:00
Colin Vidal
d7de2ba084 parse user configuration before exclusive mode
The configuration file was parsed when named was in exclusive
(i.e. single-threaded) mode and unable to answer queries. Because
the parsing is a self-contained operation, it is now done before
named enters exclusive mode.

This reduces the amount of time named can't answer queries when
reloading the configuration when the configuration file is large.
Note that exclusive mode is still used for applying the
configuration changes to the server.

Also, simplify the configuration logic by parsing the built-in
configuration only once at server start time.
2025-06-23 10:35:31 -07:00
Colin Vidal
8685ebdb99 renamed named_g_config/defaults
For better clarity, the global variables named_g_config and
named_g_defaults have been changed to named_g_defaultconfig
and named_g_defaultoptions.
2025-06-23 10:35:17 -07:00
Michal Nowak
6f17df074d fix: ci: Mark ForEachMacros as iterator names
After f10f5572ac7e0520eed4516be52df625ad56c860 spatch started reporting
the following warnings:

    Impossible: How can diff be null and have not Correct in compare_c? Tag1 ("diff token: ( VS (\nFile \"./lib/dns/include/dns/rdatasetiter.h\", line 109, column 32, charpos = 3103\n  around = '(',\n  whole content = #define DNS_RDATASETITER_FOREACH(rds)               \\\nFile \"/tmp/cocci-output-110376-c54da3-rdatasetiter.h\", line 109, column 32, charpos = 3103\n  around = '(',\n  whole content = #define DNS_RDATASETITER_FOREACH(rds)               \\\n")
    Impossible: How can diff be null and have not Correct in compare_c? Tag1 ("diff token: ( VS (\nFile \"./lib/dns/include/dns/dbiterator.h\", line 114, column 30, charpos = 3413\n  around = '(',\n  whole content = #define DNS_DBITERATOR_FOREACH(rds)               \\\nFile \"/tmp/cocci-output-110387-883f2f-dbiterator.h\", line 114, column 30, charpos = 3413\n  around = '(',\n  whole content = #define DNS_DBITERATOR_FOREACH(rds)               \\\n")

See https://github.com/coccinelle/coccinelle/issues/398.

Merge branch 'mnowak/coccinelle-fix-impossible-warning' into 'main'

See merge request isc-projects/bind9!10557
2025-06-23 19:05:09 +02:00
Michal Nowak
0569f4a559
Mark ForEachMacros as iterator names
After f10f5572ac7e0520eed4516be52df625ad56c860 spatch started reporting
the following warnings:

    Impossible: How can diff be null and have not Correct in compare_c? Tag1 ("diff token: ( VS (\nFile \"./lib/dns/include/dns/rdatasetiter.h\", line 109, column 32, charpos = 3103\n  around = '(',\n  whole content = #define DNS_RDATASETITER_FOREACH(rds)               \\\nFile \"/tmp/cocci-output-110376-c54da3-rdatasetiter.h\", line 109, column 32, charpos = 3103\n  around = '(',\n  whole content = #define DNS_RDATASETITER_FOREACH(rds)               \\\n")
    Impossible: How can diff be null and have not Correct in compare_c? Tag1 ("diff token: ( VS (\nFile \"./lib/dns/include/dns/dbiterator.h\", line 114, column 30, charpos = 3413\n  around = '(',\n  whole content = #define DNS_DBITERATOR_FOREACH(rds)               \\\nFile \"/tmp/cocci-output-110387-883f2f-dbiterator.h\", line 114, column 30, charpos = 3413\n  around = '(',\n  whole content = #define DNS_DBITERATOR_FOREACH(rds)               \\\n")

See https://github.com/coccinelle/coccinelle/issues/398.
2025-06-23 18:18:12 +02:00
Petr Špaček
8a7c95e760 fix: nil: Restore DNSSEC validation by default
Closes #5380

Merge branch '5380-reenable-dnssec-validation' into 'main'

See merge request isc-projects/bind9!10617
2025-06-23 14:02:06 +00:00
Petr Špaček
3d1733b936 Restore DNSSEC validation by default
Meson generated 'dnssec-validation yes' into the built-in config, but
this config without an explicit trust anchor does not enable validation.
Change default to 'dnssec-validation auto' to use built-in key, as in
the autotools days.
2025-06-23 12:58:59 +00:00
Aydın Mercan
181ad273e8 fix: dev: Fix RTD builds and minor documentation issues
Fix some leftover artifacts and information while transitioning BIND to Meson.
Add CI job to verify that pre-generated config grammar files are up-to-date with code.

Merge branch 'aydin/meson-doc-fix' into 'main'

See merge request isc-projects/bind9!10584
2025-06-23 14:23:53 +03:00
Aydın Mercan
3bb88f847a
Remove the configblock sphinx extension
The `configblock` extension doesn't work with RHEL 8. However, this
extension isn't needed anymore after the RTD fix and can be safely
removed.
2025-06-23 13:45:09 +03:00
Aydın Mercan
b4c1f9ee09
Switch autoconf references to meson in readme 2025-06-23 13:45:06 +03:00
Aydın Mercan
5c9b4f3163
Remove build requirements from building arm
The meson build switched to generating the file grammars and using meson
to build the manpages/ARM. This is because meson doesn't work well when
writing files outside the build directory.

However, this has been suboptimal when someone only wants to build the
documentation (like RTD). Sphinx can now be used outside meson like it
was with autoconf.

Grammars are now updated by the developer with CI checking if one is
needed or not, like clang-format.
2025-06-23 13:45:04 +03:00
Aydın Mercan
3447e1631d
Fix build instructions
There were leftover artifacts and instructions from the transition.
2025-06-23 13:44:58 +03:00
Michał Kępień
8e6ad1e465 fix: nil: Use links() for checking if -latomic is necessary
Use the links() method instead of compiles() for checking whether
-latomic needs to be added to linker invocations as compiles() does not
perform the linking step and is therefore not appropriate for carrying
out this kind of checks.

See #5379

Merge branch '5379-use-links-for-checking-if-latomic-is-necessary' into 'main'

See merge request isc-projects/bind9!10592
2025-06-23 10:28:26 +02:00
Michał Kępień
9f2dcd2853
Retain Meson >= 0.61 version requirement
The add_project_dependencies() method was only added in Meson 0.63.
Replace its only use in meson.build with a corresponding call to the
add_project_link_arguments() method to avoid bumping the minimum
required Meson version beyond the one available in stock Ubuntu 22.04
LTS repositories.
2025-06-23 10:23:17 +02:00
Michał Kępień
b06d3f6c77
Use links() for checking if -latomic is necessary
Use the links() method instead of compiles() for checking whether
-latomic needs to be added to linker invocations as compiles() does not
perform the linking step and is therefore not appropriate for carrying
out this kind of checks.
2025-06-23 10:23:17 +02:00
Michał Kępień
eed5d39fda chg: ci: move "stress" test generation script to QA repo
Move the util/generate-stress-test-configs.py script from the BIND 9
source repository to the BIND 9 QA repository.  This simplifies the
maintenance of that script by eliminating the need to backport every
change applied to it to multiple branches.

Merge branch 'michal/move-stress-test-generation-script-to-qa-repo' into 'main'

See merge request isc-projects/bind9!10585
2025-06-21 04:47:19 +00:00
Michał Kępień
4f7f420534
Move "stress" test generation script to QA repo
Move the util/generate-stress-test-configs.py script from the BIND 9
source repository to the BIND 9 QA repository.  This simplifies the
maintenance of that script by eliminating the need to backport every
change applied to it to multiple branches.
2025-06-21 06:43:36 +02:00
Michał Kępień
c5f01022b8 fix: nil: Install named-compilezone
named-compilezone is an alias for named-checkzone: the two tools are
built from the same set of source files, but they behave differently
depending on which executable gets invoked.  With Automake,
named-compilezone was installed as a hard link to named-checkzone using
a custom installation hook; try to keep things simple with Meson by
using the install_symlink() method, which makes named-compilezone a
symbolic link to named-checkzone and is the same thing that is already
used for ddns-confgen/tsig-keygen.

See #5379

Merge branch '5379-install-named-compilezone' into 'main'

See merge request isc-projects/bind9!10595
2025-06-21 04:06:45 +00:00
Michał Kępień
ebd8074988
Install named-compilezone
named-compilezone is an alias for named-checkzone: the two tools are
built from the same set of source files, but they behave differently
depending on which executable gets invoked.  With Automake,
named-compilezone was installed as a hard link to named-checkzone using
a custom installation hook; try to keep things simple with Meson by
using the install_symlink() method, which makes named-compilezone a
symbolic link to named-checkzone and is the same thing that is already
used for ddns-confgen/tsig-keygen.
2025-06-21 05:59:51 +02:00
Mark Andrews
d4b4598c2e fix: test: verify-axfr.db gets updated too fast in mirror test
Add a 1 second wait before updating verify-axfr.db so that the
modification time of the file changes.

Closes #5376

Merge branch '5376-verify-axfr-db-gets-updated-too-fast-in-mirror-test' into 'main'

See merge request isc-projects/bind9!10586
2025-06-19 16:27:13 +00:00
Mark Andrews
c19956b3cb verify-axfr.db gets updated too fast in mirror test
Add a 1 second wait before updating verify-axfr.db so that the
modification time of the file changes.
2025-06-19 15:49:29 +00:00
Nicki Křížek
65daf35b63 fix: test: Ignore softhsm2 errors when deleting token in keyfromlabel test
In some rare cases, the softhsm2 utility reports failure to delete the
token directory, despite the token being found. Subsequent attempts to
delete the token again indicate that the token was deleted.

Ignore this cleanup error, as it doesn't prevent our tests from working
properly. There is also an attempt to delete the token before the test
starts which ensures a clean state before the test is executed, in case
there's actually a leftover token.

Closes #5244

Merge branch '5244-ignore-softhsm2util-delete-token-error' into 'main'

See merge request isc-projects/bind9!10607
2025-06-19 13:49:52 +00:00
Nicki Křížek
e786a2e950 Ignore softhsm2 errors when deleting token in keyfromlabel test
In some rare cases, the softhsm2 utility reports failure to delete the
token directory, despite the token being found. Subsequent attempts to
delete the token again indicate that the token was deleted.

Ignore this cleanup error, as it doesn't prevent our tests from working
properly. There is also an attempt to delete the token before the test
starts which ensures a clean state before the test is executed, in case
there's actually a leftover token.
2025-06-19 13:49:34 +00:00