Package: gnupg-utils
Version: 2.2.46-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 -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.]


an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
troff:<stdin>:8: 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 gnupg-utils depends on:
ii  libassuan9       3.0.2-2
ii  libbz2-1.0       1.0.8-6
ii  libc6            2.41-4
ii  libgcrypt20      1.11.0-7
ii  libgpg-error0    1.51-3
ii  libksba8         1.6.7-2+b1
ii  libreadline8t64  8.2-6
ii  zlib1g           1:1.3.dfsg+really1.3.1-1+b1

Versions of packages gnupg-utils recommends:
ii  gpg        2.2.46-1+b1
ii  gpg-agent  2.2.46-1+b1
ii  gpgconf    2.2.46-1+b1
ii  gpgsm      2.2.46-1+b1

gnupg-utils suggests no packages.

-- no debconf information
Input file is migrate-pubring-from-classic-gpg.1

Output from "mandoc -T lint  migrate-pubring-from-classic-gpg.1": (shortened 
list)

      1 input text line longer than 80 bytes: migrate\-pubring\-fr...
      1 input text line longer than 80 bytes: the "classic" keyrin...

-.-.

Output from "test-nroff -mandoc -t -ww -z migrate-pubring-from-classic-gpg.1": 
(shortened list)

      1 trailing space in the line


Remove trailing space with: sed -e 's/  *$//'

-.-.

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 "\-\-".

migrate-pubring-from-classic-gpg.1:36:since the certificates rejected are 
unsafe -- either cryptographically
migrate-pubring-from-classic-gpg.1:80:Selects the GnuPG home directory when set 
and --default is given.

-.-.

