[CentOS-devel] Building ARM64 RPMs on AMD64?

Sat Dec 5 20:15:49 UTC 2020
Nico Kadel-Garcia <nkadel at gmail.com>

On Sat, Dec 5, 2020 at 2:35 PM Mihai Moldovan <ionic at ionic.de> wrote:
>
> [Resent this message to the list without aa GPG signature, since my signature
> blows the message up past the 50 KB mark... meh.]
>
> * On 12/5/20 8:15 PM, Simon Matter wrote:
> > [...]
> > We are thinking about adding ARM64 based devices to our systems.
> >
> > As we are using CentOS almost everywhere and have quite a number of
> > inhouse RPM packages in our company repository, we'd like to enhance it
> > and add ARM64 alias aarch64 to it.
> >
> > What I'm still wondering is how to run the build environment for the new
> > arch?
> >
> > How does the CentOS project do it, run ARM64 hardware or using emulation?
> > Or to ask differently, is it an option to run the build system emulated
> > with QEMU?
>
> I cannot speak for the CentOS project, but I'm doing something along those
> lines, albeit in a Debian-context with sbuild chroots (which are static,
> compared to mock's chroots, so getting this stuff working with mock could be
> painful).
>
> Essentially, you can leverage the binfmt_misc Linux kernel feature inn tandem
> with qemu-static-user binaries. The Fedora package name for that is
> qemu-user-static, I believe it's the same for CentOS.

I'd use "mock" on an arm64 architecture host. If I lack spare
hardware, I'd grab an AWS account and run mock in a CentOS 8 AMI. The
mock provided for Amazon Linux is, I'm afraid, a bit out of date and
tricky to manage due to "createrepo" versus "createrepo_c"
dependencies.