Bug#1094589: zsync.1: Some remarks and a patch with editorial changes for this man page
Package: zsync
Version: 0.6.2-6
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>:25: style: 1 leading space(s) on input line
troff:<stdin>:64: 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.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 zsync depends on:
ii libc6 2.40-6
zsync recommends no packages.
zsync suggests no packages.
-- no debconf information
Input file is zsync.1
Output from "mandoc -T lint zsync.1": (shortened list)
1 input text line longer than 80 bytes: Downloads a file ove...
1 input text line longer than 80 bytes: Either a filename or...
1 input text line longer than 80 bytes: Indicates that zsync...
1 input text line longer than 80 bytes: Should be the [http:...
1 input text line longer than 80 bytes: Specifies (extra) in...
1 input text line longer than 80 bytes: zsync [ \-u \fIurl\f...
1 input text line longer than 80 bytes: zsync \-i /var/lib/a...
1 input text line longer than 80 bytes: zsync downloads to y...
1 input text line longer than 80 bytes: zsync retrieves the ...
6 skipping paragraph macro: PP after SH
2 skipping paragraph macro: PP empty
22 whitespace at end of input line
-.-.
Output from "test-groff -mandoc -t -ww -z zsync.1": (shortened list)
1 trailing space in the line
-.-.
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
22
-.-.
Remove space in the first column, if not indented.
Use ".in +<number>n" and ".in" to end it; ".nf" and ".fi" to end
it, for an extra indention.
zsync.1:25: .zsync file is on a different server from the download, or there are multiple
-.-.
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.
7:zsync [ \-u \fIurl\fR ] [ \-i \fIinputfile\fP ] [ \-o \fIoutputfile\fP ] [ { \-s | \-q } ] [ \-k \fIfile\fR.zsync ] [ -A \fIhostname\fP=\fIusername\fR:\fIpassword\fR ] { \fIfilename\fP | \fIurl\fR }
23:Specifies a username and password to be used with the given hostname. \fB-A\fR
28:than the one named - otherwise redirects would be dangerous!).
34:Indicates that zsync should save the zsync file that it downloads, with the given filename. If that file already exists, then zsync will make a conditional request to the web server, such that it will only download it again if the server's copy is newer. zsync will append .part to the filename for storing it while it is downloading, and will only overwrite the main file once the download is done - and if the download is interrupted, it will resume using the data in the .part file.
43:Deprecated synonym for -q.
-.-.
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)
64 zsync \-i /var/lib/apt/lists/server.debian.org_debian_dists_etch_main_binary-i386_Packages http://zsync.moria.org.uk/s/etch/Packages.zsync
-.-.
Add a comma (or \&) after "e.g." and "i.e.", or use English words
(man-pages(7)).
Abbreviation points should be protected against being interpreted as
an end of sentence, if they are not, and that independent of the
current place on the line.
24:can be used multiple times (with different hostnames), in cases where e.g. the
-.-.
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.
Mark a final abbreviation point as such by suffixing it with "\&".
12:Downloads a file over HTTP. zsync uses a control file to determine whether any blocks in the file are already known to the downloader, and only downloads the new blocks.
14:Either a filename or a URL can be given on the command line \- this is the path of the \fBcontrol\fR file for the download, which normally has the name of the actual file to downlaod with .zsync appended. (To create this .zsync file you have to have a copy of the target file, so this file should be generated by the person providing the download).
16:zsync downloads to your current directory. It looks for any file in the directory of the same name as the file to download. If it finds one, it assumes that this is an earlier or incomplete version of the new file to download, and scans this file for any blocks that it can use to build the target file. (It also looks for a file of the same name with .part appended, so it will automatically find previously interrupted zsync downloads and reuse the data already downloaded. If you know that the local file to use as input has a different name, you must use \fB\-i\fR)
18:zsync retrieves the rest of the target file over HTTP. Once the download is finished, the old version (if the new file wants the same name) is moved aside (a .zs\-old extension is appended). The modification time of the file is set to be the same as the remote source file (if specified in the .zsync).
23:Specifies a username and password to be used with the given hostname. \fB-A\fR
24:can be used multiple times (with different hostnames), in cases where e.g. the
31:Specifies (extra) input files. \fIinputfile\fP is scanned to identify blocks in common with the target file and zsync uses any blocks found. Can be used multiple times.
34:Indicates that zsync should save the zsync file that it downloads, with the given filename. If that file already exists, then zsync will make a conditional request to the web server, such that it will only download it again if the server's copy is newer. zsync will append .part to the filename for storing it while it is downloading, and will only overwrite the main file once the download is done - and if the download is interrupted, it will resume using the data in the .part file.
-.-.
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 7, length 198
zsync [ \-u \fIurl\fR ] [ \-i \fIinputfile\fP ] [ \-o \fIoutputfile\fP ] [ { \-s | \-q } ] [ \-k \fIfile\fR.zsync ] [ -A \fIhostname\fP=\fIusername\fR:\fIpassword\fR ] { \fIfilename\fP | \fIurl\fR }
Line 12, length 169
Downloads a file over HTTP. zsync uses a control file to determine whether any blocks in the file are already known to the downloader, and only downloads the new blocks.
Line 14, length 348
Either a filename or a URL can be given on the command line \- this is the path of the \fBcontrol\fR file for the download, which normally has the name of the actual file to downlaod with .zsync appended. (To create this .zsync file you have to have a copy of the target file, so this file should be generated by the person providing the download).
Line 16, length 569
zsync downloads to your current directory. It looks for any file in the directory of the same name as the file to download. If it finds one, it assumes that this is an earlier or incomplete version of the new file to download, and scans this file for any blocks that it can use to build the target file. (It also looks for a file of the same name with .part appended, so it will automatically find previously interrupted zsync downloads and reuse the data already downloaded. If you know that the local file to use as input has a different name, you must use \fB\-i\fR)
Line 18, length 302
zsync retrieves the rest of the target file over HTTP. Once the download is finished, the old version (if the new file wants the same name) is moved aside (a .zs\-old extension is appended). The modification time of the file is set to be the same as the remote source file (if specified in the .zsync).
Line 31, length 168
Specifies (extra) input files. \fIinputfile\fP is scanned to identify blocks in common with the target file and zsync uses any blocks found. Can be used multiple times.
Line 34, length 485
Indicates that zsync should save the zsync file that it downloads, with the given filename. If that file already exists, then zsync will make a conditional request to the web server, such that it will only download it again if the server's copy is newer. zsync will append .part to the filename for storing it while it is downloading, and will only overwrite the main file once the download is done - and if the download is interrupted, it will resume using the data in the .part file.
Line 61, length 111
Should be the [http://]hostname:port for your web proxy, if one is required to access the target web server(s).
Line 64, length 139
zsync \-i /var/lib/apt/lists/server.debian.org_debian_dists_etch_main_binary-i386_Packages http://zsync.moria.org.uk/s/etch/Packages.zsync
-.-.
Use \(en (en-dash) for a dash at the beginning of a line,
or between space characters,
not a minus (\-) or a hyphen (-), except in the NAME section.
zsync.1:28:than the one named - otherwise redirects would be dangerous!).
zsync.1:34:Indicates that zsync should save the zsync file that it downloads, with the given filename. If that file already exists, then zsync will make a conditional request to the web server, such that it will only download it again if the server's copy is newer. zsync will append .part to the filename for storing it while it is downloading, and will only overwrite the main file once the download is done - and if the download is interrupted, it will resume using the data in the .part file.
-.-.
The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).
71:zsyncmake(1)
-.-.
Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
zsync.1:14:Either a filename or a URL can be given on the command line \- this is the path of the \fBcontrol\fR file for the download, which normally has the name of the actual file to downlaod with .zsync appended. (To create this .zsync file you have to have a copy of the target file, so this file should be generated by the person providing the download).
zsync.1:16:zsync downloads to your current directory. It looks for any file in the directory of the same name as the file to download. If it finds one, it assumes that this is an earlier or incomplete version of the new file to download, and scans this file for any blocks that it can use to build the target file. (It also looks for a file of the same name with .part appended, so it will automatically find previously interrupted zsync downloads and reuse the data already downloaded. If you know that the local file to use as input has a different name, you must use \fB\-i\fR)
zsync.1:18:zsync retrieves the rest of the target file over HTTP. Once the download is finished, the old version (if the new file wants the same name) is moved aside (a .zs\-old extension is appended). The modification time of the file is set to be the same as the remote source file (if specified in the .zsync).
zsync.1:24:can be used multiple times (with different hostnames), in cases where e.g. the
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ":
an.tmac:<stdin>:25: style: 1 leading space(s) on input line
troff:<stdin>:64: warning: trailing space in the line
--- zsync.1 2025-01-29 01:07:26.485243046 +0000
+++ zsync.1.new 2025-01-29 01:54:24.270249378 +0000
@@ -1,71 +1,118 @@
.TH "zsync" "1" "0.6.2" "Colin Phipps" "File Transfer"
.SH "NAME"
-.LP
zsync \- Partial/differential file download client over HTTP
.SH "SYNTAX"
-.LP
-zsync [ \-u \fIurl\fR ] [ \-i \fIinputfile\fP ] [ \-o \fIoutputfile\fP ] [ { \-s | \-q } ] [ \-k \fIfile\fR.zsync ] [ -A \fIhostname\fP=\fIusername\fR:\fIpassword\fR ] { \fIfilename\fP | \fIurl\fR }
-.LP
+zsync [ \-u \fIurl\fR ] [ \-i \fIinputfile\fP ] [ \-o \fIoutputfile\fP ] [ {
+\-s | \-q } ] [ \-k \fIfile\fR.zsync ] [ \-A
+\fIhostname\fP=\fIusername\fR:\fIpassword\fR ] { \fIfilename\fP | \fIurl\fR }
+.LP
zsync \-V
.SH "DESCRIPTION"
-.LP
-Downloads a file over HTTP. zsync uses a control file to determine whether any blocks in the file are already known to the downloader, and only downloads the new blocks.
-.LP
-Either a filename or a URL can be given on the command line \- this is the path of the \fBcontrol\fR file for the download, which normally has the name of the actual file to downlaod with .zsync appended. (To create this .zsync file you have to have a copy of the target file, so this file should be generated by the person providing the download).
-.LP
-zsync downloads to your current directory. It looks for any file in the directory of the same name as the file to download. If it finds one, it assumes that this is an earlier or incomplete version of the new file to download, and scans this file for any blocks that it can use to build the target file. (It also looks for a file of the same name with .part appended, so it will automatically find previously interrupted zsync downloads and reuse the data already downloaded. If you know that the local file to use as input has a different name, you must use \fB\-i\fR)
-.LP
-zsync retrieves the rest of the target file over HTTP. Once the download is finished, the old version (if the new file wants the same name) is moved aside (a .zs\-old extension is appended). The modification time of the file is set to be the same as the remote source file (if specified in the .zsync).
+Downloads a file over HTTP.
+zsync uses a control file to determine
+whether any blocks in the file are already known to the downloader,
+and only downloads the new blocks.
+.LP
+Either a filename or a URL can be given on the command line \(en
+this is the path of the \fBcontrol\fR file for the download,
+which normally has the name of the actual file to downlaod with .zsync
+appended.
+(To create this .zsync file you have to have a copy of the target file,
+so this file should be generated by the person providing the download).
+.LP
+zsync downloads to your current directory.
+It looks for any file in the directory of the same name as the file to
+download.
+If it finds one,
+it assumes that this is an earlier
+or incomplete version of the new file to download,
+and scans this file for any blocks
+that it can use to build the target file.
+(It also looks for a file of the same name with .part appended,
+so it will automatically find previously interrupted zsync downloads
+and reuse the data already downloaded.
+If you know
+that the local file to use as input has a different name,
+you must use \fB\-i\fR)
+.LP
+zsync retrieves the rest of the target file over HTTP.
+Once the download is finished,
+the old version
+(if the new file wants the same name)
+is moved aside
+(a .zs\-old extension is appended).
+The modification time of the file is set to be the same as the remote source
+file
+(if specified in the .zsync).
.SH "OPTIONS"
-.LP
-.TP
+.TP
\fB\-A\fR \fIhostname\fP=\fIusername\fR:\fIpassword\fR
-Specifies a username and password to be used with the given hostname. \fB-A\fR
-can be used multiple times (with different hostnames), in cases where e.g. the
- .zsync file is on a different server from the download, or there are multiple
-download servers (there could be different auth details for different servers -
+Specifies a username and password to be used with the given hostname.
+\fB\-A\fR can be used multiple times
+(with different hostnames),
+in cases where e.g.,
+the \&.zsync file is on a different server from the download,
+or there are multiple download servers
+(there could be different auth details for different servers -
and zsync never assumes that your password should be sent to a server other
-than the one named - otherwise redirects would be dangerous!).
-.TP
+than the one named \(en otherwise redirects would be dangerous!).
+.TP
\fB\-i\fR \fIinputfile\fP
-Specifies (extra) input files. \fIinputfile\fP is scanned to identify blocks in common with the target file and zsync uses any blocks found. Can be used multiple times.
-.TP
+Specifies (extra) input files.
+\fIinputfile\fP is scanned to identify blocks in common with the target file
+and zsync uses any blocks found.
+Can be used multiple times.
+.TP
\fB\-k\fR \fIfile\fP.zsync
-Indicates that zsync should save the zsync file that it downloads, with the given filename. If that file already exists, then zsync will make a conditional request to the web server, such that it will only download it again if the server's copy is newer. zsync will append .part to the filename for storing it while it is downloading, and will only overwrite the main file once the download is done - and if the download is interrupted, it will resume using the data in the .part file.
-.TP
+Indicates that zsync should save the zsync file that it downloads,
+with the given filename.
+If that file already exists,
+then zsync will make a conditional request to the web server,
+such that it will only download it again
+if the server's copy is newer.
+zsync will append .part to the filename for storing it
+while it is downloading,
+and will only overwrite the main file once the download is done \(en
+and if the download is interrupted,
+it will resume using the data in the .part file.
+.TP
\fB\-o\fR \fIoutputfile\fP
Override the default output file name.
-.TP
+.TP
\fB\-q\fR
Suppress the progress bar, download rate and ETA display.
-.TP
+.TP
\fB\-s\fR
-Deprecated synonym for -q.
-.TP
+Deprecated synonym for \-q.
+.TP
\fB\-u\fR \fIurl\fP
-This specifies the referring URL. If you have a .zsync file locally (if you
-downloaded it separately, with wget, say) and the .zsync file contains a
-relative URL, you need to specify where you got the .zsync file from so that
-zsync knows which server and path to use for the rest of the download (this is
-analogous to adding a <base href="..."> to a downloaded web page to make the
-links work).
-.TP
+This specifies the referring URL.
+If you have a .zsync file locally
+(if you downloaded it separately, with wget, say)
+and the .zsync file contains a relative URL,
+you need to specify where you got the .zsync file from
+so that zsync knows which server
+and path to use for the rest of the download
+(this is analogous to adding a <base href="..."> to a downloaded web page to
+make the links work).
+.TP
\fB\-V\fR
Prints the version of zsync.
.SH "FILES"
.SH "ENVIRONMENT VARIABLES"
-.LP
-.TP
+.TP
\fBhttp_proxy\fP
-Should be the [http://]hostname:port for your web proxy, if one is required to access the target web server(s).
+Should be the [http://]hostname:port for your web proxy,
+if one is required to access the target web server(s).
.SH "EXAMPLES"
-.LP
-zsync \-i /var/lib/apt/lists/server.debian.org_debian_dists_etch_main_binary-i386_Packages http://zsync.moria.org.uk/s/etch/Packages.zsync
+.nf
+zsync \-i \e
+/var/lib/apt/lists/server.debian.org_debian_dists_etch_main_binary-i386_Packages \e
+http://zsync.moria.org.uk/s/etch/Packages.zsync
+.fi
.SH "AUTHORS"
-.LP
Colin Phipps <cph@moria.org.uk>
.SH "SEE ALSO"
-.LP
-zsyncmake(1)
+.BR zsyncmake (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
-.-
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.
Not beginning each input sentence on a new line.
Line length 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 -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 -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)
-.-
Reply to: