DevHeads.net

Multi-arch support in Mock

Hi,
I just pushed into updates-testing new release of Mock (1.4.11). It has nice new feature:

$ sudo dnf install qemu-user-static # weak dependency
$ mock -r fedora-28-ppc64le --forcearch ppc64le shell

This will give you Fedora shell on different architecture. Emulated by QEMU. And of course you can build packages for
the different architectures this way.
You can do this for any architecture: aarch64, armhfp, ppc64, ppc64le, s390x.

People are asking me how much slower it is. Here are some data:

$ time mock -r fedora-28-x86_64 /tmp/tito/mock-1.4.11-1.fc28.src.rpm
real 0m56,341s
user 0m46,238s
sys 0m6,027s

$ time mock -r fedora-28-ppc64le --forcearch=ppc64le /tmp/tito/mock-1.4.11-1.fc28.src.rpm
real 11m9,576s
user 10m40,182s
sys 0m29,916s

$ time mock -r fedora-28-x86_64 --shell 'echo Ahoy'
real 0m1,199s
user 0m0,759s
sys 0m0,253s

$ time mock -r fedora-28-ppc64le --forcearch=ppc64le --shell 'echo Ahoy'
real 0m1,726s
user 0m1,228s
sys 0m0,319s

For full release notes see:
<a href="https://github.com/rpm-software-management/mock/wiki/Release-Notes-1.4.11" title="https://github.com/rpm-software-management/mock/wiki/Release-Notes-1.4.11">https://github.com/rpm-software-management/mock/wiki/Release-Notes-1.4.11</a>

Miroslav