Dr. Werner Fink 2018-11-09 13:40:15 +00:00 committed by Git OBS Bridge
parent 9d83e0e561
commit 3a8da8ebdf
5 changed files with 55 additions and 20 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Nov 9 13:37:43 UTC 2018 - Dr. Werner Fink <werner@suse.de>
- Add systemd timer service and its timer unit to refresh man
data base daily without using cron (bsc#1115406)
-------------------------------------------------------------------
Mon Apr 16 14:25:43 UTC 2018 - werner@suse.de

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -42,12 +42,14 @@ BuildRequires: zlib-devel
Version: 2.7.6
Release: 0
Summary: A Program for Displaying man Pages
License: GPL-2.0+
License: GPL-2.0-or-later
Group: System/Base
Url: https://savannah.nongnu.org/projects/man-db
PreReq: coreutils fillup
Provides: man_db
%if 0%{suse_version} < 1500
Requires: cron
%endif
Requires: glibc-locale
%if 0%{suse_version} > 1300
Recommends: groff-full
@ -63,6 +65,8 @@ Source4: mancoding
Source5: wrapper.c
Source6: man-rpmlintrc
Source7: man-db-create.service
Source8: mandb.timer
Source9: mandb.service
Patch0: man-db-2.7.6.dif
Patch1: man-db-2.6.3-man0.dif
Patch2: man-db-2.3.19deb4.0-groff.dif
@ -236,11 +240,21 @@ fi
install -m 0644 groff/tmac.andb %{buildroot}%{_datadir}/groff/site-tmac/
install -m 0644 groff/tmac.andocdb %{buildroot}%{_datadir}/groff/site-tmac/
mkdir -p %{buildroot}%{_fillupdir}
mkdir -p %{buildroot}/etc/cron.daily
install -m 0644 %{SOURCE1} %{buildroot}%{_fillupdir}
install -m 0744 %{SOURCE2} %{buildroot}/etc/cron.daily/suse-do_mandb
mkdir -p %{buildroot}%{_unitdir}/
%if 0%{suse_version} < 1500
mkdir -p %{buildroot}/etc/cron.daily
%endif
install -m 0644 %{SOURCE1} %{buildroot}%{_fillupdir}
%if 0%{suse_version} < 1500
install -m 0744 %{SOURCE2} %{buildroot}/etc/cron.daily/suse-do_mandb
%else
install -m 0744 %{SOURCE2} %{buildroot}/%{_libexecdir}/man-db/do_mandb
%endif
install -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/
%if 0%{suse_version} >= 1500
install -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/
install -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/
%endif
%find_lang man-db --all-name --with-man
@ -270,7 +284,9 @@ test -d /var/cache/man && mandb --quiet --create ||:
%doc ChangeLog
%doc %{_datadir}/doc/packages/man/man-db-manual.*
%config /etc/manpath.config
%if 0%{suse_version} < 1500
%attr(0744,root,root) /etc/cron.daily/suse-do_mandb
%endif
%{_bindir}/apropos
%{_bindir}/catman
%{_bindir}/lexgrog
@ -285,6 +301,9 @@ test -d /var/cache/man && mandb --quiet --create ||:
%attr(0755,root,root) %{_libexecdir}/man-db/mandb
%attr(0755,man,man) %{_libexecdir}/man-db/manconv
%attr(0755,man,man) %{_libexecdir}/man-db/globbing
%if 0%{suse_version} >= 1500
%attr(0744,man,man) %{_libexecdir}/man-db/do_mandb
%endif
%{_sbindir}/accessdb
%{_libdir}/libman*.so
%{_libexecdir}/man-db/zsoelim
@ -293,6 +312,10 @@ test -d /var/cache/man && mandb --quiet --create ||:
%endif
%{_libexecdir}/tmpfiles.d/man-db.conf
%{_unitdir}/man-db-create.service
%if 0%{suse_version} >= 1500
%{_unitdir}/mandb.service
%{_unitdir}/mandb.timer
%endif
%dir %{_datadir}/groff/site-tmac
%{_datadir}/groff/site-tmac/tmac.andb
%{_datadir}/groff/site-tmac/tmac.andocdb

10
mandb.service Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=Do daily mandb update
Documentation=man:mandb(8) man:catman(8)
ConditionACPower=true
[Service]
Type=oneshot
Nice=5
IOSchedulingClass=idle
ExecStart=/usr/lib/man-db/do_mandb

11
mandb.timer Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Do daily mandb update
Documentation=man:mandb(8) man:catman(8)
[Timer]
OnCalendar=daily
AccuracySec=12h
Persistent=true
[Install]
WantedBy=timers.target

View File

@ -6,18 +6,3 @@
# Should mandb and whatis be recreated by cron.daily ("yes" or "no")
#
REINIT_MANDB=yes
## Type: yesno
## Default: yes
#
# Should old preformatted man pages (in /var/cache/man) be deleted? (yes/no)
#
DELETE_OLD_CATMAN=yes
## Type: integer
## Default: 7
#
# How long should old preformatted man pages be kept before deletion? (days)
#
CATMAN_ATIME=7