distrobuilder icon indicating copy to clipboard operation
distrobuilder copied to clipboard

Install Cross-Build... works ;)

Open 0bi-w6n-K3nobi opened this issue 4 years ago • 0 comments

Hi @monstermunchkin

First at all, thank you for your commitment to answering, and for the great software that distrobuilder is. I'm not golang proficient, but it looks pretty elaborate to me!

Second, I will apologize to you, in advance, for 2 facts:

  • continue the subject by addressing issue #573 here;
  • and I say: cross-build works, and very well;

Perhaps you did not plan for this behavior. But, We may remember that LXC (not LXD) allows cross-platform execution ... See the lxc.arch field in the CONF specification.

I tested with follows OS/Archicture:

Fedora 34     aarch64,armhfp,ppc64le,s390x
Alpine 3.14   aarch64,armhf,armv7,ppc64le,s390x

Running LXC with netwok, and install some packages. Some of these cases I was able to create/run through the obsolete lxc-templates package too.

Well... Why work? The LXC was made to run on non-native architecture. It uses qemu-ARCH-static to run each foreign binary.

Please reconsider some modifications, which made it possible for Centos8, Ubuntu and Arch Linux to be support cross-build and then run on LXC for non-native arch.

For Arch Linux, it is very simple. Just add build-lxc target conditional cited at issue #573.

For Centos8, do you need add archs aarch64 and ppc64le at getRegexes function, switch case 3.

For Ubuntu, the url change a little bit... But We could have arm64, armhf, ppc64el, riscv64 and s390x archs.

So... Is being nice to share it with you.

0bi-w6n-K3nobi avatar Oct 28 '21 20:10 0bi-w6n-K3nobi