Re: Inclusion of all manual pages in all architecture releases

From: Fernando_Apesteguía <>
Date: Thu, 27 May 2021 06:40:09 UTC
On Wed, May 26, 2021 at 5:23 PM Ian Lepore <> wrote:
> On Wed, 2021-05-26 at 17:04 +0200, Fernando Apesteguía wrote:
> > I don't know what list this should be sent to, apologies if the
> > audience is too wide.
> >
> > For some time now, we have not included all manual pages in every
> > FreeBSD packaged release. For instance, i386 man pages are not
> > included in the FreeBSD amd64 distribution.
> >
> > This causes a number of problems:
> >
> > * The is incomplete. As an
> > example, it does not show results for pae(4). The reason for this is
> > that the cgi interface runs on FreeBSD amd64.
> >
> > * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4)
> > for an example.
> >
> > * Also, we have broken links in our Release Notes. This is a
> > consequence of the first point. See
> >
> >
> > Is there a specific reason for this?
> >
> > Cheers.
> >
> I have tried multiple times to get the people who adminster
>'s man.cgi to include all arches.  I added the ability to
> generate and install all of them by setting MAN_ARCH=all (or to a list
> of arches) on the build command line years ago.  But I haven't had any
> success in getting that used to install all the arches for the website
> and man.cgi updated to make the arch selection list on the webpage
> actually work.

Hi Ian,

Thanks for the explanation. That would fix the man.cgi and
consequently the Release Notes issues.
However, in order to fix the broken X-refs in the manual pages of the
release distributions, wouldn't we need to build them with
According to make.conf(5), MAN_ARCH defaults to MACHINE and
MACHINE_ARCH. Would it be possible to change the default value to

diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index f7626c80eeb1..583c4a4b9bb9 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -897,9 +897,7 @@ _cgem.4=    cgem.4
 MLINKS+=cgem.4 if_cgem.4

-.if empty(MAN_ARCH)
-.elif ${MAN_ARCH} == "all"
+.if empty(MAN_ARCH) || ${MAN_ARCH} == "all"
 __arches=      ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E}
 __arches=      ${MAN_ARCH}

This way, the released distributions will have all the man pages (we
have some PRs related to this) and would also fix man.cgi regardless
of the FreeBSD version the service runs on.

I am assuming here that we do not explicitly set MAN_ARCH to a
specific architecture when building the releases but we take the
default value.


> -- Ian