FS#16807 - [groff] Replace groff in core by mdocml
Attached to Project:
Arch Linux
Opened by Ilya Ilembitov (ilembitov) - Friday, 23 October 2009, 18:00 GMT
Last edited by Allan McRae (Allan) - Saturday, 28 April 2012, 12:41 GMT
Opened by Ilya Ilembitov (ilembitov) - Friday, 23 October 2009, 18:00 GMT
Last edited by Allan McRae (Allan) - Saturday, 28 April 2012, 12:41 GMT
|
Details
Basically, I just wanted to propose to replace groff with
mdocml.
Groff, as a troff implementation is mostly used as a way to get man pages these days, and few people really use it as a word processing/desktop publishing solution (although, me, personally, would love to see the revival of troff in these areas - but we aren't likely to see this happening within the current groff project, in my opinion). Which means, that not many people actually need the support for me/mm/ms/mom/etc macros out of the box, they just need something fully compatible with man pages format. As far as I understand, this is the reason why groff in Ubuntu/Debian world, for example, got split into two packages, the first (groff-base) containing only the man macro set, the the second (groff) being a full set. But there is also a second point: as far as I can judge, groff packages are actually tough to maintain. Basically, this is the reason why many distros are often reluctant to update or deal in other way with them. So this is why mdocml could be a nice idea: http://mdocml.bsd.lv/ Basically, this is a pretty recent implementation of the man macro set of groff, capable of producing the actual ASCII pages as well as the HTML output (to be published online, for instance, or used by a graphical man pages viewer). The biggest point here is that mdocml is written from scratch and doesn't rely on groff code base, thus it should actually be cleaner (and we all know the perfectionist-at-all-costs approach to code, shared by BSD people). It's written in C (and not in C++) and drops support for other macros, so it's fast and tiny. It is actively used within the OpenBSD/NetBSD community, so it actually has a lot of activity. And it's claimed to run on Linux as well. So, my point for this change (which is, use mdocml in core and push groff to /extra or even /community): -save some space in iso files and base installations. I believe, most of Arch users would love to see another improvement here -save some efforts on supporting the package (yes, I know that this is originally a BSD package, but I believe this is not the first time Arch gets a BSD package in core set - for instance, libfetch also comes from BSD, although it is used by pacman). -switch to a more lightweight and modern solution |
This task depends upon
Closed by Allan McRae (Allan)
Saturday, 28 April 2012, 12:41 GMT
Reason for closing: Won't implement
Additional comments about closing: See final comment
Saturday, 28 April 2012, 12:41 GMT
Reason for closing: Won't implement
Additional comments about closing: See final comment
If not, I plan to close this on April 2010 bug day as "won't implement", since it will then have been open for 6 months without activity.
It seems that it would increase, rather than decrease, complexity to maintain both groff and this mdocml, when groff alone has been and continues to be sufficient, and there don't seem to be any truly compelling reasons to stop using it; I've never seen anyone complain about the long wait to display manpages.
source compressed: groff: 4,5mb, mdocml: 150kB
installation: groff ~20mb, mdocml: 260kB
Aiming to build as system as small as possible, changing to mdocml would be a nice move.
As soon as i manage to solve the issue, i'll bring some comments about it's performance.
EDIT: Corrected the really messed phrase i wrote
From the author:
the man and mandoc utilities are not related: all mandoc does is transform -man or -mdoc input pages into formatted output, while man is responsible for finding formatted pages and displaying them with the pager. These are completely separate issues.
If you want advice on how to integrate mandoc system-wide as a replacement for groff, you may want to search/ask on the NetBSD mailing lists, as they did considerable work in doing so.
Note, significantly, that the -man support in mandoc isn't excellent: the utility's main focus is -mdoc pages. From what I understand, arch only redistributes existing "core" utility manuals (such as for GNU cat, ls, etc.) as part of the base system. These are mostly (all?) in -man, which will cause problems. Integration is much easier on BSD systems because (1) the manuals are all self-contained in the operating system, and thus may be changed and repaired; and (2) are all in -mdoc.
I hope I was able to shed some light on the situation.
Take care,
Kristaps
The pages render fine w/ the default man-db + groff setup.
When running 'tbl /usr/share/man/man3/fopen.3' I get:
/usr/share/man/man3/fopen.3:1:1: bad syntax
You'll get `token support' for `-man'.
http://undeadly.org/cgi?action=article&sid=20110314142734
and the latest version appears to fix many of the issues pointed out here. I would really like to see someone go through all packages in [core] and make a report of the compatibility of this with their man pages. Then we would have an accurate picture of what needed done to switch to this allowing us to make a final decision.
However, given the main advantage here is install size, I'm not sure it is worth the effort, especially when we are talking about 20MB installed. If you were trying for a system with minimal space, then you probably would remove this package anyway...
If by "latest version' you mean 1.10.9 https://aur.archlinux.org/packages.php?ID=41433 then I'm afraid it's a -1 from me (or maybe I can't use it properly). Rendering man page for find shows that .e.g the 'Examples' section renders in a wrong way i.e. many (but not all) examples spread across many lines
EXAMPLES
find
/tmp
-name
core
-type
f
-print
|
xargs
/bin/rm
-f
instead of
EXAMPLES
find /tmp -name core -type f -print | xargs /bin/rm -f
It may be possible to fix this, but I haven't really tried,
I use
man1 () { zcat $(find /usr/share/man/ -iname "$1".?.gz -o -iname "$1".??.gz) | mandoc | less; }
-1 from me (user signoff ;P)
grep -r groff /var/abs/
...
/var/abs/core/libldap/PKGBUILD:makedepends=('tcp_wrappers' 'groff')
If this is ever going to be implemented, someone will have to do a re-assessment to see if there are still issues and provide a better reason other than size to replace this.