Commit Graph
6703 Commits
Author SHA1 Message Date
Petr Špaček 9b2bf0f8be Pretty-print grammar for zones
It turns out the tree of dictionaries is not the best structure to
represent our grammar, unfortunatelly. The problem is that "zone" has
several context-dependent variants which change meaning of "zone" based
on inner field "type".

Redesigning the whole structure does not seem to be worth, so I settled
on this terrible hack.

(cherry picked from commit 0392144e99)
2022-07-01 10:21:05 +02:00
Petr Špaček c4133e8779 Add zone definitions into the view grammar
I cannot see a reasonable way to achieve this without the hack in this
commit.

(cherry picked from commit 435cbb61ba)
2022-07-01 10:21:05 +02:00
Petr Špaček bc729e39da Add option to suppress grammar rendering
A new flag
.. namedconf:statement::
   :suppress_grammar:
suppresses pretty-printing grammar.

It is useful mostly for zones because each zone has it's own grammar, so
printing all of them at once usually does not make sense.

(cherry picked from commit 1f5bc4fe3b)
2022-07-01 10:21:05 +02:00
Petr Špaček 243ae3b6a7 Remove auto-generated rst files in repo in favour of grammar pretty printer
(cherry picked from commit 0bbbdc6244)
2022-07-01 10:20:56 +02:00
Petr Špaček f34c1034f2 Warn about experimental and deprecated options
(cherry picked from commit 7b4ad8a3ff)
2022-07-01 10:00:28 +02:00
Petr Špaček 3a692b068c Render statement's grammar
This is replacement for auto-generated *.rst files stored in the repo.

(cherry picked from commit c6fe8970f6)
2022-07-01 10:00:28 +02:00
Petr Špaček 2df4072d43 Render list of blocks accepting a given statement
(cherry picked from commit eba3b1ad16)
2022-07-01 10:00:28 +02:00
Petr Špaček a486e6e294 Detect unsupported statement:: directives with multiple names
(cherry picked from commit d61d998e3b)
2022-07-01 10:00:28 +02:00
Petr Špaček 4c53d6f906 Warn about statements not found in the grammar
(cherry picked from commit ebe6ede2ec)
2022-07-01 10:00:28 +02:00
Petr Špaček b11b1c6414 Warn about statements in grammar not described in docs
Skip over obsolete options.

(cherry picked from commit cbad1803a5)
2022-07-01 10:00:27 +02:00
Petr Špaček 7fe582629a Give Sphinx configuration domains access to grammar
(cherry picked from commit 1c6f2c5ad1)
2022-07-01 10:00:27 +02:00
Petr Špaček 160428a0f7 Add helper to unify options and zone block grammars
A helper is needed to combine cfg_test output for generic options and
all the type-dependent zone block variants.

(cherry picked from commit a691ebd0c9)
2022-07-01 10:00:27 +02:00
Petr Špaček ec9af7dbc7 Add pretty printer for JSON grammar
It produces the same format as cfg_test --grammar. The advantage is that
it allows to print any node in configuration the tree, not just whole
blocks.

(cherry picked from commit 190004e46c)
2022-07-01 10:00:27 +02:00
Petr Špaček aabdff9551 Add utility to search for context-dependent configuration statements
The utility detects statements which use the same name (e.g.
max-zone-ttl) but use different grammar in different contexts. These
typically need special case in docs.

(cherry picked from commit 8960d51aa3)
2022-07-01 10:00:27 +02:00
Petr Špaček a78b461653 Add a new library to parse grammar format produced by cfg_test
It transforms named.conf/rndc.conf grammar from text format into Python
dictionary. This allows granular access to grammar elements.

Beware: It heavity depens on cfg_test output format!
(cherry picked from commit df08982930)
2022-07-01 10:00:27 +02:00
Petr Špaček e9d21cee3b Add rndc.conf grammar into doc/misc
It uses the same mechanism as all other grammars, but the file is named
differently to distinguish it from named.conf grammars.

