- Use the devel KVM spec file as base for EL-5 qemu

- Rebase to stable qemu 0.10.5
This commit is contained in:
Lubomir Rintel 2009-05-24 11:20:56 +00:00
parent 16e93a00d6
commit 36e4d3c218
10 changed files with 507 additions and 499 deletions

View File

@ -1 +1 @@
qemu-0.9.1.tar.gz
qemu-0.10.5.tar.gz

View File

@ -0,0 +1,100 @@
commit 1625af873aa8c9e4d22ad50a08e877110bf40623
Author: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Date: Sun Apr 5 17:41:02 2009 +0000
Make binary stripping conditional (Riku Voipio)
Currently qemu unconditionally strips binaries on install. This
is a problem for packagers who may want to store/ship debug symbols
of compiled packages for debugging purposes.
Keep stripping as default for the oldtimers and add a
--disable-strip flag to override.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6983 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/Makefile b/Makefile
index 50914c4..a9e851f 100644
--- a/Makefile
+++ b/Makefile
@@ -251,7 +251,7 @@ endif
install: all $(if $(BUILD_DOCS),install-doc)
mkdir -p "$(DESTDIR)$(bindir)"
ifneq ($(TOOLS),)
- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
+ $(INSTALL) -m 755 $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
endif
ifneq ($(BLOBS),)
mkdir -p "$(DESTDIR)$(datadir)"
diff --git a/Makefile.target b/Makefile.target
index 353ba6c..b32d1af 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -749,7 +749,7 @@ clean:
install: all
ifneq ($(PROGS),)
- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
+ $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
endif
# Include automatically generated dependency files
diff --git a/configure b/configure
index fa77937..e974834 100755
--- a/configure
+++ b/configure
@@ -154,6 +154,7 @@ case "$cpu" in
esac
gprof="no"
sparse="no"
+strip_opt="yes"
bigendian="no"
mingw32="no"
EXESUF=""
@@ -396,6 +397,8 @@ for opt do
;;
--disable-sparse) sparse="no"
;;
+ --disable-strip) strip_opt="no"
+ ;;
--disable-vnc-tls) vnc_tls="no"
;;
--disable-vnc-sasl) vnc_sasl="no"
@@ -556,6 +559,7 @@ echo " --install=INSTALL use specified install [$install]"
echo " --static enable static build [$static]"
echo " --enable-sparse enable sparse checker"
echo " --disable-sparse disable sparse checker (default)"
+echo " --disable-strip disable stripping binaries"
echo " --disable-werror disable compilation abort on warning"
echo " --disable-sdl disable SDL"
echo " --enable-cocoa enable COCOA (Mac OS X only)"
@@ -1177,6 +1181,7 @@ echo "host big endian $bigendian"
echo "target list $target_list"
echo "gprof enabled $gprof"
echo "sparse enabled $sparse"
+echo "strip binaries $strip_opt"
echo "profiler $profiler"
echo "static build $static"
echo "-Werror enabled $werror"
@@ -1251,7 +1256,6 @@ echo "INSTALL=$install" >> $config_mak
echo "CC=$cc" >> $config_mak
echo "HOST_CC=$host_cc" >> $config_mak
echo "AR=$ar" >> $config_mak
-echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
# XXX: only use CFLAGS and LDFLAGS ?
# XXX: should export HOST_CFLAGS and HOST_LDFLAGS for cross
# compilation of dyngen tool (useful for win32 build on Linux host)
@@ -1338,6 +1342,9 @@ if test "$sparse" = "yes" ; then
echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_mak
echo "CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_mak
fi
+if test "$strip_opt" = "yes" ; then
+ echo "STRIP_OPT=-s" >> $config_mak
+fi
if test "$bigendian" = "yes" ; then
echo "WORDS_BIGENDIAN=yes" >> $config_mak
echo "#define WORDS_BIGENDIAN 1" >> $config_h

View File

@ -1,11 +0,0 @@
--- qemu-0.7.0/Makefile.target.orig 2005-04-27 21:52:05.000000000 +0100
+++ qemu-0.7.0/Makefile.target 2005-04-30 11:01:41.000000000 +0100
@@ -463,7 +463,7 @@
install: all
ifneq ($(PROGS),)
- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
endif
ifneq ($(wildcard .depend),)

View File

