diff --git a/man-db-cache-update.service b/man-db-cache-update.service index 2f2f0d5..4ca914f 100644 --- a/man-db-cache-update.service +++ b/man-db-cache-update.service @@ -8,6 +8,7 @@ JobTimeoutSec=15min Type=oneshot TimeoutStartSec=infinity Environment=MAN_NO_LOCALE_WARNING=1 -ExecStart=/usr/bin/mandb +EnvironmentFile=/etc/sysconfig/man-db +ExecStart=/bin/sh -c '[ "$SERVICE" != "no" ] && /usr/bin/mandb $OPTS' Nice=19 IOWeight=20 diff --git a/man-db.spec b/man-db.spec index 42d28e9..3a4af90 100644 --- a/man-db.spec +++ b/man-db.spec @@ -4,7 +4,7 @@ Summary: Tools for searching and reading man pages Name: man-db Version: 2.7.6.1 -Release: 8%{?dist} +Release: 9%{?dist} # GPLv2+ .. man-db # GPLv3+ .. gnulib License: GPLv2+ and GPLv3+ @@ -128,6 +128,7 @@ fi %license docs/COPYING %doc README man-db-manual.txt man-db-manual.ps ChangeLog NEWS %config(noreplace) %{_sysconfdir}/man_db.conf +%config(noreplace) %{_sysconfdir}/sysconfig/man-db %config(noreplace) /usr/lib/tmpfiles.d/man-db.conf %{_unitdir}/man-db-cache-update.service %{_sbindir}/accessdb @@ -171,9 +172,12 @@ fi %files cron %config(noreplace) %{_sysconfdir}/cron.daily/man-db.cron -%config(noreplace) %{_sysconfdir}/sysconfig/man-db %changelog +* Tue Nov 21 2017 Nikola Forró - 2.7.6.1-9 +- allow configuration of man-db-cache-update service through sysconfig + resolves: #1514909 + * Tue Nov 21 2017 Nikola Forró - 2.7.6.1-8 - set group of /var/cache/man to root and drop setgid bit resolves: #1515823 diff --git a/man-db.sysconfig b/man-db.sysconfig index 608446d..e7449df 100644 --- a/man-db.sysconfig +++ b/man-db.sysconfig @@ -1,6 +1,10 @@ -# Set to no to disable daily man-db update by /etc/cron.daily/man-db.cron +# Set this to "no" to disable man-db update triggered by installation +# of any package containing manual pages +SERVICE="yes" + +# Set this to "no" to disable daily man-db update run by +# /etc/cron.daily/man-db.cron CRON="yes" -# Options used by mandb in /etc/cron.daily/man-db.cron, -# we use -q as default, too much noise without. +# Options used by mandb, we use "-q" as default, too much noise without it OPTS="-q"