(cherry picked from commit fb474de3ab)
2022-07-01 10:00:27 +02:00
Petr Špaček 214da1de67 Un-format grammar files in doc/misc
The next commit is going to add parser for ISC configuration format.
To simplify the parser the grammar files in doc/misc are no longer
line-wrapped as handling it would make the grammar parser unnecessairly
complicated.

This affects visible output in the ARM, but in the end we are going to
replace the auto-generated .rst files with grammar pretty printed, so
formatting of these files does not matter in practical terms.

(cherry picked from commit 699570cdec)
2022-07-01 10:00:20 +02:00
Petr Špaček a46f671a30 Add missing comment markers to doc/misc/ grammar files
These files can be consumed by scripts, so obviously missing comment
markers wreak havoc.

(cherry picked from commit af3683f436)
2022-07-01 09:26:18 +02:00
Petr Špaček 364a15da16 Accept rst syntax in .. statement:: short: text
Nested rst syntax is now parsed and rendered. E.g.:

.. namedconf:statement:: example
   :short: Use ``this`` **cool** syntax!

(cherry picked from commit 563eb8e1b9)
2022-06-30 18:12:01 +02:00
Petr Špaček 5513f47e53 Disambiguate address_match_list link anchor
Let's keep just the :term: produced by grammar glossary.

(cherry picked from commit 0e7ca5b5e0)
2022-06-30 18:12:01 +02:00
Suzanne GoldlustandPetr Špaček d4b1916a59 Add the :tags: and :short: descriptions for the category "transfer"
(cherry picked from commit 3cf976bd78)
2022-06-30 18:12:01 +02:00
Suzanne GoldlustandPetr Špaček 51057d3c85 Add the :tags: and :short: descriptions for the category "query"
(cherry picked from commit 7187a5cf77)
2022-06-30 18:12:01 +02:00
Petr Špaček 62958590cd Resurrect DNS NOTIFY chapter in the ARM
It was accidentally removed in the heat of
25eb91d23c.

(cherry picked from commit 2630cf8e76)
2022-06-30 18:11:54 +02:00
Petr Špaček ccb608ebea Declare Debian 9 (Stretch) community-maintained
(cherry picked from commit 4ce1f25210)
2022-06-28 17:56:34 +02:00
Matthijs Mekking f2fc0e9c9e Add some clarifications wrt dynamic zones
These were suggested by GitLab user @elmaimbo.

(cherry picked from commit fb517eb52a)
2022-06-27 11:04:11 +02:00
Ron AitchisonandPetr Špaček 22ac5003b5 Added explanations or Argument, Value, and Directive to the ARM
(cherry picked from commit d44cb9f194)
2022-06-24 16:47:28 +02:00
Petr Špaček 5fbeebc6f3 Add link to glob definition for include directive
(cherry picked from commit bb2a19d655)
2022-06-24 16:47:28 +02:00
Suzanne GoldlustandPetr Špaček 1fc681cce6 Minor text nitpicking around dnssec-policy grammar reference
(cherry picked from commit f4503061ba)
2022-06-24 16:47:28 +02:00
Petr Špaček 19fde8b8f1 Remove ambiguous link anchors for logging { file } statement
Unfortunatelly logging and zone blocks use file statements with
different semantics but the same name.

There is no sane way to disambiguate them in text, so let's remove the
link anchor from logging so we can link to the file statement in zone.

My assumption is that linking to logging { file } is very unlikely
because logging is self-contained in one block but zone config is all
over the place.

(cherry picked from commit fbcaa44851)
2022-06-24 16:47:28 +02:00
Petr Špaček 1b9c74152e Remove ambiguous link anchors for keys statement
Unfortunatelly dnssec-policy and servers blocks use keys statements with
a totally different grammar and semantics but the same name.
There is no sane way to disambiguate them in text, so let's remove the
link anchors to prevent errorneous linking.

(cherry picked from commit d6b2423c99)
2022-06-24 16:47:28 +02:00
Petr Špaček a7da2d4993 Change statement->argument terminology for control channel
control { inet ... allow keys read-only }; are not actual statements
but in fact arguments of a statement. Remove .. namedconf:statement::
syntax to avoid collisions with other statements of the same name.

