diff --git a/testing/plocate/APKBUILD b/testing/plocate/APKBUILD new file mode 100644 index 00000000000..4ebd7956ec8 --- /dev/null +++ b/testing/plocate/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: psykose +# Maintainer: psykose +pkgname=plocate +pkgver=1.1.15 +pkgrel=0 +pkgdesc="posting-list based locate(1) for finding files" +url="https://plocate.sesse.net/" +arch="all" +license="GPL-2.0-or-later" +pkggroups="locate" +depends="!mlocate" +install="$pkgname.pre-install" +makedepends=" + liburing-dev + linux-headers + meson + musl-legacy-error + zstd-dev + " +subpackages="$pkgname-doc" +source="https://plocate.sesse.net/download/plocate-$pkgver.tar.gz + include-statx.patch + plocate.cron + updatedb.conf + " +# no tests +# plocate is g+s +options="suid !check" + +build() { + abuild-meson \ + -Dlocategroup=locate \ + -Dinstall_cron=false \ + -Dinstall_systemd=false \ + . output + meson compile -C output +} + +package() { + DESTDIR="$pkgdir" meson install --no-rebuild -C output + install -Dm755 "$srcdir"/plocate.cron \ + -t "$pkgdir"/etc/periodic/daily + install -Dm644 "$srcdir"/updatedb.conf \ + -t "$pkgdir"/etc + chmod -R g+w "$pkgdir"/var/lib/plocate + chgrp -R locate "$pkgdir"/var/lib/plocate +} + +sha512sums=" +772f82af38fd7b61fa51ac31f71d4a855542cfa617867da54b5ad8202f49f9e1861064a01e9b8f0937c3da902d84f19a50c1d0e4f037a491a9a6819b2413cfa1 plocate-1.1.15.tar.gz +a88eb3cd4300256600aa245a67a71854220b9ffc89328e9f5664612092ca7d468c6729e823821b66109c75cebe046354503e5d6697de21c5086b26ffa4243edb include-statx.patch +fdf72ed18ca06e65f929f88391012e5c5c95d50f411ea52be5915b54267b424d36fd27e0fdae6e8e439b63636dc951ae7d1a97fa812728f8a6c86db798a5004c plocate.cron +863d8687bc1c520cc262ade3a7ce8a02b6930d7cbbc588c36d23f81a4a4c5432f4d9234a5498632b767a352e3996cf4da1c9e98d1b699b9d973cd9a9313d9557 updatedb.conf +" diff --git a/testing/plocate/include-statx.patch b/testing/plocate/include-statx.patch new file mode 100644 index 00000000000..db2670507e7 --- /dev/null +++ b/testing/plocate/include-statx.patch @@ -0,0 +1,10 @@ +--- a/io_uring_engine.h ++++ b/io_uring_engine.h +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + struct io_uring_sqe; + #ifndef WITHOUT_URING diff --git a/testing/plocate/plocate.cron b/testing/plocate/plocate.cron new file mode 100644 index 00000000000..5d5486bdf1e --- /dev/null +++ b/testing/plocate/plocate.cron @@ -0,0 +1,5 @@ +#!/bin/sh +set -e + +ulimit -n 100000 +exec updatedb diff --git a/testing/plocate/plocate.pre-install b/testing/plocate/plocate.pre-install new file mode 100644 index 00000000000..8ae6bbd5508 --- /dev/null +++ b/testing/plocate/plocate.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +addgroup -S locate 2>/dev/null + +exit 0 diff --git a/testing/plocate/updatedb.conf b/testing/plocate/updatedb.conf new file mode 100644 index 00000000000..cd0686a5da6 --- /dev/null +++ b/testing/plocate/updatedb.conf @@ -0,0 +1,5 @@ +# see updatedb.conf(5) for what these mean +PRUNE_BIND_MOUNTS = "yes" +PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset cramfs debugfs devpts devtmpfs ecryptfs exofs ftpfs fuse fuse.encfs fuse.sshfs fusectl gfs gfs2 hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs shfs smbfs sockfs sshfs sysfs tmpfs ubifs udf usbfs vboxsf" +PRUNENAMES = ".git .hg .svn" +PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache /var/lock /var/run /var/spool /var/tmp"