Compare commits

...

6 Commits
master ... f9

Author SHA1 Message Date
Fedora Release Engineering 3c1d711833 dist-git conversion 2010-07-29 10:59:22 +00:00
Bill Nottingham 5a8419de0b Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:16:15 +00:00
Dennis Gilmore 74d5ac15de enable sparc arches to build 2009-01-01 15:36:40 +00:00
Daniel P. Berrange c7c195bded Fix TTY to be in rawmode 2008-06-11 12:36:53 +00:00
Daniel P. Berrange 8e860de28c Remove bogus wildcard to avoid file duplication between RPM & sub-RPM (rhbz
#450701)
2008-06-11 10:47:25 +00:00
Jesse Keating f978ec44f1 Initialize branch F-9 for qemu 2008-04-21 17:32:39 +00:00
7 changed files with 183 additions and 24 deletions

View File

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: qemu
# $Id$
NAME := qemu
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -0,0 +1,10 @@
--- qemu-0.9.1/target-alpha/exec.h.BAD 2008-12-31 23:17:10.000000000 -0600
+++ qemu-0.9.1/target-alpha/exec.h 2008-12-31 23:17:48.000000000 -0600
@@ -24,6 +24,7 @@
#include "config.h"
#include "dyngen-exec.h"
+#include <stdint.h>
#define TARGET_LONG_BITS 64

11
qemu-0.9.1-dirent.patch Normal file
View File

@ -0,0 +1,11 @@
--- qemu-0.9.1/linux-user/syscall.c.BAD 2008-12-31 20:20:00.000000000 -0600
+++ qemu-0.9.1/linux-user/syscall.c 2008-12-31 20:20:27.000000000 -0600
@@ -66,7 +66,7 @@
#include <linux/cdrom.h>
#include <linux/hdreg.h>
#include <linux/soundcard.h>
-#include <linux/dirent.h>
+#include <dirent.h>
#include <linux/kd.h>
#include "qemu.h"

View File

@ -0,0 +1,94 @@
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);
}

View File

@ -0,0 +1,25 @@
--- qemu-0.9.1/configure.BAD 2008-12-31 20:49:19.000000000 -0600
+++ qemu-0.9.1/configure 2008-12-31 20:51:45.000000000 -0600
@@ -307,6 +307,8 @@
target_cpu="sparc"; cpu="sparc" ;;
v8plus|v8plusa) SP_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32"
target_cpu="sparc"; cpu="sparc" ;;
+ v932) SP_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v9__"; SP_LDFLAGS="-m32"
+ target_cpu="sparc"; cpu="sparc" ;;
v9) SP_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m64"
target_cpu="sparc64"; cpu="sparc64" ;;
*) echo "undefined SPARC architecture. Exiting";exit 1;;
@@ -337,11 +339,11 @@
#
# If cpu ~= sparc and sparc_cpu hasn't been defined, plug in the right
-# ARCH_CFLAGS/ARCH_LDFLAGS (assume sparc_v8plus for 32-bit and sparc_v9 for 64-bit)
+# ARCH_CFLAGS/ARCH_LDFLAGS (assume sparc_v9 for 32-bit and sparc_v9 for 64-bit)
#
case $cpu in
sparc) if test -z "$sparc_cpu" ; then
- ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v8plus__"
+ ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v9__"
ARCH_LDFLAGS="-m32"
else
ARCH_CFLAGS="${SP_CFLAGS}"

View File

@ -8,7 +8,7 @@
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 0.9.1
Release: 5%{?dist}
Release: 7%{?dist}
License: GPLv2+ and LGPLv2+
Group: Development/Tools
URL: http://www.qemu.org/
@ -18,13 +18,18 @@ 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
Patch6: qemu-0.9.1-alpha-int.patch
Patch7: qemu-0.9.1-dirent.patch
Patch8: qemu-0.9.1-sparc-configure.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
ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 sparc64 armv4l
%description
QEMU is a generic and open source processor emulator which achieves a good
@ -54,13 +59,25 @@ This package provides the command line tool for manipulating disk images
%patch0 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%build
./configure \
--prefix=%{_prefix} \
--interp-prefix=%{_prefix}/qemu-%%M \
--cc=gcc%{gccver} \
%ifnarch sparcv9
--enable-alsa \
%endif
%ifarch sparcv9
--sparc_cpu=v932 \
%endif
%ifarch sparc64
--sparc_cpu=v9 \
%endif
--extra-ldflags="-Wl,--build-id"
make %{?_smp_mflags} VL_LDFLAGS="-Wl,--build-id"
@ -101,21 +118,37 @@ fi
%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-m68k
%{_bindir}/qemu-mips
%{_bindir}/qemu-mipsel
%{_bindir}/qemu-ppc
%{_bindir}/qemu-ppc64
%{_bindir}/qemu-ppc64abi32
%{_bindir}/qemu-sh4
%{_bindir}/qemu-sh4eb
%{_bindir}/qemu-sparc
%{_bindir}/qemu-sparc32plus
%{_bindir}/qemu-sparc64
%{_bindir}/qemu-system-arm
%{_bindir}/qemu-system-mips
%{_bindir}/qemu-system-mipsel
%{_bindir}/qemu-system-ppc
%{_bindir}/qemu-system-sparc
%{_bindir}/qemu-system-x86_64
%{_bindir}/qemu*
%{_bindir}/qemu-system-cris
%{_bindir}/qemu-system-m68k
%{_bindir}/qemu-system-mips64
%{_bindir}/qemu-system-mips64el
%{_bindir}/qemu-system-ppc64
%{_bindir}/qemu-system-ppcemb
%{_bindir}/qemu-system-sh4
%{_bindir}/qemu-system-sh4eb
%{_bindir}/qemu-x86_64
%{_prefix}/share/qemu/
%{_mandir}/man1/qemu.1*
@ -125,6 +158,13 @@ fi
%{_mandir}/man1/qemu-img.1*
%changelog
* Wed Dec 31 2008 Dennis Gilmore <dennis@ausil.us> - 0.9.1-7
- add sparcv9 and sparc64 support
* Wed Jun 11 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-6.fc9
- Remove bogus wildcard from files list (rhbz #450701)
- Fix text console PTYs to be in rawmode
* Wed Mar 19 2008 Daniel P. Berrange <berrange@redhat.com> - 0.9.1-5.fc9
- Split qemu-img tool into sub-package for smaller footprint installs