(cherry picked from commit caf2675ef8)
2022-06-24 16:47:28 +02:00
Petr Špaček 70924290ca Deduplicate dnssec-policy definition in the ARM
(cherry picked from commit 3233414a53)
2022-06-24 16:47:28 +02:00
Petr Špaček b023b62b8d Deduplicate null definition in the ARM logging section
(cherry picked from commit fa2ba5423b)
2022-06-24 16:47:28 +02:00
Petr Špaček c496ffe4f4 Deduplicate {use,avoid}-v{4,6}-udp-ports definitions in the ARM
Statements affected:
use-v4-udp-ports
use-v6-udp-ports
avoid-v4-udp-ports
avoid-v6-udp-ports

(cherry picked from commit cd1b9aa052)
2022-06-24 16:47:28 +02:00
Petr Špaček df2c19c19b Deduplicate request-expire definition in the ARM
(cherry picked from commit 6e634c43cd)
2022-06-24 16:47:27 +02:00
Petr Špaček 8af0d9eca7 Deduplicate provide-ixfr definition in the ARM
(cherry picked from commit 22e6c8a29e)
2022-06-24 16:47:27 +02:00
Petr Špaček 98445cc32b Deduplicate request-ixfr definition in the ARM
Let's be consistent and put all definitions in the options block.

(cherry picked from commit 14389bc446)
2022-06-24 16:47:27 +02:00
Petr Špaček 0dd45cb17f Deduplicate notify-source, notify-source-v6 definitions in the ARM
(cherry picked from commit 08a3cd7ae4)
2022-06-24 16:47:27 +02:00
Petr Špaček 3688d706da Deduplicate request-nsid definition in the ARM
(cherry picked from commit e91529a48b)
2022-06-24 16:47:27 +02:00
Petr Špaček c611110c9b Deduplicate query-source, query-source-v6 definitions in the ARM
(cherry picked from commit 92a125b9c4)
2022-06-24 16:47:27 +02:00
Petr Špaček 8e5925c25a Deduplicate transfer-source, transfer-source-v6 definitions in the ARM
(cherry picked from commit 538f5a7520)
2022-06-24 16:47:27 +02:00
Petr Špaček 8a2470d559 Deduplicate transfer-format definition in the ARM
(cherry picked from commit b6eb0b298d)
2022-06-24 16:47:27 +02:00
Petr Špaček 97530e74e0 Deduplicate send-cookie definition in the ARM
(cherry picked from commit 7937c4bc9c)
2022-06-24 16:47:27 +02:00
Petr Špaček 7390e1e113 Deduplicate max-udp-size definition in the ARM
(cherry picked from commit 8ac82b4f30)
2022-06-24 16:47:27 +02:00
Petr Špaček 9ccadcc310 Deduplicate edns-udp-size definition in the ARM
(cherry picked from commit 624bbf403c)
2022-06-24 16:47:27 +02:00
Petr Špaček 40b9aa2e0b Deduplicate max-zone-ttl definition in the ARM
This is confusing as hell, but we cannot fix that in the manual itself.
At least now the user is made aware of two distinct defaults.

(cherry picked from commit 405a0931ea)
2022-06-24 16:47:27 +02:00
Petr Špaček e28050e7a4 Deduplicate allow-update definition in the ARM
(cherry picked from commit 420a7331a8)
2022-06-24 16:47:27 +02:00
Ron AitchisonandPetr Špaček 0c52d244ba Reference new named.conf description instead of man page
(cherry picked from commit cf85e776c6)
2022-06-24 16:47:26 +02:00
Ron AitchisonandPetr Špaček b8fa35789e Remove line numbering from config file examples
(cherry picked from commit 31e3d1aaf7)
2022-06-24 16:47:26 +02:00
Ron AitchisonandPetr Špaček 309a75e56b Changed all references from clause to block
(cherry picked from commit c40a983334)
2022-06-24 16:47:26 +02:00