Bug 1110274 - Please add tmpfiles snippet for automatic time-based clean-up of /var/cache/man
Summary: Please add tmpfiles snippet for automatic time-based clean-up of /var/cache/man
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: man-db
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Chaloupka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-17 10:58 UTC by Lennart Poettering
Modified: 2014-07-01 10:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-25 13:43:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lennart Poettering 2014-06-17 10:58:07 UTC
systemd upstream so far shipped a tmpfiles snippet that causes automatic time-based cleanups of /var/cache/man after 30d. This has been in place since old rc.sysinit already did this.

However, given that the man-db RPM actually owns /var/cache/man, and that man-db is actually a non-essential package for minimal systems the clean-up logic should really move into the man-db package. The line currently included in systemd's /usr/lib/tmpfiles.d/ snippets looks like this:

d /var/cache/man - - - 30d

Hence, please adopt this line and add it to a tmpfiles snippet included in the man-db package, maybe /usr/lib/tmpfiles.d/man-db.conf. Also, please consider submitting/shipping this upstream, as all major distributions have adopted systemd now, and it would make things a lot easier if all distributions could get this right.

Note that the next systemd upload to rawhide will have this line removed, at which point no automatic clean-up takes place anymore, until this is readded to man-db!

Thanks!

Comment 1 Lennart Poettering 2014-06-17 11:01:49 UTC
Also see upstream commit:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=7613d0aec98d86c449aad7932116a2e7d67f8507

Comment 2 Colin Watson 2014-06-17 11:30:33 UTC
Thanks.  I'll take care of this upstream.

Comment 3 Colin Watson 2014-06-17 12:16:45 UTC
commit a8c6b2b99b247f147e00acfc9b4f590de96463c8
Author: Colin Watson <cjwatson>
Date:   Tue Jun 17 13:13:54 2014 +0100

    Add systemd tmpfiles snippet to clean up old cat files after a week

    Fixes Fedora bug #1110274.

    * configure.ac: Accept --with-systemdtmpfilesdir option.
    (AC_CONFIG_FILES): Add init/Makefile and init/systemd/Makefile.
    * Makefile.am (SUBDIRS): Add init.
    * init/Makefile.am: New file.
    * init/systemd/Makefile.am: New file.
    * init/systemd/man-db.conf: New file.
    * .gitignore: Add init/Makefile and init/systemd/Makefile.

Comment 4 Jan Chaloupka 2014-06-25 13:43:13 UTC
Thanks Colin, patched in rawhide.

Comment 6 Bruce Jerrick 2014-07-01 09:05:29 UTC
man-db.conf has UID and GID swapped; it should be:

d /var/cache/man 2755 root man 1w

I.e,, GID 'man', to go along with the setgid.
The way it is now, there's a [FAILED] at boot, from
  systemd-tmpfiles-setup.service, about non-existent
  UID 'man'.
 
Also, perhaps the /var/cache/man entry in var.tmp should be removed?

Comment 7 Colin Watson 2014-07-01 09:25:13 UTC
In Debian it's man:root, not root:man.  You're welcome to patch this for Fedora of course.

Comment 8 Jan Chaloupka 2014-07-01 10:03:22 UTC
Thanks Bruce.

https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20140630/1297781.html

> Also, perhaps the /var/cache/man entry in var.tmp should be removed?
where is this file located?

Jan


Note You need to log in before you can comment on or make changes to this bug.