]>
git.sesse.net Git - plocate/log
Steinar H. Gunderson [Sun, 31 Dec 2023 13:26:05 +0000 (14:26 +0100)]
Release plocate 1.1.20.
Steinar H. Gunderson [Sun, 31 Dec 2023 10:29:43 +0000 (11:29 +0100)]
Add an undocumented flag --ignore-visibility.
This is mostly useful in the case where you are root, but the directories
in question no longer exist (or were never there to begin with) and you
still want to search in the database, or dump all of it using plocate ''.
Obviously, this needs to drop the sgid flag like --debug already does,
so we do that.
Using this together with -e/--existing doesn't make any sense,
but we don't have any explicit checks for it.
Florian Schmaus [Wed, 8 Nov 2023 17:05:10 +0000 (18:05 +0100)]
timer: set AccuracySec to 6h and RandomizedDelaySec to 1h
The previous configuration caused the updatedb timer to run
potentially in the late morning. However this should be avoided to not
affect normal users. Furthermore, the low setting of AccuracySet to
20m caused a low chance of systemd to coalesce the updatedb timer with
other timers.
Increase the AccuracySec to 6h so that systemd is more likely to be
able to coalesce the timer with others in an effort to optimize power
consumption.
Furthermore, lower RandomizedDelaySec to 1h, to ensure that the
plocate updatedb job runs before 07:00 in the morning (and after
midnight).
Steinar H. Gunderson [Sat, 11 Nov 2023 23:18:58 +0000 (00:18 +0100)]
Fix updatedb writing incomplete .db files under Termux.
Report and patch by Grisha Levit; see
https://unix.stackexchange.com/questions/739150/var-lib-plocate-plocate-db-has-version-
4294967295 -expected-0-or-1-please-reb/761248#761248
for the entire story.
Steinar H. Gunderson [Mon, 23 Oct 2023 22:46:44 +0000 (00:46 +0200)]
Fix all relevant instances of wrong hyphens in man pages.
Cf. https://lwn.net/Articles/947941/, not escaping - will change
e.g. “plocate-build” to “plocate(Unicode dash)build”, which breaks
cut-and-paste. We had this right most places, but not all.
Steinar H. Gunderson [Mon, 23 Oct 2023 22:46:40 +0000 (00:46 +0200)]
Bump version number.
Steinar H. Gunderson [Fri, 9 Jun 2023 07:24:29 +0000 (09:24 +0200)]
Release plocate 1.1.19.
Steinar H. Gunderson [Fri, 9 Jun 2023 07:24:02 +0000 (09:24 +0200)]
Revert stray patch that inadvertently became part of 1.1.18.
Tim Landscheidt [Mon, 8 May 2023 13:03:08 +0000 (13:03 +0000)]
Fix man page for "--add-single-prunepath"
The option "--add-single-prunepath" has no short version.
Nick Alcock [Mon, 20 Mar 2023 11:48:51 +0000 (11:48 +0000)]
uring: always pair io_uring_get_probe_ring and io_uring_free_probe
As of liburing 2.4-to-be, liburing has ceased using malloc for its
probe allocations: it's concealed behind layers of confusing macros,
but io_uring_get_probe_ring() doesn't actually use libc's malloc
but ratehr its own __uring_alloc/__uring_free functions. So it no
longer works to free() the return value of io_uring_get_probe_ring():
you have to use io_uring_free_probe() instead.
I am going to report this to liburing upstream as a possible bug,
but it is easy to work around in plocate in any case.
Steinar H. Gunderson [Wed, 8 Feb 2023 21:46:51 +0000 (22:46 +0100)]
Add missing <inttypes.h> #include.
Reported by sudhanshu goswami.
Steinar H. Gunderson [Sat, 28 Jan 2023 21:06:40 +0000 (22:06 +0100)]
Fix missing newline in error message.
Steinar H. Gunderson [Sat, 28 Jan 2023 21:06:14 +0000 (22:06 +0100)]
Bump version number.
Steinar H. Gunderson [Sat, 28 Jan 2023 20:45:19 +0000 (21:45 +0100)]
Release plocate 1.1.18.
Steinar H. Gunderson [Thu, 5 Jan 2023 17:25:08 +0000 (18:25 +0100)]
Correct the plocate-build man page around --require-visibility.
Steinar H. Gunderson [Wed, 4 Jan 2023 22:46:01 +0000 (23:46 +0100)]
Support the --require-visibility flag in plocate-build.
Steinar H. Gunderson [Tue, 3 Jan 2023 23:00:11 +0000 (00:00 +0100)]
Fix a deprecation warning when running meson.
Steinar H. Gunderson [Tue, 3 Jan 2023 22:58:13 +0000 (23:58 +0100)]
Fix display of rlim_t in ulimit error message on 32-bit platforms.
Reported by Jakub Wilk (Debian bug #
1027702 ).
Steinar H. Gunderson [Tue, 3 Jan 2023 22:51:29 +0000 (23:51 +0100)]
Bump version number.
Steinar H. Gunderson [Mon, 21 Nov 2022 17:26:34 +0000 (18:26 +0100)]
Release plocate 1.1.17.
Clément Pit-Claudel [Sun, 6 Nov 2022 20:09:53 +0000 (12:09 -0800)]
Return 1 if no matches were found
* plocate.1: Document this new behavior.
* plocate.cpp (do_search_file, main): Exit with code 1 if no matches were found.
This behavior is consistent with that of mlocate except with --limit=0, which
plocate rejects.
Steinar H. Gunderson [Wed, 26 Oct 2022 22:38:37 +0000 (00:38 +0200)]
Add missing <locale.h>.
Reported by Maciej Adamczyk.
Steinar H. Gunderson [Sat, 15 Oct 2022 13:46:03 +0000 (15:46 +0200)]
Fix a Meson warning.
Steinar H. Gunderson [Sat, 15 Oct 2022 13:44:47 +0000 (15:44 +0200)]
Use unique_lock CTAD.
It's not useful to write unique_lock<mutex> in C++17;
unique_lock will do.
Steinar H. Gunderson [Wed, 13 Jul 2022 20:31:54 +0000 (22:31 +0200)]
Remove dependency on non-POSIX header error.h.
This helps compatibility with certain configurations of musl libc.
Note that the output format on updatedb.conf errors will change somewhat,
and only the first one will be reported followed by immediate exit
(unlike earlier, where all updatedb.conf errors would be output before exit).
Based on a patch by Alfred Persson Forsberg.
Steinar H. Gunderson [Sat, 25 Jun 2022 08:01:49 +0000 (10:01 +0200)]
Add a missing #include.
Taken from the Alpine Linux packaging; seems to be for statx()
(presumably on musl libc).
Steinar H. Gunderson [Sat, 25 Jun 2022 08:01:35 +0000 (10:01 +0200)]
Bump version number.
Steinar H. Gunderson [Sat, 4 Jun 2022 13:17:11 +0000 (15:17 +0200)]
Release plocate 1.1.16.
Steinar H. Gunderson [Sun, 29 May 2022 09:11:10 +0000 (11:11 +0200)]
Fix an issue where updatedb would stop on certain CIFS filesystems.
Reported by rollopack.
Steinar H. Gunderson [Wed, 23 Feb 2022 23:43:38 +0000 (00:43 +0100)]
Correct a comment.
Steinar H. Gunderson [Tue, 22 Feb 2022 23:01:47 +0000 (00:01 +0100)]
Bump version number.
Steinar H. Gunderson [Mon, 31 Jan 2022 20:29:10 +0000 (21:29 +0100)]
Release plocate 1.1.15.
Steinar H. Gunderson [Sun, 30 Jan 2022 20:13:57 +0000 (21:13 +0100)]
If stat() on a directory check, see if it's an excluded filesystem.
Fixes an issues where a networked filesystem on the exclude list being down
causes updatedb to abort entirely. Reported by Kevin Locke.
Steinar H. Gunderson [Sun, 30 Jan 2022 19:10:34 +0000 (20:10 +0100)]
When stat() in updatedb fails, report the path instead of just the parent directory.
Reported by Kevin Locke.
Eirik Nygaard [Thu, 27 Jan 2022 14:53:18 +0000 (15:53 +0100)]
Make entire path for plocate database configurable
Steinar H. Gunderson [Thu, 27 Jan 2022 13:00:16 +0000 (14:00 +0100)]
Revert "Make entire path for plocate database configurable"
Breaks configure.
This reverts commit
d45acc377040e80dc517dbdcbf3cfcb06eab8c09 .
Eirik Nygaard [Sun, 23 Jan 2022 11:05:01 +0000 (12:05 +0100)]
Make entire path for plocate database configurable
Steinar H. Gunderson [Tue, 28 Dec 2021 13:20:04 +0000 (14:20 +0100)]
Fix a comment in db.h.
Steinar H. Gunderson [Tue, 28 Dec 2021 09:12:52 +0000 (10:12 +0100)]
Remove unneeded error.h include.
This improves compatibility with musl libc. Reported by Andrew Pirie.
Steinar H. Gunderson [Tue, 28 Dec 2021 09:12:45 +0000 (10:12 +0100)]
Bump version number.
Steinar H. Gunderson [Mon, 27 Dec 2021 10:10:12 +0000 (11:10 +0100)]
Release plocate 1.1.14.
Steinar H. Gunderson [Mon, 27 Dec 2021 10:09:29 +0000 (11:09 +0100)]
Document interactions with Btrfs subvolume mounts better.
Steinar H. Gunderson [Mon, 20 Dec 2021 22:21:18 +0000 (23:21 +0100)]
Correct plocate.1; the mlocate parameter is -A, not -a.
Steinar H. Gunderson [Mon, 20 Dec 2021 22:21:09 +0000 (23:21 +0100)]
Correct plocate.1; we have a native updatedb now.
Steinar H. Gunderson [Thu, 9 Dec 2021 15:20:27 +0000 (16:20 +0100)]
Revert "Delete unused file."
This reverts commit
2a8c3e471aef17b6841451d471a84b0937dcf8bf .
lib.cpp was not unused at all. Thanks to Manpreet Singh for noticing.
Steinar H. Gunderson [Tue, 30 Nov 2021 14:48:53 +0000 (15:48 +0100)]
Correct the man page.
updatedb.conf shares format between plocate and mlocate, but the
database file does not.
Steinar H. Gunderson [Tue, 30 Nov 2021 10:26:23 +0000 (11:26 +0100)]
Delete unused file.
Steinar H. Gunderson [Sat, 13 Nov 2021 09:37:11 +0000 (10:37 +0100)]
Document --add-single-prunepath in the man page.
Steinar H. Gunderson [Fri, 12 Nov 2021 21:14:53 +0000 (22:14 +0100)]
Add an option --add-single-prunepath.
This makes it possible to prune a path with spaces in the file name,
which was previously impossible.
Steinar H. Gunderson [Fri, 12 Nov 2021 20:17:50 +0000 (21:17 +0100)]
Fix a typo.
Steinar H. Gunderson [Fri, 12 Nov 2021 19:14:00 +0000 (20:14 +0100)]
Add ignored -A / --all parameter, for better mlocate compatibility.
Steinar H. Gunderson [Fri, 12 Nov 2021 19:11:04 +0000 (20:11 +0100)]
Bump version number.
Steinar H. Gunderson [Sat, 6 Nov 2021 17:18:05 +0000 (18:18 +0100)]
Release plocate 1.1.13.
Steinar H. Gunderson [Fri, 29 Oct 2021 22:42:16 +0000 (00:42 +0200)]
Fix an issue where non-ASCII characters would be wrongly escaped.
This only happens on platforms with signed char. Reported by
COLIN Stéphane.
Steinar H. Gunderson [Mon, 18 Oct 2021 07:42:00 +0000 (09:42 +0200)]
On wrong plocate.db header or version, output the filename in the error message.
Suggested by Trent W. Buck (Debian bug #996735).
Steinar H. Gunderson [Mon, 18 Oct 2021 07:41:34 +0000 (09:41 +0200)]
Bump version number.
Steinar H. Gunderson [Tue, 5 Oct 2021 21:05:55 +0000 (23:05 +0200)]
Release plocate 1.1.12.
Steinar H. Gunderson [Tue, 5 Oct 2021 21:02:09 +0000 (23:02 +0200)]
Implement the -N/--literal option.
This matches the GNU coreutils option to turn off the automatic
quoting of special characters when printing to a tty.
Steinar H. Gunderson [Thu, 23 Sep 2021 17:54:51 +0000 (19:54 +0200)]
Support kernels that don't know about O_TMPFILE.
Seemingly, this hit WSL1, making it impossible to run updatedb there.
Steinar H. Gunderson [Thu, 16 Sep 2021 17:54:46 +0000 (19:54 +0200)]
updatedb is in section 8, not 1.
Steinar H. Gunderson [Thu, 16 Sep 2021 17:02:42 +0000 (19:02 +0200)]
Update the plocate-build man page to inform about the existence of the native updatedb.
Arsen Arsenović [Mon, 23 Aug 2021 22:16:34 +0000 (00:16 +0200)]
fix maybe-uninitialized warning in parse_trigrams
Steinar H. Gunderson [Sat, 4 Sep 2021 22:57:34 +0000 (00:57 +0200)]
Bump version number.
Steinar H. Gunderson [Sat, 4 Sep 2021 22:50:01 +0000 (00:50 +0200)]
Release plocate 1.1.11.
Steinar H. Gunderson [Sat, 4 Sep 2021 22:47:14 +0000 (00:47 +0200)]
Fix a crash on --existing and --regex together.
--regex (and other linear scans) would launch multiple threads,
but IOUringEngine isn't thread-safe. Since --existing is obscure,
and --regex is obscure, we solve this by simply making synchronous
stat() calls.
Reported by Michael Arndt.
Steinar H. Gunderson [Mon, 23 Aug 2021 22:31:32 +0000 (00:31 +0200)]
Bump version number.
Steinar H. Gunderson [Mon, 23 Aug 2021 20:02:36 +0000 (22:02 +0200)]
Release plocate 1.1.10.
Steinar H. Gunderson [Mon, 23 Aug 2021 18:35:55 +0000 (20:35 +0200)]
Use a more C++-standard way of suppressing the unused variable warning in submit_stat().
Steinar H. Gunderson [Mon, 23 Aug 2021 18:29:23 +0000 (20:29 +0200)]
Fix a warning with -Wvla (MB_CUR_MAX is not a compile-time constant).
Arsen Arsenović [Mon, 23 Aug 2021 15:52:48 +0000 (17:52 +0200)]
fix unused parameter warns in io_uring_engine.cpp
Steinar H. Gunderson [Mon, 23 Aug 2021 16:13:08 +0000 (18:13 +0200)]
Unbreak compilation without systemd.
Steinar H. Gunderson [Mon, 23 Aug 2021 15:54:57 +0000 (17:54 +0200)]
Add missing unistd.h #include.
Adapted from the Void Linux repository, for musl compatibility.
Steinar H. Gunderson [Mon, 23 Aug 2021 15:53:34 +0000 (17:53 +0200)]
Replace canonicalize_file_name() with realpath().
canonicalize_file_name() is a GNU extension, while realpath() is POSIX.
Seemingly needed for musl. Adapted from the Void Linux repository.
Arsen Arsenović [Mon, 23 Aug 2021 08:07:01 +0000 (10:07 +0200)]
plocate: fix compilation without libiouring
Steinar H. Gunderson [Sat, 31 Jul 2021 13:37:54 +0000 (15:37 +0200)]
Unbreak the benchmark program.
Steinar H. Gunderson [Wed, 18 Aug 2021 20:16:02 +0000 (22:16 +0200)]
Release plocate 1.1.9.
Steinar H. Gunderson [Tue, 27 Jul 2021 20:16:01 +0000 (22:16 +0200)]
Run clang-format.
Steinar H. Gunderson [Tue, 27 Jul 2021 14:19:01 +0000 (16:19 +0200)]
Support the -e (--existing) option from mlocate.
This can be useful if recently having deleted some files,
and not wanting to do a database rebuild. Note that we don't
support the --nofollow option (--follow is the default),
since it's not clear what it would be useful for, and the mlocate
source code says it “looks like a historical accident”.
Steinar H. Gunderson [Tue, 27 Jul 2021 13:45:27 +0000 (15:45 +0200)]
Send the result value of the stat to the callback.
Steinar H. Gunderson [Mon, 21 Jun 2021 19:21:53 +0000 (21:21 +0200)]
Make it possible to set systemunitdir explicitly.
This allows a distributor to hard-code the systemd unit directory
instead of relying on systemd-dev. Based on a patch by
Zbigniew Jędrzejewski-Szmek.
Steinar H. Gunderson [Mon, 21 Jun 2021 18:57:44 +0000 (20:57 +0200)]
Bump version number.
Steinar H. Gunderson [Sat, 12 Jun 2021 12:27:21 +0000 (14:27 +0200)]
Release plocate 1.1.8.
Steinar H. Gunderson [Sat, 5 Jun 2021 17:31:12 +0000 (19:31 +0200)]
Fix a printing issue when outputting to a block-buffered pipe from a forked child (ie., multiple databases).
Steinar H. Gunderson [Wed, 7 Apr 2021 20:04:49 +0000 (22:04 +0200)]
Fix a typo in try_complete_pread().
Pointed out by Taj Khattra.
Steinar H. Gunderson [Wed, 7 Apr 2021 20:04:40 +0000 (22:04 +0200)]
Bump version number.
Steinar H. Gunderson [Wed, 7 Apr 2021 07:34:46 +0000 (09:34 +0200)]
Release plocate 1.1.7.
Steinar H. Gunderson [Wed, 7 Apr 2021 07:33:33 +0000 (09:33 +0200)]
Move timer settings from .service to .timer file.
Patch from Vladimir Lomov.
Steinar H. Gunderson [Wed, 7 Apr 2021 07:33:10 +0000 (09:33 +0200)]
Bump version number.
Steinar H. Gunderson [Fri, 2 Apr 2021 11:09:10 +0000 (13:09 +0200)]
Release plocate 1.1.6.
Steinar H. Gunderson [Fri, 2 Apr 2021 11:12:49 +0000 (13:12 +0200)]
Randomize updatedb systemd unit start time.
Suggested by Calum McConnell.
Steinar H. Gunderson [Sat, 27 Mar 2021 23:19:49 +0000 (00:19 +0100)]
Support searching multiple databases in plocate.
We support multiple -d arguments, single -d arguments with multiple
databases (colon-separated), and LOCATE_PATH. The two latter should
be compatible with mlocate, although we support escaping colons in
file paths and I believe mlocate does not.
This is slightly trickier than one might expect due to security
considerations; we're not robust against malicious input, so we need to
make sure that if we process an attacker-supplied database, the process
has already dropped privileges and cannot subvert a privileged reader.
Steinar H. Gunderson [Sun, 21 Mar 2021 14:48:55 +0000 (15:48 +0100)]
Make updatedb understand DT_UNKNOWN.
Some filesystems don't know from getdents() whether an entry is a file
or a directory without a stat(). I had assumed this was only an issue
for obscure operating systems, so I removed it (mlocate's updatedb
supported it), but evidently older versions of XFS has this issue, too,
so add back checking.
Reported by Marcel Partap.
Steinar H. Gunderson [Sun, 21 Mar 2021 12:11:45 +0000 (13:11 +0100)]
Give a slightly better error message on short read.
Steinar H. Gunderson [Sun, 21 Mar 2021 12:11:35 +0000 (13:11 +0100)]
Bump version number.
Steinar H. Gunderson [Wed, 24 Feb 2021 18:14:11 +0000 (19:14 +0100)]
Release plocate 1.1.5.
Steinar H. Gunderson [Fri, 19 Feb 2021 17:54:35 +0000 (18:54 +0100)]
Reduce the amount of lseek() syscalls; evidently, ftell() does not cache the position.
Steinar H. Gunderson [Fri, 19 Feb 2021 17:42:12 +0000 (18:42 +0100)]
Support filesystems that do not support O_TMPFILE, even on Linux.
Evidently, overlayfs does not support O_TMPFILE. Reported by Daniel Lewart.
Steinar H. Gunderson [Fri, 19 Feb 2021 17:38:33 +0000 (18:38 +0100)]
Bump version number.
Steinar H. Gunderson [Sun, 14 Feb 2021 09:56:16 +0000 (10:56 +0100)]
Release plocate 1.1.4.
Steinar H. Gunderson [Sat, 13 Feb 2021 10:06:44 +0000 (11:06 +0100)]
Call strlen() a bit less. Helps ~2% CPU.