summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--making-mock-faster.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/making-mock-faster.txt b/making-mock-faster.txt
new file mode 100644
index 0000000..acc906a
--- /dev/null
+++ b/making-mock-faster.txt
@@ -0,0 +1,25 @@
+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"
+
+* Parallelize compression within rpmbuild (in per-repo config files):
+ config_opts['chroot_setup_cmd'] = 'install @buildsys-build pigz lbzip2'
+ config_opts['macros']['%__gzip'] = '/usr/bin/pigz'
+ config_opts['macros']['%__bzip2'] = '/usr/bin/lbzip2'