From: Michael Tremer Date: Sun, 7 Dec 2014 15:08:37 +0000 (+0100) Subject: man-db: Update to 2.7.1 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Fipfire-3.x.git;a=commitdiff_plain;h=7bded4b099bd2a37dc868085ebcaba25a6d1ac80 man-db: Update to 2.7.1 Resolves a conflict to groff because of zsoelim and replaces the cron job by a systemd timer event. --- diff --git a/man-db/man-db.cron b/man-db/man-db.cron deleted file mode 100644 index c7d21ad61..000000000 --- a/man-db/man-db.cron +++ /dev/null @@ -1,20 +0,0 @@ -#! /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 diff --git a/man-db/man-db.nm b/man-db/man-db.nm index f1dfba0fe..a36ea9863 100644 --- a/man-db/man-db.nm +++ b/man-db/man-db.nm @@ -4,7 +4,7 @@ ############################################################################### name = man-db -version = 2.6.3 +version = 2.7.1 release = 1 groups = Documentation @@ -28,7 +28,9 @@ build gdbm-devel groff less - libpipeline-devel + libpipeline-devel >= 1.4.0 + systemd-devel + zlib-devel end configure_options += \ @@ -42,9 +44,8 @@ build 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 @@ -68,12 +69,23 @@ packages 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 diff --git a/man-db/patches/1151558-switch-man-and-root-in-init-systemd-man-db.conf.patch b/man-db/patches/1151558-switch-man-and-root-in-init-systemd-man-db.conf.patch new file mode 100644 index 000000000..b91e6d01a --- /dev/null +++ b/man-db/patches/1151558-switch-man-and-root-in-init-systemd-man-db.conf.patch @@ -0,0 +1,19 @@ +From 1d523a44a5ad360c83bff362a625cc68cbe7f296 Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +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 + diff --git a/man-db/systemd/man-db.service b/man-db/systemd/man-db.service new file mode 100644 index 000000000..4adc29792 --- /dev/null +++ b/man-db/systemd/man-db.service @@ -0,0 +1,10 @@ +[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 diff --git a/man-db/systemd/man-db.timer b/man-db/systemd/man-db.timer new file mode 100644 index 000000000..ce43df175 --- /dev/null +++ b/man-db/systemd/man-db.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Daily man-db cache update + +[Timer] +OnCalendar=daily +AccuracySec=12h +Persistent=true + +[Install] +WantedBy=multi-user.target