FS#13694 - [man-db] pages cache are not written
Attached to Project:
Arch Linux
Opened by Olive (olivel) - Saturday, 07 March 2009, 17:42 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 04 October 2009, 20:53 GMT
Opened by Olive (olivel) - Saturday, 07 March 2009, 17:42 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 04 October 2009, 20:53 GMT
|
Details
Description:
man should normally cache the preformatted man pages in /var/cache/man/...cat<n> in order to speed the displaying of the pages. catman can generate such a cache for all page. While catman works as expected, man never create a cache page and never access cache page created by catman (as can be seen by man -W). After doing a strace on man it appear that man look at these pages in <DIR>/cat<n> (for DIR in manpath) instead of /var/cache/man/...cat<n>. My /etc/man_db.conf is unmodified with: MANDB_MAP /usr/man /var/cache/man/fsstnd MANDB_MAP /usr/share/man /var/cache/man MANDB_MAP /usr/local/man /var/cache/man/oldlocal MANDB_MAP /usr/local/share/man /var/cache/man/local MANDB_MAP /usr/X11R6/man /var/cache/man/X11R6 MANDB_MAP /opt/man /var/cache/man/opt and with NOCACHE commented out #NOCACHE package version: man-db 2.5.4-2 |
This task depends upon
Closed by Andreas Radke (AndyRTR)
Sunday, 04 October 2009, 20:53 GMT
Reason for closing: Won't implement
Additional comments about closing: see comments
Sunday, 04 October 2009, 20:53 GMT
Reason for closing: Won't implement
Additional comments about closing: see comments
Anyway we have two issues:
1. /var/cache/man/ and its subdirectories permissions are 0755, owned by root:root
2. cat files are created only if $LANG = "C"; note that MANDB_MAP should be set for the localized entries, but it's not working.
btw a PIII is able to visualize the longest man pages in almost no time. Do you really need preformatted pages?
man:
impossibile scrivere in /var/cache/man/cat1/time.1.gz in modo catman
time.
$ LANG=C man -c time
man: can't chmod (null): Bad address
man: can't unlink (null): Bad address
time.
$ sudo man -c time
man:
impossibile scrivere in /var/cache/man/cat1/time.1.gz in modo catman
time.
$ LANG=C sudo man -c time
time.
This time /var/cache/man/cat1/time.1.gz is written; then
$ LANG=C man -c time
time.
PS: impossibile scrivere in %s in modo catman => cannot write to %s in catman mode
I suggest to read section 7.1 (Modes of operation) of the man-db manual located in the directory "manual" of the sources (page 18 of man_db.ps created in the build process).
This isn't the default because it does open some possible security risks (even though I'm very careful to try to avoid them) and because cat pages are not that enormous a performance advantage these days.
The tradeoff between security risks and speed of formatting a man page doesn't seem worth it either- we aren't in 1989 anymore, even a Pentium 100 could probably do this with reasonable speed on the fly.
Is allowing page caching essential because some pages otherwise wouldn't come up or is chaching only a speed improvement we can go over?
Assigning also Thomas who is on fight against setiud files.
(Note that it's possible and in some cases reasonable to have cat pages in your home directory too, for manual pages you've installed in your home directory. This does not require setuidness.)