[SM-Discuss] Anyone interested in a mlocate spell?
Ethan Grammatikidis
eekee57 at fastmail.fm
Tue Nov 11 02:36:04 EST 2008
On Thu, 23 Oct 2008 15:25:03 -0400, "flux" <flux at sourcemage.org> said:
> Kevin Monceaux (Kevin at RawFedDogs.net) wrote [08.10.23 14:11]:
> > Would anyone be interested in a mlocate spell?
> Sounds interesting to me. Thanks for bringing this to my attention so I
> can have a peek at it! And thanks for already doing the work of making
> the spell as well. :)
>
> > In addition to the updatedb.conf file mlocate overwrites three files from
> > findutils:
> >
> > /usr/bin/locate
> >
> > /usr/bin/updatedb
> >
> > /usr/share/man/man1/locate.1
> >
> > How should that be handled?
> This seems complicated. It sounds like findutils will need to get an
> option (depends?) for whether you want mlocate (have it installed), and
> if so then don't install those files. I'm not really sure how this
> should be handled, but my guess would be adding an optional_depends in
> findutils and modifying its INSTALL.
It may be complicated, but the locate bundled with findutils is not
appropriate for some systems. It shows the existence of files that a
user should not ordinarily be able to see. Mlocate, being derived from
slocate (secure locate), doesn't have this issue. Also I remember
findutils locate being noticably slower at searching the database than
slocate, but I may be going back to when findutils depended on perl.
I'm going to hate myself for saying this, :) but I'd like to modify
findutils, & also take on the mlocate spell if Kevin doesn't want to
persist with it. I'm wondering which is the best way to modify
findutils:
1: findutils optionally depends on mlocate.
2: findutils optionally doesn't install locate.
I prefer #2 as locate isn't strictly needed, there may be no use for it
at all on a very small system. Also it 'feels purer', it doesn't
introduce a dependency only to satisfy expectations. Any comments?
The modification to not install locate is actually quite simple, & goes
in PRE_BUILD rather than INSTALL. All that's needed is a sed command to
remove "locate" from the SUBDIRS setting in the makefile.
--
This post brought to you by:
Ethan Grammatikidis,
who follows directions like a butterfly.
More information about the SM-Discuss
mailing list