Re: Inclusion of all manual pages in all architecture releases

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Mon, 31 May 2021 07:07:22 UTC
Fernando Apestegua wrote this message on Thu, May 27, 2021 at 08:40 +0200:
> On Wed, May 26, 2021 at 5:23 PM Ian Lepore <ian@freebsd.org> 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 https://www.freebsd.org/cgi/man.cgi 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
> > > https://www.freebsd.org/releases/13.0R/hardware/#proc-i386.
> > >
> > > Is there a specific reason for this?
> > >
> > > Cheers.
> > >
> >
> > I have tried multiple times to get the people who adminster
> > freebsd.org'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
> MAN_ARCH=all?
> According to make.conf(5), MAN_ARCH defaults to MACHINE and
> MACHINE_ARCH. Would it be possible to change the default value to
> "all"?
> 
> 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
>  .endif
> 
> -.if empty(MAN_ARCH)
> -__arches=      ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH}
> -.elif ${MAN_ARCH} == "all"
> +.if empty(MAN_ARCH) || ${MAN_ARCH} == "all"
>  __arches=      ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E}
>  .else
>  __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.

I would like to see this change made myself.  It'd nice to be able to
use your amd64 build box to be able to get information on other systems
by default.  The extra space is minimal.

I have cc'd -arch to get a wider audience.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."