Package Details: qemu-user-static-bin 7.0-5

Git Clone URL: https://aur.archlinux.org/qemu-user-static-bin.git (read-only, click to copy)
Package Base: qemu-user-static-bin
Description: A generic and open source machine emulator, statically linked
Upstream URL: http://wiki.qemu.org
Keywords: emulation qemu
Licenses: GPL2, LGPL2.1
Conflicts: qemu-arm-static, qemu-user, qemu-user-static
Provides: qemu-arm-static, qemu-user, qemu-user-static
Submitter: dvdhrm
Maintainer: JerryXiao (jpegxguy)
Last Packager: jpegxguy
Votes: 87
Popularity: 1.00
First Submitted: 2017-10-05 07:33 (UTC)
Last Updated: 2022-05-29 17:59 (UTC)

Latest Comments

jpegxguy commented on 2022-05-29 16:59 (UTC)

Yeah, the dfsg things are probably rebuilds, at least they don't seem to change the programs' actual function. We don't want 404 though so I'll handle it

evandeaubl commented on 2022-05-28 20:42 (UTC)

It looks like upstream packages are now +dfsg-7 instead of +dfsg-3, so the current PKGBUILD is failing. I've confirmed it on aarch64. It should be failing everywhere, but the _amd64 source link still works for some reason, even though pulling an index of https://deb.debian.org/debian/pool/main/q/qemu/ , the _amd64 file is +dfsg-7 as well.

sgar commented on 2022-05-03 19:35 (UTC)

checksum error

novotny commented on 2022-01-14 22:15 (UTC) (edited on 2022-01-14 22:18 (UTC) by novotny)

helo, package conflict with qemu-arm-static-bin

qemu-user-static-bin: /usr/bin/qemu-aarch64-static exists in filesystem (owned by qemu-arm-static-bin)
qemu-user-static-bin: /usr/bin/qemu-arm-static exists in filesystem (owned by qemu-arm-static-bin)
qemu-user-static-bin: /usr/bin/qemu-armeb-static exists in filesystem (owned by qemu-arm-static-bin)``

jpegxguy commented on 2021-12-28 17:50 (UTC) (edited on 2021-12-28 17:50 (UTC) by jpegxguy)

Assuming that the orphan notice is talking about qemu 6.2 and not 5.2, that's not available in the debian repos yet. I'll update when it is.

jpegxguy commented on 2021-03-03 21:53 (UTC)

Yeah, I'll look into it.

m040601 commented on 2021-03-03 20:45 (UTC) (edited on 2021-03-03 20:58 (UTC) by m040601)

Please update the PKGBUILD to support missing architectures.

You currently have

arch=('x86_64' 'i686' 'aarch64')

This leaves out the Raspberry Pi 2 , the Raspberry Pi Zero and many other 32bit arm boards and chromebooks that run perfectly fine Arch Linux arm.

As you can see here on the place where you're pulling the deb's,
https://deb.debian.org/debian/pool/main/q/qemu/ they are there, so there's no reason not to include them in this PKGBUILD.

ex: - Raspberry Pi zero is armel - Raspberry Pi 2 is armhf - etc


If you need help here are some references:

https://en.wikipedia.org/wiki/ARM_architecture

In Debian GNU/Linux, ...  armhf (ARM hard float) refers to the ARMv7

architecture ...

https://en.wikipedia.org/wiki/Raspberry_Pi

https://www.debian.org/ports/arm/

... Debian fully supports three ports to different flavours of little-endian ARM hardware:

• (armel) 
• (armhf) port 
• (arm64) port

https://wiki.debian.org/RaspberryPi

poztit commented on 2021-01-07 19:00 (UTC)

Hi ! Update needed pkgadditver="+dfsg-3". Thanks !

pmostert commented on 2020-12-18 15:52 (UTC)

thanks @Brocellous for your pointer, it saved me tons of time. yay -Suy upgraded qemu-user-static-bin (5-1-4 -> 5.2-1) after this the systemd-binfmt service just crashed with the "add binary format message.

