[LFS Trac] #2379: man-db-2.5.5 nitpicks
trac at linuxfromscratch.org
Tue Apr 14 12:24:26 PDT 2009
#2379: man-db-2.5.5 nitpicks
Reporter: ken@… | Owner: lfs-book@…
Type: task | Status: new
Priority: normal | Milestone: 7.0
Component: Book | Version: SVN
Severity: normal | Keywords:
Here's a couple of other nitpicks from the man-DB maintainer that I
expected to get around to fixing shortly after he first reported them to
me. Unfortunately, time has once again eluded me, so here's his email in
I thought you might like to know about some cruft in
which I think could productively be removed to reduce confusion, as it's
no longer necessary. Please let me know if I should file this in a bug
tracking system somewhere instead.
The business about installing UTF-8 manual pages in
/usr/share/man/ru.UTF-8 etc. was something I suggested at one point
during development, but it was unpopular due to the file system
complexity involved and I was persuaded to take a different approach;
this has never been a recommendation for any released version of man-db.
In 2.5.0, man-db gained support for these .UTF-8 directories, but more
importantly it also gained support for detecting on the fly whether a
manual page is encoded using UTF-8. (In theory this is not possible to
do perfectly; but in practice it works excellently for text documents.)
As a result, you can simply install manual pages in either the legacy
encoding or in UTF-8 into /usr/share/man/LL (e.g. /usr/share/man/ru)
The rules for installing manual pages with man-db (which I believe are
strictly more tolerant than those for the man package) are as follows:
* If the page is in either UTF-8 or the legacy encoding for your
language, then just install it in /usr/share/man/LL.
* If the page is in something other than these two encodings, make
sure it's declared on the first line using either of these two forms
documented in manconv(1) (depending on whether the page also needs
preprocessors such as tbl):
'\" -*- coding: YOUR-ENCODING-HERE -*-
'\" t -*- coding: YOUR-ENCODING-HERE -*-
This is only necessary for a very few pages such as the iso-8859-*
ones; iso-8859-* will include these runes as of man-pages 3.20.
You'll need man-db 2.5.5 (just released) to make this work properly.
Hardly anyone will need to care about this, and you might not even
need to document it.
That's it. You can and probably should completely bin this convert-mans
stuff; man-db should work it out for itself and please let me know if it
doesn't because in most cases I'm likely to consider it a bug. Certainly
nobody using man-db 2.5.x should ever have to care whether they're using
UTF-8 or the legacy encoding. It seems to me that it would be a
significant improvement for LFS users not to have to worry about this.
The only case where I think it is still likely to be useful to use
/usr/share/man/LL.ENCODING is if there is a language for which people
are routinely shipping significant numbers of manual pages in more than
one legacy encoding. In that case obviously the "-*- coding: FOO -*-"
approach is too cumbersome and you'd want to just install them into a
separate directory. However, at the moment I know of no such language.
You can add the following to the list of supported languages, and remove
or rephrase the note about Norwegian not working since you already have
a version of man-db containing the fix for your problem here:
Estonian (et) ISO-8859-1
Norwegian Bokmål (nb) ISO-8859-1
Norwegian Nynorsk (nn) ISO-8859-1
Belarusian (be) CP1251
Greek (el) ISO-8859-7
Lithuanian (lt) ISO-8859-13
Latvian (lv) ISO-8859-13
Macedonian (mk) ISO-8859-5
Romanian (ro) ISO-8859-2
Serbian Latin (sr at latin) ISO-8859-2
Ukrainian (uk) KOI8-U
Incidentally, as of man-db 2.5.5, man-db does come with a very small
excuse for a test suite that just tests whether its own manual pages
render without errors, so it might be worth telling people to run that
using 'make check'.
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2379#comment:2>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
More information about the lfs-book