Package: linux-base
Version: 4.11
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?


an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
an.tmac:<stdin>:27: style: use of deprecated macro: .PD
an.tmac:<stdin>:36: style: use of deprecated macro: .PD
an.tmac:<stdin>:67: style: use of deprecated macro: .PD
an.tmac:<stdin>:69: misuse, warning: .IR is for at least 2 arguments, got 1
        Use macro '.I' for one argument or split argument.
an.tmac:<stdin>:75: style: use of deprecated macro: .PD


   * 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.17-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 linux-base depends on:
ii  debconf [debconf-2.0]  1.5.89

linux-base recommends no packages.

linux-base suggests no packages.

-- debconf information excluded
Input file is linux-update-symlinks.1

Output from "mandoc -T lint  linux-update-symlinks.1": (shortened list)


-.-.

Output from "test-nroff -mandoc -t -ww -z linux-update-symlinks.1": (shortened 
list)

      1         Use macro '.I' for one argument or split argument.
      1 .IR is for at least 2 arguments, got 1

-.-.

Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.

18:\fBuname -r\fR and used in filenames.

-.-.

Put a subordinate sentence (after a comma) on a new line.


linux-update-symlinks.1:23:By default, this command maintains symlinks in the 
root directory.
linux-update-symlinks.1:32:If set to a true value, specifies that the directory 
is \fI/boot\fR
linux-update-symlinks.1:35:If set to a false value, disables maintenance of 
symlinks
linux-update-symlinks.1:44:If symlink maintenance is disabled, 
\fBlinux\-update\-symlinks\fR does
linux-update-symlinks.1:45:nothing, successfully.  Otherwise it makes a list of 
kernel versions
linux-update-symlinks.1:48:The given \fIVERSION\fR, if the first argument is 
\fBinstall\fR
linux-update-symlinks.1:50:The current primary default version, if it exists 
and is not already
linux-update-symlinks.1:53:The current secondary default version, if it exists 
and is not already
linux-update-symlinks.1:56:All other versions whose files are installed, 
excluding the specified
linux-update-symlinks.1:57:\fIVERSION\fR if the first argument is \fBremove\fR, 
in decreasing
linux-update-symlinks.1:61:default versions, and it updates the symlinks 
accordingly.  In case
linux-update-symlinks.1:62:there is only one entry, this is both the primary 
and secondary
linux-update-symlinks.1:63:default version.  If there are no entries, there are 
no default

-.-.

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

an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
an.tmac:<stdin>:27: style: use of deprecated macro: .PD
an.tmac:<stdin>:36: style: use of deprecated macro: .PD
an.tmac:<stdin>:67: style: use of deprecated macro: .PD
an.tmac:<stdin>:69: misuse, warning: .IR is for at least 2 arguments, got 1
        Use macro '.I' for one argument or split argument.
an.tmac:<stdin>:75: style: use of deprecated macro: .PD

-.-.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- linux-update-symlinks.1     2025-03-17 15:01:46.543073112 +0000
+++ linux-update-symlinks.1.new 2025-03-17 15:07:19.984505210 +0000
@@ -15,7 +15,7 @@ postinst script must pass the first argu
 has taken place.
 .PP
 The \fIVERSION\fR argument must be the kernel version string as shown by
-\fBuname -r\fR and used in filenames.
+\fBuname \-r\fR and used in filenames.
 .PP
 The \fIIMAGE\-PATH\fR argument must be the absolute filename of the
 kernel image.
@@ -66,7 +66,7 @@ versions and it removes the default syml
 .SH ENVIRONMENT VARIABLES
 .PD 0
 .TP
-.IR INITRD
+.B INITRD
 When the first argument is \fBinstall\fR or \fBupgrade\fR,
 \fBlinux\-update\-symlinks\fR assumes that the given \fIVERSION\fR
 will use an initramfs unless this variable is set to \fBNo\fR.
  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