[arch-commits] Commit in mlocate/trunk (4 files)
Thomas Bächler
thomas at nymeria.archlinux.org
Fri Mar 28 20:31:25 UTC 2014
Date: Friday, March 28, 2014 @ 21:31:25
Author: thomas
Revision: 208926
upgpkg: mlocate 0.26-2: use systemd timers instead of anacron
Added:
mlocate/trunk/updatedb.service
mlocate/trunk/updatedb.timer
Modified:
mlocate/trunk/PKGBUILD
Deleted:
mlocate/trunk/updatedb.cron
------------------+
PKGBUILD | 17 +++++++++++------
updatedb.cron | 6 ------
updatedb.service | 10 ++++++++++
updatedb.timer | 7 +++++++
4 files changed, 28 insertions(+), 12 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-03-28 20:25:47 UTC (rev 208925)
+++ PKGBUILD 2014-03-28 20:31:25 UTC (rev 208926)
@@ -5,19 +5,20 @@
pkgname=mlocate
pkgver=0.26
-pkgrel=1
+pkgrel=2
pkgdesc='Merging locate/updatedb implementation'
url='https://fedorahosted.org/mlocate/'
arch=('i686' 'x86_64')
license=('GPL')
-backup=('etc/updatedb.conf'
- 'etc/cron.daily/updatedb')
+backup=('etc/updatedb.conf')
+depends=('glibc')
source=("https://fedorahosted.org/releases/m/l/mlocate/mlocate-${pkgver}.tar.xz"
'updatedb.conf'
- 'updatedb.cron')
+ updatedb.{timer,service})
sha1sums=('c6e6d81b25359c51c545f4b8ba0f3b469227fcbc'
'0150379149bf9d714bc81332d775fc273e7e3535'
- '8301e6277d27db539af6cf4bc243e8e247bffc2e')
+ '2f3a94994ece62aeb286315a6fa5e9e03203706a'
+ '3a26beed05c7b61d3a78bc7dd5cfffe114ceb1f6')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -48,5 +49,9 @@
install -dm750 -g21 "${pkgdir}/var/lib/locate"
install -Dm644 ../updatedb.conf "${pkgdir}/etc/updatedb.conf"
- install -Dm744 ../updatedb.cron "${pkgdir}/etc/cron.daily/updatedb"
+
+ install -D -m644 ${srcdir}/updatedb.timer ${pkgdir}/usr/lib/systemd/system/updatedb.timer
+ install -D -m644 ${srcdir}/updatedb.service ${pkgdir}/usr/lib/systemd/system/updatedb.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../updatedb.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/updatedb.timer
}
Deleted: updatedb.cron
===================================================================
--- updatedb.cron 2014-03-28 20:25:47 UTC (rev 208925)
+++ updatedb.cron 2014-03-28 20:31:25 UTC (rev 208926)
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-NICE='nice -n 19'
-IONICE='ionice -c 2 -n 7'
-
-exec ${IONICE} ${NICE} updatedb -f proc
Added: updatedb.service
===================================================================
--- updatedb.service (rev 0)
+++ updatedb.service 2014-03-28 20:31:25 UTC (rev 208926)
@@ -0,0 +1,10 @@
+[Unit]
+Description=Update locate database
+RequiresMountsFor=/var/cache/man
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/updatedb
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
Added: updatedb.timer
===================================================================
--- updatedb.timer (rev 0)
+++ updatedb.timer 2014-03-28 20:31:25 UTC (rev 208926)
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily locate database update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
More information about the arch-commits
mailing list