* [gentoo-commits] repo/proj/guru:dev commit in: sys-apps/plocate/, sys-apps/plocate/files/
@ 2021-03-03 22:01 Arsen Arsenovic
0 siblings, 0 replies; only message in thread
From: Arsen Arsenovic @ 2021-03-03 22:01 UTC (permalink / raw
To: gentoo-commits
commit: 2aaa3ab6406398c4f531e32b0284dbc7d5c6b5d3
Author: Arsen Arsenović <arsen <AT> aarsen <DOT> me>
AuthorDate: Wed Mar 3 21:50:44 2021 +0000
Commit: Arsen Arsenovic <arsen <AT> aarsen <DOT> me>
CommitDate: Wed Mar 3 21:51:41 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2aaa3ab6
sys-apps/plocate: add cron and timers for updatedb
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Arsen Arsenović <arsen <AT> aarsen.me>
sys-apps/plocate/files/updatedb.cron | 2 ++
sys-apps/plocate/files/updatedb.service | 13 +++++++++++++
sys-apps/plocate/files/updatedb.timer | 9 +++++++++
sys-apps/plocate/plocate-1.1.5.ebuild | 14 +++++++++++---
4 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/sys-apps/plocate/files/updatedb.cron b/sys-apps/plocate/files/updatedb.cron
new file mode 100644
index 00000000..c3895afe
--- /dev/null
+++ b/sys-apps/plocate/files/updatedb.cron
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/sbin/updatedb
diff --git a/sys-apps/plocate/files/updatedb.service b/sys-apps/plocate/files/updatedb.service
new file mode 100644
index 00000000..01af0322
--- /dev/null
+++ b/sys-apps/plocate/files/updatedb.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Update the plocate database
+ConditionACPower=true
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/updatedb
+LimitNOFILE=131072
+IOSchedulingClass=idle
+
+PrivateTmp=true
+PrivateDevices=true
+PrivateNetwork=true
diff --git a/sys-apps/plocate/files/updatedb.timer b/sys-apps/plocate/files/updatedb.timer
new file mode 100644
index 00000000..1f69330c
--- /dev/null
+++ b/sys-apps/plocate/files/updatedb.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Update the plocate database daily
+
+[Timer]
+OnCalendar=daily
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/sys-apps/plocate/plocate-1.1.5.ebuild b/sys-apps/plocate/plocate-1.1.5.ebuild
index 6d3fdab7..3c9b1fa0 100644
--- a/sys-apps/plocate/plocate-1.1.5.ebuild
+++ b/sys-apps/plocate/plocate-1.1.5.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit meson
+inherit meson systemd
if [[ "${PV}" == "9999" ]]; then
inherit git-r3
@@ -27,10 +27,18 @@ DEPEND="
src_configure() {
local emesonargs=(
- -Dinstall_cron=true
- -Dinstall_systemd=true
+ -Dinstall_cron=false
+ -Dinstall_systemd=false
-Dlocategroup=locate
)
meson_src_configure
}
+
+src_install() {
+ meson_src_install
+
+ exeinto /etc/cron.daily/
+ newexe "${FILESDIR}"/updatedb.cron plocate
+ systemd_dounit "${FILESDIR}"/updatedb.{service,timer}
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-03 22:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-03 22:01 [gentoo-commits] repo/proj/guru:dev commit in: sys-apps/plocate/, sys-apps/plocate/files/ Arsen Arsenovic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox