[Debconf-devel] Bug#1089844: debconf.1: Some remarks and a patch with editorial changes for this man page
Bjarni Ingi Gislason
bjarniig at simnet.is
Fri Dec 13 19:01:21 GMT 2024
Package: debconf
Version: 1.5.87
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with a new version
test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -z < "man page"
[Use "groff -e ' $' <file>" to find trailing spaces.]
["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).
[The fate of "test-nroff" was decided in groff bug #55941.]
* What was the outcome of this action?
an.tmac:<stdin>:58: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0")
troff:<stdin>:67: warning: font name 'CW' is deprecated
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.11.10-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
debconf depends on no packages.
Versions of packages debconf recommends:
ii apt-utils 2.9.16
ii debconf-i18n 1.5.87
Versions of packages debconf suggests:
pn debconf-doc <none>
pn debconf-kde-helper <none>
pn debconf-utils <none>
pn libgtk3-perl <none>
pn libnet-ldap-perl <none>
pn libterm-readline-gnu-perl <none>
ii perl 5.40.0-8
ii whiptail 0.52.24-4
-- debconf information excluded
-------------- next part --------------
Input file is debconf.1
Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)
[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>
The same goes for man pages that are used as an input.
For a style guide use
mandoc -T lint
-.-
So any 'generator' should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
This is just a simple quality control measure.
The 'generator' may have to be corrected to get a better man page,
the source file may, and any additional file may.
Common defects:
Input text line longer than 80 bytes.
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
Not beginning each input sentence on a new line.
Lines should thus be shorter.
See man-pages(7), item 'semantic newline'.
-.-
The difference between the formatted output of the original and patched file
can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -u <out1> <out2>
and for groff, using
"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - "
instead of 'nroff -mandoc'
Add the option '-t', if the file contains a table.
Read the output of 'diff -u' with 'less -R' or similar.
-.-.
If 'man' (man-db) is used to check the manual for warnings,
the following must be set:
The option "-warnings=w"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT="-ww -b -z"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-.
Output from "mandoc -T lint debconf.1": (shortened list)
1 input text line longer than 80 bytes
-.-.
Output from "test-groff -mandoc -t -ww -z debconf.1": (shortened list)
1 font name 'CW' is deprecated
-.-.
Output from "mandoc -T lint debconf.1":
mandoc: debconf.1:85:89: STYLE: input text line longer than 80 bytes: for debconf to be us...
-.-.
Wrong distance between sentences in the input file.
Separate the sentences and subordinate clauses; each begins on a new
line. See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").
The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.
Remember coding: Only one command ("sentence") on each (logical) line.
E-mail: Easier to quote exactly the relevant lines.
Generally: Easier to edit the sentence.
Patches: Less unaffected text.
Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.
The amount of space between sentences in the output can then be
controlled with the ".ss" request.
-.-
Mark a abbreviation point as such by suffixing them with &.
72:Debconf is a configuration system for Debian packages. For a debconf
77:to talk with debconf on stdio. The program's output is expected to be debconf
78:protocol commands, and it is expected to read result codes on stdin. See
84:This command is not the usual way that debconf is used. It's more typical
90:Tell debconf what package the command it is running is a part of. This is
101:Enables terse output mode. This affects only some frontends.
-.-.
Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.
Line 85, length 89
for debconf to be used via \fBdpkg\-preconfigure\fR\|(8) or \fBdpkg\-reconfigure\fR\|(8).
-.-.
Add a zero (0) in front of a decimal fraction that begins with a period
(.)
7:.if t .sp .5v
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ":
an.tmac:<stdin>:58: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0")
troff:<stdin>:67: warning: font name 'CW' is deprecated
-.-
For a font for constant width define a string 'mC' (is done in groff's an-ext.tmac file)
.\" register .g is defined to be 1 for heirloom-doc (and groff)
.if n .ds mC R
.
.if t \{\
. ie \n(.g \{\
. ds mC \f(CR
.\". tm constant width font used is \*(mC
. \}
. el \{\
. if !'\*(mC'' \{\
. tm String 'mC' already defined to be \*(mC
. tm Is redefined to be \f(CW
. \}
. ds mC \f(CW
.\". tm constant width font used is \*(mC
. \}
.\}
then use '\f(\*(mC' to change the font
-------------- next part --------------
--- debconf.1 2024-12-13 01:19:58.481567726 +0000
+++ debconf.1.new 2024-12-13 18:43:47.136184614 +0000
@@ -4,11 +4,12 @@
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
+.if t .sp 0.5v
.if n .sp
..
.de Vb \" Begin verbatim text
-.ft CW
+. ie \\(.g .ft CR
+. el .ft CW
.nf
.ne \\$1
..
@@ -69,27 +70,33 @@ debconf \- run a debconf\-using program
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
-Debconf is a configuration system for Debian packages. For a debconf
-overview and documentation for sysadmins, see \fBdebconf\fR\|(7) (in the
-debconf-doc package).
+Debconf is a configuration system for Debian packages.
+For a debconf overview and documentation for sysadmins,
+see \fBdebconf\fR\|(7)
+(in the debconf-doc package).
.PP
-The \fBdebconf\fR program runs a program under debconf's control, setting it up
-to talk with debconf on stdio. The program's output is expected to be debconf
-protocol commands, and it is expected to read result codes on stdin. See
-\&\fBdebconf\-devel\fR\|(7) for details about the debconf protocol.
+The \fBdebconf\fR program runs a program under debconf's control,
+setting it up to talk with debconf on stdio.
+The program's output is expected to be debconf protocol commands,
+and it is expected to read result codes on stdin.
+See
+.BR debconf\-devel (7)
+for details about the debconf protocol.
.PP
The command to be run under debconf must be specified in a way that will
let your PATH find it.
.PP
-This command is not the usual way that debconf is used. It's more typical
-for debconf to be used via \fBdpkg\-preconfigure\fR\|(8) or \fBdpkg\-reconfigure\fR\|(8).
+This command is not the usual way that debconf is used.
+It's more typical for debconf to be used via \fBdpkg\-preconfigure\fR\|(8)
+or \fBdpkg\-reconfigure\fR\|(8).
.SH OPTIONS
.IX Header "OPTIONS"
.IP "\fB\-o\fR\fIpackage\fR, \fB\-\-owner=\fR\fIpackage\fR" 4
.IX Item "-opackage, --owner=package"
-Tell debconf what package the command it is running is a part of. This is
-necessary to get ownership of registered questions right, and to support
-unregister and purge commands properly.
+Tell debconf what package the command it is running is a part of.
+This is necessary to get ownership of registered questions right,
+and to support unregister
+and purge commands properly.
.IP "\fB\-f\fR\fItype\fR, \fB\-\-frontend=\fR\fItype\fR" 4
.IX Item "-ftype, --frontend=type"
Select the frontend to use.
@@ -98,7 +105,8 @@ Select the frontend to use.
Specify the minimum priority of question that will be displayed.
.IP \fB\-\-terse\fR 4
.IX Item "--terse"
-Enables terse output mode. This affects only some frontends.
+Enables terse output mode.
+This affects only some frontends.
.SH EXAMPLES
.IX Header "EXAMPLES"
To debug a shell script that uses debconf, you might use:
More information about the Debconf-devel
mailing list