From Fedora Project Wiki
Some tips for speeding up mock via its configuration:
/etc/mock/site-defaults.cfg
- Disable the package state plugin:
config_opts['plugin_conf']['package_state_enable'] = False
- Parallelize builds:
config_opts['macros']['%_smp_mflags'] = "-j17"
- Improve ccache hits between package version builds (may break -debuginfos!):
config_opts['files']['etc/profile.d/zz-local.sh'] = """ unset CCACHE_HASHDIR """
- Compress ccache:
config_opts['plugin_conf']['ccache_opts']['compress'] = True
- Use lzo compression for root cache:
config_opts['plugin_conf']['root_cache_opts']['compress_program'] = "lzop" config_opts['plugin_conf']['root_cache_opts']['extension'] = ".lzo"
- Disable the package state plugin:
- Per-repo config files
- Parallelize (de)compression within rpmbuild:
config_opts['chroot_setup_cmd'] = 'install @buildsys-build /usr/bin/pigz /usr/bin/lbzip2' config_opts['macros']['%__gzip'] = '/usr/bin/pigz' config_opts['macros']['%__bzip2'] = '/usr/bin/lbzip2'
- Parallelize (de)compression within rpmbuild: