Package: bzip2
Version: 1.0.8-6
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: backtrace: file '<stdin>':16
troff:<stdin>:16: warning: trailing space in the line
troff: backtrace: file '<stdin>':35
troff:<stdin>:35: 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.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 bzip2 depends on:
ii  libbz2-1.0  1.0.8-6
ii  libc6       2.40-3

bzip2 recommends no packages.

Versions of packages bzip2 suggests:
pn  bzip2-doc  <none>

-- no debconf information
Input file is bzdiff.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  bzdiff.1 ": (shortened list)

      1 missing date, using ""
      2 whitespace at end of input line

-.-.

Output from "test-groff -mandoc -t -ww -b -z bzdiff.1 ": (shortened list)

      2 trailing space in the line

-.-.

Output from "mandoc -T lint  bzdiff.1 ":

mandoc: bzdiff.1:3:2: WARNING: missing date, using "": TH
mandoc: bzdiff.1:16:4: STYLE: whitespace at end of input line
mandoc: bzdiff.1:35:21: STYLE: whitespace at end of input line

-.-.

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

16:and 
35:The exit status from 

-.-.

Name of a manual is set in bold, the section in roman.
See man-pages(7).

41:cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1)

-.-.

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)).

15:.I  Bzcmp
22:program on bzip2 compressed files.  All options specified are passed

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ":

troff: backtrace: file '<stdin>':16
troff:<stdin>:16: warning: trailing space in the line
troff: backtrace: file '<stdin>':35
troff:<stdin>:35: warning: trailing space in the line
--- bzdiff.1    2024-12-04 06:49:14.423883921 +0000
+++ bzdiff.1.new        2024-12-04 07:00:52.817582538 +0000
@@ -1,47 +1,48 @@
 \"Shamelessly copied from zmore.1 by Philippe Troin <p...@fifi.org>
 \"for Debian GNU/Linux
-.TH BZDIFF 1
+.TH BZDIFF 1 ""\" Date is missing
 .SH NAME
 bzcmp, bzdiff \- compare bzip2 compressed files
 .SH SYNOPSIS
 .B bzcmp
-[ cmp_options ] file1
-[ file2 ]
+.RI "[ " cmp_options " ] " file1 \
+" [ " file2 " ]"
 .br
 .B bzdiff
-[ diff_options ] file1
-[ file2 ]
+.RI "[ " diff_options " ] " file1 \
+" [ " file2 " ]"
 .SH DESCRIPTION
-.I  Bzcmp
-and 
-.I bzdiff
+.B Bzcmp
+and
+.B bzdiff
 are used to invoke the
-.I cmp
+.B cmp
 or the
-.I diff
-program on bzip2 compressed files.  All options specified are passed
-directly to
-.I cmp
+.B diff
+program on bzip2 compressed files.
+All options specified are passed directly to
+.B cmp
 or
-.IR diff "."
+.BR diff "."
 If only 1 file is specified, then the files compared are
 .I file1
 and an uncompressed
 .IR file1 ".bz2."
 If two files are specified, then they are uncompressed if necessary and fed to
-.I cmp
+.B cmp
 or
-.IR diff "."
-The exit status from 
-.I cmp
+.BR diff "."
+The exit status from
+.B cmp
 or
-.I diff
+.B diff
 is preserved.
 .SH "SEE ALSO"
-cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1)
+.BR cmp "(1), " diff "(1), " bzmore "(1), " bzless "(1), " bzgrep "(1), " \
+bzip2 (1)
 .SH BUGS
 Messages from the
-.I cmp
+.B cmp
 or
-.I diff
+.B diff
 programs refer to temporary filenames instead of those specified.

Reply via email to