On Sat, 19 Nov 2011 18:05:42 +0100, Ingo Schwarze wrote:
> Hi Marc,
> 
> Marc Espie wrote on Sat, Nov 19, 2011 at 05:40:38PM +0100:
> > On Sat, Nov 19, 2011 at 04:31:57PM +0100, Ingo Schwarze wrote:
> >> Thomas de Grivel wrote on Sat, Nov 19, 2011 at 03:32:03PM +0100:
> 
> >>> From weekly output :
> >>>> Rebuilding whatis databases:
> >>>> /usr/libexec/makewhatis: Can't create /usr/share/man/whatis.db:
> >>>> Read-only file system
> >>> Should not whatis.db be in /var/... ?
> 
> >> I think you have a point.  Specifically, /var/db/man/.
> >> Having cron(8) scripts write to /usr is ugly.
> >> I don't see why mounting /usr readonly should require
> >> disabling makewhatis(8).
> 
> > I disagree: manpage directories are self-contained.  
> > 
> > If I add or remove a directory to my man configuration, it shouldn't
> > require a rebuild of the database for other directories.
> > Hence having a whatis.db per-man directory root.
> > 
> > If you want to move those to /var/db/man or something, you'd better be
> > prepared to have database file names that depend on the root directory
> > being used.
> 
> I fully agree with all that, and having per-hierarchy databases
> in /var/db/man - one for /usr/share/man, one for /usr/X11R6/man,
> one for /usr/local/man, one for each additional directory the
> user configures in man.conf(5) - is indeed what i hope to do.

I think what Marc meant is that whatis.db/mandoc.db should be in the
same directory as their corresponding manpages.  And I agree on that
point, especially in the case of NFS-mounted /usr: One shouldn't have to
run mandocdb to be able to run apropos(1) for the pages on the remote
machine.  And even worse, what happens if the remote machine is updated
or packages are added?  The client in such a setup will have an outdated
database without being aware of it.

mandoc.db should be in the same directory as the manpages it was
generated from, and need not be writable by machines that don't have
write access to the pages themselves.

With respect to the weekly makewhatis, I think that's a bug in the
weekly(8) script: It should not blindly assume that every database
listed in man.conf(5) is on a writable filesystem.

Reply via email to