Commenting the :qemu-ppc64abi32: line in /usr/lib/binfmt.d/qemu-static.conf put things back on track for me.

jpegxguy commented on 2020-12-17 13:08 (UTC) (edited on 2020-12-17 13:08 (UTC) by jpegxguy)

@Brocellous I'm using binfmt-qemu-static-all-arch and I don't see that line in /usr/lib/binfmt.d/qemu-static.conf provided by that package. Maybe this architecture isn't part of qemu-static anymore?

Brocellous commented on 2020-12-17 09:41 (UTC)

With 5.2 my systemd-binfmt fails with "Failed to add binary format: No such file or directory"

Copying the coonfig file to /etc/binfmt.d/qemu-static.conf and commenting out "qemu-ppc64abi32" format allows it to work for me. It has some kind of trouble loading that one.

JerryXiao commented on 2020-11-27 11:24 (UTC)

@jpegxguy me neither. I think It will be removed by admin soon. Also, I've added you to co-maintainers.

jpegxguy commented on 2020-11-27 10:19 (UTC)

Good to see you're active again and thanks! I don't think there's a way for me to remove the request.

addisonbean commented on 2020-11-24 21:10 (UTC)

https://deb.debian.org/debian/pool/main/q/qemu/qemu-user-static_5.1+dfsg-4_amd64.deb is 404-ing

jpegxguy commented on 2020-11-19 20:41 (UTC) (edited on 2020-11-19 20:42 (UTC) by jpegxguy)

I can comaintain if you want

smn.pgn commented on 2020-11-19 19:49 (UTC)

Update needed, pkgadditver="+dfsg-4+b1". Thanks!

aa13q commented on 2020-09-14 04:23 (UTC)

needs update, pkgadditver="+dfsg-4" for now

JerryXiao commented on 2020-08-20 07:41 (UTC)

anyone who would like to co-maintain this package please comment down below

justinesmithies commented on 2020-07-23 20:37 (UTC)

This doesn't exist on the deb server https://deb.debian.org/debian/pool/main/q/qemu/qemu-user-static_5.0-10_amd64.deb

To build I changed pkgadditver from 10 to 11 and it built perfectly https://deb.debian.org/debian/pool/main/q/qemu/qemu_5.0-11_amd64.deb

esotericnonsense commented on 2020-07-03 10:43 (UTC)

emulti: sudo systemctl restart systemd-binfmt worked for me. Exec errors prior to running that, now I can chroot into an aarch64 rootfs.

emulti commented on 2020-06-25 11:05 (UTC) (edited on 2020-06-25 11:12 (UTC) by emulti)

Just a note that when installing this package for the first time, the binary format data installed by the binfmt-qemu-static package is passed to the kernel by the systemd-binfmt service which runs on boot. As far as I can tell it's not possible to trigger a run of the systemd-binfmt service without rebooting.

JerryXiao commented on 2020-04-29 00:27 (UTC) (edited on 2020-04-29 02:33 (UTC) by JerryXiao)

No checksum, and no https in download uri, very insecure. Better use https://deb.debian.org

binhex commented on 2020-04-23 11:18 (UTC)

curl: (22) The requested URL returned error: 404 Not Found ==> ERROR: Failure while downloading http://ftp.debian.org/debian/pool/main/q/qemu/qemu-user-static_4.2-3_amd64.deb

abelfodil commented on 2019-12-04 16:53 (UTC)

I removed the binfmt file and added binfmt-qemu-static as a dependency

Depau commented on 2019-12-04 00:23 (UTC)

Can you please set binfmt flags to OFC so setuid programs work?

https://github.com/multiarch/qemu-user-static/issues/17#issuecomment-518660227

Thank you

theaifam5 commented on 2019-11-22 12:13 (UTC) (edited on 2019-11-22 12:14 (UTC) by theaifam5)

--Why update to 3.1 when 4.1 is out?--

EDIT: You forgot to update .SRCINFO

JerryXiao commented on 2019-11-22 05:16 (UTC)

