Package: moreutils Version: 0.69-1 Severity: minor Tags: patch * What led up to the situation?
Checking for defects with test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page" [Use "groff -e ' $' <file>" to find 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? troff:<stdin>:80: warning: font name 'CW' is deprecated * 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.11.10-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 moreutils depends on: ii libc6 2.40-4 ii libipc-run-perl 20231003.0-2 ii libtime-duration-perl 1.21-2 ii libtimedate-perl 2.3300-2 ii perl 5.40.0-8 moreutils recommends no packages. moreutils suggests no packages. -- no debconf information
Input file is chronic.1 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 -.- 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 output of the original and patched file 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 chronic.1 ": (shortened list) -.-. Output from "test-groff -mandoc -t -ww -b -z chronic.1 ": (shortened list) 1 font name 'CW' is deprecated -.-. Output from "mandoc -T lint chronic.1 ": -.-. 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. 74:A common use for chronic is for running a cron job. Rather than 91:Stderr triggering. Triggers output when stderr output length is non-zero. -.-. Add a zero (0) in front of a decimal fraction that begins with a period (.) 7:.if t .sp .5v -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". chronic.1:71:error to only be displayed if the command fails (exits nonzero or crashes). chronic.1:88:Verbose output (distinguishes between STDOUT and STDERR, also reports RETVAL) -.-. No space is needed before a quote (") at the end of a line 58:.TH CHRONIC 1 2024-02-25 moreutils " " -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -z ": troff:<stdin>:80: warning: font name 'CW' is deprecated
--- chronic.1 2024-12-08 09:08:53.771233642 +0000 +++ chronic.1.new 2024-12-08 09:21:50.164813134 +0000 @@ -4,11 +4,12 @@ .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v +.if t .sp 0.5v .if n .sp .. .de Vb \" Begin verbatim text -.ft CW +.ie \\n(.g .ft CR +.el .ft CW .nf .ne \\$1 .. @@ -55,7 +56,7 @@ .\" ======================================================================== .\" .IX Title "CHRONIC 1" -.TH CHRONIC 1 2024-02-25 moreutils " " +.TH CHRONIC 1 2024-02-25 moreutils "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -91,8 +92,8 @@ Verbose output (distinguishes between ST Stderr triggering. Triggers output when stderr output length is non-zero. Without \-e chronic needs non-zero return value to trigger output. .Sp -In this mode, chronic's return value will be \f(CW2\fR if the command's return -value is \f(CW0\fR but the command printed to stderr. +In this mode, chronic's return value will be \f(CR2\fR if the command's return +value is \f(CR0\fR but the command printed to stderr. .SH AUTHOR .IX Header "AUTHOR" Copyright 2010 by Joey Hess <i...@joeyh.name>