Package: sysvinit-core Version: 3.10-2 Severity: minor Tags: patch * What led up to the situation?
Checking for defects with [test-][gn]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page" [test-groff is a script in the repository for "groff"] (local copy and "troff" slightly changed by me). * What was the outcome of this action? troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':694: string 'an-result' troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':700: macro 'RB' troff: backtrace: file '<stdin>':42 troff:<stdin>:42: warning: ignoring escape character before '<' troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':694: string 'an-result' troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':700: macro 'RB' troff: backtrace: file '<stdin>':42 troff:<stdin>:42: warning: ignoring escape character before '>' troff: backtrace: file '<stdin>':84 troff:<stdin>:84: warning: trailing space in the line troff: backtrace: file '<stdin>':110 troff:<stdin>:110: 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.10.9-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 sysvinit-core depends on: ii initscripts 3.10-2 ii libc6 2.40-2 ii libselinux1 3.7-3 ii mount 2.40.2-8 ii sysv-rc 3.10-2 ii sysvinit-utils 3.10-2 Versions of packages sysvinit-core recommends: ii orphan-sysvinit-scripts 0.16 Versions of packages sysvinit-core suggests: ii bootlogd 3.10-2 -- debconf information excluded
Any program (person), that produces man pages, should check its content for defects by using groff -mandoc -t -ww -b -z [ -K utf8 | k ] <man page> The same goes for man pages that are used as an input. For a style guide use mandoc -T lint -.- So any 'generator' should check its products with the above mentioned 'groff', 'mandoc', and additionally with 'nroff ...'. This is just a simple quality control measure. The 'generator' may have to be corrected to get a better man page, the source file may, and any additional file may. Common defects: Input text line longer than 80 bytes. 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. Lines should thus be shorter. See man-pages(7), item 'semantic newline'. -.- The difference between the formatted outputs can be seen with: nroff -mandoc <file1> > <out1> nroff -mandoc <file2> > <out2> diff -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 of \'diff -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) -.-. Output from "mandoc -T lint halt.8": (possibly shortened list) mandoc: halt.8:20:12: STYLE: normalizing date format to: TH November 6, 2001 mandoc: halt.8:42:12: WARNING: undefined escape, printing literally: \< mandoc: halt.8:42:21: WARNING: undefined escape, printing literally: \> mandoc: halt.8:76:81: STYLE: input text line longer than 80 bytes: Put all hard drives ... mandoc: halt.8:84:63: STYLE: whitespace at end of input line mandoc: halt.8:93:85: STYLE: input text line longer than 80 bytes: When halting the sys... mandoc: halt.8:110:85: STYLE: input text line longer than 80 bytes: correctly and \fI/va... mandoc: halt.8:110:85: STYLE: whitespace at end of input line mandoc: halt.8:123:2: WARNING: skipping paragraph macro: PP empty -.-. Remove space characters at the end of lines. Use "git apply ... --whitespace=fix" to fix extra space issues, or use global configuration "core.whitespace". 84:When running on a Linux system, any quoted parameter after the 110:correctly and \fI/var/run/runlevel\fR does not exist) \fBshutdown\fP will be called, -.-. 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. 62:normally, \fBshutdown\fP will be invoked instead (with the \fB-h\fP 63:or \fB-r\fP flag). For more info see the \fBshutdown\fP(8) 87:target partitions. Please note, this parameter enables -f, forcing 112:Use the \fB-f\fP flag if you want to do a hard \fBhalt\fP or \fBreboot\fP. 114:The \fB-h\fP flag puts all hard disks in standby mode just before halt 122:\fBpoweroff\fP is called or the \fB-h\fP switch will do nothing. -.-. 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. 63:or \fB-r\fP flag). For more info see the \fBshutdown\fP(8) 86:time. Some systems, like the Raspberry Pi, can use this to switch 87:target partitions. Please note, this parameter enables -f, forcing 90:Don't sync before reboot or halt. Note that the kernel and storage 93:When halting the system, switch off the power. This is the default when \fBhalt\fR is 106:never be called directly. From release 2.74 on \fBhalt\fP and \fBreboot\fP 107:invoke \fBshutdown\fP(8) if the system is not in runlevel 0 or 6. This 115:or power-off. Right now this is only implemented for IDE drives. A side 117:on the disk is flushed. This is important for IDE drives, since the -.-. 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 76, length 81 Put all hard drives on the system in stand-by mode just before halt or power-off. Line 93, length 85 When halting the system, switch off the power. This is the default when \fBhalt\fR is Line 110, length 85 correctly and \fI/var/run/runlevel\fR does not exist) \fBshutdown\fP will be called, -.-. FSF office address update. See https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00004.html 16:.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ": troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':694: string 'an-result' troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':700: macro 'RB' troff: backtrace: file '<stdin>':42 troff:<stdin>:42: warning: ignoring escape character before '<' troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':694: string 'an-result' troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':700: macro 'RB' troff: backtrace: file '<stdin>':42 troff:<stdin>:42: warning: ignoring escape character before '>' troff: backtrace: file '<stdin>':84 troff:<stdin>:84: warning: trailing space in the line troff: backtrace: file '<stdin>':110 troff:<stdin>:110: warning: trailing space in the line -.-. Additionally (general): Abbreviations get a '\&' added after their final full stop (.) to mark them as such and not as an end of sentence. There is no need to add a '\&' before a full stop (.) if it has a character before it!
--- halt.8 2024-09-26 17:59:58.343651983 +0000 +++ halt.8.new 2024-09-26 18:27:17.377263169 +0000 @@ -39,7 +39,7 @@ halt, reboot, poweroff \- stop the syste .RB [ \-f ] .RB [ \-i ] .RB [ \-k ] -.RB [ \-m\ \<message\>] +.RB [ \-m\ <message> ] .RB [ \-n ] .RB [ \-w ] .br @@ -59,9 +59,9 @@ power-off the system. .PP If \fBhalt\fP or \fBreboot\fP is called when the system is \fInot\fP in runlevel \fB0\fP or \fB6\fP, in other words when it's running -normally, \fBshutdown\fP will be invoked instead (with the \fB-h\fP -or \fB-r\fP flag). For more info see the \fBshutdown\fP(8) -manpage. +normally, \fBshutdown\fP will be invoked instead (with the \fB\-h\fP +or \fB\-r\fP flag). +For more info see the \fBshutdown\fP(8) manpage. .PP The rest of this manpage describes the behavior in runlevels 0 and 6, that is when the systems shutdown scripts are being run. @@ -73,7 +73,8 @@ Don't write the wtmp record. .IP \fB\-f\fP Force halt or reboot, don't call \fBshutdown\fP(8). .IP \fB\-h\fP -Put all hard drives on the system in stand-by mode just before halt or power-off. +Put all hard drives on the system in stand-by mode +just before halt or power-off. .IP \fB\-i\fP Shut down all network interfaces just before \fBhalt\fR or \fBreboot\fR. Warning: This may not work on interfaces which do not have an IP address @@ -81,17 +82,19 @@ and should ideally be handled by a netwo .IP \fB\-k\fP Try to reboot using \fBkexec\fP, if kernel supports it. .IP \fB\-m\fP -When running on a Linux system, any quoted parameter after the -\-m flag will be passed to the firmware to be interpreted at boot -time. Some systems, like the Raspberry Pi, can use this to switch -target partitions. Please note, this parameter enables -f, forcing -the reboot command to handle shutting down itself. +When running on a Linux system, any quoted parameter after the +\-m flag will be passed to the firmware to be interpreted at boot time. +Some systems, like the Raspberry Pi, +can use this to switch target partitions. +Please note, this parameter enables \-f, +forcing the reboot command to handle shutting down itself. .IP \fB\-n\fP -Don't sync before reboot or halt. Note that the kernel and storage -drivers may still sync. This implies \fB\-d\fP. +Don't sync before reboot or halt. +Note that the kernel and storage drivers may still sync. +This implies \fB\-d\fP. .IP \fB\-p\fP -When halting the system, switch off the power. This is the default when \fBhalt\fR is -called as \fBpoweroff\fP. +When halting the system, switch off the power. +This is the default when \fBhalt\fR is called as \fBpoweroff\fP. .IP \fB\-w\fP Don't actually reboot or halt but only write the wtmp record (in the \fI/var/log/wtmp\fP file). @@ -103,24 +106,29 @@ If you're not the superuser, you will ge .\"{{{ Notes .SH NOTES Under older \fBsysvinit\fP releases, \fBreboot\fP and \fBhalt\fP should -never be called directly. From release 2.74 on \fBhalt\fP and \fBreboot\fP -invoke \fBshutdown\fP(8) if the system is not in runlevel 0 or 6. This -means that if \fBhalt\fP or \fBreboot\fP cannot find out the current -runlevel (for example, when \fI/var/run/utmp\fP hasn't been initialized -correctly and \fI/var/run/runlevel\fR does not exist) \fBshutdown\fP will be called, +never be called directly. +From release 2.74 on, +\fBhalt\fP and \fBreboot\fP invoke \fBshutdown\fP(8) +if the system is not in runlevel 0 or 6. +This means that if \fBhalt\fP or \fBreboot\fP cannot find out the current +runlevel +(for example, when \fI/var/run/utmp\fP hasn't been initialized correctly and +\fI/var/run/runlevel\fR does not exist) +\fBshutdown\fP will be called, which might not be what you want. -Use the \fB-f\fP flag if you want to do a hard \fBhalt\fP or \fBreboot\fP. +Use the \fB\-f\fP flag if you want to do a hard \fBhalt\fP or \fBreboot\fP. .PP -The \fB-h\fP flag puts all hard disks in standby mode just before halt -or power-off. Right now this is only implemented for IDE drives. A side -effect of putting the drive in stand-by mode is that the write cache -on the disk is flushed. This is important for IDE drives, since the -kernel doesn't flush the write cache itself before power-off. +The \fB\-h\fP flag puts all hard disks in standby mode just before halt +or power-off. +Right now this is only implemented for IDE drives. +A side effect of putting the drive in stand-by mode is +that the write cache on the disk is flushed. +This is important for IDE drives, +since the kernel doesn't flush the write cache itself before power-off. .PP The \fBhalt\fP program uses \fI/proc/ide/hd*\fR to find all IDE disk devices, which means that \fI/proc\fP needs to be mounted when \fBhalt\fP or -\fBpoweroff\fP is called or the \fB-h\fP switch will do nothing. -.PP +\fBpoweroff\fP is called or the \fB\-h\fP switch will do nothing. .\"}}} .\"{{{ Author .SH AUTHOR