@Anexthesy Any update?

reynoldsbd commented on 2019-09-18 05:42 (UTC)

Getting a 404 while building. Looks like the .deb used here has been renamed to something different.

Also, 4.1 is now available :)

jpegxguy commented on 2019-09-04 19:53 (UTC)

Also, either change to CF flag (for setuid binaries in chroot) or leave the task to the binfmt-user-static packages

jpegxguy commented on 2019-03-28 16:22 (UTC) (edited on 2019-03-28 16:22 (UTC) by jpegxguy)

@dvdhrm aarch64 works as well now. Thanks!

dvdhrm commented on 2019-03-28 07:28 (UTC)

@jpegxguy I see, you use aarch64. I fixed the binfmt generator to work with the x86 versions as well. Please give it a try!

jpegxguy commented on 2019-03-22 16:34 (UTC) (edited on 2019-03-22 16:36 (UTC) by jpegxguy)

uname -srvmo is: Linux 5.0.3-1-ARCH #1 SMP Wed Mar 20 18:03:35 MDT 2019 aarch64 GNU/Linux

I've found the problematic files: (Installed by this package in /usr/bin/binfmt.d)

  • qemu-i486-static.conf and qemu-x86_64-static.conf, which contain only the letter F and a newline (LF). systemd-binfmt complains that Rule file name '' is not valid, refusing. as can be seen in the journal

  • qemu-i386-static.conf, which contains what seems to be 2 rules stitched together? less output:

:qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xff\xff\xff:/usr/bin/qemu-i386::qemu-i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xff\xff\xff:/usr/bin/qemu-i386-static:F

In my x86_64 pc, no errors, because those files aren't there in that case

dvdhrm commented on 2019-03-22 06:50 (UTC)

@jpegxguy You sure this is related to this package? I cannot reproduce it. Can you check which file exactly causes this to be triggered? The files systemd-binfmt reads are in {/usr/bin,/etc}/binfmt.d/.

jpegxguy commented on 2019-03-21 20:58 (UTC) (edited on 2019-03-21 20:59 (UTC) by jpegxguy)

journalctl has this to say when systemd-binfmt.service is (re)started:

Μαρ 21 22:55:22 systemd[1]: Starting Set Up Additional Binary Formats...
Μαρ 21 22:55:22 systemd-binfmt[16910]: Failed to add binary format: Invalid argument
Μαρ 21 22:55:22 systemd-binfmt[16910]: Rule file name '' is not valid, refusing.
Μαρ 21 22:55:22 systemd-binfmt[16910]: Failed to add binary format: Invalid argument
Μαρ 21 22:55:22 systemd-binfmt[16910]: Rule file name '' is not valid, refusing.
Μαρ 21 22:55:22 systemd-binfmt[16910]: Failed to add binary format: Invalid argument
Μαρ 21 22:55:22 systemd[1]: systemd-binfmt.service: Main process exited, code=exited, status=1/FAILURE

dvdhrm commented on 2019-01-08 11:54 (UTC)

@polyzen I changed this now. I think I had to rename the source because the HTTP request supplied a generic name. Not sure. Regardless, it is now versioned according to the package version.

@mudkip908 Thanks! Should be fixed now. No idea why I forgot that. I assume the issue @polyzen mentioned might have caused me to miss this. Sorry!

polyzen commented on 2019-01-08 07:49 (UTC)

Please either do not rename the deb sources or at least include the pkgver or something so people don't have to delete the older sources when there's an upgrade.

mudkip908 commented on 2019-01-07 19:04 (UTC)

The checksum of the downloaded .deb file for x86_64 does not match. The actual checksum is b52b43a2519a97613ac4081e8eadb58300c890be710db19bf6e2607a7fac4948, while the PKGBUILD says it should be 27aff9179038f561cfdbf0726b5dfda5afb6ff938afa586d255160afce265375.

petronny commented on 2018-10-31 09:24 (UTC)

That's very helpful. Thanks!

dvdhrm commented on 2018-10-31 09:10 (UTC)

