Skip to content
Miroslav Suchý edited this page Aug 8, 2018 · 6 revisions

Forcearch

Previously you were able to only build for compatible architectures. I.e., you can build i386 package on x86_64 architecture. When you tried to build for incompatible architecture, you get this error:

$ mock -r fedora-28-ppc64le shell
ERROR: Cannot build target ppc64le on arch x86_64, because it is not listed in legal_host_arches ('ppc64le',)

Now, you can build for any architecture using new option --force-arch ARCH. GH#120 You have to have installed package qemu-user-static, which is a new soft dependence. Try this:

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

and you get the prompt in PPC64LE Fedora. You can do this for any architecture supported by QEMU. Note: Do not confuse --forcearch and --arch which are very different options.

This has been added in Mock 1.4.11.

Clone this wiki locally