From nox@saturn.kn-bremen.de  Tue Oct 31 21:51:02 2006
Return-Path: <nox@saturn.kn-bremen.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7A41216A632
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 31 Oct 2006 21:51:02 +0000 (UTC)
	(envelope-from nox@saturn.kn-bremen.de)
Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8F41143DD0
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 31 Oct 2006 21:50:21 +0000 (GMT)
	(envelope-from nox@saturn.kn-bremen.de)
Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1])
	by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id k9VLo9eK031058
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 31 Oct 2006 22:50:10 +0100
Received: from saturn.kn-bremen.de (uucp@localhost)
	by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id k9VLo9nu031053
	for FreeBSD-gnats-submit@freebsd.org; Tue, 31 Oct 2006 22:50:09 +0100
Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1])
	by saturn.kn-bremen.de (8.13.6/8.13.6) with ESMTP id k9VLfEBi000294
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 31 Oct 2006 22:41:14 +0100 (CET)
	(envelope-from nox@saturn.kn-bremen.de)
Received: (from nox@localhost)
	by saturn.kn-bremen.de (8.13.6/8.13.6/Submit) id k9VLfDGg000293;
	Tue, 31 Oct 2006 22:41:13 +0100 (CET)
	(envelope-from nox)
Message-Id: <200610312141.k9VLfDGg000293@saturn.kn-bremen.de>
Date: Tue, 31 Oct 2006 22:41:13 +0100 (CET)
From: Juergen Lock <nox@jelal.kn-bremen.de>
Reply-To: Juergen Lock <nox@jelal.kn-bremen.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: update emulators/qemu to 20061031 snapshot
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         104989
>Category:       ports
>Synopsis:       update emulators/qemu to 20061031 snapshot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 31 22:00:37 GMT 2006
>Closed-Date:    Tue Oct 31 22:55:49 GMT 2006
>Last-Modified:  Tue Oct 31 23:00:31 GMT 2006
>Originator:     Juergen Lock
>Release:        FreeBSD 6.1-RELEASE-p5 i386
>Organization:
me?  organized??
>Environment:
System: FreeBSD saturn 6.1-RELEASE-p5 FreeBSD 6.1-RELEASE-p5 #0: Mon Sep 4 15:37:14 CEST 2006 nox@saturn:/ad4/usr/home/nox/src61/src/sys/i386/compile/GENERICua i386


>Description:
	
- update to 20061031 cvs snapshot (now uses aio and supports acpi and
a new qcow2 image format)
- properly respect NOPORTDOCS
- make -serial /dev/cuadX work (modified patch from this post:
	http://lists.gnu.org/archive/html/qemu-devel/2006-09/msg00201.html
, and hi Michael! :)
- add WITHOUT_SDL (hi joshe! :) and WITHOUT_CDROM_DMA knobs (the latter
to work around atapicam problems in FreeBSD guests with the now by default
enabled ide cdrom dma patch)
- use OPTIONS

>How-To-Repeat:
	n/a
>Fix:

New files: files/patch-vl.h files/patch-Makefile files/patch-vl.c-serial
	files/cdrom-dma-patch

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.57
diff -u -r1.57 Makefile
--- Makefile	20 Sep 2006 11:20:47 -0000	1.57
+++ Makefile	31 Oct 2006 20:45:44 -0000
@@ -6,83 +6,75 @@
 #
 
 PORTNAME=	qemu
-PORTVERSION=	0.8.2
-PORTREVISION=	2
+PORTVERSION=	0.8.2s.20061031
 CATEGORIES=	emulators
 MASTER_SITES=	http://www.qemu.org/:release \
+		http://qemu-forum.ipi.fi/qemu-snapshots/:snapshot \
 		http://people.fruitsalad.org/nox/qemu/:snapshot \
 		http://www.volny.cz/xnavara/qemu/:snapshot \