@petronny, it should be enabled by default. See systemctl status systemd-binfmt. I thought it picks up new entries automatically, but you might be required to run systemctl restart systemd-binfmt. A reboot is sufficient as well.

petronny commented on 2018-10-31 08:16 (UTC)

Thanks. But do I need to run systemd-binfmt manually? Or I just need to install binfmt-qemu-static and reboot?

dvdhrm commented on 2018-10-28 15:35 (UTC)

@petronny, systemd-binfmt is part of systemd and installed as /usr/lib/systemd/systemd-binfmt.

petronny commented on 2018-10-26 07:11 (UTC)

Hi, could you tell me where is systemd-binfmt?

darkgeek commented on 2018-08-30 18:37 (UTC) (edited on 2018-08-30 18:41 (UTC) by darkgeek)

Could you consider adding aarch64 support? I see this PKGBUILD builds only for i386 and x86_64 currently. With the following patch, it's possible to add aarch64 support: https://gist.github.com/darkgeek/8cae10ab9c2fc6234241e9fc69f6dc9f

coderobe commented on 2018-02-28 00:13 (UTC)

the optdep binfmt-support should probably be changed to binfmt-qemu-static, which uses the correct binfmt config syntax & integrates with systemd-binfmt just fine

blubbblubb commented on 2018-01-21 16:03 (UTC)

ah thanks, so it should probably be removed as an optional dependency?

z3ntu commented on 2018-01-19 17:27 (UTC)

@blubbblubb: https://www.mail-archive.com/aur-requests@archlinux.org/msg21705.html

blubbblubb commented on 2018-01-18 20:54 (UTC)

Does anyone know what happened to the binfmt-support package?

TioDuke commented on 2017-06-14 11:14 (UTC)

@Synchronicity: Could you point me to the debian package you are refering to? I cannot find it. Thank you.

TioDuke commented on 2017-06-14 11:09 (UTC) (edited on 2017-06-14 11:14 (UTC) by TioDuke)

@ajs124: This package will be updated whenever Debian will release the new package. And as of renaming it to "-bin", feel free to do it in your _own_ system whenever you build it. It is a free world (at least it is here).

commented on 2017-06-14 10:46 (UTC)

Why is this not marked as "-bin" if it is in fact a binary package and not compiled from sources. Or rather, why is this a binary package in the first place?

Synchronicity commented on 2017-05-29 22:28 (UTC)

Detecting ppc binaries is broken. The magic and mask used for qemu-ppc in this package requires that the 8th byte of the ELF header (e_ident[EI_OSABI]) be 0x00. But sometimes it is different. It seems this was already addressed in the Debian package, which uses a mask of 0xfc instead of 0xff for that byte. Can the magics and masks for all the binfmts in this package be updated to match the Debian package?

adlerweb commented on 2017-04-25 20:14 (UTC)

Source is 404ed, current Debian package is http://ftp.debian.org/debian/pool/main/q/qemu/qemu-user-static_2.8+dfsg-4+b1_i386.deb

TioDuke commented on 2017-02-10 02:51 (UTC)

All you need to do is start/enable binfmt-support systemd service, which executes "/usr/bin/update-binfmts --enable", and you are all set up. The "update-binfmts --importdir /usr/share/binfmts/ --import" command is for converting from the format normally under /usr/share/binfmts/ to the "right" format which goes under /usr/lib/binfmts. Enjoy!

SandAngel commented on 2017-02-10 01:58 (UTC)

same problem here. When I run #update-binfmts --importdir /var/lib/binfmts/ --import, it showed the errors like @jhlink has posted.

TioDuke commented on 2017-02-09 02:09 (UTC)

@jhlink I really don't know what you are talking about. If you check the systemd service file in binfmt-support, it issues the following command on start: /usr/bin/update-binfmts --enable I have just run it myself and I've got no warnings and when I do a "ls /proc/sys/fs/binfmt_misc" I am able to see all the architectures registered there. What is the command that you are using?

