About open source, education and random other Stuff
Archive for March, 2010
Speeding up mock
Mar 4th
I found this quite useful since I’ve been doing some more mock builds lately:
This will speed up mock builds on your multi-core system. Basically mock uses tar and gzip to create a cache of the buildroot contents before building so that it doesn’t need to install a fresh buildroot every time you do a mock build. Unfortunately gzip can only use one core of your multi-core processor at a time. pigz is a mutli-threaded implementation of gzip that is fully compatible. You can tell mock to use pgiz instead of gzip.
As root do:
- yum install pigz
- open /etc/mock/site-defaults.cfg in your favorite editor
- find the line
# config_opts['plugin_conf']['root_cache_opts']['compress_program'] = “gzip”
In my cfg is is at lines 65. - Uncomment that line and edit it to say pigz instead of gzip
- You’re all set.