[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mapping from debian arch to qemu arch



13.02.2023 00:51, Christian Kastner пишет:
Hi all,

apologies for the late reply.

On 2022-12-28 17:20, Johannes Schauer Marin Rodrigues wrote:
Quoting Michael Tokarev (2022-12-25 08:01:31)
BTW, does sbuild really needs qemu-system (and sbuild-qemu to begin with)?

sbuild-qemu uses the autopkgtest backend of sbuild to run builds with qemu
isolation. So for building packages, sbuild-qemu only uses qemu-system-XXX
indirectly via autopkgtest. The sbuild scripts that need qemu-system-XXX
directly are sbuild-qemu-update and sbuild-qemu-boot that assist with updating
or entering a qemu image for autopkgtest use, respectively.

Correct, sbuild-qemu needs a mapping from Debian arch to QEMU arch so
that when a user invokes

     $ sbuild-qemu --arch ppc64el *.dsc

sbuild-qemu knows which QEMU binary to request:
    amd64     needs   qemu-system-x86_64
    ppc64el   needs   qemu-system-ppc64le
    arm64     needs   qemu-system-aarch64
    etc.

That's all there is.

If there would be some system-wide solution for this (via symlinks or
whatever), great!

Yesterday I uploaded a new qemu release (to experimental), with the
following commit:
https://salsa.debian.org/qemu-team/qemu/-/commit/09115a82cd1cef9f76fc36d5ca5676ed494554ea

which should fix this very issue.  You can now depend on, say,
qemu-system-arm64, or run qemu-system-amd64 binary.

Maybe next time I'll rearrange qemu-system-foo split somehow, but
the scheme will (hopefully) stay.

..
For now, I'm not really sure we actually needs even the symlinks mentioned
above. This is just due to my misunderstanding, I guess.  For example, the
sbuild-qemu thing, - it needs not only the qemu-system-$arch binary naming
but also the package naming, it seems.

Ah you are referring to the Depends and Recomends of sbuild-qemu. Maybe this is
a mistake. I'm not maintaining sbuild-qemu but Christian Kastner is, so they
will be much more fit to answer all these questions. Putting them in CC. Maybe
sbuild-qemu should Depend on the qemu-system meta-package to automatically pull
in qemu-system-$foo for all possible architectures?
Perhaps I'm misunderstanding something, but the current setup of

    Depends: qemu-system-x86
    Recommends: qemu-system-arm, qemu-system-ppc

was chosen because those are the architectures supported by autopkgtest,
and thus by sbuild-qemu. There needs to be at least one qemu-system-* to
be useful, and x86 is the dominating arch.

But I'm totally open to adapting this in any way that might be more
convenient to you.

I don't really know what to put there. Maybe qemu-system-amd64 (as of now),
and maybe any qemu-system-foo, probably with an alternative.  I guess I can
provide qemu-system-any in all qemu-system-foo packages, so the above will
look like:

  Depends: qemu-system-amd64 | qemu-system-any.

Dunno really.  For now, I'm not yet sure how to re-split the thing better,
so let's keep it the way it is now :)

Thanks,

/mjt


Reply to: