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, dpkg-cross Suggests: sudo Description: fast processor emulator QEMU is a FAST! processor emulator: currently the package supports @@ -34,0 +35,20 @@ +Package: qemu-user-static +Architecture: amd64 i386 powerpc alpha sparc arm s390 +Depends: ${shlibs:Depends} +Description: fast processor emulator (static version) + QEMU is a FAST! processor emulator: currently the package supports + arm, powerpc, sparc and x86 emulation. By using dynamic translation + it achieves reasonable speed while being easy to port on new host + CPUs. QEMU has two operating modes: + . + * User mode emulation: QEMU can launch Linux processes compiled for + one CPU on another CPU. + * Full system emulation: QEMU emulates a full system, including a + processor and various peripherials. It enables easier testing and + debugging of system code. It can also be used to provide virtual + hosting of several virtual PC on a single server. + . + As QEMU requires no host kernel patches to run, it is very safe and + easy to use. + . + This package contains statically linked versions of user mode emulators. diff -u qemu-0.8.0/debian/changelog qemu-0.8.0/debian/changelog --- qemu-0.8.0/debian/changelog +++ qemu-0.8.0/debian/changelog @@ -1,3 +1,15 @@ +qemu (0.8.0-3) unstable; urgency=low + + [ Anderson Lizardo ] + * Fixed package build/clean/build bugs. + * Added binfmt-support hooks, allowing "transparent" user emulation. Idea + borrowed from qemu-binfmt-conf.sh. + * Changed default interpreter prefix to match dpkg-cross crossdir. + * Removed "--enable-slirp" configure flag, as it's default now. + * Added qemu-user-static package. + + -- Anderson Lizardo Sun, 26 Feb 2006 12:59:04 -0400 + qemu (0.8.0-2) unstable; urgency=low [ Guillem Jover ] 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,9 @@ # 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) +DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) + ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else @@ -23,6 +26,19 @@ ppc_rom.bin \ proll.elf +qemu_docs = \ + qemu-doc.html \ + qemu-tech.html \ + qemu.1 \ + qemu-img.1 + +qemu_static_list = \ + i386-user \ + arm-user armeb-user \ + sparc-user \ + ppc-user \ + mips-user mipsel-user + include debian/patch.mk config-host.mak: configure @@ -30,20 +46,62 @@ CFLAGS="$(CFLAGS)" ./configure \ --prefix=/usr \ - --enable-slirp \ - --cc=$(CC) + --cc=$(CC) \ + --interp-prefix=/usr/%M-$(DEB_HOST_GNU_SYSTEM) + + mv config-host.mak config-host.mak.shared + mv config-host.h config-host.h.shared + + CFLAGS="$(CFLAGS)" ./configure \ + --prefix=/usr \ + --cc=$(CC) \ + --interp-prefix=/usr/%M-$(DEB_HOST_GNU_SYSTEM) \ + --static \ + --target-list="$(qemu_static_list)" + + mv config-host.mak config-host.mak.static + mv config-host.h config-host.h.static build: patch config-host.mak dh_testdir + # Force documentation rebuild + -for i in $(qemu_docs); do \ + test ! -f $$i.keep && mv $$i $$i.keep; \ + done + + # First build static qemu executables + cp config-host.mak.static config-host.mak + cp config-host.h.static config-host.h + $(MAKE) + for i in $(qemu_static_list); do \ + cp -a $$i $$i-static; \ + done + + $(MAKE) clean + + # Next the shared ones + cp config-host.mak.shared config-host.mak + cp config-host.h.shared config-host.h $(MAKE) clean: unpatch dh_testdir dh_testroot - -$(MAKE) clean - rm -f qemu-doc.html qemu.1 qemu-img.1 qemu-tech.html + -cp config-host.mak.shared config-host.mak + -cp config-host.h.shared config-host.h + -$(MAKE) distclean + rm -f config-host.mak.shared config-host.mak.static + rm -f config-host.h.shared config-host.h.static + for i in $(qemu_static_list); do \ + rm -rf $$i-static; \ + done + + # Move original files back + -for i in $(qemu_docs); do \ + test -f $$i.keep && mv $$i.keep $$i; \ + done dh_clean @@ -69,6 +127,44 @@ for i in $(qemu_bios_files); do \ rm -f pc-bios/$$i $(D)/usr/share/qemu/$$i; \ done + + install -m755 -d $(D)-user-static/usr/bin + for i in $(qemu_static_list); do \ + $(MAKE) -C $$i install \ + bindir=$(D)-user-static/usr/bin; \ + done + for i in $(D)-user-static/usr/bin/qemu-*; do \ + mv $$i $$i-static; \ + done + + # Install binfmt-support format files (except for DEB_HOST_ARCH_CPU) + install -m755 -d $(D)/usr/share/binfmts +ifneq ($(DEB_HOST_ARCH_CPU),i386) + install -m644 $(CURDIR)/debian/binfmts/qemu-i386.binfmt \ + $(D)/usr/share/binfmts/qemu-i386 + install -m644 $(CURDIR)/debian/binfmts/qemu-i486.binfmt \ + $(D)/usr/share/binfmts/qemu-i486 +endif +ifneq ($(DEB_HOST_ARCH_CPU),arm) + install -m644 $(CURDIR)/debian/binfmts/qemu-arm.binfmt \ + $(D)/usr/share/binfmts/qemu-arm + install -m644 $(CURDIR)/debian/binfmts/qemu-armeb.binfmt \ + $(D)/usr/share/binfmts/qemu-armeb +endif +ifneq ($(DEB_HOST_ARCH_CPU),sparc) + install -m644 $(CURDIR)/debian/binfmts/qemu-sparc.binfmt \ + $(D)/usr/share/binfmts/qemu-sparc +endif +ifneq ($(DEB_HOST_ARCH_CPU),ppc) + install -m644 $(CURDIR)/debian/binfmts/qemu-ppc.binfmt \ + $(D)/usr/share/binfmts/qemu-ppc +endif +ifneq ($(DEB_HOST_ARCH_CPU),mips) + install -m644 $(CURDIR)/debian/binfmts/qemu-mips.binfmt \ + $(D)/usr/share/binfmts/qemu-mips + install -m644 $(CURDIR)/debian/binfmts/qemu-mipsel.binfmt \ + $(D)/usr/share/binfmts/qemu-mipsel +endif 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,44 @@ +#! /bin/sh +# prerm script for qemu +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +binfmt_files="qemu-arm qemu-armeb qemu-i386 qemu-i486 qemu-mips qemu-mipsel \ + qemu-ppc qemu-sparc" + +case "$1" in + remove|upgrade|deconfigure) + if [ -x /usr/sbin/update-binfmts ]; then + for i in $binfmt_files; do + test -f /usr/share/binfmts/$i && + update-binfmts --package qemu --remove $i /usr/bin/$i || 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,48 @@ +#! /bin/sh +# postinst script for qemu +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +binfmt_files="qemu-arm qemu-armeb qemu-i386 qemu-i486 qemu-mips qemu-mipsel \ + qemu-ppc qemu-sparc" + +case "$1" in + configure) + if [ -x /usr/sbin/update-binfmts ]; then + for i in $binfmt_files; do + test -f /usr/share/binfmts/$i && + 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/qemu-arm.binfmt +++ qemu-0.8.0/debian/binfmts/qemu-arm.binfmt @@ -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/qemu-armeb.binfmt +++ qemu-0.8.0/debian/binfmts/qemu-armeb.binfmt @@ -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/qemu-i386.binfmt +++ qemu-0.8.0/debian/binfmts/qemu-i386.binfmt @@ -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/qemu-i486.binfmt +++ qemu-0.8.0/debian/binfmts/qemu-i486.binfmt @@ -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/qemu-mips.binfmt +++ qemu-0.8.0/debian/binfmts/qemu-mips.binfmt @@ -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 only in patch2: unchanged: --- qemu-0.8.0.orig/debian/binfmts/qemu-mipsel.binfmt +++ qemu-0.8.0/debian/binfmts/qemu-mipsel.binfmt @@ -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/qemu-ppc.binfmt +++ qemu-0.8.0/debian/binfmts/qemu-ppc.binfmt @@ -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/qemu-sparc.binfmt +++ qemu-0.8.0/debian/binfmts/qemu-sparc.binfmt @@ -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/qemu-user-static.install +++ qemu-0.8.0/debian/qemu-user-static.install @@ -0,0 +1 @@ +debian/overrides/qemu-user-static usr/share/lintian/overrides/ only in patch2: unchanged: --- qemu-0.8.0.orig/debian/overrides/qemu-user-static +++ qemu-0.8.0/debian/overrides/qemu-user-static @@ -0,0 +1,7 @@ +qemu-user-static: shlib-with-non-pic-code usr/bin/qemu-i386-static +qemu-user-static: shlib-with-non-pic-code usr/bin/qemu-ppc-static +qemu-user-static: shlib-with-non-pic-code usr/bin/qemu-arm-static +qemu-user-static: shlib-with-non-pic-code usr/bin/qemu-armeb-static +qemu-user-static: shlib-with-non-pic-code usr/bin/qemu-mips-static +qemu-user-static: shlib-with-non-pic-code usr/bin/qemu-mipsel-static +qemu-user-static: shlib-with-non-pic-code usr/bin/qemu-sparc-static