Package: curl Version: 8.13.0-5 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 grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file> to find (most) 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? Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:30: warning: ignoring escape character before '>' troff:<stdin>:36: warning: ignoring escape character before '>' troff:<stdin>:57: warning: ignoring escape character before '<' troff:<stdin>:57: warning: ignoring escape character before '>' troff:<stdin>:60: warning: ignoring escape character before '<' troff:<stdin>:60: warning: ignoring escape character before '>' troff:<stdin>:100: warning: ignoring escape character before '<' troff:<stdin>:100: warning: ignoring escape character before '>' troff:<stdin>:101: warning: ignoring escape character before '<' troff:<stdin>:101: warning: ignoring escape character before '>' * 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.25-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 curl depends on: ii libc6 2.41-7 ii libcurl4t64 8.13.0-5 ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1 Versions of packages curl recommends: ii bash-completion 1:2.16.0-7 curl suggests no packages. -- no debconf information
Input file is wcurl.1 Output from "mandoc -T lint wcurl.1": (shortened list) 3 input text line longer than 80 bytes 10 undefined escape, printing literally Find trailing space with: grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page> -.-. Output from test-nroff -mandoc -t -ww -z wcurl.1: (shortened list) 4 ignoring escape character before '<' 6 ignoring escape character before '>' Find trailing space with: grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page> -.-. Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em), if one is intended. " \(em " creates a too big gap in the text (in "troff"). An en-dash is usually surrounded by a space, while an em-dash is used without spaces. "man" (1 byte characters in input) transforms an en-dash (\(en) to one HYPHEN-MINUS, and an em-dash to two HYPHEN-MINUSES without considering the space around it. If "--" are two single "-" (begin of an option or end of options) then use "\-\-". wcurl.1:8:\fBwcurl [\--curl\-options <CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\-o|\-O|\--output <PATH>] [\--] <URL>...\fP wcurl.1:10:\fBwcurl [\--curl\-options=<CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\--output=<PATH>] [\--] <URL>...\fP wcurl.1:12:\fBwcurl \-V|\--version\fP wcurl.1:14:\fBwcurl \-h|\--help\fP wcurl.1:23:parameters via the \fB\--curl\-options\fP option. Just beware that you likely wcurl.1:30:if the installed curl's version is \>= 7.66.0 (--parallel); wcurl.1:36: if the installed curl's version is \>= 7.83.0 (--no-clobber); wcurl.1:57:.IP "--curl-options, --curl-options=\<CURL_OPTIONS\>..." wcurl.1:60:.IP "-o, -O, --output, --output=\<PATH\>" wcurl.1:65:.IP --no-decode-filename wcurl.1:68:.IP --dry-run wcurl.1:70:.IP "-V, \--version" wcurl.1:72:.IP "-h, \--help" wcurl.1:90:Download a file passing the \fB\--progress\-bar\fP and \fB\--http2\fP flags to curl: wcurl.1:92:\fBwcurl \--curl\-options="\--progress\-bar \--http2" example.com/filename.txt\fP wcurl.1:97:\fBwcurl \--curl\-options="\--continue\-at \-" example.com/filename.txt\fP -.-. Change -- in x--y to \(em (em-dash), or, if an option, to \-\- 57:.IP "--curl-options, --curl-options=\<CURL_OPTIONS\>..." 60:.IP "-o, -O, --output, --output=\<PATH\>" 65:.IP --no-decode-filename 68:.IP --dry-run -.-. 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. 8:\fBwcurl [\--curl\-options <CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\-o|\-O|\--output <PATH>] [\--] <URL>...\fP 10:\fBwcurl [\--curl\-options=<CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\--output=<PATH>] [\--] <URL>...\fP 12:\fBwcurl \-V|\--version\fP 14:\fBwcurl \-h|\--help\fP 23:parameters via the \fB\--curl\-options\fP option. Just beware that you likely 30:if the installed curl's version is \>= 7.66.0 (--parallel); 36: if the installed curl's version is \>= 7.83.0 (--no-clobber); 57:.IP "--curl-options, --curl-options=\<CURL_OPTIONS\>..." 60:.IP "-o, -O, --output, --output=\<PATH\>" 65:.IP --no-decode-filename 68:.IP --dry-run 70:.IP "-V, \--version" 72:.IP "-h, \--help" 90:Download a file passing the \fB\--progress\-bar\fP and \fB\--http2\fP flags to curl: 92:\fBwcurl \--curl\-options="\--progress\-bar \--http2" example.com/filename.txt\fP 97:\fBwcurl \--curl\-options="\--continue\-at \-" example.com/filename.txt\fP -.-. Wrong distance (not two spaces) 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. Split (sometimes) lines after a punctuation mark; before a conjunction. Lines with only one (or two) space(s) between sentences could be split, so latter sentences begin on a new line. Use #!/usr/bin/sh sed -e '/^\./n' \ -e 's/\([[:alpha:]]\)\. */\1.\n/g' $1 to split lines after a sentence period. Check result with the difference between the formatted outputs. See also the attachment "general.bugs" 8:\fBwcurl [\--curl\-options <CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\-o|\-O|\--output <PATH>] [\--] <URL>...\fP 10:\fBwcurl [\--curl\-options=<CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\--output=<PATH>] [\--] <URL>...\fP 23:parameters via the \fB\--curl\-options\fP option. Just beware that you likely 58:Specify extra options to be passed when invoking curl. May be specified more 61:Use the provided output path instead of getting it from the URL. If multiple 63:the end (curl >= 7.83.0). If this option is provided multiple times, only the 75:Any option supported by curl can be set here. This is not used by \fBwcurl\fP; it 78:URL to be downloaded. Anything that is not a parameter is considered 79:an URL. Whitespaces are percent\-encoded and the URL is passed to curl, which 80:then performs the parsing. May be specified more than once. -.-. 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. Add "\:" to split the string for the output, "\<newline>" in the source. Line 8, length 130 \fBwcurl [\--curl\-options <CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\-o|\-O|\--output <PATH>] [\--] <URL>...\fP Line 10, length 122 \fBwcurl [\--curl\-options=<CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\--output=<PATH>] [\--] <URL>...\fP Line 66, length 82 Don\(aqt percent\-decode the output filename, even if the percent\-encoding in the Line 75, length 81 Any option supported by curl can be set here. This is not used by \fBwcurl\fP; it Line 90, length 84 Download a file passing the \fB\--progress\-bar\fP and \fB\--http2\fP flags to curl: Line 92, length 81 \fBwcurl \--curl\-options="\--progress\-bar \--http2" example.com/filename.txt\fP Longest line is number 8 with 130 characters -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". wcurl.1:63:the end (curl >= 7.83.0). If this option is provided multiple times, only the -.-. SYNOPSIS: put a space on both sides of "[" and "]" (except at the end of the line) to increase readability (?) wcurl.1:\fBwcurl [\--curl\-options <CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\-o|\-O|\--output <PATH>] [\--] <URL>...\fP wcurl.1:\fBwcurl [\--curl\-options=<CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\--output=<PATH>] [\--] <URL>...\fP -.-. Change a HYPHEN-MINUS (code 0x55, 2D) to a dash (\-, minus) if it matches "[[:alph:]]-[[:alpha:]]" in the name of an option). Facilitates the copy and paste of a) an option in UTF-8 text b) web addresses (URL). Is not needed in ordinary words like "mother-in-law", that are not copied and pasted to a command line (which needs ASCII code) 36: if the installed curl's version is \>= 7.83.0 (--no-clobber); 57:.IP "--curl-options, --curl-options=\<CURL_OPTIONS\>..." 65:.IP --no-decode-filename 68:.IP --dry-run -.-. Only one space character is after a possible end of sentence (after a punctuation, that can end a sentence). wcurl.1:8:\fBwcurl [\--curl\-options <CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\-o|\-O|\--output <PATH>] [\--] <URL>...\fP wcurl.1:10:\fBwcurl [\--curl\-options=<CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\--output=<PATH>] [\--] <URL>...\fP wcurl.1:23:parameters via the \fB\--curl\-options\fP option. Just beware that you likely wcurl.1:58:Specify extra options to be passed when invoking curl. May be specified more wcurl.1:61:Use the provided output path instead of getting it from the URL. If multiple wcurl.1:63:the end (curl >= 7.83.0). If this option is provided multiple times, only the wcurl.1:75:Any option supported by curl can be set here. This is not used by \fBwcurl\fP; it wcurl.1:78:URL to be downloaded. Anything that is not a parameter is considered wcurl.1:79:an URL. Whitespaces are percent\-encoded and the URL is passed to curl, which wcurl.1:80:then performs the parsing. May be specified more than once. -.-. 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. wcurl.1:2:.TH wcurl 1 "2025-04-20" wcurl -.-. Add "\&" after an ellipsis, when it does not end a sentence. 8:\fBwcurl [\--curl\-options <CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\-o|\-O|\--output <PATH>] [\--] <URL>...\fP 10:\fBwcurl [\--curl\-options=<CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\--output=<PATH>] [\--] <URL>...\fP 57:.IP "--curl-options, --curl-options=\<CURL_OPTIONS\>..." -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:30: warning: ignoring escape character before '>' troff:<stdin>:36: warning: ignoring escape character before '>' troff:<stdin>:57: warning: ignoring escape character before '<' troff:<stdin>:57: warning: ignoring escape character before '>' troff:<stdin>:60: warning: ignoring escape character before '<' troff:<stdin>:60: warning: ignoring escape character before '>' troff:<stdin>:100: warning: ignoring escape character before '<' troff:<stdin>:100: warning: ignoring escape character before '>' troff:<stdin>:101: warning: ignoring escape character before '<' troff:<stdin>:101: warning: ignoring escape character before '>' -.-. Generally: Split (sometimes) lines after a punctuation mark; before a conjunction.
--- wcurl.1 2025-05-07 02:57:08.685377327 +0000 +++ wcurl.1.new 2025-05-07 03:07:43.970643138 +0000 @@ -5,13 +5,13 @@ .SH SYNOPSIS \fBwcurl <URL>...\fP -\fBwcurl [\--curl\-options <CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\-o|\-O|\--output <PATH>] [\--] <URL>...\fP +\fBwcurl [\-\-curl\-options <CURL_OPTIONS>]...\& [\-\-dry\-run] [\-\-no\-decode\-filename] [\-o|\-O|\-\-output <PATH>] [\-\-] <URL>...\fP -\fBwcurl [\--curl\-options=<CURL_OPTIONS>]... [\--dry\-run] [\--no\-decode\-filename] [\--output=<PATH>] [\--] <URL>...\fP +\fBwcurl [\-\-curl\-options=<CURL_OPTIONS>]...\& [\-\-dry\-run] [\-\-no\-decode\-filename] [\-\-output=<PATH>] [\-\-] <URL>...\fP -\fBwcurl \-V|\--version\fP +\fBwcurl \-V|\-\-version\fP -\fBwcurl \-h|\--help\fP +\fBwcurl \-h|\-\-help\fP .SH DESCRIPTION \fBwcurl\fP is a simple curl wrapper which lets you use curl to download files without having to remember any parameters. @@ -20,20 +20,20 @@ Simply call \fBwcurl\fP with a list of U picks sane defaults. If you need anything more complex, you can provide any of curl\(aqs supported -parameters via the \fB\--curl\-options\fP option. Just beware that you likely +parameters via the \fB\-\-curl\-options\fP option. Just beware that you likely should be using curl directly if your use case is not covered. By default, \fBwcurl\fP does: .IP "* Percent-encode whitespaces in URLs;" .IP "* Download multiple URLs in parallel" .nf -if the installed curl's version is \>= 7.66.0 (--parallel); +if the installed curl's version is >= 7.66.0 (\-\-parallel); .fi .IP "* Follow redirects;" .IP "* Automatically choose a filename as output;" .IP "* Avoid overwriting files" .nf - if the installed curl's version is \>= 7.83.0 (--no-clobber); + if the installed curl's version is >= 7.83.0 (\-\-no-clobber); .fi .IP "* Perform retries;" .IP "* Set the downloaded file timestamp" @@ -54,22 +54,22 @@ so {} and [] characters in URLs are not if there is none in the URL. .fi .SH OPTIONS -.IP "--curl-options, --curl-options=\<CURL_OPTIONS\>..." +.IP "\-\-curl-options, \-\-curl-options=<CURL_OPTIONS>..." Specify extra options to be passed when invoking curl. May be specified more than once. -.IP "-o, -O, --output, --output=\<PATH\>" +.IP "\-o, \-O, \-\-output, \-\-output=<PATH>" Use the provided output path instead of getting it from the URL. If multiple URLs are provided, resulting files share the same name with a number appended to the end (curl >= 7.83.0). If this option is provided multiple times, only the last value is considered. -.IP --no-decode-filename +.IP \-\-no-decode-filename Don\(aqt percent\-decode the output filename, even if the percent\-encoding in the URL was done by \fBwcurl\fP, e.g.: The URL contained whitespaces. -.IP --dry-run +.IP \-\-dry-run Do not actually execute curl, just print what would be invoked. -.IP "-V, \--version" +.IP "\-V, \-\-version" Print version information. -.IP "-h, \--help" +.IP "\-h, \-\-help" Print help message. .SH CURL_OPTIONS Any option supported by curl can be set here. This is not used by \fBwcurl\fP; it @@ -87,18 +87,18 @@ Download two files in parallel: \fBwcurl example.com/filename1.txt example.com/filename2.txt\fP -Download a file passing the \fB\--progress\-bar\fP and \fB\--http2\fP flags to curl: +Download a file passing the \fB\-\-progress\-bar\fP and \fB\-\-http2\fP flags to curl: -\fBwcurl \--curl\-options="\--progress\-bar \--http2" example.com/filename.txt\fP +\fBwcurl \-\-curl\-options="\-\-progress\-bar \-\-http2" example.com/filename.txt\fP Resume from an interrupted download (if more options are used, this needs to be the last one in the list): -\fBwcurl \--curl\-options="\--continue\-at \-" example.com/filename.txt\fP +\fBwcurl \-\-curl\-options="\-\-continue\-at \-" example.com/filename.txt\fP .SH AUTHORS .nf -Samuel Henrique \<samuel...@debian.org\> -Sergio Durigan Junior \<sergi...@debian.org\> +Samuel Henrique <samuel...@debian.org> +Sergio Durigan Junior <sergi...@debian.org> and many contributors, see the AUTHORS file. .fi .SH REPORTING BUGS
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> To find trailing space use grep -n -e ' $' -e ' \\f.$' -e ' \\"' <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) -.-