Package: adduser
Version: 3.152
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 

grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>

  to find (most) 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?

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

an.tmac:<stdin>:5: style: .TH missing third argument; consider document 
modification date in ISO 8601 format (YYYY-MM-DD)
troff:<stdin>:16: warning [page 1, line 9]: cannot break line; overset by 31n
troff:<stdin>:17: warning [page 1, line 10]: cannot break line; overset by 12n
troff:<stdin>:18: warning [page 1, line 11]: cannot break line; overset by 12n
troff:<stdin>:19: warning [page 1, line 12]: cannot break line; overset by 13n
troff:<stdin>:19: warning [page 1, line 13]: cannot break line; overset by 17n

   * 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.27-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 adduser depends on:
ii  passwd  1:4.17.4-2

adduser recommends no packages.

Versions of packages adduser suggests:
ii  cron                    3.0pl1-196
ii  liblocale-gettext-perl  1.07-7+b1
ii  perl                    5.40.1-3
pn  quota                   <none>

-- no debconf information
Input file is adduser.local.8

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

      1 missing date, using ""


Find trailing space with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>

-.-.

Output from
test-nroff -mandoc -t -ww -z adduser.local.8: (shortened list)

      2 cannot break line; overset by 12n
      1 cannot break line; overset by 13n
      1 cannot break line; overset by 17n
      1 cannot break line; overset by 31n
-.-.

Reduce space between words.

adduser.local.8:38:if  \-\-quiet is specified

-.-.

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

an.tmac:<stdin>:5: style: .TH missing third argument; consider document 
modification date in ISO 8601 format (YYYY-MM-DD)
troff:<stdin>:16: warning [page 1, line 9]: cannot break line; overset by 31n
troff:<stdin>:17: warning [page 1, line 10]: cannot break line; overset by 12n
troff:<stdin>:18: warning [page 1, line 11]: cannot break line; overset by 12n
troff:<stdin>:19: warning [page 1, line 12]: cannot break line; overset by 13n
troff:<stdin>:19: warning [page 1, line 13]: cannot break line; overset by 17n

-.-.

Additionally:

  Add a missing 'YS' macro.

  Add an empty argument to the OP macro to make the argument name (to be
replaced) to be typeset as italic.

-.-

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- adduser.local.8     2025-05-15 15:38:24.601574660 +0000
+++ adduser.local.8.new 2025-05-15 15:52:58.594973964 +0000
@@ -8,15 +8,16 @@ adduser.local, deluser.local \-
 hook for local actions in adduser and deluser
 .SH SYNOPSIS
 .SY adduser.local
-.OP username
-.OP uid
-.OP gid
-.OP home-directory
+.OP "" username
+.OP "" uid
+.OP "" gid
+.OP "" home-directory
+.YS
 .SY deluser.local
-.OP username
-.OP uid
-.OP gid
-.OP home-directory
+.OP "" username
+.OP "" uid
+.OP "" gid
+.OP "" home-directory
 .YS
 .SH DESCRIPTION
 \fBadduser.local\fP and \fBdeluser.local\fP
@@ -35,7 +36,7 @@ Return values from the hooks are ignored
 .SH ENVIRONMENT
 .B VERBOSE
 .IP 0
-if  \-\-quiet is specified
+if \-\-quiet is specified
 .IP 1
 if neither \-\-quiet nor \-\-debug is specified
 .IP 2
@@ -50,4 +51,3 @@ if \-\-debug is specified
 .BR useradd (8),
 .BR usermod (8),
 Debian Policy 9.2.2.
-
  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>

  To find trailing space use

grep -n -e ' $' -e ' \\f.$' -e ' \\"' <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