sys-apps/plocate: add 1.1.24

Extend PRUNEFS list by fuse.* entries as reported by FaniX in
bug #970823. Also apply a patch to fix the stat.h include to use the
libc verison of the header instead of the the kernel header
version. This should fix bug #928568.

Also use greadme.eclass for the user-facing instructions.

Closes: https://bugs.gentoo.org/970823
Closes: https://bugs.gentoo.org/928568
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Florian Schmaus
2026-03-05 09:32:18 +01:00
parent 46a4712b44
commit 4e69741e81
4 changed files with 128 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST plocate-1.1.23.tar.gz 75390 BLAKE2B 1048904dee080e7cadf69ee25701dccc6d109b3b0e4d97f3d59ae4f6cdc60d9c4c4602d8af171610e4403f210308e3fab5b8dd07148fb4b79128d42b0e60a493 SHA512 22c88dd2411951871432bdbf8aba32332ade73af281d4b5acaf52d7537f8e119249f17d86b3bd3579d9b0f0304b54857bf4bc85b97c4c1e8f0de8b4f52645fd8
DIST plocate-1.1.24.tar.gz 76117 BLAKE2B f8ca8d324449b9f66668329b9c1ce67b0875e2d42e402825172138b5914a6b7fb46baa8fbacb8c049d0b23f6740b1cd1acde3dd1d64c00772e341ebadb808031 SHA512 e1ac1f41b750d1e88558dec7d054302773f751e081446e54d9d06eed3757da1de2a7001a49d1c4ad8d2002aae4522d2b3e32ae47e09827e97008ca1c7f1a5823

View File

@@ -0,0 +1,27 @@
From 1596461129adadb53c0185f8f83bfc01c2efe384 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flo@geekplace.eu>
Date: Thu, 5 Mar 2026 09:21:35 +0100
Subject: [PATCH] io_uring_engine: Fix stat.h include
Prefer the version from libc, which is already used everywhere else in
plocate, instead of the version from the linux headers to avoid
redifinition errors [1].
1: https://bugs.gentoo.org/928568
Fixes: 0125004cd28c ("Add a missing #include.")
--- a/io_uring_engine.h
+++ b/io_uring_engine.h
@@ -6,8 +6,8 @@
#include <stddef.h>
#include <string_view>
#include <sys/socket.h>
+#include <sys/stat.h>
#include <sys/types.h>
-#include <linux/stat.h>
struct io_uring_sqe;
#ifndef WITHOUT_URING
--
2.52.0

View File

@@ -0,0 +1,16 @@
# /etc/updatedb.conf: config file for slocate
# This file sets variables that are used by updatedb.
# For more info, see the updatedb.conf(5) manpage.
# Filesystems that are pruned from updatedb database
PRUNEFS="afs anon_inodefs auto autofs bdev binfmt binfmt_misc cgroup cifs coda configfs cramfs cpuset debugfs devfs devpts devtmpfs ecryptfs eventpollfs exofs futexfs ftpfs fuse fuse.ceph fuse.glusterfs fuse.gvfsd-fuse fuse.mfs fuse.rozofs fuse.sshfs fusectl gfs gfs2 hostfs hugetlbfs inotifyfs iso9660 jffs2 lustre misc mqueue ncpfs nfs NFS nfs4 nfsd nnpfs ocfs ocfs2 pipefs proc ramfs rpc_pipefs securityfs selinuxfs sfs shfs smbfs sockfs spufs sshfs subfs supermount sysfs tmpfs ubifs udf usbfs vboxsf vperfctrfs"
# Paths which are pruned from updatedb database
PRUNEPATHS="/tmp /var/tmp /var/cache /var/lock /var/run /var/spool"
# Folder names that are pruned from updatedb database
PRUNENAMES=".git .hg .svn CVS"
# Skip bind mounts.
PRUNE_BIND_MOUNTS="yes"

View File

@@ -0,0 +1,84 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit greadme linux-info meson systemd
DESCRIPTION="Posting locate is a much faster locate"
HOMEPAGE="https://plocate.sesse.net/"
SRC_URI="https://plocate.sesse.net/download/${P}.tar.gz"
# GPL-2 for updatedb
# GPL-2+ for plocate itself
LICENSE="GPL-2 GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="+io-uring"
RDEPEND="
acct-group/locate
app-arch/zstd:=
io-uring? ( sys-libs/liburing:= )
!sys-apps/mlocate
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-1.1.15-meson-use-feature-option-for-libiouring.patch
"${FILESDIR}"/${PN}-1.1.24-io_uring_engine-Fix-stat.h-include.patch
)
pkg_setup() {
if use io-uring && linux_config_exists; then
if ! linux_chkconfig_present IO_URING; then
ewarn "CONFIG_IO_URING must be enabled for USE=io-uring"
fi
fi
}
src_prepare() {
# We'll install the manpage ourself to locate.1
sed -i "/install_man('plocate.1')/d" meson.build || die
default
}
src_configure() {
local emesonargs=(
-Dlocategroup=locate
-Dinstall_systemd=true
-Dinstall_cron=false
-Dsystemunitdir="$(systemd_get_systemunitdir)"
"$(meson_feature io-uring use_libiouring)"
)
meson_src_configure
}
src_install() {
meson_src_install
dodoc README NEWS
newman "${S}"/${PN}.1 locate.1
dosym plocate /usr/bin/locate
insinto /etc
newins "${FILESDIR}"/updatedb-1.1.24.conf updatedb.conf
doins "${FILESDIR}"/plocate-cron.conf
fperms 0644 /etc/{updatedb,plocate-cron}.conf
insinto /etc/cron.daily
# Ensure that the cron file has the same name as the
# systemd-timer, to avoid plocate being run twice daily on systems
# with a systemd compatiblity layer. See also bug #780351.
newins "${FILESDIR}"/plocate.cron plocate-updatedb
fperms 0755 /etc/cron.daily/plocate-updatedb
systemd_dounit "${BUILD_DIR}"/${PN}-updatedb.service "${S}"/${PN}-updatedb.timer
greadme_stdin <<-EOF
The database for the locate command is generated daily by a cron job or systemd timer,
if you install for the first time you can run the updatedb command manually now.
Note that the /etc/updatedb.conf file is generic, please customize it to your system requirements.
EOF
}