View on GitHub

Mock » Plugin RootCache

A 'simple' chroot build environment manager for building RPMs.

This plugin caches your buildroots. It creates archive of your buildroot and puts it in config_opts['plugin_conf']['root_cache_opts']['dir'], which is be default /var/cache/mock/NAME_OF_CHROOT/root_cache/cache.tar.gz. It is enabled by default.

Configuration

This plugin is enabled by default and has the following values built-in:

config_opts['plugin_conf']['root_cache_enable'] = True
config_opts['plugin_conf']['root_cache_opts'] = {}
config_opts['plugin_conf']['root_cache_opts']['age_check'] = True
config_opts['plugin_conf']['root_cache_opts']['max_age_days'] = 15
config_opts['plugin_conf']['root_cache_opts']['dir'] = "%(cache_topdir)s/%(root)s/root_cache/"
config_opts['plugin_conf']['root_cache_opts']['compress_program'] = "pigz"
config_opts['plugin_conf']['root_cache_opts']['extension'] = ".gz"
config_opts['plugin_conf']['root_cache_opts']['exclude_dirs'] = ["./proc", \
   "./sys", "./dev", "./tmp/ccache", "./var/cache/yum" ]

WARNING: You should disable root_cache plugin when using lvm_root plugin - having two caches with the same contents would just slow you down.

NOTE: If you have enough disk storage you can speed-up it a bit by disabling archiving of cache:

config_opts['plugin_conf']['root_cache_opts']['compress_program'] = ""
config_opts['plugin_conf']['root_cache_opts']['extension'] = ""