jhlink commented on 2017-02-07 18:02 (UTC)

Hello everyone! I'm still having this problem that @maleadt was describing. Using binfmt-support, I'm getting these warning messages and exiting. Is there a certain format standard that these qemu-* files must adhere to for binfmt-support? update-binfmts: warning: /var/lib/binfmts/qemu-sparc64: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-sparc32plus: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-sparc: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-sh4eb: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-sh4: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-s390x: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-ppc64abi32: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-ppc64: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-ppc: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-mipsel: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-mips: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-microblaze: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-m68k: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-cris: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-armeb: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-arm: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-alpha: required 'package' line missing update-binfmts: warning: /var/lib/binfmts/qemu-aarch64: required 'package' line missing update-binfmts: exiting due to previous errors Thanks a lot!

acssilva commented on 2016-11-12 05:22 (UTC)

Naming scheme changed. In order to make it work: -_debsrc=${pkgname}_${pkgver}+dfsg-3_${_arch}.deb -sha1sums=('1ed56046786a7a722289ad83b0f77874a9c605e6') -[ "$CARCH" = 'i686' ] && sha1sums=('709f0949cf4e07060a9239998e88d4165a3b087f') +_debsrc=${pkgname}_${pkgver}+dfsg-3+b1_${_arch}.deb +md5sums=('c28ff4f2e1270335a72f38896e546717')

gdamjan commented on 2016-06-04 11:05 (UTC)

what are the files in /var/lib/binfmts/ ? are they used by something in ArchLinux?

TioDuke commented on 2016-02-24 02:35 (UTC)

I finally created a script that will (hopefully) tell me whenever a new version is available, so updates should be coming sooner from now on. That been said, I still count on your help to give me a heads up if an update is available and the package is not updated (the script could be wrong or debian changed its naming scheme). Thank you.

TioDuke commented on 2016-02-20 12:38 (UTC) (edited on 2016-02-20 12:40 (UTC) by TioDuke)

@greyltc: please read my reaply on 2015-10-24 09:49 If you want to contribute, please contribute a script that tells me whenver a new version is available on Debian's servers : it would be highly appreciated.

greyltc commented on 2016-02-18 12:05 (UTC)

This package should have the -bin suffix. It's just unpacking a .deb, not actually building anything.

netidjeg commented on 2016-01-30 16:53 (UTC)

Looks like new/updated version, if I understand their numbering scheme correctly. (It sure doesn't lend itself much to automated/scripted checking very easily.) -_debsrc=${pkgname}_${pkgver}+dfsg-3_${_arch}.deb +_debsrc=${pkgname}_${pkgver}+dfsg-5_${_arch}.deb -sha1sums=('9d2ad8848c4135e5443a400917e29363cfd822ba') +sha1sums=('2a71f280c899dc2fc6702289c3f3453ae8e3f81b')

Swizz commented on 2016-01-14 18:15 (UTC)

The sources download raise a 404. Use : 9d2ad8848c4135e5443a400917e29363cfd822ba qemu-user-static_2.5+dfsg-3_amd64.deb

bricewge commented on 2015-12-07 21:00 (UTC)

The sources changed. Here is a working PKGBUILD: https://gist.github.com/bricewge/1e404c293cb902e2a9b0

maleadt commented on 2015-11-21 13:34 (UTC)

Using this package with binfmt-support from AUR I'm getting: update-binfmts: warning: /var/lib/binfmts/qemu-m68k: required 'package' line missing Am I doing something wrong?

TioDuke commented on 2015-10-24 09:49 (UTC)

Package has been updated to latest debian I really appreciate when you comment or flag the package out-of-date, so that I can update it properly. What I won't tolerate, is people complaining that the package is bad maintained: if you need to build it in a hurry and you can't wait for me to update, then modify it yourself before doing a makepkg (and if you are using an aur helper, bad luck; you need to undertand that makepkg is the supported Arch way).

michix5d commented on 2015-10-17 15:49 (UTC)

Flagged out of date. Needs new wget URL: http://ftp.debian.org/debian/pool/main/q/qemu/qemu-user-static_2.4+dfsg-4_amd64.deb

mdl commented on 2015-09-22 05:46 (UTC)

This package currently can't be built because the file on the Debian mirror specified in the PKGBUILD is no longer present; it needs to be changed to "qemu-user-static_2.4+dfsg-3_amd64.deb".

jjanzic commented on 2015-09-08 20:20 (UTC)

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

kalsan commented on 2015-07-26 14:24 (UTC)

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 (UTC)

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 (UTC)

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

DiegoAscanio commented on 2015-06-30 23:14 (UTC)

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 (UTC)

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 (UTC)

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.

commented on 2015-01-28 20:01 (UTC)

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

rains commented on 2015-01-28 08:45 (UTC)

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 }

