Package: coreutils Version: 9.5-1+b1 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 -ww -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>:236: 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 coreutils depends on: ii libacl1 2.3.2-2+b1 ii libattr1 1:2.5.2-2 ii libc6 2.40-4 ii libgmp10 2:6.3.0+dfsg-3 ii libselinux1 3.7-3+b1 ii libssl3t64 3.3.2-2 coreutils recommends no packages. coreutils suggests no packages. -- no debconf information
Input file is date.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 date.1": (shortened list) 1 input text line longer than 80 bytes 1 skipping paragraph macro -.-. Output from "test-groff -mandoc -t -ww -z date.1": (shortened list) 1 font name 'CW' is deprecated -.-. Output from "mandoc -T lint date.1": mandoc: date.1:10:96: STYLE: input text line longer than 80 bytes: [\fI\,-u|--utc|--uni... mandoc: date.1:13:2: WARNING: skipping paragraph macro: PP after SH -.-. Change -- in x--y to \(em (em-dash), or, if an option, to \-\- 236:\f(CW$ date --date='@2147483647'\fR 244:\f(CW$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'\fR 247:The --date=STRING is a mostly free format human readable date string -.-. Change - to \- if it shall be printed as a minus sign. date.1:248:such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or -.-. 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. 10:[\fI\,-u|--utc|--universal\/\fR] [\fI\,MMDDhhmm\/\fR[[\fI\,CC\/\fR]\fI\,YY\/\fR][\fI\,.ss\/\fR]] 236:\f(CW$ date --date='@2147483647'\fR 244:\f(CW$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'\fR 247:The --date=STRING is a mostly free format human readable date string -.-. Strings longer than 3/4 of a standard line length (80) Use "\:" to split the string at the end of an output line, for example a long URLs (web address) 10 [\fI\,-u|--utc|--universal\/\fR] [\fI\,MMDDhhmm\/\fR[[\fI\,CC\/\fR]\fI\,YY\/\fR][\fI\,.ss\/\fR]] -.-. 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. -.- 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 10, length 96 [\fI\,-u|--utc|--universal\/\fR] [\fI\,MMDDhhmm\/\fR[[\fI\,CC\/\fR]\fI\,YY\/\fR][\fI\,.ss\/\fR]] -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". date.1:77:locale's full weekday name (e.g., Sunday) date.1:83:locale's full month name (e.g., January) date.1:86:locale's date and time (e.g., Thu Mar 3 23:05:25 2005) date.1:137:nanoseconds (000000000..999999999) date.1:149:locale's 12\-hour clock time (e.g., 11:11:04 PM) date.1:155:seconds since the Epoch (1970\-01\-01 00:00 UTC) date.1:182:locale's date representation (e.g., 12/31/99) date.1:185:locale's time representation (e.g., 23:13:48) date.1:194:+hhmm numeric time zone (e.g., \fB\-0400\fR) date.1:197:+hh:mm numeric time zone (e.g., \fB\-04\fR:00) date.1:200:+hh:mm:ss numeric time zone (e.g., \fB\-04\fR:00:00) date.1:203:numeric time zone with : to necessary precision (e.g., \fB\-04\fR, +05:30) date.1:234:Convert seconds since the Epoch (1970\-01\-01 UTC) to a date date.1:238:Show the time on the west coast of the US (use \fBtzselect\fP(1) to find TZ) -.-. Two or more space charaters between printable characters. When the distance is between sentences, start the beginning of the second one on a separate line ("semantic newline", see man-pages(7)). Change this in the original file. 68:FORMAT controls the output. Interpreted sequences are: 86:locale's date and time (e.g., Thu Mar 3 23:05:25 2005) 249:even "next Thursday". A date string may contain items indicating 251:relative date, and numbers. An empty string indicates the beginning 252:of the day. The date string format is more complex than is easily -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:236: warning: font name 'CW' is deprecated -.-. '|' inside '[...]' is typeset in roman. -.- Additionally (general): Abbreviations get a '\&' added after their final full stop (.) to mark them as such and not as an end of a sentence. There is no need to add a '\&' before a full stop (.) if it has a character before it!
--- date.1 2024-12-12 01:42:56.367791309 +0000 +++ date.1.new 2024-12-12 02:16:06.420857339 +0000 @@ -4,10 +4,11 @@ date \- print or set the system date and time .SH SYNOPSIS .B date -[\fI\,OPTION\/\fR]... [\fI\,+FORMAT\/\fR] +.RI [ OPTION "]...\& [" +FORMAT ] .br .B date -[\fI\,-u|--utc|--universal\/\fR] [\fI\,MMDDhhmm\/\fR[[\fI\,CC\/\fR]\fI\,YY\/\fR][\fI\,.ss\/\fR]] +.RB [ \-u | \-\-utc | \-\-universal ] +.RI [ MMDDhhmm [[ CC ] YY ][ .ss ]] .SH DESCRIPTION .\" Add any additional description here .PP @@ -31,7 +32,7 @@ output date/time in ISO 8601 format. FMT='date' for date only (the default), \&'hours', 'minutes', 'seconds', or 'ns' for date and time to the indicated precision. -Example: 2006\-08\-14T02:34:56\-06:00 +Example: 2006\-08\-14T02:34:56\(en06:00 .TP \fB\-\-resolution\fR output the available resolution of timestamps @@ -233,19 +234,19 @@ O to use the locale's alternate numeric .SH EXAMPLES Convert seconds since the Epoch (1970\-01\-01 UTC) to a date .IP -\f(CW$ date --date='@2147483647'\fR +\f(CR$ date \-\-date='@2147483647'\fR .PP Show the time on the west coast of the US (use \fBtzselect\fP(1) to find TZ) .IP -\f(CW$ TZ='America/Los_Angeles' date\fR +\f(CR$ TZ='America/Los_Angeles' date\fR .PP Show the local time for 9AM next Friday on the west coast of the US .IP -\f(CW$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'\fR +\f(CR$ date \-\-date='TZ="America/Los_Angeles" 09:00 next Fri'\fR .SH "DATE STRING" .\" NOTE: keep this paragraph in sync with the one in touch.x -The --date=STRING is a mostly free format human readable date string -such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or +The \-\-date=STRING is a mostly free format human readable date string +such as "Sun, 29 Feb 2004 16:21:42 \-0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning