Relation between MAN
PMAN
and its mappings
It seems that the
web page interface for FreeBSD man pages offers the following main three options:
- for FreeBSD base install (no ports included). URL example:
https://www.freebsd.org/cgi/man.cgi?query=ls&manpath=freebsd-release
- for FreeBSD base install and ports. URL example:
https://www.freebsd.org/cgi/man.cgi?query=ls&manpath=freebsd-release-ports
- for FreeBSD, for ports only. URL example:
https://www.freebsd.org/cgi/man.cgi?query=rsync&manpath=freebsd-ports
It seems that not all those three options can be selected by BBC on the FreeBSD forum; available are:
[MAN]ls[/MAN]
and [MAN=1]ls[/MAN]
[PMAN=1]rsync[/PMAN]
Having only two BBC options available, a working compromise seems:
[MAN]ls[/MAN]
and [MAN=1]ls[/MAN]
mapped to the base-install and ports.
[PMAN=1]rsync[/PMAN]
mapped to ports.
As described in
Formatting Guidelines and
BBC-MAN,
MAN
is not precisely defined as to its intended targets but, it refers to manual pages in general terms, making the choice for #1 more likely. The current implementation on the FreeBSD forum is as described in #1. In the
Formatting Guidelines and more officially in
BBC-PMAN however, choice #2 suggests it should be mapped to ports only:
Create a link to a Ports Collection manual page.
Problems
BBC
PMAN
, for example
[PMAN=1]rsync[/PMAN]
—as in
rsync(1)—is being mapped to the man page for the base install
and ports,
and is
hard-coded to 12.1-RELEASE; URL:
https://www.freebsd.org/cgi/man.cgi...+and+Ports&arch=default&format=html&sektion=1
Proposed solution
Taking
[PMAN=1]rsync[/PMAN]
as an example, BBC
PMAN
should be mapped to ports accompanying the highest_major-highest_minor-RELEASE that is being supported; at the moment that would be
FreeBSD Ports 13.0 accompanying 13.0-RELEASE. Without a hard-coded reference to any specific X.Y-RELEASE and in line with
BBC-PMAN, it seems that this can be achieved by mapping
[PMAN=1]rsync[/PMAN]
to
ports only by generating for example the following URL:
https://www.freebsd.org/cgi/man.cgi?query=rsync&sektion=1&manpath=freebsd-ports
Currently, other extra options as part of the target URL (e.g. apropos and arch) are being generated as well. Specifically with regard to the BBC it seems that those are not relevant but, perhaps there are good reasons for those to be present.
Additional notes on mappings
Given that only
MAN
and
PMAN
are available as BBC, another possibility would be to map
MAN
to man pages of the FreeBSD base install
only and map
PMAN
to ports only. This would mean a mutual exclusive use of
MAN
&
PMAN
as to their intended targets.
This would have the advantage for the
reader of a forum message that it is quickly clear if the man page in question (and its related command) is part of the base install and as a consequence should be available on the FreeBSD installation of the user. Or, alternatively, is in ports and may require the user to install it from ports, for example as a package.
The
writer of a forum message on the other hand has to specifically select either
MAN
or
PMAN
.
Personally, I would welcome this mutual exclusive usage of
MAN
&
PMAN
for its intended targets; preferences may differ. There's also such a thing as backwards compatibility for all the written
MAN
references on this forum so far.
___
P.S. this thread seems somewhat intertwined with
Coding for MAN and PMAN markup. However, there the issue seems mainly about the actual FreeBSD website of the man pages and about the dual existence of
beadm(1) and
beadm(8); those are outside the purview of the FreeBSD forum sec as I understand it.