From 391b0024566e829451f3748e02919d6861dfcad6 Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Fri, 21 May 2021 14:39:45 -0300 Subject: [PATCH 1/2] Fix sysconfdir path in man pages Some man pages have hardcoded values for the default configuration file paths. This path is configurable through the "sysconfdir" variable, and the manpages should perform the proper substitutions whenever the default value is changed. This patch uses the already existing templating system for building the docs to perform such substitutions. --- ...004-fix-sysconfdir-path-in-man-pages.patch | 191 ++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 192 insertions(+) create mode 100644 debian/patches/0004-fix-sysconfdir-path-in-man-pages.patch diff --git a/debian/patches/0004-fix-sysconfdir-path-in-man-pages.patch b/debian/patches/0004-fix-sysconfdir-path-in-man-pages.patch new file mode 100644 index 000000000..05b4b517e --- /dev/null +++ b/debian/patches/0004-fix-sysconfdir-path-in-man-pages.patch @@ -0,0 +1,191 @@ +From: Athos Ribeiro +Date: Fri, 21 May 2021 14:17:13 -0300 +Subject: Fix sysconfdir path in man pages + +Some man pages have hardcoded values for the default configuration file paths. +This path is configurable through the "sysconfdir" variable, and the manpages +should perform the proper substitutions whenever the default value is changed. + +This patch uses the already existing templating system for building the docs to +perform such substitutions. + +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606767 +Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/bind9/+bug/1897545 +Forwarded: https://gitlab.isc.org/isc-projects/bind9/-/issues/2717 +Last-updated: 2021-05-21 +--- + doc/man/Makefile.in | 2 +- + doc/man/delv.1in | 8 ++++---- + doc/man/dnssec-keymgr.8in | 4 ++-- + doc/man/named-checkconf.8in | 4 ++-- + doc/man/named.8in | 6 +++--- + doc/man/named.conf.5in | 2 +- + doc/man/nsupdate.1in | 2 +- + doc/man/rndc.8in | 4 ++-- + 8 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in +index 240ae02..7de6048 100644 +--- a/doc/man/Makefile.in ++++ b/doc/man/Makefile.in +@@ -202,7 +202,7 @@ man_SUBST = sed \ + -e 's,[@]BIND9_VERSION[@],$(BIND9_VERSION),' \ + -e 's,[@]RELEASE_DATE[@],$(RELEASE_DATE),' \ + -e 's,[@]BIND9_VERSION_STRING[@],$(BIND9_VERSION_STRING),' \ +- -e 's,[@]sysconfdir[@],$(sysconfdir),' \ ++ -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ + -e 's,[@]plugindir[@],$(plugindir),' + + $(man1_MANS): @MANSRCS@ +diff --git a/doc/man/delv.1in b/doc/man/delv.1in +index 0b2e1f4..a514216 100644 +--- a/doc/man/delv.1in ++++ b/doc/man/delv.1in +@@ -113,7 +113,7 @@ supplied, \fBdelv\fP performs a lookup for an A record. + .TP + .B \fB\-a anchor\-file\fP + This option specifies a file from which to read DNSSEC trust anchors. The default +-is \fB/etc/bind.keys\fP, which is included with BIND 9 and contains one ++is \fB@sysconfdir@/bind.keys\fP, which is included with BIND 9 and contains one + or more trust anchors for the root zone ("."). + .sp + Keys that do not match the root zone name are ignored. An alternate +@@ -123,8 +123,8 @@ Note: When reading the trust anchor file, \fBdelv\fP treats \fBtrust\-anchors\fP + \fBinitial\-key\fP, and \fBstatic\-key\fP identically. That is, for a managed key, + it is the \fIinitial\fP key that is trusted; \fI\%RFC 5011\fP key management is not + supported. \fBdelv\fP does not consult the managed\-keys database maintained by +-\fBnamed\fP, which means that if either of the keys in \fB/etc/bind.keys\fP is +-revoked and rolled over, \fB/etc/bind.keys\fP must be updated to ++\fBnamed\fP, which means that if either of the keys in \fB@sysconfdir@/bind.keys\fP is ++revoked and rolled over, \fB@sysconfdir@/bind.keys\fP must be updated to + use DNSSEC validation in \fBdelv\fP\&. + .TP + .B \fB\-b address\fP +@@ -331,7 +331,7 @@ This option prints response data in YAML format. + .UNINDENT + .SH FILES + .sp +-\fB/etc/bind.keys\fP ++\fB@sysconfdir@/bind.keys\fP + .sp + \fB/etc/resolv.conf\fP + .SH SEE ALSO +diff --git a/doc/man/dnssec-keymgr.8in b/doc/man/dnssec-keymgr.8in +index fe1c9b8..1a5b1fc 100644 +--- a/doc/man/dnssec-keymgr.8in ++++ b/doc/man/dnssec-keymgr.8in +@@ -41,7 +41,7 @@ for manipulating DNSSEC key metadata: \fBdnssec\-keygen\fP and + \fBdnssec\-settime\fP\&. + .sp + DNSSEC policy can be read from a configuration file (default +-/etc/dnssec\-policy.conf), from which the key parameters, publication and ++@sysconfdir@/dnssec\-policy.conf), from which the key parameters, publication and + rollover schedule, and desired coverage duration for any given zone can + be determined. This file may be used to define individual DNSSEC + policies on a per\-zone basis, or to set a "default" policy used for all +@@ -80,7 +80,7 @@ It is expected that this tool will be run automatically and unattended + .INDENT 3.5 + If \fB\-c\fP is specified, then the DNSSEC policy is read from \fBfile\fP\&. + (If not specified, then the policy is read from +-/etc/dnssec\-policy.conf; if that file doesnt exist, a built\-in global ++@sysconfdir@/dnssec\-policy.conf; if that file doesnt exist, a built\-in global + default policy is used.) + .UNINDENT + .UNINDENT +diff --git a/doc/man/named-checkconf.8in b/doc/man/named-checkconf.8in +index 8d3d18b..5ad12ec 100644 +--- a/doc/man/named-checkconf.8in ++++ b/doc/man/named-checkconf.8in +@@ -38,7 +38,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] + \fBnamed\-checkconf\fP checks the syntax, but not the semantics, of a + \fBnamed\fP configuration file. The file, along with all files included by it, is parsed and checked for syntax + errors. If no file is specified, +-\fB/etc/named.conf\fP is read by default. ++\fB@sysconfdir@/named.conf\fP is read by default. + .sp + Note: files that \fBnamed\fP reads in separate parser contexts, such as + \fBrndc.key\fP and \fBbind.keys\fP, are not automatically read by +@@ -91,7 +91,7 @@ This option performs a test load of all zones of type \fBprimary\fP found in \fB + .TP + .B \fBfilename\fP + This indicates the name of the configuration file to be checked. If not specified, +-it defaults to \fB/etc/named.conf\fP\&. ++it defaults to \fB@sysconfdir@/named.conf\fP\&. + .UNINDENT + .SH RETURN VALUES + .sp +diff --git a/doc/man/named.8in b/doc/man/named.8in +index fa99f02..c2c1a7d 100644 +--- a/doc/man/named.8in ++++ b/doc/man/named.8in +@@ -40,7 +40,7 @@ distribution from ISC. For more information on the DNS, see \fI\%RFC 1033\fP, + \fI\%RFC 1034\fP, and \fI\%RFC 1035\fP\&. + .sp + When invoked without arguments, \fBnamed\fP reads the default +-configuration file \fB/etc/named.conf\fP, reads any initial data, and ++configuration file \fB@sysconfdir@/named.conf\fP, reads any initial data, and + listens for queries. + .SH OPTIONS + .INDENT 0.0 +@@ -55,7 +55,7 @@ This option tells \fBnamed\fP to use only IPv6, even if the host machine is capa + .TP + .B \fB\-c config\-file\fP + This option tells \fBnamed\fP to use \fBconfig\-file\fP as its configuration file instead of the default, +-\fB/etc/named.conf\fP\&. To ensure that the configuration file ++\fB@sysconfdir@/named.conf\fP\&. To ensure that the configuration file + can be reloaded after the server has changed its working directory + due to to a possible \fBdirectory\fP option in the configuration file, + \fBconfig\-file\fP should be an absolute pathname. +@@ -243,7 +243,7 @@ in the script used to start the \fBnamed\fP process. + .SH FILES + .INDENT 0.0 + .TP +-.B \fB/etc/named.conf\fP ++.B \fB@sysconfdir@/named.conf\fP + The default configuration file. + .TP + .B \fB/var/run/named/named.pid\fP +diff --git a/doc/man/named.conf.5in b/doc/man/named.conf.5in +index 089cdb8..6867ad5 100644 +--- a/doc/man/named.conf.5in ++++ b/doc/man/named.conf.5in +@@ -1122,7 +1122,7 @@ zone string [ class ] { + .UNINDENT + .SH FILES + .sp +-\fB/etc/named.conf\fP ++\fB@sysconfdir@/named.conf\fP + .SH SEE ALSO + .sp + \fBddns\-confgen(8)\fP, \fBnamed(8)\fP, \fBnamed\-checkconf(8)\fP, \fBrndc(8)\fP, \fBrndc\-confgen(8)\fP, BIND 9 Administrator Reference Manual. +diff --git a/doc/man/nsupdate.1in b/doc/man/nsupdate.1in +index 30fa730..e81ae0b 100644 +--- a/doc/man/nsupdate.1in ++++ b/doc/man/nsupdate.1in +@@ -57,7 +57,7 @@ described in \fI\%RFC 3645\fP\&. + .sp + TSIG relies on a shared secret that should only be known to \fBnsupdate\fP + and the name server. For instance, suitable \fBkey\fP and \fBserver\fP +-statements are added to \fB/etc/named.conf\fP so that the name server ++statements are added to \fB@sysconfdir@/named.conf\fP so that the name server + can associate the appropriate secret key and algorithm with the IP + address of the client application that is using TSIG + authentication. \fBddns\-confgen\fP can generate suitable +diff --git a/doc/man/rndc.8in b/doc/man/rndc.8in +index 77fe6dd..8449e6b 100644 +--- a/doc/man/rndc.8in ++++ b/doc/man/rndc.8in +@@ -69,11 +69,11 @@ IPv4 and IPv6 source addresses. + .TP + .B \fB\-c config\-file\fP + This option indicates \fBconfig\-file\fP as the configuration file instead of the default, +-\fB/etc/rndc.conf\fP\&. ++\fB@sysconfdir@/rndc.conf\fP\&. + .TP + .B \fB\-k key\-file\fP + This option indicates \fBkey\-file\fP as the key file instead of the default, +-\fB/etc/rndc.key\fP\&. The key in \fB/etc/rndc.key\fP is used to ++\fB@sysconfdir@/rndc.key\fP\&. The key in \fB@sysconfdir@/rndc.key\fP is used to + authenticate commands sent to the server if the config\-file does not + exist. + .TP diff --git a/debian/patches/series b/debian/patches/series index c4094ce0b..343f73770 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 0001-Add_--install-layout=deb_to_setup.py_call.patch 0002-python-fix-for-dist-packages.patch 0003-Revert-Add-a-Sphinx-role-for-linking-GitLab-issues-M.patch +0004-fix-sysconfdir-path-in-man-pages.patch -- GitLab From 5b5f8f2d6bdb92c52e998d40d95a2f7cbd6abdad Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Fri, 21 May 2021 14:45:46 -0300 Subject: [PATCH 2/2] Update changelog --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index ab209ac05..b0b2af5ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +bind9 (1:9.16.16-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * d/p/0004-fix-sysconfdir-path-in-man-pages.patch: Fix sysconfdir path in + man pages (Closes: #606767) (LP: #1897545) + + -- Athos Ribeiro Fri, 21 May 2021 14:40:27 -0300 + bind9 (1:9.16.16-2) unstable; urgency=medium * Revert upstream 'Add a Sphinx role for linking GitLab issues/MRs' -- GitLab