From: Michael Prokop Date: Thu, 2 Feb 2023 15:07:12 +0000 (+0100) Subject: Ship custom tmpfiles.d configuration to avoid man-db cache removal X-Git-Tag: v0.43.0~6 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=a4d3b318439a047a6676605bd29e9c850cc17415 Ship custom tmpfiles.d configuration to avoid man-db cache removal The default /usr/lib/tmpfiles.d/man-db.conf configuration includes: d /var/cache/man 0755 man man 1w The systemd-tmpfiles-clean.timer runs 15 minutes after system bootup (and then once per day). On our live system the mandb cache directory /var/cache/man dates to the build time of the ISO, which of course usually is older than one week. Then as soon as the systemd-tmpfiles-clean.service is executed the mandb cache gets removed and apropos(1) no longer works (at least until mandb gets executed again). Avoid this /var/cache/man removal by overriding the default configuration file with a /etc/tmpfiles.d/man-db.conf configuration that doesn't set the age option ("1w"). Credits to @2f2a for the bug report and @jkirk for assistance in debugging Closes: https://github.com/grml/grml/issues/201 Thanks: 2f2a and Darshaka Pathirana --- diff --git a/etc/grml/fai/config/files/etc/tmpfiles.d/man-db.conf/GRMLBASE b/etc/grml/fai/config/files/etc/tmpfiles.d/man-db.conf/GRMLBASE new file mode 100644 index 0000000..c248a47 --- /dev/null +++ b/etc/grml/fai/config/files/etc/tmpfiles.d/man-db.conf/GRMLBASE @@ -0,0 +1,6 @@ +# This file was deployed via grml-live's +# ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/85-systemd script, using +# ${GRML_FAI_CONFIG}/config/files/etc/tmpfiles.d/man-db.conf/GRMLBASE + +# Override default (age set to 1w) to avoid disappearing mandb caches +d /var/cache/man 0755 man man - diff --git a/etc/grml/fai/config/scripts/GRMLBASE/85-systemd b/etc/grml/fai/config/scripts/GRMLBASE/85-systemd new file mode 100755 index 0000000..4ea4247 --- /dev/null +++ b/etc/grml/fai/config/scripts/GRMLBASE/85-systemd @@ -0,0 +1,16 @@ +#!/bin/bash +# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/85-systemd +# Purpose: configure systemd and related services +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +################################################################################ + +set -u +set -e +. "$GRML_LIVE_CONFIG" + +fcopy -M -i -B -v -r /etc/tmpfiles.d + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2