From f5c66f311a1dcffcde474abde6315f4d6bf73c18 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 1 Feb 2022 17:49:19 +1100 Subject: [PATCH 1/4] Add missing rst-grammars.pl dependecy to config grammar build --- doc/misc/Makefile.am | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/misc/Makefile.am b/doc/misc/Makefile.am index e78e108171..0951e6aa97 100644 --- a/doc/misc/Makefile.am +++ b/doc/misc/Makefile.am @@ -104,79 +104,79 @@ delegation-only.zoneopt: cfg_test in-view.zoneopt: cfg_test $(AM_V_CFG_TEST)$(builddir)/cfg_test --zonegrammar in-view --active > $@ -../../bin/named/named.conf.rst: options.active +../../bin/named/named.conf.rst: options.active rst-options.pl $(AM_V_RST_OPTIONS)$(PERL) $(srcdir)/rst-options.pl options.active > $@ -master.zoneopt.rst: master.zoneopt +master.zoneopt.rst: master.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl master.zoneopt > $@ -slave.zoneopt.rst: slave.zoneopt +slave.zoneopt.rst: slave.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl slave.zoneopt > $@ -mirror.zoneopt.rst: mirror.zoneopt +mirror.zoneopt.rst: mirror.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl mirror.zoneopt > $@ -forward.zoneopt.rst: forward.zoneopt +forward.zoneopt.rst: forward.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl forward.zoneopt > $@ -hint.zoneopt.rst: hint.zoneopt +hint.zoneopt.rst: hint.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl hint.zoneopt > $@ -stub.zoneopt.rst: stub.zoneopt +stub.zoneopt.rst: stub.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl stub.zoneopt > $@ -static-stub.zoneopt.rst: static-stub.zoneopt +static-stub.zoneopt.rst: static-stub.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl static-stub.zoneopt > $@ -redirect.zoneopt.rst: redirect.zoneopt +redirect.zoneopt.rst: redirect.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl redirect.zoneopt > $@ -delegation-only.zoneopt.rst: delegation-only.zoneopt +delegation-only.zoneopt.rst: delegation-only.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl delegation-only.zoneopt > $@ -in-view.zoneopt.rst: in-view.zoneopt +in-view.zoneopt.rst: in-view.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl in-view.zoneopt > $@ -acl.grammar.rst: options.active +acl.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active acl > $@ -controls.grammar.rst: options.active +controls.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active controls > $@ -dnssec-policy.grammar.rst: options.active +dnssec-policy.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active dnssec-policy > $@ -key.grammar.rst: options.active +key.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active key > $@ -logging.grammar.rst: options.active +logging.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active logging > $@ -primaries.grammar.rst: options.active +primaries.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active primaries > $@ -options.grammar.rst: options.active +options.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active options > $@ -server.grammar.rst: options.active +server.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active server > $@ -statistics-channels.grammar.rst: options.active +statistics-channels.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active statistics-channels > $@ -tls.grammar.rst: options.active +tls.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active tls > $@ -trust-anchors.grammar.rst: options.active +trust-anchors.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active trust-anchors > $@ -managed-keys.grammar.rst: options.active +managed-keys.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active managed-keys > $@ -trusted-keys.grammar.rst: options.active +trusted-keys.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active trusted-keys > $@ -http.grammar.rst: options.active +http.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active http > $@ endif From d975e6630f3586f2f462710979bd6a0135705868 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 1 Feb 2022 17:50:09 +1100 Subject: [PATCH 2/4] Fix grammar generators to produce renderable include files in rst format The missing `::` in the .rst files caused grammar section in docs to render empty. The `::` was accidentally removed in an unrelated commit 58bd26b6cf7bac3f614b6614cd2aff6075b6f9fa which was supposed to update only copyright headers. Fixes: #3120 --- doc/misc/rst-grammars.pl | 2 ++ doc/misc/rst-zoneopt.pl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/doc/misc/rst-grammars.pl b/doc/misc/rst-grammars.pl index 74ffa09db1..56ff5ea708 100644 --- a/doc/misc/rst-grammars.pl +++ b/doc/misc/rst-grammars.pl @@ -39,6 +39,8 @@ print <) { From e97c35b3bc5835f690d50dbcfa0d26b7caf56fb9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 1 Feb 2022 17:51:38 +1100 Subject: [PATCH 3/4] Regenerate .rst files with grammars after changes to rst generators $ make -C doc/misc all --- doc/misc/acl.grammar.rst | 2 ++ doc/misc/controls.grammar.rst | 2 ++ doc/misc/delegation-only.zoneopt.rst | 2 ++ doc/misc/dnssec-policy.grammar.rst | 2 ++ doc/misc/forward.zoneopt.rst | 2 ++ doc/misc/hint.zoneopt.rst | 2 ++ doc/misc/http.grammar.rst | 2 ++ doc/misc/in-view.zoneopt.rst | 2 ++ doc/misc/key.grammar.rst | 2 ++ doc/misc/logging.grammar.rst | 2 ++ doc/misc/managed-keys.grammar.rst | 2 ++ doc/misc/master.zoneopt.rst | 2 ++ doc/misc/mirror.zoneopt.rst | 2 ++ doc/misc/options.grammar.rst | 2 ++ doc/misc/primaries.grammar.rst | 2 ++ doc/misc/redirect.zoneopt.rst | 2 ++ doc/misc/server.grammar.rst | 2 ++ doc/misc/slave.zoneopt.rst | 2 ++ doc/misc/static-stub.zoneopt.rst | 2 ++ doc/misc/statistics-channels.grammar.rst | 2 ++ doc/misc/stub.zoneopt.rst | 2 ++ doc/misc/tls.grammar.rst | 2 ++ doc/misc/trust-anchors.grammar.rst | 2 ++ doc/misc/trusted-keys.grammar.rst | 2 ++ 24 files changed, 48 insertions(+) diff --git a/doc/misc/acl.grammar.rst b/doc/misc/acl.grammar.rst index 4b9d81458e..d27dab3a15 100644 --- a/doc/misc/acl.grammar.rst +++ b/doc/misc/acl.grammar.rst @@ -9,4 +9,6 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + acl { ; ... }; diff --git a/doc/misc/controls.grammar.rst b/doc/misc/controls.grammar.rst index 3c59b7d908..440bce4929 100644 --- a/doc/misc/controls.grammar.rst +++ b/doc/misc/controls.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + controls { inet ( | | * ) [ port ( | * ) ] allow diff --git a/doc/misc/delegation-only.zoneopt.rst b/doc/misc/delegation-only.zoneopt.rst index 3f7d8d1a27..2a262d14f2 100644 --- a/doc/misc/delegation-only.zoneopt.rst +++ b/doc/misc/delegation-only.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type delegation-only; }; diff --git a/doc/misc/dnssec-policy.grammar.rst b/doc/misc/dnssec-policy.grammar.rst index b0b9692fcb..0aec73b683 100644 --- a/doc/misc/dnssec-policy.grammar.rst +++ b/doc/misc/dnssec-policy.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + dnssec-policy { dnskey-ttl ; keys { ( csk | ksk | zsk ) [ ( key-directory ) ] lifetime diff --git a/doc/misc/forward.zoneopt.rst b/doc/misc/forward.zoneopt.rst index cf162b866f..3ced3ac356 100644 --- a/doc/misc/forward.zoneopt.rst +++ b/doc/misc/forward.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type forward; delegation-only ; diff --git a/doc/misc/hint.zoneopt.rst b/doc/misc/hint.zoneopt.rst index 33a9fb2cec..998e66240c 100644 --- a/doc/misc/hint.zoneopt.rst +++ b/doc/misc/hint.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type hint; check-names ( fail | warn | ignore ); diff --git a/doc/misc/http.grammar.rst b/doc/misc/http.grammar.rst index 48fac447ac..89f0457011 100644 --- a/doc/misc/http.grammar.rst +++ b/doc/misc/http.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + http { endpoints { ; ... }; listener-clients ; diff --git a/doc/misc/in-view.zoneopt.rst b/doc/misc/in-view.zoneopt.rst index 8b3b5c1021..df1a587307 100644 --- a/doc/misc/in-view.zoneopt.rst +++ b/doc/misc/in-view.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { in-view ; }; diff --git a/doc/misc/key.grammar.rst b/doc/misc/key.grammar.rst index aec1c82c02..a417997a72 100644 --- a/doc/misc/key.grammar.rst +++ b/doc/misc/key.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + key { algorithm ; secret ; diff --git a/doc/misc/logging.grammar.rst b/doc/misc/logging.grammar.rst index 2a0d540640..377d6e968d 100644 --- a/doc/misc/logging.grammar.rst +++ b/doc/misc/logging.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + logging { category { ; ... }; channel { diff --git a/doc/misc/managed-keys.grammar.rst b/doc/misc/managed-keys.grammar.rst index 7d74262209..a57f8ef8a6 100644 --- a/doc/misc/managed-keys.grammar.rst +++ b/doc/misc/managed-keys.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + managed-keys { ( static-key | initial-key | static-ds | initial-ds ) diff --git a/doc/misc/master.zoneopt.rst b/doc/misc/master.zoneopt.rst index 36cf6c7210..e4d01d68c7 100644 --- a/doc/misc/master.zoneopt.rst +++ b/doc/misc/master.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type ( master | primary ); allow-query { ; ... }; diff --git a/doc/misc/mirror.zoneopt.rst b/doc/misc/mirror.zoneopt.rst index 46921e16d9..f747c6d9e6 100644 --- a/doc/misc/mirror.zoneopt.rst +++ b/doc/misc/mirror.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type mirror; allow-notify { ; ... }; diff --git a/doc/misc/options.grammar.rst b/doc/misc/options.grammar.rst index c6e5ba8d95..b6dc89ca0c 100644 --- a/doc/misc/options.grammar.rst +++ b/doc/misc/options.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + options { allow-new-zones ; allow-notify { ; ... }; diff --git a/doc/misc/primaries.grammar.rst b/doc/misc/primaries.grammar.rst index a9b5ef92b5..aceea97306 100644 --- a/doc/misc/primaries.grammar.rst +++ b/doc/misc/primaries.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + primaries [ port ] [ dscp ] { ( | [ port ] | diff --git a/doc/misc/redirect.zoneopt.rst b/doc/misc/redirect.zoneopt.rst index 2cd89eb09a..a7df8ff771 100644 --- a/doc/misc/redirect.zoneopt.rst +++ b/doc/misc/redirect.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type redirect; allow-query { ; ... }; diff --git a/doc/misc/server.grammar.rst b/doc/misc/server.grammar.rst index 056e186c68..526636ec90 100644 --- a/doc/misc/server.grammar.rst +++ b/doc/misc/server.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + server { bogus ; edns ; diff --git a/doc/misc/slave.zoneopt.rst b/doc/misc/slave.zoneopt.rst index 013b799795..2cef150a0f 100644 --- a/doc/misc/slave.zoneopt.rst +++ b/doc/misc/slave.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type ( slave | secondary ); allow-notify { ; ... }; diff --git a/doc/misc/static-stub.zoneopt.rst b/doc/misc/static-stub.zoneopt.rst index b8681a8217..d307586718 100644 --- a/doc/misc/static-stub.zoneopt.rst +++ b/doc/misc/static-stub.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type static-stub; allow-query { ; ... }; diff --git a/doc/misc/statistics-channels.grammar.rst b/doc/misc/statistics-channels.grammar.rst index dda9c682b2..7a4ef27d25 100644 --- a/doc/misc/statistics-channels.grammar.rst +++ b/doc/misc/statistics-channels.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + statistics-channels { inet ( | | * ) [ port ( | * ) ] [ diff --git a/doc/misc/stub.zoneopt.rst b/doc/misc/stub.zoneopt.rst index 56fc9d9244..d7eb4d41e4 100644 --- a/doc/misc/stub.zoneopt.rst +++ b/doc/misc/stub.zoneopt.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + zone [ ] { type stub; allow-query { ; ... }; diff --git a/doc/misc/tls.grammar.rst b/doc/misc/tls.grammar.rst index 778f2f34d4..8e572e15ec 100644 --- a/doc/misc/tls.grammar.rst +++ b/doc/misc/tls.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + tls { cert-file ; ciphers ; diff --git a/doc/misc/trust-anchors.grammar.rst b/doc/misc/trust-anchors.grammar.rst index fffb8a5b96..eabe7c082c 100644 --- a/doc/misc/trust-anchors.grammar.rst +++ b/doc/misc/trust-anchors.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + trust-anchors { ( static-key | initial-key | static-ds | initial-ds ) diff --git a/doc/misc/trusted-keys.grammar.rst b/doc/misc/trusted-keys.grammar.rst index 1428d2172e..55cfa3805d 100644 --- a/doc/misc/trusted-keys.grammar.rst +++ b/doc/misc/trusted-keys.grammar.rst @@ -9,6 +9,8 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. +:: + trusted-keys { ; ... };, deprecated From 34a3b35b08ed0b8f2f723ec78046e6e1d4bb6d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Tue, 1 Feb 2022 13:04:21 +0100 Subject: [PATCH 4/4] Add missing parental-agents grammar generation Formerly parental-agents grammar was an exception and it did not auto-generate itself from source code. From now on it is generated using the same mechanism as other grammars. For consistency with rest of the system, I've also renamed the grammar file and the link anchors from "parentals" to "parental-agents". Technically this is fixup for commit 0311705d4b36c536dd541b0b193bd01b68fe90b3. Related: !5234 --- doc/arm/Makefile.am | 2 +- doc/arm/reference.rst | 6 +++--- doc/misc/Makefile.am | 6 +++++- .../{parentals.grammar.rst => parental-agents.grammar.rst} | 6 ++++-- 4 files changed, 13 insertions(+), 7 deletions(-) rename doc/misc/{parentals.grammar.rst => parental-agents.grammar.rst} (84%) diff --git a/doc/arm/Makefile.am b/doc/arm/Makefile.am index feebea0737..75d7e7434c 100644 --- a/doc/arm/Makefile.am +++ b/doc/arm/Makefile.am @@ -40,7 +40,7 @@ EXTRA_DIST = \ ../misc/master.zoneopt.rst \ ../misc/mirror.zoneopt.rst \ ../misc/options.grammar.rst \ - ../misc/parentals.grammar.rst \ + ../misc/parental-agents.grammar.rst \ ../misc/primaries.grammar.rst \ ../misc/redirect.zoneopt.rst \ ../misc/server.grammar.rst \ diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst index 09e6202eaf..a3a75ded5b 100644 --- a/doc/arm/reference.rst +++ b/doc/arm/reference.rst @@ -851,14 +851,14 @@ At ``debug`` level 4 or higher, the detailed context information logged at ``debug`` level 2 is logged for errors other than SERVFAIL and for negative responses such as NXDOMAIN. -.. _parentals_grammar: +.. _parental_agents_grammar: ``parental-agents`` Statement Grammar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. include:: ../misc/parentals.grammar.rst +.. include:: ../misc/parental-agents.grammar.rst -.. _parentals_statement: +.. _parental_agents_statement: ``parental-agents`` Statement Definition and Usage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/misc/Makefile.am b/doc/misc/Makefile.am index 0951e6aa97..3aab4c8b3e 100644 --- a/doc/misc/Makefile.am +++ b/doc/misc/Makefile.am @@ -38,7 +38,8 @@ OPTIONS_FILES = \ trust-anchors.grammar.rst \ managed-keys.grammar.rst \ trusted-keys.grammar.rst \ - http.grammar.rst + http.grammar.rst \ + parental-agents.grammar.rst EXTRA_DIST = \ $(OPTIONS_FILES) \ @@ -179,4 +180,7 @@ trusted-keys.grammar.rst: options.active rst-grammars.pl http.grammar.rst: options.active rst-grammars.pl $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active http > $@ +parental-agents.grammar.rst: options.active rst-grammars.pl + $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active parental-agents > $@ + endif diff --git a/doc/misc/parentals.grammar.rst b/doc/misc/parental-agents.grammar.rst similarity index 84% rename from doc/misc/parentals.grammar.rst rename to doc/misc/parental-agents.grammar.rst index 144967d68e..f30e6a8105 100644 --- a/doc/misc/parentals.grammar.rst +++ b/doc/misc/parental-agents.grammar.rst @@ -9,8 +9,10 @@ .. See the COPYRIGHT file distributed with this work for additional .. information regarding copyright ownership. - parental-agents [ port ] [ dscp - ] { ( | +:: + + parental-agents [ port ] [ + dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... };