Bug#1098804: lsinitramfs.8: Some remarks and a patch with editorial changes for this man page
Package: initramfs-tools-core
Version: 0.145
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?
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ":
an.tmac:<stdin>:42: misuse, warning: .BR is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:52: misuse, warning: .BR is for at least 2 arguments, got 0
Use macro '.B' for one argument or split argument.
* 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 initramfs-tools-core depends on:
ii coreutils 9.5-1+b1
ii cpio 2.15+dfsg-2
ii dracut-install 105-3
ii e2fsprogs 1.47.2-1
ii klibc-utils 2.0.13-4
ii kmod 33+20240816-2
ii logsave 1.47.2-1
ii udev 257.3-1
Versions of packages initramfs-tools-core recommends:
pn busybox | busybox-static <none>
ii zstd 1.5.6+dfsg-2
Versions of packages initramfs-tools-core suggests:
ii bash-completion 1:2.16.0-7
-- no debconf information
Input file is lsinitramfs.8
Output from "mandoc -T lint lsinitramfs.8": (shortened list)
1 input text line longer than 80 bytes: command lists the co...
-.-.
Output from "test-groff -mandoc -t -ww -z lsinitramfs.8": (shortened list)
2 Use macro '.B' for one argument or split argument.
1 .BR is for at least 2 arguments, got 0
1 .BR 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.
8:.RB [ -l ]
11:.BR lsinitramfs " " -h
22:.B -h
26:.B -l
34:.B lsinitramfs /boot/initrd.img-$(uname -r)
39:.B lsinitramfs -l /boot/vmlinuz-2.6.31-grml64 /boot/vmlinuz-2.6.33-grml64
-.-.
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.
16:command lists the content of given initramfs images. It allows one to quickly check
-.-.
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.
Add "\:" to split the string for the output, "\<newline>" in the source.
Line 16, length 83
command lists the content of given initramfs images. It allows one to quickly check
-.-.
Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
lsinitramfs.8:17:the content of one (or multiple) specified initramfs files.
-.-.
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 LSINITRAMFS 8 "2015/12/09" "initramfs\-tools" "System Administration"
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ":
an.tmac:<stdin>:42: misuse, warning: .BR is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:52: misuse, warning: .BR is for at least 2 arguments, got 0
Use macro '.B' for one argument or split argument.
-.-.
Additionally:
Have a space between a string and ... when ... is not a continuation of the
string.
abc... is different from abc ...
-.-
Man pages are marked with bold not italic.
See man-pages(7).
-.-
Generally:
Split (sometimes) lines after a punctuation mark; before a conjunction.
--- lsinitramfs.8 2025-02-24 13:44:56.079903070 +0000
+++ lsinitramfs.8.new 2025-02-24 14:01:30.772726316 +0000
@@ -1,29 +1,32 @@
-.TH LSINITRAMFS 8 "2015/12/09" "initramfs\-tools" "System Administration"
+.TH LSINITRAMFS 8 2015/12/09 initramfs\-tools "System Administration"
.SH NAME
lsinitramfs \- list content of an initramfs image
.SH SYNOPSIS
.B lsinitramfs
-.RB [ -l ]
-.IR initramfs-file ...
+.RB [ \-l ]
+.I initramfs-file
+\&...
.br
-.BR lsinitramfs " " -h
+.B lsinitramfs \-h
.SH DESCRIPTION
The
.B lsinitramfs
-command lists the content of given initramfs images. It allows one to quickly check
-the content of one (or multiple) specified initramfs files.
+command lists the content of given initramfs images.
+It allows one to quickly check the content of one
+(or multiple)
+specified initramfs files.
.SH OPTIONS
.TP
-.B -h
+.B \-h
Display usage information and exit.
.TP
-.B -l
+.B \-l
Display long and more verbose listing of initramfs content.
.SH USAGE EXAMPLES
@@ -31,15 +34,15 @@ Display long and more verbose listing of
List initramfs content of current running kernel:
.PP
-.B lsinitramfs /boot/initrd.img-$(uname -r)
+.B lsinitramfs /boot/initrd.img\-$(uname \-r)
List content of two initramfs files in verbose mode:
.PP
-.B lsinitramfs -l /boot/vmlinuz-2.6.31-grml64 /boot/vmlinuz-2.6.33-grml64
+.B lsinitramfs \-l /boot/vmlinuz\-2.6.31\-grml64 /boot/vmlinuz\-2.6.33\-grml64
.SH BUGS
-.BR lsinitramfs
+.B lsinitramfs
cannot deal with multiple-segmented initramfs images, except where an
early (uncompressed) initramfs with system firmware is prepended to
the regular compressed initramfs.
@@ -49,8 +52,7 @@ The initramfs-tools are written by Maxim
and numerous others.
.SH SEE ALSO
-.BR
-.IR initramfs-tools (7),
-.IR mkinitramfs (8),
-.IR unmkinitramfs (8),
-.IR update-initramfs (8).
+.BR initramfs-tools (7),
+.BR mkinitramfs (8),
+.BR unmkinitramfs (8),
+.BR update-initramfs (8).
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 to: