On Wed, 26 Aug 2020 16:53:30 +0200
Kurt Jaeger <p...@freebsd.org> wrote:
> Hi!
>
> > Is there any documentation explaining how port man pages are
> > generated for man.cgi
>
> The man.cgi script itself is in the docs svn repo:
>
> https://svnweb.freebsd.org/doc/head/en_US.ISO8859-1/htdocs/cgi/man.cgi?revision=54262&view=markup
Thanks.
>
> We find that each released version has that version's ports tree.
>
> > and how frequently they're updated? Like, are they taken
> > from binary packages every few months or are they maybe created
> > from the ports tree that's current at the time of a release (so
> > "FreeBSD 12.1-RELEASE and Ports" contains man pages based on
> > https://download.freebsd.org/ftp/releases/amd64/12.1-RELEASE/ports.txz)?
> >
>
> Yes, exactly.
>
> Any ideas on how man.cgi can be made to also display ports head man
> pages ?
One way would be to extract man pages from the binary packages we
provide - this would allow to have man pages for head and quarterly
branches. This could be implemented as a poudriere feature while
building (so it collects man pages as a side effect of bulk builds), or
based on the artifacts/binary package produced by poudriere. The former
would probably be more elegant and less resource intensive, but also
more intrusive.
Naive implementation:
Get list of man pages:
find /usr/local/poudriere/data/packages/121amd64-default/All/ \
-name "*.txz" -exec tar -tf {} /usr/local/man 2>/dev/null \;
Extract man pages to /tmp/manpages:
find /usr/local/poudriere/data/packages/121amd64-default/All/ \
-name "*.txz" -exec tar \
-C /tmp/manpages \
--strip-components 4 \
-xf {} \
/usr/local/man 2>/dev/null \;
Test if it works:
MANPATH=/tmp/manpages man XGrabButton
Cheers,
Michael
--
Michael Gmelin
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"