Package: whois
Version: 5.5.23
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 -rCHECKSTYLE=10 -ww -z < "man 
page"

  [Use "groff -e ' $' <file>" to find obvious 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?

troff:<stdin>:17: warning: trailing space in the line
troff:<stdin>:20: warning: trailing space in the line
troff:<stdin>:23: warning: trailing space in the line

   * 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.12.9-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)

Versions of packages whois depends on:
ii  libc6      2.40-5
ii  libcrypt1  1:4.4.38-1
ii  libidn2-0  2.3.7-2+b1

whois recommends no packages.

whois suggests no packages.

-- no debconf information
Input file is whois.1

Output from "mandoc -T lint  whois.1": (shortened list)

      1 input text line longer than 80 bytes: When querying the Ve...

-.-.

Output from "test-groff -mandoc -t -ww -z whois.1": (shortened list)

      3 trailing space in the line

-.-.

Lines containing '\c' (' \c' does not make sense):

12:] [\~\c
14:] [\~\c
16:] [\~\c
19:[\~\c
22:[\~\c
59:.B \-h \c
68:.B \-p \c
116:.B \-g \c
129:.B \-i \c
162:.B \-q \c
181:.B \-s \c
190:.B \-t \c
195:.B \-T \c
201:.B \-v \c

-.-

Strings longer than 3/4 of a standard line length (80)

Use "\:" to split the string at the end of an output line, for example a
long URL (web address)

292 .RI < 
https://www.ripe.net/data\-tools/support/documentation/ripe\-database\-query\-reference\-manual
 >

-.-.

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 final abbreviation point as such by suffixing it with "\&".

52:ask for the specified object. If no guess can be made it will connect to
78:whois server authoritative for that request. This works for IP addresses,
124:update serial number. It is useful to obtain Near Real Time Mirroring 
stream.
138:Return primary key attributes only. An exception is the
142:objects, which is always returned. Another exception are all
242:servers. This may or may not be the behaviour intended by the user.
251:to find a server before applying the normal rules. Each line of the
282:of objects are located. If the variable does not exist then

-.-.

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 209, length 83

When querying the Verisign gTLDs (e.g.\& \&.com, \&.net...\&) thin registry 
servers

Line 292, length 103

.RI < 
https://www.ripe.net/data\-tools/support/documentation/ripe\-database\-query\-reference\-manual
 >

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
Not considered in a patch, too many lines.


whois.1:209:When querying the Verisign gTLDs (e.g.\& \&.com, \&.net...\&) thin 
registry servers

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z 
":

troff:<stdin>:17: warning: trailing space in the line
troff:<stdin>:20: warning: trailing space in the line
troff:<stdin>:23: warning: trailing space in the line

-.-.

  Additionally:

Change line '\"...' to '.\"...', otherwise an empty line is produced.
--- whois.1     2025-01-26 00:47:30.506747074 +0000
+++ whois.1.new 2025-01-26 01:53:26.679081546 +0000
@@ -9,18 +9,16 @@ whois \- client for the whois directory
 ] [
 .RB {\~ \-p \~|\~ \-\-port \~}
 .I PORT
-] [\~\c
-.B \-abBcdGHIKlLmMrRx
-] [\~\c
-.BI \-g \~SOURCE:FIRST\-LAST
-] [\~\c
-.BR \-i \~
+]
+.RB [\~ \-abBcdGHIKlLmMrRx
+]
+.RB [\~ \-g \fI\~SOURCE:FIRST\-LAST\fR
+]
+.RB [\~ \-i
 .IR ATTR [, ATTR ]...\~]
-[\~\c
-.BR \-s \~
+.RB [\~ \-s
 .IR SOURCE [, SOURCE ]...\~]
-[\~\c
-.BR \-T \~
+.RB [\~ \-T
 .IR TYPE [, TYPE ]...\~]
 .RB [\~ \-\-verbose \~]
 .RB [\~ \-\-no\-recursion \~]
@@ -49,14 +47,15 @@ searches for an object in a
 database.
 .P
 This version of the whois client tries to guess the right server to
-ask for the specified object. If no guess can be made it will connect to
+ask for the specified object.
+If no guess can be made it will connect to
 .I whois.networksolutions.com
 for NIC handles or
 .I whois.arin.net
 for IPv4 addresses and network names.
 .SH OPTIONS
 .TP 8
-.B \-h \c
+.B \-h
 .IR HOST ,
 .BI \-\-host= HOST
 Connect to
@@ -65,7 +64,7 @@ Connect to
 .B \-H
 Do not display the legal disclaimers that some registries like to show you.
 .TP 8
-.B \-p \c
+.B \-p
 .IR PORT ,
 .BI \-\-port= PORT
 Connect to
@@ -75,7 +74,8 @@ Connect to
 First query
 .I whois.iana.org
 and then follow its referral to the
-whois server authoritative for that request. This works for IP addresses,
+whois server authoritative for that request.
+This works for IP addresses,
 AS numbers and domains.
 .BR BEWARE :
 this implies that the IANA server will receive your complete query.
@@ -113,7 +113,7 @@ Return the smallest IP address range wit
 .B \-d
 Return the reverse DNS delegation object too.
 .TP 8
-.B \-g \c
+.B \-g
 .I SOURCE:FIRST\-LAST
 Search updates from
 .I SOURCE
@@ -121,12 +121,13 @@ database between
 .I FIRST
 and
 .I LAST
-update serial number. It is useful to obtain Near Real Time Mirroring stream.
+update serial number.
+It is useful to obtain Near Real Time Mirroring stream.
 .TP 8
 .B \-G
 Disable grouping of associated objects.
 .TP 8
-.B \-i \c
+.B \-i
 .IR ATTR [, ATTR ]...
 Inverse-search objects having associated attributes.
 .I ATTR
@@ -135,11 +136,13 @@ is the attribute name, while the positio
 argument is the attribute value.
 .TP 8
 .B \-K
-Return primary key attributes only. An exception is the
+Return primary key attributes only.
+An exception is the
 .I members
 attribute of
 .I set
-objects, which is always returned. Another exception are all
+objects, which is always returned.
+Another exception are all
 attributes of the objects
 .IR organisation ,
 .I person
@@ -159,7 +162,7 @@ Return all one level more specific objec
 .B \-M
 Return all levels of more specific objects.
 .TP 8
-.B \-q \c
+.B \-q
 .I KEYWORD
 Return information about the server.
 .I KEYWORD
@@ -178,7 +181,7 @@ Disable recursive lookups for contact in
 Disable following referrals and force showing the object from the local copy
 in the server.
 .TP 8
-.B \-s \c
+.B \-s
 .IR SOURCE [, SOURCE ]...
 Request the server to search for objects mirrored from
 .IR SOURCE .
@@ -187,18 +190,18 @@ Use the
 .I \-q sources
 parameter to obtain a list of valid sources.
 .TP 8
-.B \-t \c
+.B \-t
 .I TYPE
 Return the template for a object of
 .IR TYPE .
 .TP 8
-.B \-T \c
+.B \-T
 .IR TYPE [, TYPE ]...
 Restrict the search to objects of
 .IR TYPE .
 Multiple types are separated by a comma.
 .TP 8
-.B \-v \c
+.B \-v
 .I TYPE
 Return the verbose template for a object of
 .IR TYPE .
@@ -206,7 +209,9 @@ Return the verbose template for a object
 .B \-x
 Search for only exact match on network address prefix.
 .SH NOTES
-When querying the Verisign gTLDs (e.g.\& \&.com, \&.net...\&) thin registry 
servers
+When querying the Verisign gTLDs
+(e.g.\& \&.com, \&.net...\&)
+thin registry servers
 for a domain, the program will automatically prepend the
 .I domain
 keyword to only show domain records.  The
@@ -239,7 +244,8 @@ flags have been specified, the program w
 .IR "\-\-show\-handles" .
 .P
 RIPE-specific command line options are ignored when querying non-RIPE
-servers. This may or may not be the behaviour intended by the user.
+servers.
+This may or may not be the behaviour intended by the user.
 When using non-standard query parameters then the command line options
 which are not to be interpreted by the client must follow the
 .I \-\-
@@ -248,7 +254,8 @@ separator (which marks the beginning of
 If the
 .I /etc/whois.conf
 configuration file exists, it will be consulted
-to find a server before applying the normal rules. Each line of the
+to find a server before applying the normal rules.
+Each line of the
 file should contain a regular expression to be matched against the query
 text and the whois server to use, separated by white space.
 IDN domains must use the ACE format.
@@ -279,7 +286,8 @@ A list of options which will be evaluate
 command line.
 .IP "WHOIS_SERVER"
 This server will be queried if the program cannot guess where some kind
-of objects are located. If the variable does not exist then
+of objects are located.
+If the variable does not exist then
 .I whois.arin.net
 will be queried.
 .SH "SEE ALSO"
@@ -289,7 +297,7 @@ will be queried.
 WHOIS Protocol Specification.
 .P
 .IR "RIPE Database Query Reference Manual" :
-.RI < 
https://www.ripe.net/data\-tools/support/documentation/ripe\-database\-query\-reference\-manual
 >
+.RI < 
https://www.ripe.net/\:data\-tools/\:support/\:documentation/\:ripe\-database\-query\-reference\-manual
 >
 .SH BUGS
 The program may have buffer overflows in the command line parser:
 be sure to not pass untrusted data to it.
@@ -304,4 +312,4 @@ and this man page were written by Marco
 .RI < m...@linux.it >
 and are licensed under the terms of the GNU General Public License,
 version 2 or later.
-\" SPDX-License-Identifier: GPL-2.0-or-later
+.\" SPDX-License-Identifier: GPL-2.0-or-later
  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

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

  The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  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.
Line length should thus be reduced.

  The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.

  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 from '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)

-.-

Reply via email to