@ -1,82 +0,0 @@
===================================================================
RCS file: /sources/qemu/qemu/target-i386/translate.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- qemu/target-i386/translate.c 2006/07/10 19:53:04 1.59
+++ qemu/target-i386/translate.c 2006/09/03 17:09:02 1.60
@@ -1615,6 +1615,56 @@
*offset_ptr = disp;
}
+static void gen_nop_modrm(DisasContext *s, int modrm)
+{
+ int mod, rm, base, code;
+
+ mod = (modrm >> 6) & 3;
+ if (mod == 3)
+ return;
+ rm = modrm & 7;
+
+ if (s->aflag) {
+
+ base = rm;
+
+ if (base == 4) {
+ code = ldub_code(s->pc++);
+ base = (code & 7);
+ }
+
+ switch (mod) {
+ case 0:
+ if (base == 5) {
+ s->pc += 4;
+ }
+ break;
+ case 1:
+ s->pc++;
+ break;
+ default:
+ case 2:
+ s->pc += 4;
+ break;
+ }
+ } else {
+ switch (mod) {
+ case 0:
+ if (rm == 6) {
+ s->pc += 2;
+ }
+ break;
+ case 1:
+ s->pc++;
+ break;
+ default:
+ case 2:
+ s->pc += 2;
+ break;
+ }
+ }
+}
+
/* used for LEA and MOV AX, mem */
static void gen_add_A0_ds_seg(DisasContext *s)
{
@@ -5791,10 +5841,15 @@
gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
/* nothing more to do */
break;
- default:
- goto illegal_op;
+ default: /* nop (multi byte) */
+ gen_nop_modrm(s, modrm);
+ break;
}
break;
+ case 0x119 ... 0x11f: /* nop (multi byte) */
+ modrm = ldub_code(s->pc++);
+ gen_nop_modrm(s, modrm);
+ break;
case 0x120: /* mov reg, crN */
case 0x122: /* mov crN, reg */
if (s->cpl != 0) {

View File

@ -1,212 +0,0 @@
diff -rup qemu-0.9.1.orig/block.c qemu-0.9.1.new/block.c
--- qemu-0.9.1.orig/block.c 2008-02-26 18:03:00.000000000 -0500
+++ qemu-0.9.1.new/block.c 2008-02-26 18:05:26.000000000 -0500
@@ -123,6 +123,60 @@ void path_combine(char *dest, int dest_s
}
}
+static int bdrv_rd_badreq_sectors(BlockDriverState *bs,
+ int64_t sector_num, int nb_sectors)
+{
+ return
+ nb_sectors < 0 ||
+ sector_num < 0 ||
+ nb_sectors > bs->total_sectors ||
+ sector_num > bs->total_sectors - nb_sectors;
+}
+
+static int bdrv_rd_badreq_bytes(BlockDriverState *bs,
+ int64_t offset, int count)
+{
+ int64_t size = bs->total_sectors << SECTOR_BITS;
+ return
+ count < 0 ||
+ size < 0 ||
+ count > size ||
+ offset > size - count;
+}
+
+static int bdrv_wr_badreq_sectors(BlockDriverState *bs,
+ int64_t sector_num, int nb_sectors)
+{
+ if (sector_num < 0 ||
+ nb_sectors < 0)
+ return 1;
+
+ if (sector_num > bs->total_sectors - nb_sectors) {
+ if (bs->autogrow)
+ bs->total_sectors = sector_num + nb_sectors;
+ else
+ return 1;
+ }
+ return 0;
+}
+
+static int bdrv_wr_badreq_bytes(BlockDriverState *bs,
+ int64_t offset, int count)
+{
+ int64_t size = bs->total_sectors << SECTOR_BITS;
+ if (count < 0 ||
+ offset < 0)
+ return 1;
+
+ if (offset > size - count) {
+ if (bs->autogrow)
+ bs->total_sectors = (offset + count + SECTOR_SIZE - 1) >> SECTOR_BITS;
+ else
+ return 1;
+ }
+ return 0;
+}
+
static void bdrv_register(BlockDriver *bdrv)
{
@@ -331,6 +385,10 @@ int bdrv_open2(BlockDriverState *bs, con
bs->read_only = 0;
bs->is_temporary = 0;
bs->encrypted = 0;
+ bs->autogrow = 0;
+
+ if (flags & BDRV_O_AUTOGROW)
+ bs->autogrow = 1;
if (flags & BDRV_O_SNAPSHOT) {
BlockDriverState *bs1;
@@ -375,6 +433,7 @@ int bdrv_open2(BlockDriverState *bs, con
}
bs->drv = drv;
bs->opaque = qemu_mallocz(drv->instance_size);
+ bs->total_sectors = 0; /* driver will set if it does not do getlength */
if (bs->opaque == NULL && drv->instance_size > 0)
return -1;
/* Note: for compatibility, we open disk image files as RDWR, and
@@ -440,6 +499,7 @@ void bdrv_close(BlockDriverState *bs)
bs->drv = NULL;
/* call the change callback */
+ bs->total_sectors = 0;
bs->media_changed = 1;
if (bs->change_cb)
bs->change_cb(bs->change_opaque);
@@ -505,6 +565,8 @@ int bdrv_read(BlockDriverState *bs, int6
if (!drv)
return -ENOMEDIUM;
+ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors))
+ return -EDOM;
if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
memcpy(buf, bs->boot_sector_data, 512);
sector_num++;
@@ -545,6 +607,8 @@ int bdrv_write(BlockDriverState *bs, int
return -ENOMEDIUM;
if (bs->read_only)
return -EACCES;
+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors))
+ return -EDOM;
if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
memcpy(bs->boot_sector_data, buf, 512);
}
@@ -670,6 +734,8 @@ int bdrv_pread(BlockDriverState *bs, int
return -ENOMEDIUM;
if (!drv->bdrv_pread)
return bdrv_pread_em(bs, offset, buf1, count1);
+ if (bdrv_rd_badreq_bytes(bs, offset, count1))
+ return -EDOM;
return drv->bdrv_pread(bs, offset, buf1, count1);
}
@@ -685,6 +751,8 @@ int bdrv_pwrite(BlockDriverState *bs, in
return -ENOMEDIUM;
if (!drv->bdrv_pwrite)
return bdrv_pwrite_em(bs, offset, buf1, count1);
+ if (bdrv_wr_badreq_bytes(bs, offset, count1))
+ return -EDOM;
return drv->bdrv_pwrite(bs, offset, buf1, count1);
}
@@ -951,6 +1019,8 @@ int bdrv_write_compressed(BlockDriverSta
return -ENOMEDIUM;
if (!drv->bdrv_write_compressed)
return -ENOTSUP;
+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors))
+ return -EDOM;
return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors);
}
@@ -1097,6 +1167,8 @@ BlockDriverAIOCB *bdrv_aio_read(BlockDri
if (!drv)
return NULL;
+ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors))
+ return NULL;
/* XXX: we assume that nb_sectors == 0 is suppored by the async read */
if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
@@ -1128,6 +1200,8 @@ BlockDriverAIOCB *bdrv_aio_write(BlockDr
return NULL;
if (bs->read_only)
return NULL;
+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors))
+ return NULL;
if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
memcpy(bs->boot_sector_data, buf, 512);
}
diff -rup qemu-0.9.1.orig/block.h qemu-0.9.1.new/block.h
--- qemu-0.9.1.orig/block.h 2008-01-06 14:38:42.000000000 -0500
+++ qemu-0.9.1.new/block.h 2008-02-26 17:41:47.000000000 -0500
@@ -45,6 +45,7 @@ typedef struct QEMUSnapshotInfo {
it (default for
bdrv_file_open()) */
#define BDRV_O_DIRECT 0x0020
+#define BDRV_O_AUTOGROW 0x0040 /* Allow backing file to extend when writing past end of file */
#ifndef QEMU_IMG
void bdrv_info(void);
diff -rup qemu-0.9.1.orig/block_int.h qemu-0.9.1.new/block_int.h
--- qemu-0.9.1.orig/block_int.h 2008-01-06 14:38:42.000000000 -0500
+++ qemu-0.9.1.new/block_int.h 2008-02-26 17:41:47.000000000 -0500
@@ -97,6 +97,7 @@ struct BlockDriverState {
int locked; /* if true, the media cannot temporarily be ejected */
int encrypted; /* if true, the media is encrypted */
int sg; /* if true, the device is a /dev/sg* */
+ int autogrow; /* if true, the backing store can auto-extend to allocate new extents */
/* event callback when inserting/removing */
void (*change_cb)(void *opaque);
void *change_opaque;
diff -rup qemu-0.9.1.orig/block-qcow2.c qemu-0.9.1.new/block-qcow2.c
--- qemu-0.9.1.orig/block-qcow2.c 2008-01-06 14:38:42.000000000 -0500
+++ qemu-0.9.1.new/block-qcow2.c 2008-02-26 18:01:06.000000000 -0500
@@ -191,7 +191,7 @@ static int qcow_open(BlockDriverState *b
int len, i, shift, ret;
QCowHeader header;
- ret = bdrv_file_open(&s->hd, filename, flags);
+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW);
if (ret < 0)
return ret;
if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header))
diff -rup qemu-0.9.1.orig/block-qcow.c qemu-0.9.1.new/block-qcow.c
--- qemu-0.9.1.orig/block-qcow.c 2008-01-06 14:38:41.000000000 -0500
+++ qemu-0.9.1.new/block-qcow.c 2008-02-26 18:00:53.000000000 -0500
@@ -95,7 +95,7 @@ static int qcow_open(BlockDriverState *b
int len, i, shift, ret;
QCowHeader header;
- ret = bdrv_file_open(&s->hd, filename, flags);
+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW);
if (ret < 0)
return ret;
if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header))
diff -rup qemu-0.9.1.orig/block-vmdk.c qemu-0.9.1.new/block-vmdk.c
--- qemu-0.9.1.orig/block-vmdk.c 2008-01-06 14:38:42.000000000 -0500
+++ qemu-0.9.1.new/block-vmdk.c 2008-02-26 18:02:17.000000000 -0500
@@ -376,7 +376,7 @@ static int vmdk_open(BlockDriverState *b
flags = BDRV_O_RDONLY;
fprintf(stderr, "(VMDK) image open: flags=0x%x filename=%s\n", flags, bs->filename);
- ret = bdrv_file_open(&s->hd, filename, flags);
+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW);
if (ret < 0)
return ret;
if (bdrv_pread(s->hd, 0, &magic, sizeof(magic)) != sizeof(magic))

