+++ /dev/null
-#! /bin/bash
-
-renice +19 -p $$ >/dev/null 2>&1
-ionice -c3 -p $$ >/dev/null 2>&1
-
-LOCKFILE=/var/lock/man-db.lock
-
-# The lockfile is not meant to be perfect, it's just in case the
-# two man-db cron scripts get run close to each other to keep
-# them from stepping on each other's toes. The worst that will
-# happen is that they will temporarily corrupt the database.
-[ -f $LOCKFILE ] && exit 0
-
-trap "{ rm -f $LOCKFILE ; exit 0; }" EXIT
-touch $LOCKFILE
-
-# Create/update the mandb database.
-mandb -q
-
-exit 0
###############################################################################
name = man-db
-version = 2.6.3
+version = 2.7.1
release = 1
groups = Documentation
gdbm-devel
groff
less
- libpipeline-devel
+ libpipeline-devel >= 1.4.0
+ systemd-devel
+ zlib-devel
end
configure_options += \
mv -v %{BUILDROOT}%{libdir}/man-db/libman{,db}-%{version}.so %{BUILDROOT}%{libdir}
rm -rf %{BUILDROOT}%{libdir}/man-db/
- # Create cron job to regularly update the man page database.
- mkdir -pv %{BUILDROOT}%{sysconfdir}/cron.daily
- install -v -m 755 %{DIR_SOURCE}/man-db.cron %{BUILDROOT}%{sysconfdir}/cron.daily
+ # Remove zsoelim man page which is not part of groff
+ rm -vf %{BUILDROOT}%{datadir}/man/man*/zsoelim.*
# Create cache directory.
mkdir -pv %{BUILDROOT}/var/cache/man
script posttransin
# Update the database right now.
- %{sysconfdir}/cron.daily/man-db.cron
+ rm -rf /var/cache/man/*
+
+ systemctl -q enable man-db.timer
+ systemctl start man-db.timer
end
script posttransup
# Update the database right now.
- %{sysconfdir}/cron.daily/man-db.cron
+ rm -rf /var/cache/man/*
+
+ systemctl -q enable man-db.timer
+ systemctl start man-db.timer
+ end
+
+ script preun
+ systemctl stop man-db.timer
+ systemctl -q disable man-db.timer
end
end
--- /dev/null
+From 1d523a44a5ad360c83bff362a625cc68cbe7f296 Mon Sep 17 00:00:00 2001
+From: Jan Chaloupka <jchaloup@redhat.com>
+Date: Wed, 15 Oct 2014 09:46:56 +0200
+Subject: [PATCH] switch man and root in init/systemd/man-db.conf
+
+---
+ init/systemd/man-db.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/init/systemd/man-db.conf b/init/systemd/man-db.conf
+index 10b27b4..43dd2ad 100644
+--- a/init/systemd/man-db.conf
++++ b/init/systemd/man-db.conf
+@@ -1 +1 @@
+-d /var/cache/man 2755 man root 1w
++d /var/cache/man 2755 root man 1w
+--
+1.9.3
+
--- /dev/null
+[Unit]
+Description=Update man-db cache
+RequiresMountsFor=/var/cache/man
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mandb --quiet
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
--- /dev/null
+[Unit]
+Description=Daily man-db cache update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
+
+[Install]
+WantedBy=multi-user.target