[arch-commits] Commit in man-db/trunk (4 files)
Thomas Bächler
thomas at nymeria.archlinux.org
Fri Mar 28 20:18:06 UTC 2014
Date: Friday, March 28, 2014 @ 21:18:05
Author: thomas
Revision: 208923
upgpkg: man-db 2.6.6-2: switch from anacron to systemd timers
Added:
man-db/trunk/man-db.service
man-db/trunk/man-db.timer
Modified:
man-db/trunk/PKGBUILD
Deleted:
man-db/trunk/man-db.cron.daily
-------------------+
PKGBUILD | 19 +++++++++++--------
man-db.cron.daily | 39 ---------------------------------------
man-db.service | 11 +++++++++++
man-db.timer | 7 +++++++
4 files changed, 29 insertions(+), 47 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-03-28 20:10:12 UTC (rev 208922)
+++ PKGBUILD 2014-03-28 20:18:05 UTC (rev 208923)
@@ -4,7 +4,7 @@
pkgname=man-db
pkgver=2.6.6
-pkgrel=1
+pkgrel=2
pkgdesc="A utility for reading man pages"
arch=('i686' 'x86_64')
url="http://www.nongnu.org/man-db/"
@@ -12,18 +12,19 @@
groups=('base')
depends=( 'bash' 'gdbm' 'zlib' 'groff' 'libpipeline' 'less')
optdepends=('gzip')
-backup=('etc/man_db.conf'
- 'etc/cron.daily/man-db')
+backup=('etc/man_db.conf')
conflicts=('man')
provides=('man')
replaces=('man')
install=${pkgname}.install
source=(http://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.xz{,.sig}
- convert-mans man-db.cron.daily)
+ convert-mans
+ man-db.{timer,service})
md5sums=('5d65d66191080c144437a6c854e17868'
'SKIP'
'2b7662a7d5b33fe91f9f3e034361a2f6'
- '934fd047fecb915038bf4bf844ea609c')
+ 'df6d4f432e3e16c255c785fca1447346'
+ '36fb3f616e42a0e23cf7a4d284e640cd')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
@@ -54,7 +55,9 @@
# http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html
install -D -m755 ${srcdir}/convert-mans ${pkgdir}/usr/bin/convert-mans
- #install whatis cron script
- install -D -m744 ${srcdir}/man-db.cron.daily ${pkgdir}/etc/cron.daily/man-db
+ # install man-db update timer
+ install -D -m644 ${srcdir}/man-db.timer ${pkgdir}/usr/lib/systemd/system/man-db.timer
+ install -D -m644 ${srcdir}/man-db.service ${pkgdir}/usr/lib/systemd/system/man-db.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../man-db.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/man-db.timer
}
-
Deleted: man-db.cron.daily
===================================================================
--- man-db.cron.daily 2014-03-28 20:10:12 UTC (rev 208922)
+++ man-db.cron.daily 2014-03-28 20:18:05 UTC (rev 208923)
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
-NICE=19
-
-# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
-IONICE_CLASS=2
-
-# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
-IONICE_PRIORITY=7
-
-UPDATEMANDB="/usr/bin/mandb --quiet"
-
-# Update the "whatis" database
-#/usr/bin/makewhatis -u -w
-
-# taken from Debian
-# man-db cron daily
-set -e
-
-if ! [ -d /var/cache/man ]; then
- # Recover from deletion, per FHS.
- mkdir -p /var/cache/man
- chmod 755 /var/cache/man
-fi
-
-# regenerate man database
-
-if [ -x /usr/bin/nice ]; then
- UPDATEMANDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEMANDB}"
-fi
-
-if [ -x /usr/bin/ionice ]; then
- UPDATEMANDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEMANDB}"
-fi
-
-${UPDATEMANDB}
-
-exit 0
Added: man-db.service
===================================================================
--- man-db.service (rev 0)
+++ man-db.service 2014-03-28 20:18:05 UTC (rev 208923)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Update man-db cache
+RequiresMountsFor=/var/cache/man
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mkdir -m 0755 -p /var/cache/man
+ExecStart=/usr/bin/mandb --quiet
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
Added: man-db.timer
===================================================================
--- man-db.timer (rev 0)
+++ man-db.timer 2014-03-28 20:18:05 UTC (rev 208923)
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily man-db cache update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
More information about the arch-commits
mailing list