View File

@ -1,13 +0,0 @@
Enable graphic console on isapc (addressed by upstream r5026)
Lubomir Rintel <lkundrak@v3.sk>
--- qemu-0.9.1/hw/cirrus_vga.c.orig 2008-01-06 20:38:42.000000000 +0100
+++ qemu-0.9.1/hw/cirrus_vga.c 2008-12-03 11:03:21.000000000 +0100
@@ -3197,6 +3197,7 @@ void isa_cirrus_vga_init(DisplayState *d
vga_common_init((VGAState *)s,
ds, vga_ram_base, vga_ram_offset, vga_ram_size);
cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0);
+ graphic_console_init(s->ds, s->update, s->invalidate, s->screen_dump, s);
/* XXX ISA-LFB support */
}

View File

@ -1,24 +0,0 @@
diff -rup qemu-0.9.1.orig/hw/pc.c qemu-0.9.1.new/hw/pc.c
--- qemu-0.9.1.orig/hw/pc.c 2008-01-06 14:38:42.000000000 -0500
+++ qemu-0.9.1.new/hw/pc.c 2008-01-08 17:06:27.000000000 -0500
@@ -913,7 +913,7 @@ static void pc_init1(int ram_size, int v
nd = &nd_table[i];
if (!nd->model) {
if (pci_enabled) {
- nd->model = "ne2k_pci";
+ nd->model = "rtl8139";
} else {
nd->model = "ne2k_isa";
}
diff -rup qemu-0.9.1.orig/vl.c qemu-0.9.1.new/vl.c
--- qemu-0.9.1.orig/vl.c 2008-01-06 14:38:42.000000000 -0500
+++ qemu-0.9.1.new/vl.c 2008-01-08 17:05:40.000000000 -0500
@@ -8787,7 +8787,7 @@ int main(int argc, char **argv)
char buf[1024];
if (net_boot & (1 << i)) {
if (model == NULL)
- model = "ne2k_pci";
+ model = "rtl8139";
snprintf(buf, sizeof(buf), "%s/pxe-%s.bin", bios_dir, model);
if (get_image_size(buf) > 0) {
if (nb_option_roms >= MAX_OPTION_ROMS) {

View File

@ -1,94 +0,0 @@
diff -rup qemu-0.9.1.orig/vl.c qemu-0.9.1.new/vl.c
--- qemu-0.9.1.orig/vl.c 2008-05-05 13:32:55.000000000 -0400
+++ qemu-0.9.1.new/vl.c 2008-05-05 13:33:17.000000000 -0400
@@ -2200,28 +2200,78 @@ static CharDriverState *qemu_chr_open_st
return chr;
}
+#ifdef __sun__
+/* Once Solaris has openpty(), this is going to be removed. */
+int openpty(int *amaster, int *aslave, char *name,
+ struct termios *termp, struct winsize *winp)
+{
+ const char *slave;
+ int mfd = -1, sfd = -1;
+
+ *amaster = *aslave = -1;
+
+ mfd = open("/dev/ptmx", O_RDWR | O_NOCTTY);
+ if (mfd < 0)
+ goto err;
+
+ if (grantpt(mfd) == -1 || unlockpt(mfd) == -1)
+ goto err;
+
+ if ((slave = ptsname(mfd)) == NULL)
+ goto err;
+
+ if ((sfd = open(slave, O_RDONLY | O_NOCTTY)) == -1)
+ goto err;
+
+ if (ioctl(sfd, I_PUSH, "ptem") == -1 ||
+ (termp != NULL && tcgetattr(sfd, termp) < 0))
+ goto err;
+
+ if (amaster)
+ *amaster = mfd;
+ if (aslave)
+ *aslave = sfd;
+ if (winp)
+ ioctl(sfd, TIOCSWINSZ, winp);
+
+ return 0;
+
+err:
+ if (sfd != -1)
+ close(sfd);
+ close(mfd);
+ return -1;
+}
+
+void cfmakeraw (struct termios *termios_p)
+{
+ termios_p->c_iflag &=
+ ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
+ termios_p->c_oflag &= ~OPOST;
+ termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+ termios_p->c_cflag &= ~(CSIZE|PARENB);
+ termios_p->c_cflag |= CS8;
+
+ termios_p->c_cc[VMIN] = 0;
+ termios_p->c_cc[VTIME] = 0;
+}
+#endif
+
#if defined(__linux__) || defined(__sun__)
static CharDriverState *qemu_chr_open_pty(void)
{
struct termios tty;
- char slave_name[1024];
int master_fd, slave_fd;
-#if defined(__linux__)
- /* Not satisfying */
- if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) {
+ if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) < 0) {
return NULL;
}
-#endif
- /* Disabling local echo and line-buffered output */
- tcgetattr (master_fd, &tty);
- tty.c_lflag &= ~(ECHO|ICANON|ISIG);
- tty.c_cc[VMIN] = 1;
- tty.c_cc[VTIME] = 0;
- tcsetattr (master_fd, TCSAFLUSH, &tty);
+ /* Set raw attributes on the pty. */
+ cfmakeraw(&tty);
+ tcsetattr(slave_fd, TCSAFLUSH, &tty);
- fprintf(stderr, "char device redirected to %s\n", slave_name);
+ fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));
return qemu_chr_open_fd(master_fd, master_fd);
}

