mlocate - now in chum

Rating: 
5
Your rating: None Average: 5 (2 votes)

This is now available from the chum repository. Please update to that version.

mlocate is a locate/updatedb implementation.  The 'm' stands for "merging": updatedb reuses the existing database to avoid rereading most of the file system, which makes updatedb faster and does not trash the system caches as much.

There is now also a GUI for it in gmLocate , thanks to sh6668.

Some examples of usage:

locate <pattern> # lists files matching pattern, case sensitive

locate -i <pattern> # case insensitive

locate -e <pattern> # checks that the matching files actually exist at the moment

locate -e -i -c jpg # counts the number of JPG files

Please test the systemd timer and service file. There are a harbour-mlocate-updatedb.timer and a harbour-mlocate-updatedb.service file installed to `/usr/lib/systemd/system`. The timer should trigger "daily" at midnight, and should use minimal I/O and CPU resources.

The shipped configuration ignores `tmpfs` and `/run`. As SD Cards are mounted under `/run` if you want to index the SD card, you will have to edit `/etc/updatedb.conf` and remove the prunefs entry for tmpfs and the `/run` directory. This may have harmless side effects, as transient files will be added to the database. 

Thanks to @itoss for pointing this out.  

NOTE: At the moment, the package does not install on SFOS releases < 3.2.

I'll be happy to implement any improvements.

Screenshots: 
Application versions: 
Changelog: 

- rebuild arm64 on newest SDK - improve systemd handling under multiarch

Comments

itoss's picture

inst local harbour-mlocate-0.26-3.armv7hl.rpm
Loading repository data...
Reading installed packages...
'local' not found in package names. Trying capabilities.
No provider of 'local' found.
Resolving package dependencies...

The following NEW package is going to be installed:
  harbour-mlocate

1 new package to install.
Overall download size: 659.1 KiB. Already cached: 0 B. After the operation, additional 1.1 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package harbour-mlocate-0.26-3.armv7hl                                            (1/1), 659.1 KiB (  1.1 MiB unpacked)
harbour-mlocate-0.26-3.armv7hl.rpm:
    Package is not signed!

harbour-mlocate-0.26-3.armv7hl (Plain RPM files cache): Signature verification failed [6-File is unsigned]
Abort, retry, ignore? [a/r/i] (a): i
Checking for file conflicts: ...............................................................................................[done]
(1/1) Installing: harbour-mlocate-0.26-3.armv7hl ...........................................................................[done]
Additional rpm output:
Created symlink from /etc/systemd/system/timers.target.wants/harbour-mlocate-updatedb.timer to /usr/lib/systemd/system/harbour-mlocate-updatedb.timer.

Installation has completed with error.

Installation exit with error but after updatedb locate command works.

sdcard is mounted in /run/media/nemo/<sdcardname> and as tmpfs. So you have to delete the prunepath entry /run and prunefs tmpfs entry.

Then sd indexing works well ;)

Thanks for this tool ;)

itoss's picture

Sailfish OS 3.0.3.10 (Hossa) install error :

Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: nothing provides libc.so.6(GLIBC_2.28) needed by harbour-mlocate-0.26-2.armv7hl
Solution 1: do not install harbour-mlocate-0.26-2.armv7hl
Solution 2: break harbour-mlocate-0.26-2.armv7hl by ignoring some of its dependencies

lpr_next's picture

easiest solution: update your glibc here at openrepos: https://openrepos.net/content/lprnext/glibc-230

nephros's picture

holy shit, you are using a self-built libc package? you are a much braver person than me!

nephros's picture

Could you do me a favour and try this version and see if it works for you?

https://gitlab.com/nephros/harbour-mlocate/-/blob/static-build/RPMS/harb...

nephros's picture

Thanks for reporting this.

For now I build my binaries on a SFOS device and not in the SDK. This is why it's linking to the build OS libc. At the moment that is 3.2.1.20 (Nuuksio), which has glibc 2.28.

I'll try to find a solution.