XenGi commented on 2014-12-28 20:36 (UTC)

Changed again. here is a patch: 15c15 < _debsrc=${pkgname}_${pkgver}+dfsg-2_${_arch}.deb --- > _debsrc=${pkgname}_${pkgver}+dfsg-11_${_arch}.deb 17,18c17,18 < sha1sums=('16afb8a1853c535ed27e9292d5c57110657c8145') < [ "$CARCH" = 'i686' ] && sha1sums=('b9d74a745e09fa7188a9c27e710ced87f5888224') --- > sha1sums=('805f000c1826db83960ed2835c0d6380fb82de3e') > [ "$CARCH" = 'i686' ] && sha1sums=('f349df1be10439d8f85f5da1464da1938ef5e9df')

BuddyLuvve commented on 2014-12-07 19:14 (UTC)

Changed again... ${pkgname}_${pkgver}+dfsg-9_${_arch}.deb

qwazerty commented on 2014-11-18 20:58 (UTC)

And debsrc updated again. _debsrc=${pkgname}_${pkgver}+dfsg-7+b1_${_arch}.deb

codestation commented on 2014-10-26 14:27 (UTC)

The name changed again, now is: ${pkgname}_${pkgver}+dfsg-5+b1_${_arch}.deb

kevinb commented on 2014-09-29 04:52 (UTC)

debian package must have been removed servers. Here is an updated PKGBUILD with the newest version. http://pastebin.com/irJGmUk6

ryad.eldajani commented on 2014-09-10 15:37 (UTC)

I needed to make some tiny modifications to this PKGBUILD to get it working: http://pastebin.com/raw.php?i=9xE8ssDG

TioDuke commented on 2014-08-18 12:26 (UTC)

Thank you tycho. I tried (ab)using update-binfmts to no avail. Then, I took your script (with little modifications). I am satisfied with doing it this way (there shouldn't be much of a high-maintenance as these magic/mask string don't change much, or ever).

tycho commented on 2014-08-18 10:58 (UTC)

Here's what I came up with. It's a bit high-maintenance for my liking, but it should work... http://git.uplinklabs.net/snoonan/projects/archlinux/ec2/ec2-packages.git/tree/qemu-user-static/PKGBUILD?id=3bece4db7ef0e3bbdc3c4258545291227c2b1c83

tycho commented on 2014-08-18 09:48 (UTC)

Or more accurately, it abuses update-binfmts. There will need to be some hackery to mutate the postinst into something useful.

tycho commented on 2014-08-18 09:45 (UTC)

See the 'postinst' script in the control tarball. It generates the binfmts.

TioDuke commented on 2014-08-08 22:18 (UTC)

I have tried to update the package to version 2.1, but unfortunately there is no trace of the binfmt files. Until I found a solution, I am not planning to update the package. @pngochai: If you know where to find the binfmt files, feel free to point me in the right direction. I have already searched inside most of the qemu-* packages from Debian (including qemu-binfmt), to no avail.

pngochai commented on 2014-08-08 21:53 (UTC)

