Hi guys.
How can number of jobs(make) be controlled - or any other place which 'mock' goes multitasking? I did a bit of tweaking in: ~/.rpmmacros of the user who runs mocks, but that does not seem to have desired effect. many thanks, L.
Hi,
lejeczek via buildsys wrote:
How can number of jobs(make) be controlled - or any other place which 'mock' goes multitasking?
I did a bit of tweaking in: ~/.rpmmacros of the user who runs mocks, but that does not seem to have desired effect.
I think -- though I don't know that I've ever had a need for it -- setting the RPM_BUILD_NCPUS envvar is the proper way to do this. You can set some of the _smp_* macros directly, but I don't think that's as clear or clean.
So in ~/.config/mock.cfg or in a chroot config, you can put something like this:
config_opts['environment']['RPM_BUILD_NCPUS'] = '2'
Dne 16. 06. 25 v 11:41 dop. lejeczek via buildsys napsal(a):
Hi guys.
How can number of jobs(make) be controlled - or any other place which 'mock' goes multitasking? I did a bit of tweaking in: ~/.rpmmacros of the user who runs mocks, but that does not seem to have desired effect. many thanks, L.
Mock ignores rpmmacros on host.
Instead go to config (or to ~/.config/mock.cfg )
and put there
config_opts['macros']['%Add_your_macro_name_here'] = "add macro value here"
in your specific case:
config_opts['macros']['%_smp_mflags'] = "-j16"
For more example what you can put in config see
/usr/share/doc/mock/site-defaults.cfg
Tip: better than -j is -l as it can utilize computer better. See `man make`.
thanks, That does work. Number of spawned LTOs seems to "disrespect" that though - at certain stages of a build mock/rpmbuild spawns to the max - would there a similar or any way, to control that too? many thanks, L.
Just FTR, once I complained about the amount of processes spawned by LTO:
https://bugzilla.redhat.com/show_bug.cgi?id=2041537
Vít
Dne 05. 07. 25 v 7:15 lejeczek via buildsys napsal(a):
thanks, That does work. Number of spawned LTOs seems to "disrespect" that though - at certain stages of a build mock/rpmbuild spawns to the max - would there a similar or any way, to control that too? many thanks, L.
buildsys@lists.fedoraproject.org