-		http://qemu.dad-answers.com/download/qemu/:snapshot \
 		http://people.brandeis.edu/~jcoiner/qemu_idedma/:idedma \
 		http://people.freebsd.org/~maho/qemu/:misc
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:release
-.if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS)
-DISTFILES+=	patch3_cirrus:misc
-.endif
+DISTNAME=	${PORTNAME}-snapshot-2006-10-31_05
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:snapshot
 DIST_SUBDIR=	qemu
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	nox@jelal.kn-bremen.de
 COMMENT=	QEMU CPU Emulator
 
-BUILD_DEPENDS+=	texi2html:${PORTSDIR}/textproc/texi2html
-.if defined(WITH_SAMBA)
-RUN_DEPENDS+=	${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba3
-.endif
-.if defined(WITH_KQEMU)
-BUILD_DEPENDS+=	kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod
-.endif
-
 HAS_CONFIGURE=	yes
+USE_BZIP2=	yes
 USE_GMAKE=	yes
 USE_GETOPT_LONG=	yes
-USE_SDL=	sdl
 USE_PERL5=	yes
+USE_GCC=	3.4
 PATCH_STRIP=	-p1
 CONFIGURE_ARGS+=	--prefix=${PREFIX} --cc=${CC}
 MAKE_ENV+=	BSD_MAKE="${MAKE}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
 MAN1=		qemu.1 qemu-img.1
 ONLY_FOR_ARCHS=	amd64 i386
+
+OPTIONS=	KQEMU "Build with (alpha!) accelerator module" Off \
+		HACKS_CIRRUS "Large display speedup (buggy!)" Off \
+		RTL8139_TIMER "allow use of re(4) nic with FreeBSD guests" Off \
+		SAMBA "samba dependency (for -smb)" Off \
+		SDL "SDL/X dependency (graphical output)" On \
+		CDROM_DMA "IDE CDROM DMA" On
+
+.include <bsd.port.pre.mk>
+
 WITHOUT_CPU_CFLAGS=yes	#to avoid problems with register allocation
 
+.if defined(WITHOUT_SDL)
+CONFIGURE_ARGS+=	--disable-sdl --disable-gfx-check
+.else
+USE_SDL=	sdl
+.endif
+
+.if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS)
+DISTFILES+=	patch3_cirrus:misc
+.endif
+
+.if defined(WITH_SAMBA)
+RUN_DEPENDS+=	${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba3
+.endif
+
 .if defined(WITH_KQEMU)
+BUILD_DEPENDS+=	kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod
 CONFIGURE_ARGS+=	--enable-kqemu
 .else
 CONFIGURE_ARGS+=	--disable-kqemu
 .endif
 
-.include <bsd.port.pre.mk>
+.if defined(NOPORTDOCS)
+MAKE_ARGS+=	NOPORTDOCS=${NOPORTDOCS}
+.else
+BUILD_DEPENDS+=	texi2html:${PORTSDIR}/textproc/texi2html
+.endif
 
 .if ${ARCH} == "amd64"
 MAKE_ARGS+=	ARCH=x86_64
 .endif
-USE_GCC=	3.4
-
-pre-everything::
-.if !defined(WITH_KQEMU)
-	@${ECHO_MSG} "Notice: you can build qemu with the (alpha!) kqemu accelerator kernel module"
-	@${ECHO_MSG} "by defining WITH_KQEMU."
-.endif
-.if !defined(WITH_HACKS_CIRRUS) && !defined(WITH_HACKS)
-	@${ECHO_MSG} "You can build qemu with some hacks (esp. for speedup)"
-	@${ECHO_MSG} "by defining WITH_HACKS, or specifically:"
-	@${ECHO_MSG} "2. WITH_HACKS_CIRRUS: higher speed on large display (cirrus_vga)"
-	@${ECHO_MSG} "by Juergen Pfennig"
-	@${ECHO_MSG} "http://lists.gnu.org/archive/html/qemu-devel/2006-01/msg00208.html"
-	@${ECHO_MSG} "Note: this second patch is known to cause mouse problems with some(?)"
-	@${ECHO_MSG} "versions of XP, and also minor redraw bugs with some Linux guests."
-.endif
-.if !defined(WITH_SAMBA) && !exists(${LOCALBASE}/sbin/smbd)
-	@${ECHO_MSG} "Notice: if you need qemu's -smb option (smb-export local dir to guest)"
-	@${ECHO_MSG} "then you also need samba, you can have this port install it by defining"
-	@${ECHO_MSG} "WITH_SAMBA."
-.endif
-.if !defined(WITH_RTL8139_TIMER)
-	@${ECHO_MSG} "Notice: if you want to use qemu's rtl8139c+ nic with a FreeBSD guest"
-	@${ECHO_MSG} "(qemu -net nic,model=rtl8139 -net user or tap ... - will use re(4)"
-	@${ECHO_MSG} "instead of ed(4) which should use less cpu), then you need to enable"
-	@${ECHO_MSG} "the emulated rtl8139 timer by defining WITH_RTL8139_TIMER."
-.endif
 
 post-extract:
 	@${MKDIR} ${WRKSRC}/kqemu
@@ -101,6 +93,9 @@
 .if defined(WITH_RTL8139_TIMER)
 	@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/rtl8139-re-patch
 .endif
+.if !defined(WITHOUT_CDROM_DMA)
+	@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/cdrom-dma-patch
+.endif
 	@${REINPLACE_CMD} -E \
 		-e "s,^(CFLAGS=).*,\1${CFLAGS} -fno-strict-aliasing," \
 		-e "s,^(LDFLAGS=).*,\1${LDFLAGS}," \
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v
retrieving revision 1.32
diff -u -r1.32 distinfo
--- distinfo	7 Aug 2006 16:10:26 -0000	1.32
+++ distinfo	31 Oct 2006 19:47:21 -0000
@@ -1,6 +1,6 @@
-MD5 (qemu/qemu-0.8.2.tar.gz) = 5b3a89eb2f256a8a6f3bb07f7b3f1b07
-SHA256 (qemu/qemu-0.8.2.tar.gz) = 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3
-SIZE (qemu/qemu-0.8.2.tar.gz) = 1810909
+MD5 (qemu/qemu-snapshot-2006-10-31_05.tar.bz2) = ff3943d14548b6e1b99ad3a052af5df6
+SHA256 (qemu/qemu-snapshot-2006-10-31_05.tar.bz2) = af189f92043e7280589021e2ddabe3758f413ada6db674504b67358f153bf766
+SIZE (qemu/qemu-snapshot-2006-10-31_05.tar.bz2) = 1493895
 MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810
 SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11
 SIZE (qemu/patch3_cirrus) = 8817
Index: pkg-message
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/pkg-message,v
retrieving revision 1.15
diff -u -r1.15 pkg-message
--- pkg-message	2 Sep 2006 19:50:46 -0000	1.15
+++ pkg-message	31 Oct 2006 20:01:23 -0000
@@ -52,8 +52,17 @@
 before linux loads the module or rmmod and modprobe it afterwards.
 - to avoid panics or non-working re(4) nics with FreeBSD guests if you
 use qemu -net nic,model=rtl8139 -net user or tap ... enable the emulated
-rtl8139 timer by building the port with WITH_RTL8139_TIMER defined.
+rtl8139 timer by building the port with RTL8139_TIMER enabled.
 (the rtl8139c+ that model=rtl8139 emulates needs less cpu than qemu's
 default ne2k nic which is driven by ed(4), it has not been made default
 only because it may not work with all guests yet.)
+- qemu now uses aio at least for ide dma, so if you get `Bad system call'
+crashes that is because aio is not (kld)loaded.
+- if you get repeated `atapi_poll called!' console messages with FreeBSD
+guests or other weird cdrom problems then thats probably because the guest
+has atapicam loaded, which for reasons still to be determined has problems
+with qemu's now by default enabled cdrom dma.  You can build the port with
+CDROM_DMA disabled to disable it.
+- if you build qemu wihout SDL and then get crashes running it try passing
+it -nographic.  This should probably be default in that case...
 ====
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/pkg-plist,v
retrieving revision 1.16
diff -u -r1.16 pkg-plist
--- pkg-plist	7 Aug 2006 16:10:26 -0000	1.16
+++ pkg-plist	31 Oct 2006 21:46:05 -0000
@@ -8,6 +8,7 @@
 bin/qemu-system-x86_64
 %%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html
 %%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
 %%DATADIR%%/bios.bin
 %%DATADIR%%/linux_boot.bin
 %%DATADIR%%/vgabios.bin
Index: files/patch-vl.h
@@ -0,0 +1,12 @@
+Index: qemu/vl.h
+@@ -73,6 +73,10 @@
+ #define PRIo64 "I64o"
+ #endif
+ 
++#ifndef ENOMEDIUM
++#define ENOMEDIUM 4097
++#endif
++
+ #ifdef QEMU_TOOL
+ 
+ /* we use QEMU_TOOL in the command line tools which do not depend on
Index: files/patch-Makefile
@@ -0,0 +1,11 @@
+Index: qemu/Makefile
+@@ -28,7 +28,8 @@
+ ifndef CONFIG_DARWIN
+ ifndef CONFIG_WIN32
+ ifndef CONFIG_SOLARIS
+-LIBS+=-lrt
++# XXX need ifndef CONFIG_BSD
++# LIBS+=-lrt
+ endif
+ endif
+ endif
Index: files/patch-vl.c-serial
@@ -0,0 +1,17 @@
+Index: qemu/vl.c
+@@ -1606,10 +1606,13 @@
+     cfsetospeed(&tty, spd);
+ 
+     tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
+-                          |INLCR|IGNCR|ICRNL|IXON);
+-    tty.c_oflag |= OPOST;
++                          |INLCR|IGNCR|ICRNL|IXON|IMAXBEL);
++    tty.c_oflag &= ~OPOST; /* Don't do any output processing! */
+     tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN|ISIG);
+     tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS|CSTOPB);
++#ifdef __FreeBSD__
++    cfmakeraw(&tty);
++#endif
+     switch(data_bits) {
+     default:
+     case 8:
Index: files/cdrom-dma-patch
@@ -0,0 +1,10 @@
+Index: hw/ide.c
+@@ -27,7 +27,7 @@
+ //#define DEBUG_IDE
+ //#define DEBUG_IDE_ATAPI
+ //#define DEBUG_AIO
+-#define USE_DMA_CDROM
++// #define USE_DMA_CDROM
+ 
+ /* Bits of HD_STATUS */
+ #define ERR_STAT		0x01
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue Oct 31 22:55:41 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104989 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/104989: commit references a PR
Date: Tue, 31 Oct 2006 22:55:50 +0000 (UTC)

 pav         2006-10-31 22:55:34 UTC
 
   FreeBSD ports repository
 
   Modified files:
     emulators/qemu       Makefile distinfo pkg-message pkg-plist 
   Added files:
     emulators/qemu/files cdrom-dma-patch patch-Makefile 
                          patch-vl.c-serial patch-vl.h 
   Log:
   - update to 20061031 cvs snapshot (now uses aio and supports acpi and a new
     qcow2 image format)
   - properly respect NOPORTDOCS
   - make -serial /dev/cuadX work (modified patch from this post:
     http://lists.gnu.org/archive/html/qemu-devel/2006-09/msg00201.html , and hi
     Michael! :)
   - add WITHOUT_SDL (hi joshe! :) and WITHOUT_CDROM_DMA knobs (the latter to work
     around atapicam problems in FreeBSD guests with the now by default enabled
     ide cdrom dma patch)
   - use OPTIONS
   
   PR:             ports/104989
   Submitted by:   Juergen Lock <nox@jelal.kn-bremen.de> (maintainer)
   
   Revision  Changes    Path
   1.58      +39 -44    ports/emulators/qemu/Makefile
   1.33      +3 -3      ports/emulators/qemu/distinfo
   1.1       +10 -0     ports/emulators/qemu/files/cdrom-dma-patch (new)
   1.1       +11 -0     ports/emulators/qemu/files/patch-Makefile (new)
   1.1       +17 -0     ports/emulators/qemu/files/patch-vl.c-serial (new)
   1.1       +12 -0     ports/emulators/qemu/files/patch-vl.h (new)
   1.16      +10 -1     ports/emulators/qemu/pkg-message
   1.17      +1 -1      ports/emulators/qemu/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
