mandb is not updated

See fedora/ostree/sig#62 (closed) for the investigation:

According to mandb(8), the index is stored in /var/cache/man/ which can not be updated as part of the image.

The man-db package includes a systemd unit that can be used to update the index but it's not enabled by default and only started from a transfiletriggerin which will not work when building the image:

$ rpm -ql man-db | grep systemd
/usr/lib/systemd/system/man-db-cache-update.service
/usr/lib/systemd/system/man-db-restart-cache-update.service

There is another sub package that we don't ship and that includes a daily cronjob config which would be ignored as we don't ship a cronjob runner.

Potential options:

  • update that unit and use it to rebuild the index at boot time, or 5 minutes after boot.
  • move the index somewhere in /usr and teach rpm-ostree/bootc to update it after the transaction or update the package to use a post-trans without a systemd unit in the rpm-ostree case. Note that will not be able to update the index for man pages installed in /usr/local/ (as that's in /var) so that may not be ideal.

This also likely impacts all bootc images but likely went unnoticed as the man pages are stripped from the image.