Version 2.1 PKGBUILD =============================== # Maintainer: Sergio Tridente <tioduke at gmail dot com > pkgname=qemu-user-static pkgver=2.1 pkgrel=1 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-2_${_arch}.deb source=(http://ftp.debian.org/debian/pool/main/q/qemu/${_debsrc}) sha1sums=('16afb8a1853c535ed27e9292d5c57110657c8145') [ "$CARCH" = 'i686' ] && sha1sums=('b9d74a745e09fa7188a9c27e710ced87f5888224') build() { 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/ cp "$srcdir"/usr/bin/* "$pkgdir"/usr/bin/ cp "$srcdir"/usr/share/man/man1 "$pkgdir"/usr/share/man/ -r }

TioDuke commented on 2014-06-01 09:37 (UTC)

Uptdated t0 version 2.0.0 Thank you XenGi

XenGi commented on 2014-05-31 19:49 (UTC)

Here is a updated PKGBUILD for version 2.0.0 from debian repos. I don't trust canonical with this. https://gist.github.com/XenGi/bfb305176b6bb22313a2

erholst commented on 2014-04-04 05:56 (UTC)

Changed again. with yaourt i choose to Edit PKGBUILD to change this line: from: source=(http://mirrors.us.kernel.org/ubuntu/pool/universe/q/qemu/${_debsrc}) to: source=(http://launchpadlibrarian.net/163116292/${_debsrc})

danwood76 commented on 2014-02-26 09:36 (UTC)

And again: _debsrc=${pkgname}_${pkgver}+dfsg-3ubuntu3_${_arch}.deb [ "$CARCH" = 'x86_64' ] && sha1sums=('739422db29e2806e5606592def2142f8209306c2')

gdw commented on 2014-02-14 03:49 (UTC)

Changed again: _debsrc=${pkgname}_${pkgver}+dfsg-3ubuntu2_${_arch}.deb [ "$CARCH" = 'x86_64' ] && sha1sums=('0c4e55227c53c21fc8119bdc75fe6d179bd8fc10')

WarheadsSE commented on 2014-02-07 15:57 (UTC)

And it has changed again. http://mirrors.us.kernel.org/ubuntu/pool/universe/q/qemu/qemu-user-static_1.7.0+dfsg-3ubuntu1_amd64.deb 22ed410ad34be30cb4c5ab900428c416f21df4a3 qemu-user-static_1.7.0+dfsg-3ubuntu1_amd64.deb

OrdinaryMagician commented on 2014-01-29 12:42 (UTC)

file changed again, should now be "${pkgname}_${pkgver}+dfsg-2ubuntu9_${_arch}.deb"

sehraf commented on 2014-01-24 22:31 (UTC)

the file (name) has changed: qemu-user-static_1.7.0+dfsg-2ubuntu3_*arch*.deb doesn't exists anymore (it's qemu-user-static_1.7.0+dfsg-2ubuntu7_*arch*.deb now)

lvzongting commented on 2013-11-22 19:36 (UTC)

http://mirrors.us.kernel.org/ubuntu/pool/universe/q/qemu/qemu-user-static_1.6.0+dfsg-2ubuntu2_i386.deb contant new structer mips64el mips64 please update PKGBUILD - pkgver=1.4.0 + pkgver=1.6.0 - _debsrc=${pkgname}_${pkgver}+dfsg-1expubuntu4_${_arch}.deb + _debsrc=${pkgname}_${pkgver}+dfsg-2ubuntu2_${_arch}.deb - sha1sums=('826a66ad57ba1a51c8b0cdd2020f0c0e471ac3f3') + sha1sums=('c6e9d9d917f631608ece0fddc4d12a81b2ff69f7')

sergej commented on 2013-10-11 20:07 (UTC)

I've made https://aur.archlinux.org/packages/qemu-static/ which builds qemu-*-static from sources. Probably these packages should be merged.

TioDuke commented on 2013-07-21 03:38 (UTC)

@rustam: Done.

rustam commented on 2013-07-08 14:29 (UTC)

Can you pls add the contents of /usr/share/binfmts/ to the package and add aur/binfmt-support as either depends or optdepends to allow handling foreign ELF binaries and executing them via qemu?