Package: mpack Version: 1.6-18+b2 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 third argument; consider document modification date in ISO 8601 format (YYYY-MM-DD) an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0") troff:<stdin>:76: warning: trailing space in the line troff:<stdin>:78: warning: trailing space in the line an.tmac:<stdin>:86: misuse, warning: .BI is for at least 2 arguments, got 1 Use macro '.B' for one argument or split argument. troff:<stdin>:91: warning: trailing space in the line troff:<stdin>:109: warning: trailing space in the line troff:<stdin>:113: warning: trailing space in the line troff:<stdin>:120: warning: trailing space in the line troff:<stdin>:124: 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.17-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 mpack depends on: ii libc6 2.41-4 mpack recommends no packages. Versions of packages mpack suggests: ii exim4-daemon-light [mail-transport-agent] 4.98.1-1 pn inews <none> -- no debconf information
Input file is mpack.1 Output from "mandoc -T lint mpack.1": (shortened list) 1 missing date, using "": TH 1 skipping paragraph macro: PP empty 1 unterminated quoted argument 7 whitespace at end of input line Remove trailing space with: sed -e 's/ *$//' -.-. Output from "test-nroff -mandoc -t -ww -z mpack.1": (shortened list) 1 Use macro '.B' for one argument or split argument. 1 .BI is for at least 2 arguments, got 1 7 trailing space in the line Remove trailing space with: sed -e 's/ *$//' -.-. 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 7 -.-. 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. 155:Default value of the -m switch. -.-. Find a repeated word ! 79 --> the -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". mpack.1:106:Split the message (if necessary) into partial messages, each not -.-. Put a subordinate sentence (after a comma) on a new line. mpack.1:81:written to a named file or set of files, or posted to a set of mpack.1:106:Split the message (if necessary) into partial messages, each not mpack.1:111:environment variable, or no limit if the environment variable mpack.1:133:If the message has to be split, the partial messages will instead be -.-. Section headings (.SH and .SS) do not need quoting their arguments. 156:.SH "REPORTING BUGS" -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": an.tmac:<stdin>:1: style: .TH missing third argument; consider document modification date in ISO 8601 format (YYYY-MM-DD) an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0") troff:<stdin>:76: warning: trailing space in the line troff:<stdin>:78: warning: trailing space in the line an.tmac:<stdin>:86: misuse, warning: .BI is for at least 2 arguments, got 1 Use macro '.B' for one argument or split argument. troff:<stdin>:91: warning: trailing space in the line troff:<stdin>:109: warning: trailing space in the line troff:<stdin>:113: warning: trailing space in the line troff:<stdin>:120: warning: trailing space in the line troff:<stdin>:124: warning: trailing space in the line -.-. Generally: Split (sometimes) lines after a punctuation mark; before a conjunction.
--- mpack.1 2025-03-19 16:01:06.507948232 +0000 +++ mpack.1.new 2025-03-19 16:10:42.832855233 +0000 @@ -73,22 +73,22 @@ mpack \- pack a file in MIME format .I newsgroups .I file .SH DESCRIPTION -The +The .I mpack -program encodes the -the named file in one or more MIME messages. +program encodes the +named file in one or more MIME messages. The resulting messages are mailed to one or more recipients, -written to a named file or set of files, or posted to a set of -newsgroups. +written to a named file or set of files, +or posted to a set of newsgroups. .PP .SH OPTIONS .TP -.BI \-a +.B \-a Set the Content-Disposition to attachment. If \-a is not used the Content-Disposition is inline. .TP .BI \-s " subject" -Set the +Set the .B Subject header field to .IR Subject . @@ -103,25 +103,28 @@ in an introductory section at the beginn generated message. .TP .BI \-m " maxsize" -Split the message (if necessary) into partial messages, each not -exceeding +Split the message +(if necessary) +into partial messages, +each not exceeding .I maxsize -characters. The default limit is the value of the +characters. The default limit is the value of the .B SPLITSIZE -environment variable, or no limit if the environment variable -does not exist. -Specifying a +environment variable, +or no limit +if the environment variable does not exist. +Specifying a .I maxsize of 0 means there is no limit to the size of the generated message. .TP .BI \-c " content-type" Label the included file as being of MIME type .IR content-type , -which must be a subtype of +which must be a subtype of .BR application , .BR audio , .BR image , -or +or .BR video . If this switch is not given, .B mpack @@ -130,8 +133,8 @@ examines the file to determine its type. .BI \-o " outputfile" Write the generated message to the file .IR outputfile . -If the message has to be split, the partial messages will instead be -written to the files +If the message has to be split, +the partial messages will instead be written to the files .IR outputfile .01, .IR outputfile .02, etc. @@ -152,6 +155,6 @@ Mail the generated messages to the speci Directory to store temporary files. Default is /tmp. .TP .B SPLITSIZE -Default value of the -m switch. -.SH "REPORTING BUGS" +Default value of the \-m switch. +.SH REPORTING BUGS Send all bug reports to mpack\-b...@andrew.cmu.edu.
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) -.-