summaryrefslogtreecommitdiff
path: root/system/man-db/README.Slackware
blob: f0eb6b57ca842d98facb841f3ac8b68955e2c226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
By default, man-db can be installed alongside Slackware's man package
without conflict, as it installs its binaries and man pages into
/opt/man-db. After installation, either log out and back in, or source
/etc/profile.d/man-db.sh in your shell (this adjusts $PATH so the man
command from /opt/man-db will be found first).

Alternately, man-db can be built as a replacement for Slackware's
man package.  To do this, set USR=yes in the script's environment,
and "removepkg man" before installing man-db. No profile scripts are
installed in this case.

When installing man-db, the doinst.sh script may take several minutes to
run. This is because it's indexing all the man pages on the system. Also,
a cron job is installed in /etc/cron.daily, which adds newly-installed
man pages to the database. The index speeds up searching via "man -K",
"man -k", or "apropos". It's fast enough that "man -K" is now actually
useful... the disadvantage is that newly-installed man pages won't be
found in these searches until the database has been updated, so any time
you install new man pages, you'll want to run "mandb" as root, or wait
for cron to do it for you (if you don't do this, the new pages can still
be displayed, they just won't be searchable). The indexing runs quickly
once the initial database has been created, so the cron job or manual
update shouldn't bring your system to its knees.

The database is located in /var/cache/man, and on a full Slackware install
will be approximately 5MB in size. During index creation, approximately
10MB in /var is used. If you decide to removepkg man-db, you'll probably
also want to get rid of its database with "rm -rf /var/cache/man". If
the database gets corrupted somehow, it can be regenerated from scratch
by running "mandb -c" or just reinstalling the man-db package.

Although man-db supports caching formatted pages ("cat" pages), it's
disabled in this build, to make man-db behave more like Slackware's man
(which supports caching, but it's disabled). On modern (and even 10+
year old) systems, the small amount of extra time it takes to format
a man page every time it's viewed is probably not worth the headaches
caused by stale cat pages.

Unlike some distro packages of man-db, this build doesn't install man or
mandb setuid. This prevents caching cat pages from working (see above),
and prevents man from automatically adding new man pages to the database
the first time a user views them (they will be indexed by the cron job,
or by root manually running "mandb", if you're impatient).

A word about i18n support: the whole reason I packaged man-db is because
Slackware's man can't handle Japanese man pages, and I couldn't come
up with a way to make them work after several hours of research and
man.conf editing. With man-db, they Just Work, with LANG=ja_JP.UTF-8
(now all I have to do is learn to read Japanese). In general, UTF-8
locales are preferred for man-db, although non-UTF-8 is also supported.