Bug#1095674: halt.5: Some remarks and a patch with editorial changes for this man page
Bjarni Ingi Gislason
bjarniig at simnet.is
Mon Feb 10 15:46:46 GMT 2025
Package: initscripts
Version: 3.13-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?
an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0")
troff:<stdin>:18: 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.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 initscripts depends on:
ii sysv-rc 3.13-1
ii sysvinit-utils 3.13-1
Versions of packages initscripts recommends:
ii e2fsprogs 1.47.2-1
ii psmisc 23.7-1
ii util-linux-extra 2.40.4-3
initscripts suggests no packages.
-- Configuration Files:
/etc/default/halt changed [not included]
/etc/init.d/hwclock.sh changed [not included]
-- no debconf information
-------------- next part --------------
Input file is halt.5
Output from "mandoc -T lint halt.5": (shortened list)
2 input text line longer than 80 bytes: This manual page is ...
1 input text line longer than 80 bytes: You should have rece...
3 whitespace at end of input line
-.-.
Output from "test-groff -mandoc -t -ww -z halt.5": (shortened list)
2 trailing space in the line
-.-.
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
3
-.-.
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.
21:brought down. This is the default.
26:down. What exactly this means depends on your hardware.
47:This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-.-.
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 45, length 243
This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Line 47, length 236
This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Line 49, length 202
You should have received a copy of the GNU General Public License along with this manual page; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 USA
-.-.
Add a zero (0) in front of a decimal fraction that begins with a period
(.)
8:.IP "" .5i
-.-.
Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
halt.5:12:Comments (starting with '#') are also allowed.
halt.5:45:This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-.-.
FSF office address update. See
https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00004.html
49:You should have received a copy of the GNU General Public License along with this manual page; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 USA
-.-.
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.
39:.BR halt "(8), " shutdown "(8)."
44:.SH "COPYRIGHT"
-.-.
Trailing space in a macro call.
24:.B halt
-.-.
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")
troff:<stdin>:18: warning: trailing space in the line
troff:<stdin>:23: warning: trailing space in the line
-.-.
Spelling (codespell)::
intefaces ==> interfaces
-.-
Additionally (general):
FSF office address update. See
https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00004.html
-------------- next part --------------
--- halt.5 2025-02-10 15:24:55.763539646 +0000
+++ halt.5.new 2025-02-10 15:39:17.961561743 +0000
@@ -5,30 +5,32 @@ halt \- variables that affect the behavi
The
.I /etc/default/halt
file contains variable settings in POSIX format:
-.IP "" .5i
+.IP "" 0.5i
VAR=VAL
.PP
Only one assignment is allowed per line.
-Comments (starting with '#') are also allowed.
+Comments
+(starting with '#')
+are also allowed.
.SH OPTIONS
The following variables can be set.
.IP \fBHALT\fP
-If set to
+If set to
.B poweroff
-the system will be powered down after it has been
-brought down. This is the default.
+the system will be powered down after it has been brought down.
+This is the default.
.br
-If set to
-.B halt
-the system will only be halted after it has been brought
-down. What exactly this means depends on your hardware.
+If set to
+.B halt
+the system will only be halted after it has been brought down.
+What exactly this means depends on your hardware.
.IP \fBNETDOWN\fB
Setting this to
.B no
-prevents shutdown from shutting down the network intefaces.
+prevents shutdown from shutting down the network interfaces.
This is necessary to use Wake-On-Lan.
Setting it to
.B yes
@@ -36,14 +38,26 @@ causes shutdown to also bring down the n
thus prevent the machine from being woken up remotely).
.SH SEE ALSO
-.BR halt "(8), " shutdown "(8)."
+.BR halt "(8), " shutdown (8).
.SH AUTHOR
\fBCasper Gielen\fR <\&casper at gielen.name\&>
-.SH "COPYRIGHT"
-This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+.SH COPYRIGHT
+This manual page is free software;
+you can redistribute it
+and/or modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation;
+either version 2 of the License,
+or (at your option) any later version.
.PP
-This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+This manual page is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY;
+without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.
+See the GNU General Public License for more details.
.PP
-You should have received a copy of the GNU General Public License along with this manual page; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 USA
+You should have received a copy of the GNU General Public License along
+with this manual page;
+if not, write to the Free Software Foundation,
+Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 USA
-------------- next part --------------
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 -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)
-.-
More information about the Debian-init-diversity
mailing list