466
qemu.spec
View File

@ -1,34 +1,34 @@
# For FC >= 6 we have gcc 3.4, for FC <= 5 we have gcc 3.2
%if %{!?fedora:6}%{?fedora} >= 6
%define gccver 34
%else
%define gccver 32
%endif
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 0.9.1
Release: 11%{?dist}
License: GPLv2+ and LGPLv2+
Version: 0.10.5
Release: 1
# Epoch because we pushed a qemu-1.0 package
Epoch: 2
License: GPLv2+ and LGPLv2+ and BSD
Group: Development/Tools
URL: http://www.qemu.org/
Source0: http://www.qemu.org/%{name}-%{version}.tar.gz
Source0: http://download.savannah.gnu.org/releases/qemu/%{name}-%{version}.tar.gz
Source1: qemu.init
Patch0: qemu-0.7.0-build.patch
# Change default NIC to rtl8139 to get link-state detection
Patch3: qemu-0.9.1-nic-defaults.patch
Patch4: qemu-%{version}-block-rw-range-check.patch
# Upstream SVN changeset #4338
Patch5: qemu-%{version}-pty-rawmode.patch
# Similar to upstream changeset #5026
Patch6: qemu-0.9.1-isapcvga.patch
Patch0: qemu-0.1.5-disable-strip.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL-devel compat-gcc-%{gccver} zlib-devel which texi2html gnutls-devel
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service /sbin/chkconfig
Requires(postun): /sbin/service
Requires: %{name}-img = %{version}-%{release}
ExclusiveArch: %{ix86} x86_64 ppc alpha sparc armv4l
BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel
BuildRequires: dev86
BuildRequires: pulseaudio-libs-devel
Requires: %{name}-user = %{epoch}:%{version}-%{release}
Requires: %{name}-system-x86 = %{epoch}:%{version}-%{release}
Requires: %{name}-system-sparc = %{epoch}:%{version}-%{release}
Requires: %{name}-system-arm = %{epoch}:%{version}-%{release}
Requires: %{name}-system-cris = %{epoch}:%{version}-%{release}
Requires: %{name}-system-sh4 = %{epoch}:%{version}-%{release}
Requires: %{name}-system-m68k = %{epoch}:%{version}-%{release}
Requires: %{name}-system-mips = %{epoch}:%{version}-%{release}
Requires: %{name}-system-ppc = %{epoch}:%{version}-%{release}
Requires: %{name}-img = %{epoch}:%{version}-%{release}
%define qemudocdir %{_docdir}/%{name}-%{version}
%description
QEMU is a generic and open source processor emulator which achieves a good
@ -43,75 +43,217 @@ emulation speed by using dynamic translation. QEMU has two operating modes:
As QEMU requires no host kernel patches to run, it is safe and easy to use.
%package img
Summary: QEMU is a FAST! processor emulator
%package img
Summary: QEMU command line tool for manipulating disk images
Group: Development/Tools
%description img
QEMU is a generic and open source processor emulator which achieves a good
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the command line tool for manipulating disk images
%package common
Summary: QEMU common files needed by all QEMU targets
Group: Development/Tools
%description common
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the common files needed by all QEMU targets
%package user
Summary: QEMU user mode emulation of qemu targets
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service /sbin/chkconfig
Requires(postun): /sbin/service
%description user
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the user mode emulation of qemu targets
%package system-x86
Summary: QEMU system emulator for x86
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description system-x86
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the system emulator for x86. When being run in a x86
machine that supports it, this package also provides the KVM virtualization
platform.
%package system-ppc
Summary: QEMU system emulator for ppc
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: openbios-ppc
%description system-ppc
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the system emulator for ppc
%package system-sparc
Summary: QEMU system emulator for sparc
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description system-sparc
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the system emulator for sparc
%package system-arm
Summary: QEMU system emulator for arm
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description system-arm
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the system emulator for arm
%package system-mips
Summary: QEMU system emulator for mips
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description system-mips
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the system emulator for mips
%package system-cris
Summary: QEMU system emulator for cris
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description system-cris
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the system emulator for cris
%package system-m68k
Summary: QEMU system emulator for m68k
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description system-m68k
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the system emulator for m68k
%package system-sh4
Summary: QEMU system emulator for sh4
Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description system-sh4
QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation.
This package provides the system emulator for sh4
%prep
%setup -q
%patch0 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch0 -p1 -b .disable-strip
%build
# systems like rhel build system does not have a recent enough linker so
# --build-id works. this option is used fedora 8 onwards for giving info
# to the debug packages.
build_id_available() {
echo "int main () { return 0; }" | gcc -x c -Wl,--build-id - 2>/dev/null
}
if build_id_available; then
extraldflags="-Wl,--build-id";
buildldflags="VL_LDFLAGS=-Wl,--build-id"
else
extraldflags=""
buildldflags=""
fi
./configure \
--target-list="i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu \
mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu \
ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu \
i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user \
armeb-linux-user cris-linux-user m68k-linux-user mips-linux-user \
mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user \
sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user \
sparc32plus-linux-user" \
--prefix=%{_prefix} \
--interp-prefix=%{_prefix}/qemu-%%M \
--cc=gcc%{gccver} \
--enable-alsa
# --extra-ldflags="-Wl,--build-id"
make %{?_smp_mflags} #VL_LDFLAGS="-Wl,--build-id"
--audio-drv-list=pa,sdl,alsa,oss \
--disable-strip \
--disable-kvm \
--extra-ldflags=$extraldflags \
--extra-cflags="$RPM_OPT_FLAGS"
make V=1 %{?_smp_mflags} $buildldflags
%install
rm -rf $RPM_BUILD_ROOT
make prefix="${RPM_BUILD_ROOT}%{_prefix}" \
bindir="${RPM_BUILD_ROOT}%{_bindir}" \
sharedir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" \
sharedir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" \
mandir="${RPM_BUILD_ROOT}%{_mandir}" \
docdir="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" \
datadir="${RPM_BUILD_ROOT}%{_prefix}/share/qemu" install
chmod -x ${RPM_BUILD_ROOT}%{_mandir}/man1/*
datadir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" install
install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/qemu
install -D -p -m 0644 -t ${RPM_BUILD_ROOT}/%{qemudocdir} Changelog README TODO COPYING COPYING.LIB LICENSE
%clean
rm -rf $RPM_BUILD_ROOT
%post
%post user
/sbin/chkconfig --add qemu
%preun
%preun user
if [ $1 -eq 0 ]; then
/sbin/service qemu stop &>/dev/null || :
/sbin/chkconfig --del qemu
fi
%postun
%postun user
if [ $1 -ge 1 ]; then
/sbin/service qemu condrestart &>/dev/null || :
fi
%files
%files
%defattr(-,root,root)
%files common
%defattr(-,root,root)
%doc %{qemudocdir}/Changelog
%doc %{qemudocdir}/README
%doc %{qemudocdir}/TODO
%doc %{qemudocdir}/qemu-doc.html
%doc %{qemudocdir}/qemu-tech.html
%doc %{qemudocdir}/COPYING
%doc %{qemudocdir}/COPYING.LIB
%doc %{qemudocdir}/LICENSE
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/keymaps/
%{_mandir}/man1/qemu.1*
%{_mandir}/man8/qemu-nbd.8*
%{_bindir}/qemu-nbd
%files user
%defattr(-,root,root)
%doc Changelog README TODO
%doc qemu-doc.html qemu-tech.html
%doc COPYING COPYING.LIB LICENSE
%{_sysconfdir}/rc.d/init.d/qemu
%{_bindir}/qemu
%{_bindir}/qemu-alpha
%{_bindir}/qemu-arm
%{_bindir}/qemu-armeb
%{_bindir}/qemu-cris
%{_bindir}/qemu-i386
%{_bindir}/qemu-x86_64
%{_bindir}/qemu-m68k
%{_bindir}/qemu-mips
%{_bindir}/qemu-mipsel
@ -121,25 +263,52 @@ fi
%{_bindir}/qemu-sh4
%{_bindir}/qemu-sh4eb
%{_bindir}/qemu-sparc
%{_bindir}/qemu-sparc32plus
%{_bindir}/qemu-sparc64
%{_bindir}/qemu-sparc32plus
%files system-x86
%defattr(-,root,root)
%{_bindir}/qemu
%{_bindir}/qemu-system-x86_64
%{_datadir}/%{name}/bios.bin
%{_datadir}/%{name}/vgabios.bin
%{_datadir}/%{name}/vgabios-cirrus.bin
%{_datadir}/%{name}/pxe-e1000.bin
%{_datadir}/%{name}/pxe-pcnet.bin
%{_datadir}/%{name}/pxe-rtl8139.bin
%{_datadir}/%{name}/pxe-ne2k_pci.bin
%files system-sparc
%defattr(-,root,root)
%{_bindir}/qemu-system-sparc
%{_datadir}/%{name}/openbios-sparc32
%{_datadir}/%{name}/openbios-sparc64
%files system-arm
%defattr(-,root,root)
%{_bindir}/qemu-system-arm
%files system-mips
%defattr(-,root,root)
%{_bindir}/qemu-system-mips
%{_bindir}/qemu-system-mipsel
%{_bindir}/qemu-system-ppc
%{_bindir}/qemu-system-sparc
%{_bindir}/qemu-system-x86_64
%{_bindir}/qemu-system-cris
%{_bindir}/qemu-system-m68k
%{_bindir}/qemu-system-mips64
%{_bindir}/qemu-system-mips64el
%files system-ppc
%defattr(-,root,root)
%{_bindir}/qemu-system-ppc
%{_bindir}/qemu-system-ppc64
%{_bindir}/qemu-system-ppcemb
%{_datadir}/%{name}/openbios-ppc
%{_datadir}/%{name}/video.x
%{_datadir}/%{name}/bamboo.dtb
%{_datadir}/%{name}/ppc_rom.bin
%files system-cris
%defattr(-,root,root)
%{_bindir}/qemu-system-cris
%files system-m68k
%defattr(-,root,root)
%{_bindir}/qemu-system-m68k
%files system-sh4
%defattr(-,root,root)
%{_bindir}/qemu-system-sh4
%{_bindir}/qemu-system-sh4eb
%{_bindir}/qemu-x86_64
%{_prefix}/share/qemu/
%{_mandir}/man1/qemu.1*
%files img
%defattr(-,root,root)
@ -147,8 +316,183 @@ fi
%{_mandir}/man1/qemu-img.1*
%changelog
* Wed Dec 3 2008 Lubomir Rintel <lkundrak@v3.sk> - 0.9.1-11
- Fix VGA init on isapc machines
* Sun May 24 2009 Lubomir Rintel <lkundrak@v3.sk> - 2:0.10.5-1
- Use the devel KVM spec file as base for EL-5 qemu
- Rebase to stable qemu 0.10.5
* Thu May 21 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.50-4.kvm86
- Update to kvm-86 release
- ChangeLog here: http://marc.info/?l=kvm&m=124282885729710
* Fri May 1 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.50-3.kvm85
- Really provide qemu-kvm as a metapackage for comps
* Tue Apr 28 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.50-2.kvm85
- Provide qemu-kvm as a metapackage for comps
* Mon Apr 27 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.50-1.kvm85
- Update to qemu-kvm-devel-85
- kvm-85 is based on qemu development branch, currently version 0.10.50
- Include new qemu-io utility in qemu-img package
- Re-instate -help string for boot=on to fix virtio booting with libvirt
- Drop upstreamed patches
- Fix missing kernel/include/asm symlink in upstream tarball
- Fix target-arm build
- Fix build on ppc
- Disable preadv()/pwritev() until bug #497429 is fixed
- Kill more .kernelrelease uselessness
- Make non-kvm qemu build verbose
* Fri Apr 24 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-15
- Fix source numbering typos caused by make-release addition
* Thu Apr 23 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-14
- Improve instructions for generating the tarball
* Tue Apr 21 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-13
- Enable pulseaudio driver to fix qemu lockup at shutdown (#495964)
* Tue Apr 21 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-12
- Another qcow2 image corruption fix (#496642)
* Mon Apr 20 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-11
- Fix qcow2 image corruption (#496642)
* Sun Apr 19 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-10
- Run sysconfig.modules from %post on x86_64 too (#494739)
* Sun Apr 19 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-9
- Align VGA ROM to 4k boundary - fixes 'qemu-kvm -std vga' (#494376)
* Tue Apr 14 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-8
- Provide qemu-kvm conditional on the architecture.
* Thu Apr 9 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-7
- Add a much cleaner fix for vga segfault (#494002)
* Sun Apr 5 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-6
- Fixed qcow2 segfault creating disks over 2TB. #491943
* Fri Apr 3 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-5
- Fix vga segfault under kvm-autotest (#494002)
- Kill kernelrelease hack; it's not needed
- Build with "make V=1" for more verbose logs
* Thu Apr 02 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-4
- Support botting gpxe roms.
* Wed Apr 01 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-2
- added missing patch. love for CVS.
* Wed Apr 01 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-1
- Include debuginfo for qemu-img
- Do not require qemu-common for qemu-img
- Explicitly own each of the firmware files
- remove firmwares for ppc and sparc. They should be provided by an external package.
Not that the packages exists for sparc in the secondary arch repo as noarch, but they
don't automatically get into main repos. Unfortunately it's the best we can do right
now.
- rollback a bit in time. Snapshot from avi's maint/2.6.30
- this requires the sasl patches to come back.
- with-patched-kernel comes back.
* Wed Mar 25 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10-0.12.kvm20090323git
- BuildRequires pciutils-devel for device assignment (#492076)
* Mon Mar 23 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.11.kvm20090323git
- Update to snapshot kvm20090323.
- Removed patch2 (upstream).
- use upstream's new split package.
- --with-patched-kernel flag not needed anymore
- Tell how to get the sources.
* Wed Mar 18 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.10.kvm20090310git
- Added extboot to files list.
* Wed Mar 11 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.9.kvm20090310git
- Fix wrong reference to bochs bios.
* Wed Mar 11 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.8.kvm20090310git
- fix Obsolete/Provides pair
- Use kvm bios from bochs-bios package.
- Using RPM_OPT_FLAGS in configure
- Picked back audio-drv-list from kvm package
* Tue Mar 10 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.7.kvm20090310git
- modify ppc patch
* Tue Mar 10 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.6.kvm20090310git
- updated to kvm20090310git
- removed sasl patches (already in this release)
* Tue Mar 10 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.5.kvm20090303git
- kvm.modules were being wrongly mentioned at %%install.
- update description for the x86 system package to include kvm support
- build kvm's own bios. It is still necessary while kvm uses a slightly different
irq routing mechanism
* Thu Mar 05 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.4.kvm20090303git
- seems Epoch does not go into the tags. So start back here.
* Thu Mar 05 2009 Glauber Costa <glommer@redhat.com> - 2:0.10-0.1.kvm20090303git
- Use bochs-bios instead of bochs-bios-data
- It's official: upstream set on 0.10
* Thu Mar 5 2009 Daniel P. Berrange <berrange@redhat.com> - 2:0.9.2-0.2.kvm20090303git
- Added BSD to license list, since many files are covered by BSD
* Wed Mar 04 2009 Glauber Costa <glommer@redhat.com> - 0.9.2-0.1.kvm20090303git
- missing a dot. shame on me
* Wed Mar 04 2009 Glauber Costa <glommer@redhat.com> - 0.92-0.1.kvm20090303git
- Set Epoch to 2
- Set version to 0.92. It seems upstream keep changing minds here, so pick the lowest
- Provides KVM, Obsoletes KVM
- Only install qemu-kvm in ix86 and x86_64
- Remove pkgdesc macros, as they were generating bogus output for rpm -qi.
- fix ppc and ppc64 builds
* Tue Mar 03 2009 Glauber Costa <glommer@redhat.com> - 0.10-0.3.kvm20090303git
- only execute post scripts for user package.
- added kvm tools.
* Tue Mar 03 2009 Glauber Costa <glommer@redhat.com> - 0.10-0.2.kvm20090303git
- put kvm.modules into cvs
* Tue Mar 03 2009 Glauber Costa <glommer@redhat.com> - 0.10-0.1.kvm20090303git
- Set Epoch to 1
- Build KVM (basic build, no tools yet)
- Set ppc in ExcludeArch. This is temporary, just to fix one issue at a time.
ppc users (IBM ? ;-)) please wait a little bit.
* Tue Mar 3 2009 Daniel P. Berrange <berrange@redhat.com> - 1.0-0.5.svn6666
- Support VNC SASL authentication protocol
- Fix dep on bochs-bios-data
* Tue Mar 03 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.4.svn6666
- use bios from bochs-bios package.
* Tue Mar 03 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.3.svn6666
- use vgabios from vgabios package.
* Mon Mar 02 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.2.svn6666
- use pxe roms from etherboot package.
* Mon Mar 02 2009 Glauber Costa <glommer@redhat.com> - 1.0-0.1.svn6666
- Updated to tip svn (release 6666). Featuring split packages for qemu.
Unfortunately, still using binary blobs for the bioses.
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sun Jan 11 2009 Debarshi Ray <rishi@fedoraproject.org> - 0.9.1-12
- Updated build patch. Closes Red Hat Bugzilla bug #465041.
* Wed Dec 31 2008 Dennis Gilmore <dennis@ausil.us> - 0.9.1-11
- add sparcv9 and sparc64 support
* Fri Jul 25 2008 Bill Nottingham <notting@redhat.com>
- Fix qemu-img summary (#456344)
* Wed Jun 25 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-10.fc10
- Rebuild for GNU TLS ABI change

View File

@ -1 +1 @@
6591df8e9270eb358c881de4ebea1262 qemu-0.9.1.tar.gz
60060feb98c9649a5da8b136685f76ba qemu-0.10.5.tar.gz