Package: qemu Version: 0.8.0-2 Severity: wishlist Tags: patch New patch version, now reduced to just the binfmt changes. The other changes were moved to separate bug reports. Note that this patch depends on #356309 being applied first.
Changes since last version: - removed hard-coded binary lists from debian/rules and prerm/postinst scripts. - removed qemu-user-static package creation (will move it to another bug report, since it's not necessary to run executables transparently outside of a chroot). Changelog: * Add binfmt-support hooks, allowing "transparent" user emulation. Idea borrowed from qemu-binfmt-conf.sh. - Recommends binfmt-support. -- Anderson Lizardo Embedded Linux Lab - 10LE Nokia Institute of Technology - INdT Manaus - Brazil
diff -u qemu-0.8.0/debian/control qemu-0.8.0/debian/control --- qemu-0.8.0/debian/control +++ qemu-0.8.0/debian/control @@ -14,7 +14,7 @@ Architecture: amd64 i386 powerpc alpha sparc arm s390 Depends: ${shlibs:Depends}, vgabios (>= 0.5a-1), bochsbios (>= 2.2.1-1), proll, openhackware -Recommends: debootstrap, sharutils +Recommends: debootstrap, sharutils, binfmt-support Suggests: sudo, dpkg-cross Description: fast processor emulator QEMU is a FAST! processor emulator: currently the package supports diff -u qemu-0.8.0/debian/rules qemu-0.8.0/debian/rules --- qemu-0.8.0/debian/rules +++ qemu-0.8.0/debian/rules @@ -7,6 +7,8 @@ # WARNING: Removing no-strict-aliasing will make qemu insta-segfault. CFLAGS = -Wall -g -fno-strict-aliasing +DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) + ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else @@ -69,6 +71,14 @@ for i in $(qemu_bios_files); do \ rm -f pc-bios/$$i $(D)/usr/share/qemu/$$i; \ done + + # Install binfmt-support format files (except for DEB_HOST_ARCH_CPU) + install -m755 -d $(D)/usr/share/binfmts + -for i in `ls $(CURDIR)/debian/binfmts`; do \ + test "$(DEB_HOST_ARCH_CPU)" != "$$i" && \ + install -m644 $(CURDIR)/debian/binfmts/$$i/* \ + $(D)/usr/share/binfmts; \ + done binary-indep: # Nothing to do. only in patch2: unchanged: --- qemu-0.8.0.orig/debian/qemu.prerm +++ qemu-0.8.0/debian/qemu.prerm @@ -0,0 +1,43 @@ +#! /bin/sh +# prerm script for qemu +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <prerm> `remove' +# * <old-prerm> `upgrade' <new-version> +# * <new-prerm> `failed-upgrade' <old-version> +# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> +# * <deconfigured's-prerm> `deconfigure' `in-favour' +# <package-being-installed> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + remove|upgrade|deconfigure) + if [ -x /usr/sbin/update-binfmts ]; then + for i in `ls /usr/share/binfmts/qemu-*`; do + qemu_bin=$i + if [ "$i" = "i486" ]; then qemu_bin=i386; fi + update-binfmts --package qemu --remove $i \ + /usr/bin/$qemu_bin || true + done + fi + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 only in patch2: unchanged: --- qemu-0.8.0.orig/debian/qemu.postinst +++ qemu-0.8.0/debian/qemu.postinst @@ -0,0 +1,44 @@ +#! /bin/sh +# postinst script for qemu +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + if [ -x /usr/sbin/update-binfmts ]; then + for i in `ls /usr/share/binfmts/qemu-*`; do + update-binfmts --import $i || true + done + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/i386/qemu-i486 +++ qemu-0.8.0/debian/binfmts/i386/qemu-i486 @@ -0,0 +1,4 @@ +package qemu +interpreter /usr/bin/qemu-i386 +magic \x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00 +mask \xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/i386/qemu-i386 +++ qemu-0.8.0/debian/binfmts/i386/qemu-i386 @@ -0,0 +1,4 @@ +package qemu +interpreter /usr/bin/qemu-i386 +magic \x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00 +mask \xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/arm/qemu-armeb +++ qemu-0.8.0/debian/binfmts/arm/qemu-armeb @@ -0,0 +1,4 @@ +package qemu +interpreter /usr/bin/qemu-armeb +magic \x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28 +mask \xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/arm/qemu-arm +++ qemu-0.8.0/debian/binfmts/arm/qemu-arm @@ -0,0 +1,4 @@ +package qemu +interpreter /usr/bin/qemu-arm +magic \x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00 +mask \xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/sparc/qemu-sparc +++ qemu-0.8.0/debian/binfmts/sparc/qemu-sparc @@ -0,0 +1,4 @@ +package qemu +interpreter /usr/bin/qemu-sparc +magic \x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02 +mask \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/powerpc/qemu-ppc +++ qemu-0.8.0/debian/binfmts/powerpc/qemu-ppc @@ -0,0 +1,4 @@ +package qemu +interpreter /usr/bin/qemu-ppc +magic \x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14 +mask \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/mips/qemu-mipsel +++ qemu-0.8.0/debian/binfmts/mips/qemu-mipsel @@ -0,0 +1,4 @@ +package qemu +interpreter /usr/bin/qemu-mipsel +magic \x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00 +mask \xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/mips/qemu-mips +++ qemu-0.8.0/debian/binfmts/mips/qemu-mips @@ -0,0 +1,4 @@ +package qemu +interpreter /usr/bin/qemu-mips +magic \x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08 +mask \xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff