Package: net-tools
Version: 2.10-1.1
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 ' $' -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>:14: warning: trailing space in the line
troff:<stdin>:71: 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.12-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 net-tools depends on:
ii  libc6        2.40-7
ii  libselinux1  3.8-3

net-tools recommends no packages.

net-tools suggests no packages.

-- no debconf information
Input file is rarp.8

Output from "mandoc -T lint  rarp.8": (shortened list)

      1 skipping paragraph macro: PP after SH
      2 whitespace at end of input line

Remove trailing space with: sed -e 's/  *$//'

-.-.

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

      2 trailing space in the line

Remove trailing space with: sed -e 's/  *$//'

-.-.

Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

Number of lines affected is

2

-.-.

Add a (no-break, "\ " or "\~") space between a number and a unit,
as these are not one entity.

42:.B "IEEE 802.3 10Mbps Ethernet".

-.-.

  Add a "\&" (or a comma (Oxford comma)) after "e.g." and "i.e.", or use
English words (man-pages(7)).
  Abbreviation points should be marked as such and protected against being
interpreted as an end of sentence, if they are not, and that independent
of the current place on the line.

39:(i.e. hardware code

-.-.

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 "\&".

Some sentences (etc.) do not begin on a new line.

Split (sometimes) lines after a punctuation mark; before a conjunction.

N.B.

  The number of lines affected can be too large to be in a patch.

  Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.

Use

#!/usr/bin/sh

sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\.  */\1.\n/g' $1

to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"

14:This program is obsolete.  From version 2.3, the Linux kernel 
15:no longer contains RARP support.  For a replacement RARP daemon, see
20:manipulates the kernel's RARP table in various ways.  The primary options
21:are clearing an address mapping entry and manually setting up one.  For
36:which class of entries it should check for.  The default value of
39:(i.e. hardware code
67:can be used.  For the Ethernet class, this is 6 bytes in hexadecimal,
71:a RARP query can also provide other remote boot services. Therefore 
82:Ross D. Martin, <mar...@trcsun3.eas.asu.edu>
84:Fred N. van Kempen, <wal...@uwalt.nl.mugnet.org>

-.-.

Split a punctuation from a single argument, if a two-font macro is meant.

42:.B "IEEE 802.3 10Mbps Ethernet".
46:.B NET/ROM (netrom).
75:.I /proc/net/rarp,

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

rarp.8:70:Some systems (notably older Suns) assume that the host replying to

-.-.

Use SI units, not abbreviations, bps -> bit/s

42:.B "IEEE 802.3 10Mbps Ethernet".

-.-.

Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.

1:.TH RARP 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
48:.B "\-a"
50:.B "\-\-list"

-.-.

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

troff:<stdin>:14: warning: trailing space in the line
troff:<stdin>:71: warning: trailing space in the line

-.-.

Additionally:

Use two-font macro for "option lines".

-.-

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.

--- rarp.8      2025-02-26 18:01:40.608009737 +0000
+++ rarp.8.new  2025-02-26 18:52:35.510185005 +0000
@@ -1,25 +1,27 @@
-.TH RARP 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
+.TH RARP 8 2008\-10\-03 net\-tools "Linux System Administrator's Manual"
 .SH NAME
 rarp \- manipulate the system RARP table
 .SH SYNOPSIS
-.B "rarp [\-V] [\-\-version] [\-h] [\-\-help]"
+.BR rarp " [" \-V "] [" \-\-version "] [" \-h "] [" \-\-help ]
 .br
-.B "rarp \-a"
+.B rarp \-a
 .br
-.B "rarp [\-v] \-d hostname ..."
+.BR rarp " [" \-v "] " \-d " \fIhostname\fR ..."
 .br
-.B "rarp [\-v] [\-t type] \-s hostname hw_addr"
+.BR rarp " [" \-v "] [" \-t " \fItype\fR] " \-s " \fIhostname hw_addr\fR"
 .SH NOTE
-.P
-This program is obsolete.  From version 2.3, the Linux kernel 
-no longer contains RARP support.  For a replacement RARP daemon, see
+This program is obsolete.
+From version 2.3,
+the Linux kernel no longer contains RARP support.
+For a replacement RARP daemon, see
 .I
 ftp://ftp.dementia.org/pub/net\-tools
 .SH DESCRIPTION
 .B Rarp
-manipulates the kernel's RARP table in various ways.  The primary options
-are clearing an address mapping entry and manually setting up one.  For
-debugging purposes, the
+manipulates the kernel's RARP table in various ways.
+The primary options are clearing an address mapping entry
+and manually setting up one.
+For debugging purposes, the
 .B rarp
 program also allows a complete dump of the RARP table.
 .SH OPTIONS
@@ -30,57 +32,61 @@ Display the version of RARP in use.
 .B \-v
 Tell the user what is going on by being verbose.
 .TP
-.B "\-t type"
+.BI \-t " type"
 When setting or reading the RARP table, this optional parameter tells
 .B rarp
-which class of entries it should check for.  The default value of
-this parameter is
+which class of entries it should check for.
+The default value of this parameter is
 .B ether
-(i.e. hardware code
+(i.e.\& hardware code
 .B 0x01
 for
-.B "IEEE 802.3 10Mbps Ethernet".
+.BR "IEEE 802.3 10\~Mbit/s Ethernet" .
 Other values might include network technologies such as
 .B AX.25 (ax25)
 and
-.B NET/ROM (netrom).
+.BR "NET/ROM (netrom)" .
 .TP
-.B "\-a"
+.B \-a
 .TP
-.B "\-\-list"
+.B \-\-list
 Lists the entries in the RARP table.
 .TP
-.B "\-d hostname"
+.BI \-d " hostname"
 .TP
-.B "\-\-delete hostname"
+.BI \-\-delete " hostname"
 Remove all RARP entries for the specified host.
 .TP
-.B "\-s hostname hw_addr"
+.BI \-s " hostname hw_addr"
 .TP
-.B "\-\-set hostname hw_addr"
+.BI \-\-set " hostname hw_addr"
 Create a RARP address mapping entry for host
 .B hostname
 with hardware address set to
 .BR hw_addr .
 The format of the hardware address is dependent on the hardware
 class, but for most classes one can assume that the usual presentation
-can be used.  For the Ethernet class, this is 6 bytes in hexadecimal,
+can be used.
+For the Ethernet class, this is 6 bytes in hexadecimal,
 separated by colons.
 .SH WARNING
-Some systems (notably older Suns) assume that the host replying to
-a RARP query can also provide other remote boot services. Therefore 
+Some systems
+(notably older Suns)
+assume that the host replying to
+a RARP query can also provide other remote boot services.
+Therefore
 never gratuitously add rarp entries unless you wish to meet the wrath
 of the network administrator.
 .SH FILES
-.I /proc/net/rarp,
+.IR /proc/net/rarp ,
 .SH SEE ALSO
 .BR arp (8),
 .BR route (8),
 .BR ifconfig (8),
 .BR netstat (8)
 .SH AUTHORS
-Ross D. Martin, <mar...@trcsun3.eas.asu.edu>
+Ross D.\& Martin, <mar...@trcsun3.eas.asu.edu>
 .br
-Fred N. van Kempen, <wal...@uwalt.nl.mugnet.org>
+Fred N.\& van Kempen, <wal...@uwalt.nl.mugnet.org>
 .br
 Phil Blundell, <philip.blund...@pobox.com>
  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.

  "git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")

  Not beginning each input sentence on a new line.
Line length and patch size 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 -d -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 -d -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