[RFC] Replace gnu groff in base by heirloom doctools

Baptiste Daroussin bapt at FreeBSD.org
Thu May 14 00:02:16 UTC 2015


Hi,

I plan to work in replacing GNU groff for FreeBSD 11.0 in base by heirloom
doctools.

This mostly concern documentation in share/docs and the fallback when mandoc(1)
is not able to render a manpage.

Heirloom doctools has progressed a lot recently and is now able to render
correctly all the document we do provide in base, it has active development and
integrate quickly new features.

Upstream have been very reactive to bug report I have sent to them and fixed
them very quickly.

Heirloom has multiple advantages over GNU groff:
- it is partially CDDL partially BSD license.
- it is mainly written in C (to the exception of a single tool in C++ which I do
  not plan to important)
- it is derived from the original macros from AT&T (in particular ms(7))
- it is smaller than GNU groff
- it has better unicode support than GNU groff
- it has better error reporting than GNU groff (which allowed me to fix a couple
  of the documentation there)
- heirloom manpages are mandoc(1) friendly which is not the case for GNU groff's
  one

I do only plan to incorporate part of it and keeping our own version of tools we
already have like: col(1), soelim(1), checknr(1) and vgrind(1).

mandoc(1) is still the target for rendering manpages and but I think keeping a
fully functionnal roff(7) toolchain part of the base system is very good on a
unix.

The issue we have with GNU groff is that newer version are in GPLv3 so we
cannot upgrade base version to a newer version. Base version of GNU groff is a
stripped down version of GNU groff so users willing to user some extra
functionnality of GNU groff will have to rely on the ports tree.

what have already been done:
- col(1): updated and fixed  base on work with the heirloom doctools and
collaboration with OpenBSD folks. While there I have already sandboxed
col(1) using capsicum.
- checknr(1): now handles more roff(7) commands.
- vgrind(11): modernize code base and synchronized some changes from NetBSD

I plan to import heirloom doctool later this month.

So far the only issue we have is with documents using pic(1) when rendering in
ascii (postscript and pdf rendering are ok) upstream is working on a fix but I
do not consider this as a blocker.

Allowing to have both gnu groff and heirloom at once switchable via an option
will be hard so I plan to make the switch happening at once.

From what I could check I cannot find any regression when migrating from gnu
groff to heirloom doctools, if there is a particular area when you think extra
care is needed please share it.

Heirloom doctools: https://github.com/n-t-roff/heirloom-doctools

Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20150514/ee0af748/attachment.sig>


More information about the freebsd-current mailing list