Change -- in x--y to \(em (em-dash), or, if an
option, to \-\-

80:Selects the GnuPG home directory when set and --default is given.

-.-.

Add a (no-break, "\ " or "\~") space between a number and a unit,
as these are not one entity.

50:than 5MiB.  As of GnuPG 2.2.17, if gpg encounters such a flooded

-.-.

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.

36:since the certificates rejected are unsafe -- either cryptographically
80:Selects the GnuPG home directory when set and --default is given.

-.-.

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 URL (web address)

47 
https://tools.ietf.org/html/draft-dkg-openpgp-abuse-resistant-keystore-03#section-2.1).

-.-.

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"

93:Copyright (C) 2016 Daniel Kahn Gillmor for the Debian project. Please

-.-.

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 4, length 97

migrate\-pubring\-from\-classic\-gpg \- Migrate a public keyring from "classic" 
to "modern" GnuPG

Line 15, length 84

the "classic" keyring format (pubring.gpg) to the "modern" keybox format using 
GnuPG

Line 47, length 87

https://tools.ietf.org/html/draft-dkg-openpgp-abuse-resistant-keystore-03#section-2.1).

Longest line is number 4 with 97 characters

-.-.

The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

52:certifications (see "self-sigs-only" in gpg(1)).

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

migrate-pubring-from-classic-gpg.1:28:The program sends quite a bit of text 
(perhaps too much) to stderr.
migrate-pubring-from-classic-gpg.1:52:certifications (see "self-sigs-only" in 
gpg(1)).

-.-.

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

47:https://tools.ietf.org/html/draft-dkg-openpgp-abuse-resistant-keystore-03#section-2.1).

-.-.

No space is needed before a quote (") at the end of a line

8:.RB "[ " GPGHOMEDIR " | "

-.-.

Only one space character after a possible end of sentence
(after a punctuation, that can end a sentence).

migrate-pubring-from-classic-gpg.1:62:.B OpenPGPv3 public keys (a.k.a. "PGP-2" 
keys)
migrate-pubring-from-classic-gpg.1:93:Copyright (C) 2016 Daniel Kahn Gillmor 
for the Debian project. Please

-.-.

Put a subordinate sentence (after a comma) on a new line.

migrate-pubring-from-classic-gpg.1:21:first, and falling back to ~/.gnupg if 
unset.
migrate-pubring-from-classic-gpg.1:30:During a migration, the tool backs up 
several pieces of data in a
migrate-pubring-from-classic-gpg.1:37:unsound, or dangerously non-performant.  
This means that some
migrate-pubring-from-classic-gpg.1:50:than 5MiB.  As of GnuPG 2.2.17, if gpg 
encounters such a flooded
migrate-pubring-from-classic-gpg.1:69:The keybox format skips v3 keys entirely 
during migration, and GnuPG

-.-.

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.

migrate-pubring-from-classic-gpg.1:1:.TH "MIGRATE-PUBRING-FROM-CLASSIC-GPG" 1 
"April 2016"

-.-.

Use "\-" instead of "-" in web addresses.

47:https://tools.ietf.org/html/draft-dkg-openpgp-abuse-resistant-keystore-03#section-2.1).
66:See https://tools.ietf.org/html/rfc4880#section-5.5.2 for more details

-.-.

Put a (long) web address on a new line to reduce the posibility of
splitting the address between two output lines.
Or inhibit hyphenation with "\%" in front of the name.


47:https://tools.ietf.org/html/draft-dkg-openpgp-abuse-resistant-keystore-03#section-2.1).
66:See https://tools.ietf.org/html/rfc4880#section-5.5.2 for more details

-.-.

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

an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
troff:<stdin>:8: warning: trailing space in the line

-.-.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- migrate-pubring-from-classic-gpg.1  2025-03-18 18:37:00.477664586 +0000
+++ migrate-pubring-from-classic-gpg.1.new      2025-03-18 19:08:25.570950454 
+0000
@@ -1,42 +1,49 @@
-.TH "MIGRATE-PUBRING-FROM-CLASSIC-GPG" 1 "April 2016"
+.TH MIGRATE-PUBRING-FROM-CLASSIC-GPG 1 "April 2016"
 
 .SH NAME
-migrate\-pubring\-from\-classic\-gpg \- Migrate a public keyring from 
"classic" to "modern" GnuPG
+migrate\-pubring\-from\-classic\-gpg \- Migrate a public keyring from
+"classic" to "modern" GnuPG
 
 .SH SYNOPSIS
 .B migrate\-pubring\-from\-classic\-gpg
-.RB "[ " GPGHOMEDIR " | "
+.RB "[ " GPGHOMEDIR " |"
 .IR \-\-default " ]"
 
 .SH DESCRIPTION
 
 .B migrate\-pubring\-from\-classic\-gpg
 migrates the public keyring in GnuPG home directory GPGHOMEDIR from
-the "classic" keyring format (pubring.gpg) to the "modern" keybox format using 
GnuPG
-versions 2.1 or 2.2 (pubring.kbx).
+the "classic" keyring format (pubring.gpg)
+to the "modern" keybox format using GnuPG versions 2.1 or 2.2 (pubring.kbx).
 
 Specifying
 .B \-\-default
-selects the standard GnuPG home directory (looking at $GNUPGHOME
-first, and falling back to ~/.gnupg if unset.
+selects the standard GnuPG home directory
+(looking at $GNUPGHOME first,
+and falling back to ~/.gnupg if unset).
 
 .SH OPTIONS
 .BR \-h ", " \-\-help ", " \-\-usage
 Output a short usage information.
 
 .SH DIAGNOSTICS
-The program sends quite a bit of text (perhaps too much) to stderr.
-
-During a migration, the tool backs up several pieces of data in a
-timestamped subdirectory of the GPGHOMEDIR.
+The program sends quite a bit of text
+(perhaps too much)
+to stderr.
+
+During a migration,
+the tool backs up several pieces of data
+in a timestamped subdirectory of the GPGHOMEDIR.
 
 .SH LIMITATIONS
 The keybox format rejects a number of OpenPGP certificates that the
 "classic" keyring format used to accept.  These filters are defensive,
-since the certificates rejected are unsafe -- either cryptographically
-unsound, or dangerously non-performant.  This means that some
-migrations may produce warning messages about the migration being
-incomplete.  This is generally a good thing!
+since the certificates rejected are unsafe \(en either cryptographically
+unsound,
+or dangerously non-performant.
+This means
+that some migrations may produce warning messages about the migration
+being incomplete.  This is generally a good thing!
 
 Known limitations:
 
@@ -44,12 +51,16 @@ Known limitations:
 .RS 4
 Some OpenPGP certificates have been flooded with bogus certifications
 as part of an attack on the SKS keyserver network (see
-https://tools.ietf.org/html/draft-dkg-openpgp-abuse-resistant-keystore-03#section-2.1).
+.br
+https://tools.ietf.org/\:html/\:draft\-dkg\-openpgp\-abuse\-resistant\-keystore\-03#\:section\-2.1).
 
 The keybox format rejects import of any OpenPGP certificate larger
-than 5MiB.  As of GnuPG 2.2.17, if gpg encounters such a flooded
-certificate will retry the import while stripping all third-party
-certifications (see "self-sigs-only" in gpg(1)).
+than 5\~MiB.
+As of GnuPG 2.2.17,
+if gpg encounters such a flooded certificate will retry the import
+while stripping all third-party certifications
+(see "self-sigs-only" in
+.BR gpg (1)).
 
 The typical error message when migrating a keyring with a flooded
 certificate will be something like:
@@ -59,15 +70,17 @@ certificate will be something like:
 error writing keyring 'pubring.kbx': Provided object is too large
 .RE
 
-.B OpenPGPv3 public keys (a.k.a. "PGP-2" keys)
+.B OpenPGPv3 public keys (a.k.a.\& "PGP-2" keys)
 .RS 4
 Modern OpenPGP implementations use so-called "OpenPGP v4" public keys.
 Older versions of the public key format have serious known problems.
-See https://tools.ietf.org/html/rfc4880#section-5.5.2 for more details
+See
+.br
+https://tools.ietf.org/html/rfc4880#section\-5.5.2 for more details
 about and reasons for v3 key deprecation.
 
-The keybox format skips v3 keys entirely during migration, and GnuPG
-will produce a message like:
+The keybox format skips v3 keys entirely during migration,
+and GnuPG will produce a message like:
 
 .RE
 .RS 8
@@ -77,7 +90,7 @@ skipped PGP-2 keys: 1
 .SH ENVIRONMENT VARIABLES
 
 .B GNUPGHOME
-Selects the GnuPG home directory when set and --default is given.
+Selects the GnuPG home directory when set and \-\-default is given.
 
 .B GPG
 The name of the
@@ -90,5 +103,5 @@ executable (defaults to
 .BR gpg (1)
 
 .SH AUTHOR
-Copyright (C) 2016 Daniel Kahn Gillmor for the Debian project. Please
-report bugs via the Debian BTS.
+Copyright (C) 2016 Daniel Kahn Gillmor for the Debian project.
+Please report bugs via the Debian BTS.
  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)

-.-

Reply via email to