Package Details: binfmt-qemu-static-all-arch 20200413-1

Git Clone URL: https://aur.archlinux.org/binfmt-qemu-static-all-arch.git (read-only, click to copy)
Package Base: binfmt-qemu-static-all-arch
Description: Register qemu-static interpreters for various binary formats - all archetectures, intelligently removing the current archetecture
Upstream URL: http://www.freedesktop.org/software/systemd/man/binfmt.d.html
Licenses: GPL
Conflicts: binfmt-qemu-static
Provides: binfmt-qemu-static
Submitter: lilmike
Maintainer: lilmike
Last Packager: lilmike
Votes: 5
Popularity: 0.96
First Submitted: 2019-08-13 17:31 (UTC)
Last Updated: 2020-04-13 20:05 (UTC)

Required by (4)

Sources (1)

Latest Comments

waltibaba commented on 2021-11-09 14:39 (UTC) (edited on 2021-11-09 14:40 (UTC) by waltibaba)

@pmatos Yes just had it myself; this package depends on qemu static bins existing (/usr/bin/qemu-xxxx-static) for each arch it provides. However, the AUR package including those static bins depends on binfmt-qemu-static (which this package provides). It's an incorrect backwards (or maybe even circular) dependency, maybe official qemu changed and used to provide those statics in the past?

Just install this package, then a provider for those qemu static bins (like qemu-user-static-bin), then reinstall this package afterwards and it should work fine, though the dependency hierarchy will be wrong.

pmatos commented on 2021-11-08 09:49 (UTC)

Has anyone seen this problem before:

Packages (1) binfmt-qemu-static-all-arch-20200413-1

Total Installed Size:  0.01 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                           [####################################################] 100%
(1/1) checking package integrity                                                         [####################################################] 100%
(1/1) loading package files                                                              [####################################################] 100%
(1/1) checking for file conflicts                                                        [####################################################] 100%
(1/1) checking available disk space                                                      [####################################################] 100%
:: Processing package changes...
(1/1) installing binfmt-qemu-static-all-arch                                             [####################################################] 100%
Optional dependencies for binfmt-qemu-static-all-arch
    qemu-user-static
:: Running post-transaction hooks...
(1/2) Registering binary formats...
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
Failed to add binary format: No such file or directory
error: command failed to execute correctly
(2/2) Arming ConditionNeedsUpdate...

crab2313 commented on 2021-01-19 04:03 (UTC)

@lilmike

Hello, should we merge binfmt-qemu-static-all-arch into binfmt-qemu-static?

gamezelda commented on 2020-03-05 16:29 (UTC) (edited on 2020-03-05 20:24 (UTC) by gamezelda)

Relative to the binaries in qemu-user-static-bin, those architectures files are still missing:

qemu-aarch64_be
qemu-hppa
qemu-microblazeel
qemu-mips64
qemu-mipsn32
qemu-mipsn32el
qemu-nios2
qemu-or1k
qemu-ppc64le
qemu-riscv32
qemu-tilegx
qemu-xtensa
qemu-xtensaeb

It looks like definitions can be found here: https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh , except I didn't found qemu-nios2 and qemu-tilegx, but the rest should be there.

EDIT: I could generate a list of formats like this, however it looks like some of the existing binfmts have masks that are a bit different?! However this comes from the official qemu distribution so I guess it can be trusted?

rm -rf /tmp/qemubinfmts && mkdir -p /tmp/qemubinfmts && ./qemu-binfmt-conf.sh --systemd ALL --exportdir /tmp/qemubinfmts --qemu-path /usr/bin --qemu-suffix -static && for x in /tmp/qemubinfmts/*; do cat "$x" | sed 's/$/CF/'; done

jpegxguy commented on 2020-02-27 07:58 (UTC)

Thanks for taking the time to patch it. I do think that only line 18 needs the fallthrough ;&. All the others should have ;;.

for example, as it is the arm cases fallthrough and the x86_64 entries get removed

jpegxguy commented on 2020-02-21 00:51 (UTC)

I came to say this, but @robxu9 has already said it. I had it happen on a board of mine and it took me a bit to find out the cause.

You should change ;; in line 18 to ;& or something.

robxu9 commented on 2020-02-04 21:04 (UTC)

In PKGBUILD, your case statement doesn't work for aarch64; it causes the qemu-arm entries to be removed from qemu-static.conf, but doesn't wipe out the qemu-aarch64 entry. (statements do not fallthrough)

This can cause an aarch64 system to brick.

aeden commented on 2019-12-04 20:20 (UTC)

qemu-static.conf is missing some entries for different architectures (e.g. mips64el).

:qemu-mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el-static:CF