On Tue, 18 Apr 2023 17:21:18 +0300 Michael Tokarev <m...@tls.msk.ru> wrote:
Replying to 3 different bug reports all about the same theme.
With the upcoming version of qemu-user[-static] package, I'm shipping all
available binfmt entries, including the ones for the same-family arch and
even for native arch.
But the same-family-arch entries will go into /usr/share/doc/qemu-user-static/,
not to /usr/lib/binfmt.d/ where all other entries reside.
This way, the system will automatically enable only entirely foreign binfmt
formats by default, just like it does now. But it is possible to symlink,
say, /usr/share/doc/qemu-user-static/qemu-x86_64.conf to
/etc/binfmt.d/qemu-x86_64.conf, and it will be enabled on a i386 system.
You have to be careful though, and not enable native format this way, as
it will break your system.
In 9.2.0, I re-visited this old theme. For quite some time, qemu-user package
(a successor to qemu-user and qemu-user-static) ships all available binfmts in
/usr/share/qemu/binfmt.d/, while qemu-user-binfmt symlinks the ones which are
not questionable (ie, not from the same cpu family as the host) into
/usr/lib/binfmt.d/ directory for systemd-binfmt (or other tools) to process.
/usr/share/qemu/binfmt.d/ is the canonical place for all qemu-related binfmt
registrations, - unlike /usr/share/doc/qemu-user-static/. And 9.2.0+ds1-2
version, which I just uploaded, removed the binfmts kept in the doc subdir.
So if you relied on these binfmts, please switch to /usr/share/qemu/binfmt.d
ones.
Thanks,
/mjt