Package Details: qemu-user-static-bin 3.1-7

Git Clone URL: https://aur.archlinux.org/qemu-user-static-bin.git (read-only)
Package Base: qemu-user-static-bin
Description: A generic and open source machine emulator, statically linked
Upstream URL: http://wiki.qemu.org
Licenses: GPL2, LGPL2.1
Conflicts: qemu-user, qemu-user-static
Provides: qemu-user, qemu-user-static
Submitter: dvdhrm
Maintainer: dvdhrm
Last Packager: dvdhrm
Votes: 72
Popularity: 0.597493
First Submitted: 2017-10-05 07:33
Last Updated: 2019-04-01 12:33

Dependencies (1)

Required by (6)

Sources (2)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 Next › Last »

jjanzic commented on 2015-09-08 20:20

There's 2.4 out: http://pastebin.com/5DAhLC61

kalsan commented on 2015-07-26 14:24

I'm getting a 404 when installing this. The PKGBUILD from http://pastebin.com/d9swBvqr appears to be working.

vinadoros commented on 2015-07-01 11:09

Hmm, I actually was getting this same error about the "package" line not being found right up until yesterday. I updated the binfmts-support package (there was no version change for it, but my AUR helper seemed to think it wanted an upgrade). After that, it started working with the modified change in this qemu-user-static PKGBUILD. Perhaps that needs an update or something. I don't know why it started working either (I didn't change the qemu-user-static package in any way, and I am using the new format).

DiegoAscanio commented on 2015-06-30 23:17

Sorry, I'm trying to compile yaourt, with makepkg and i'm not reaching it

DiegoAscanio commented on 2015-06-30 23:14

vinadoros, what you proposed does not works with update-binfmt, at least at the most recent version of qemu-user-static package, on debian repo.

when I tried to:
#update-binfmt --importdir /var/lib/binfmts --import

a warning came up saying that the required 'package' line was not found and update-binfmt exited dues to previous errors

I got it working with the old lines in PKGBUILD and using version 6a from debian repository.

Now I'm trying to cross compile makepkg, but it keeps stalling and seg faulting.

Sorry for the poor english.

vinadoros commented on 2015-06-27 17:46

Actually the link to qemu-user-static_2.3+dfsg-5 is also out of date (is now 6a). These lines should work in place of the existing lines:

_debsrc=${pkgname}_${pkgver}+dfsg-6a_${_arch}.deb
source=(http://ftp.debian.org/debian/pool/main/q/qemu/${_debsrc})
sha1sums=('aab940002044c9543a8aaf4502622b03fd06e153')
[ "$CARCH" = 'i686' ] && sha1sums=('51eaaca22d6ccf969623453190cffa62c79de480')

vinadoros commented on 2015-06-22 15:26

Hmm, the binary translation (in /var/lib/binfmts) doesn't seem to work properly when using update-binfmts. I think I know why. It seems the format of the files in /var/lib/binfmts have changed in the debian packages, and this has not been updated in this PKGBUILD. The solution I have tested is to replace these lines in the PKGBUILD:

for fmt in $fmts ; do
eval "magic=\"\$${fmt}_magic\" mask=\"\$${fmt}_mask\""
cat >> "${pkgdir}/var/lib/binfmts/qemu-$fmt" << EOF
package qemu-user-static
interpreter /usr/bin/qemu-$fmt-static
credentials yes
offset 0
magic $magic
mask $mask
EOF
done
}

With these lines:

for fmt in $fmts ; do
eval "magic=\"\$${fmt}_magic\" mask=\"\$${fmt}_mask\""
cat >> "${pkgdir}/var/lib/binfmts/qemu-$fmt" << EOF
qemu-user-static
magic
0
$magic
$mask
/usr/bin/qemu-$fmt-static

yes

EOF
done
}

I have tested this PKGBUILD with the qemu-arm binary translation (by chrooting into a debain armhf chroot), and it seems to now be working. Here is a pastebin for the full working PKGBUILD:

http://pastebin.com/d9swBvqr

Can we get an update to this pkg? I have flagged it out of date to get some attention. Thanks.

benob commented on 2015-01-28 20:01

Update to 2.2
http://pastebin.com/6fqs9Yca

rains commented on 2015-01-28 08:45

there is a 'binfmt-support friendly' qemu-user-static PKGBUILD:
% cat PKGBUILD
# Maintainer: Sergio Tridente <tioduke at gmail dot com >

