Subject: bug#59631: 29.0.50; [PATCH] New check-man target to check man pages for errors

From: Eli Zaretskii <[email-masked]>
Date: Thu, 01 Dec 2022 18:01:30 +0200

> From: Stefan Kangas <[email-masked]>
> Date: Thu, 1 Dec 2022 07:02:16 -0800
> Cc: [email-masked]
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Can this be done by running Groff directly instead of via 'man'?  If it's
> > possible, it's IMO better, since Groff installations are more widespread
> > than the particular variant of 'man' you used in the script.  E.g., I think
> > the requirement for C.UTF-8 locale being available can be dropped in that
> > case.
> 
> The version of man used is man-db, which AFAIK is used by all major
> GNU/Linux distributions.

Exactly.  So anyone who doesn't have man-db or isn't on GNU/Linux is toast.
Groff is another matter: there's even a Windows port.

> Looking into this with PIPELINE_DEBUG=1, the processing done is
> non-trivial, and depends on e.g. /usr/libexec/man-db/zsoelim from
> man-db.  So I think trying to duplicate all of that for the purposes of
> this script might not be the best use of our time.

Fine with me, but just so you know: zsoelim is just a variant of soelim
which comes with Groff; it differs from soelim in that it knows about
compressed man pages (which are not the issue here).

AFAICT, the pipeline is simple:

 soelim FILE | preconv -e UTF-8 | groff -mandoc -Z -wall -wmac -Tutf8 > /dev/null