#1041070 perl: pod2man uses CW, groff-base no longer supports this by default

Package:
perl
Source:
perl
Description:
Larry Wall's Practical Extraction and Report Language
Submitter:
Andrew Ruthven
Date:
2023-10-30 17:36:06 UTC
Severity:
normal
Tags:
#1041070#5
Date:
2023-07-13 12:54:01 UTC
From:
To:
Dear Maintainer,

groff-base v1.23 has been uploaded to unstable, which disables the CW macro
by default. This causes errors like this to be generated with pod2man now:

puck@dirk:~$ pod2man /usr/share/perl/5.36.0/version.pod | nroff -man | grep CW
troff:<standard input>:145: warning: cannot select font 'CW'
troff:<standard input>:182: warning: cannot select font 'CW'
troff:<standard input>:191: warning: cannot select font 'CW'
troff:<standard input>:205: warning: cannot select font 'CW'
troff:<standard input>:207: warning: cannot select font 'CW'
...

This is causing lintian to be upset when build packages, e.g.:

W: rt-extension-mergeusers-common: groff-message troff:<standard input>:115: warning: cannot select font 'CW' [usr/share/man/man3/RT::Extension::MergeUsers.3pm.gz:1]

This version of groff-base introduces a new option in /etc/groff/man.local:

.\" "CW" is not a portable font name, but some man pages use it anyway.
.\" Uncomment this to suppress warnings produced by such pages.  This
.\" test remaps the font to roman ("R") on nroff (terminal) devices. You
.\" might prefer to remap it to bold ("B") instead.
.\" .if n .ftr CW R

Now, is it pod2man or groff-base that is at fault here? Perl 5.38 still uses
CW in pod2man by default.

Cheers,
Andrew

#1041070#10
Date:
2023-07-14 03:15:47 UTC
From:
To:
Hey,

I think a change in groff-base to re-enable the CW font alias might be
reasonable. This affects a number of other packages, not just perl (via
pod2man), for example:

puck@dirk:~$ man --warnings /usr/share/man/man1/strace.1.gz > /dev/null
troff:<standard input>:88: warning: macro 'IX' not defined
troff:<standard input>:119: warning: cannot select font 'CW'
troff:<standard input>:124: warning: cannot select font 'CW'
...

(Lintian excludes the IX macro which is why that is present)

Cheers,
Andrew

#1041070#21
Date:
2023-07-14 16:44:05 UTC
From:
To:
Control: clone -1 -2
Control: reassign -2 perl

I'll re-enable the CW alias, but I think pod2man should probably be
changed as well, since it'll still be generating pages that result in
warnings from upstream groff.

I'm less sure exactly what the change should be.  Using CW does have its
advantages despite the non-portability: as I recall, it looks better in
troff output.  Perhaps the generated document should attempt to use the
CW font if it exists, but otherwise suppress warnings and fall back to
R?