pkgname=qemu-user-static
pkgver=2.1
pkgrel=11
pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation, statically linked."
arch=('i686' 'x86_64')
license=('GPL2' 'LGPL2.1')
url="http://wiki.qemu.org/Index.html"
depends=()
optdepends=('binfmt-support: to allow handling foreign ELF binaries and executing them via qemu')
conflicts=()
_arch=i386
[ "$CARCH" = 'x86_64' ] && _arch=amd64
_debsrc=${pkgname}_${pkgver}+dfsg-${pkgrel}_${_arch}.deb
source=(http://ftp.debian.org/debian/pool/main/q/qemu/${_debsrc})
sha1sums=('805f000c1826db83960ed2835c0d6380fb82de3e')
[ "$CARCH" = 'i686' ] && sha1sums=('f349df1be10439d8f85f5da1464da1938ef5e9df')

prepare() {
cd "$srcdir"
ar p ${_debsrc} data.tar.xz | bsdtar xf -
}

package() {
cd "$pkgdir"
mkdir -p "$pkgdir"/usr/bin/
mkdir -p "$pkgdir"/usr/share/man/
mkdir -p "$pkgdir"/var/lib/binfmts/

cp "$srcdir"/usr/bin/* "$pkgdir"/usr/bin/
cp "$srcdir"/usr/share/man/man1 "$pkgdir"/usr/share/man/ -r

create_binfmts
}

create_binfmts() {
aarch64_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7'
aarch64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
alpha_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90'
alpha_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
arm_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00'
arm_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
armeb_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28'
armeb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
cris_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x4c\x00'
cris_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
m68k_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04'
m68k_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
microblaze_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xba\xab'
microblaze_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
mips_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08'
mips_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
mipsel_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00'
mipsel_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
ppc_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14'
ppc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
ppc64_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15'
ppc64_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
ppc64abi32_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15'
ppc64abi32_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
s390x_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16'
s390x_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
sh4_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00'
sh4_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
sh4eb_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a'
sh4eb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
sparc_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02'
sparc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
sparc32plus_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x12'
sparc32plus_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
sparc64_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2b'
sparc64_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'

# Drop support for emulating amd64 on i386, http://bugs.debian.org/604712
fmts="aarch64 alpha arm armeb cris m68k microblaze mips mipsel ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64"

for fmt in $fmts ; do
eval "magic=\"\$${fmt}_magic\" mask=\"\$${fmt}_mask\""
cat >> "${pkgdir}/var/lib/binfmts/$fmt" << EOF
qemu-user-static
magic
0
$magic
$mask
/usr/bin/qemu-$fmt-static

EOF
done
}

rains commented on 2015-01-28 08:38

there is a working qemu-user-static PKGBUILD below:
% cat PKGBUILD
# Maintainer: Sergio Tridente <tioduke at gmail dot com >

pkgname=qemu-user-static
pkgver=2.1
pkgrel=11
pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation, statically linked."
arch=('i686' 'x86_64')
license=('GPL2' 'LGPL2.1')
url="http://wiki.qemu.org/Index.html"
depends=()
optdepends=('binfmt-support: to allow handling foreign ELF binaries and executing them via qemu')
conflicts=()
_arch=i386
[ "$CARCH" = 'x86_64' ] && _arch=amd64
_debsrc=${pkgname}_${pkgver}+dfsg-${pkgrel}_${_arch}.deb
source=(http://ftp.debian.org/debian/pool/main/q/qemu/${_debsrc})
sha1sums=('805f000c1826db83960ed2835c0d6380fb82de3e')
[ "$CARCH" = 'i686' ] && sha1sums=('f349df1be10439d8f85f5da1464da1938ef5e9df')

prepare() {
cd "$srcdir"
ar p ${_debsrc} data.tar.xz | bsdtar xf -
}

package() {
cd "$pkgdir"
mkdir -p "$pkgdir"/usr/bin/
mkdir -p "$pkgdir"/usr/share/man/
mkdir -p "$pkgdir"/var/lib/binfmts/

cp "$srcdir"/usr/bin/* "$pkgdir"/usr/bin/
cp "$srcdir"/usr/share/man/man1 "$pkgdir"/usr/share/man/ -r

create_binfmts
}

create_binfmts() {
aarch64_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7'
aarch64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
alpha_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90'
alpha_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
arm_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00'
arm_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
armeb_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28'
armeb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
cris_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x4c\x00'
cris_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
m68k_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04'
m68k_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
microblaze_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xba\xab'
microblaze_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
mips_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08'
mips_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
mipsel_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00'
mipsel_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
ppc_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14'
ppc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
ppc64_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15'
ppc64_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
ppc64abi32_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15'
ppc64abi32_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
s390x_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16'
s390x_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
sh4_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00'
sh4_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
sh4eb_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a'
sh4eb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
sparc_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02'
sparc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
sparc32plus_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x12'
sparc32plus_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
sparc64_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2b'
sparc64_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'

# Drop support for emulating amd64 on i386, http://bugs.debian.org/604712
fmts="aarch64 alpha arm armeb cris m68k microblaze mips mipsel ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64"

for fmt in $fmts ; do
eval "magic=\"\$${fmt}_magic\" mask=\"\$${fmt}_mask\""
cat >> "${pkgdir}/var/lib/binfmts/$fmt" << EOF
qemu-user-static
magic
0
$magic
$mask
/usr/bin/qemu-$fmt-static

EOF
done
}