devel/kvm kvm.spec, 1.22, 1.23 qemu-0.9.0-vnc-authentication.patch, 1.1, 1.2
Jeremy Katz (katzj)
fedora-extras-commits at redhat.com
Tue Sep 4 19:22:19 UTC 2007
Author: katzj
Update of /cvs/pkgs/devel/kvm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv359
Modified Files:
kvm.spec qemu-0.9.0-vnc-authentication.patch
Log Message:
* Tue Sep 4 2007 Jeremy Katz <katzj at redhat.com> - 36-2
- rebase vnc auth patch
Index: kvm.spec
===================================================================
RCS file: /cvs/pkgs/devel/kvm/kvm.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- kvm.spec 4 Sep 2007 19:00:54 -0000 1.22
+++ kvm.spec 4 Sep 2007 19:21:46 -0000 1.23
@@ -1,7 +1,7 @@
Summary: Kernel-based Virtual Machine
Name: kvm
Version: 36
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 and LGPLv2
Group: Development/Tools
URL: http://kvm.sf.net
@@ -42,7 +42,7 @@
%patch101 -p1
%patch102 -p0
-%patch103 -p1
+%patch103 -p1 -b .vnc
%build
LDFLAGS=-Wl,--build-id ./configure --with-patched-kernel --qemu-cc=gcc34 --kerneldir=$(pwd)/kernel --prefix=%{_prefix}
@@ -87,6 +87,9 @@
%{_sysconfdir}/sysconfig/modules/kvm.modules
%changelog
+* Tue Sep 4 2007 Jeremy Katz <katzj at redhat.com> - 36-2
+- rebase vnc auth patch
+
* Tue Sep 4 2007 Jeremy Katz <katzj at redhat.com> - 36-1
- update to kvm-36
qemu-0.9.0-vnc-authentication.patch:
Index: qemu-0.9.0-vnc-authentication.patch
===================================================================
RCS file: /cvs/pkgs/devel/kvm/qemu-0.9.0-vnc-authentication.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- qemu-0.9.0-vnc-authentication.patch 27 Aug 2007 21:43:49 -0000 1.1
+++ qemu-0.9.0-vnc-authentication.patch 4 Sep 2007 19:21:46 -0000 1.2
@@ -1,76 +1,72 @@
-diff -rupN kvm-35.orig/qemu/configure kvm-35.new/qemu/configure
---- kvm-35.orig/qemu/configure 2007-08-14 23:17:30.000000000 -0400
-+++ kvm-35.new/qemu/configure 2007-08-27 17:08:38.000000000 -0400
-@@ -86,6 +86,7 @@ alsa="no"
- fmod="no"
- fmod_lib=""
- fmod_inc=""
-+vnc_tls="yes"
- bsd="no"
- linux="no"
- kqemu="no"
-@@ -228,6 +229,8 @@ for opt do
- ;;
- --fmod-inc=*) fmod_inc="$optarg"
- ;;
-+ --disable-vnc-tls) vnc_tls="no"
-+ ;;
- --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; user="no"
- ;;
- --disable-slirp) slirp="no"
-@@ -303,6 +306,7 @@ echo " --enable-coreaudio enable
- echo " --enable-alsa enable ALSA audio driver"
- echo " --enable-fmod enable FMOD audio driver"
- echo " --enabled-dsound enable DirectSound audio driver"
-+echo " --disable-vnc-tls disable TLS encryption for VNC server"
- echo " --enable-system enable all system emulation targets"
- echo " --disable-system disable all system emulation targets"
- echo " --enable-linux-user enable all linux usermode emulation targets"
-@@ -548,6 +552,16 @@ else
- fi # -z $sdl
+diff -up kvm-36/qemu/vl.h.vnc kvm-36/qemu/vl.h
+--- kvm-36/qemu/vl.h.vnc 2007-08-21 10:09:33.000000000 -0400
++++ kvm-36/qemu/vl.h 2007-09-04 15:15:08.000000000 -0400
+@@ -118,6 +118,7 @@ void hw_error(const char *fmt, ...);
+ extern const char *bios_dir;
- ##########################################
-+# VNC TLS detection
-+if test "$vnc_tls" = "yes" ; then
-+ `pkg-config gnutls` || vnc_tls="no"
-+fi
-+if test "$vnc_tls" = "yes" ; then
-+ vnc_tls_cflags=`pkg-config --cflags gnutls`
-+ vnc_tls_libs=`pkg-config --libs gnutls`
-+fi
-+
-+##########################################
- # alsa sound support libraries
+ extern int vm_running;
++extern const char *qemu_name;
- if test "$alsa" = "yes" ; then
-@@ -632,6 +646,11 @@ else
- fmod_support=""
- fi
- echo "FMOD support $fmod $fmod_support"
-+echo "VNC TLS support $vnc_tls"
-+if test "$vnc_tls" = "yes" ; then
-+ echo " TLS CFLAGS $vnc_tls_cflags"
-+ echo " TLS LIBS $vnc_tls_libs"
-+fi
- echo "kqemu support $kqemu"
- echo "kvm support $kvm"
- echo "Documentation $build_docs"
-@@ -776,6 +795,12 @@ if test "$fmod" = "yes" ; then
- echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
- echo "#define CONFIG_FMOD 1" >> $config_h
- fi
-+if test "$vnc_tls" = "yes" ; then
-+ echo "CONFIG_VNC_TLS=yes" >> $config_mak
-+ echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_mak
-+ echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_mak
-+ echo "#define CONFIG_VNC_TLS 1" >> $config_h
-+fi
- qemu_version=`head $source_path/VERSION`
- echo "VERSION=$qemu_version" >>$config_mak
- echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
-diff -rupN kvm-35.orig/qemu/d3des.c kvm-35.new/qemu/d3des.c
---- kvm-35.orig/qemu/d3des.c 1969-12-31 19:00:00.000000000 -0500
-+++ kvm-35.new/qemu/d3des.c 2007-08-27 17:08:38.000000000 -0400
+ typedef struct vm_change_state_entry VMChangeStateEntry;
+ typedef void VMChangeStateHandler(void *opaque, int running);
+@@ -943,7 +944,10 @@ void sdl_display_init(DisplayState *ds,
+ void cocoa_display_init(DisplayState *ds, int full_screen);
+
+ /* vnc.c */
+-void vnc_display_init(DisplayState *ds, const char *display);
++void vnc_display_init(DisplayState *ds);
++void vnc_display_close(DisplayState *ds);
++int vnc_display_open(DisplayState *ds, const char *display);
++int vnc_display_password(DisplayState *ds, const char *password);
+ void do_info_vnc(void);
+
+ /* x_keymap.c */
+diff -up kvm-36/qemu/monitor.c.vnc kvm-36/qemu/monitor.c
+--- kvm-36/qemu/monitor.c.vnc 2007-08-21 10:09:33.000000000 -0400
++++ kvm-36/qemu/monitor.c 2007-09-04 15:15:08.000000000 -0400
+@@ -422,7 +422,7 @@ static void do_io_statistics(const char
+ }
+ }
+
+-static void do_change(const char *device, const char *filename)
++static void do_change_block(const char *device, const char *filename)
+ {
+ BlockDriverState *bs;
+ int i;
+@@ -447,6 +447,30 @@ static void do_change(const char *device
+ }
+ }
+
++static void do_change_vnc(const char *target)
++{
++ if (strcmp(target, "passwd") == 0 ||
++ strcmp(target, "password") == 0) {
++ char password[9];
++ monitor_readline("Password: ", 1, password, sizeof(password)-1);
++ password[sizeof(password)-1] = '\0';
++ if (vnc_display_password(NULL, password) < 0)
++ term_printf("could not set VNC server password\n");
++ } else {
++ if (vnc_display_open(NULL, target) < 0)
++ term_printf("could not start VNC server on %s\n", target);
++ }
++}
++
++static void do_change(const char *device, const char *target)
++{
++ if (strcmp(device, "vnc") == 0) {
++ do_change_vnc(target);
++ } else {
++ do_change_block(device, target);
++ }
++}
++
+ static void do_screen_dump(const char *filename)
+ {
+ vga_hw_screen_dump(filename);
+diff -up /dev/null kvm-36/qemu/d3des.c
+--- /dev/null 2007-08-31 09:05:50.271024097 -0400
++++ kvm-36/qemu/d3des.c 2007-09-04 15:15:08.000000000 -0400
@@ -0,0 +1,434 @@
+/*
+ * This is D3DES (V5.09) by Richard Outerbridge with the double and
@@ -506,64 +502,9 @@
+ *
+ * d3des V5.0a rwo 9208.07 18:44 Graven Imagery
+ **********************************************************************/
-diff -rupN kvm-35.orig/qemu/d3des.h kvm-35.new/qemu/d3des.h
---- kvm-35.orig/qemu/d3des.h 1969-12-31 19:00:00.000000000 -0500
-+++ kvm-35.new/qemu/d3des.h 2007-08-27 17:08:38.000000000 -0400
-@@ -0,0 +1,51 @@
-+/*
-+ * This is D3DES (V5.09) by Richard Outerbridge with the double and
-+ * triple-length support removed for use in VNC.
-+ *
-+ * These changes are:
-+ * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
-+ *
-+ * This software is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-+ */
-+
-+/* d3des.h -
-+ *
-+ * Headers and defines for d3des.c
-+ * Graven Imagery, 1992.
-+ *
-+ * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
-+ * (GEnie : OUTER; CIS : [71755,204])
-+ */
-+
-+#define EN0 0 /* MODE == encrypt */
-+#define DE1 1 /* MODE == decrypt */
-+
-+extern void deskey(unsigned char *, int);
-+/* hexkey[8] MODE
-+ * Sets the internal key register according to the hexadecimal
-+ * key contained in the 8 bytes of hexkey, according to the DES,
-+ * for encryption or decryption according to MODE.
-+ */
-+
-+extern void usekey(unsigned long *);
-+/* cookedkey[32]
-+ * Loads the internal key register with the data in cookedkey.
-+ */
-+
-+extern void cpkey(unsigned long *);
-+/* cookedkey[32]
-+ * Copies the contents of the internal key register into the storage
-+ * located at &cookedkey[0].
-+ */
-+
-+extern void des(unsigned char *, unsigned char *);
-+/* from[8] to[8]
-+ * Encrypts/Decrypts (according to the key currently loaded in the
-+ * internal key register) one block of eight bytes at address 'from'
-+ * into the block at address 'to'. They can be the same.
-+ */
-+
-+/* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
-+ ********************************************************************/
-diff -rupN kvm-35.orig/qemu/Makefile.target kvm-35.new/qemu/Makefile.target
---- kvm-35.orig/qemu/Makefile.target 2007-08-14 23:17:30.000000000 -0400
-+++ kvm-35.new/qemu/Makefile.target 2007-08-27 17:08:38.000000000 -0400
+diff -up kvm-36/qemu/Makefile.target.vnc kvm-36/qemu/Makefile.target
+--- kvm-36/qemu/Makefile.target.vnc 2007-08-21 10:09:33.000000000 -0400
++++ kvm-36/qemu/Makefile.target 2007-09-04 15:15:08.000000000 -0400
@@ -365,6 +365,11 @@ LIBS += -lkvm
DEPLIBS += ../user/libkvm.a
endif
@@ -594,146 +535,9 @@
$(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
sdlaudio.o: sdlaudio.c
-diff -rupN kvm-35.orig/qemu/monitor.c kvm-35.new/qemu/monitor.c
---- kvm-35.orig/qemu/monitor.c 2007-08-14 23:17:30.000000000 -0400
-+++ kvm-35.new/qemu/monitor.c 2007-08-27 17:08:38.000000000 -0400
-@@ -422,7 +422,7 @@ static void do_io_statistics(const char
- }
- }
-
--static void do_change(const char *device, const char *filename)
-+static void do_change_block(const char *device, const char *filename)
- {
- BlockDriverState *bs;
- int i;
-@@ -447,6 +447,30 @@ static void do_change(const char *device
- }
- }
-
-+static void do_change_vnc(const char *target)
-+{
-+ if (strcmp(target, "passwd") == 0 ||
-+ strcmp(target, "password") == 0) {
-+ char password[9];
-+ monitor_readline("Password: ", 1, password, sizeof(password)-1);
-+ password[sizeof(password)-1] = '\0';
-+ if (vnc_display_password(NULL, password) < 0)
-+ term_printf("could not set VNC server password\n");
-+ } else {
-+ if (vnc_display_open(NULL, target) < 0)
-+ term_printf("could not start VNC server on %s\n", target);
-+ }
-+}
-+
-+static void do_change(const char *device, const char *target)
-+{
-+ if (strcmp(device, "vnc") == 0) {
-+ do_change_vnc(target);
-+ } else {
-+ do_change_block(device, target);
-+ }
-+}
-+
- static void do_screen_dump(const char *filename)
- {
- vga_hw_screen_dump(filename);
-diff -rupN kvm-35.orig/qemu/vl.c kvm-35.new/qemu/vl.c
---- kvm-35.orig/qemu/vl.c 2007-08-27 17:07:03.000000000 -0400
-+++ kvm-35.new/qemu/vl.c 2007-08-27 17:11:10.000000000 -0400
-@@ -180,6 +180,7 @@ const char *option_rom[MAX_OPTION_ROMS];
- int nb_option_roms;
- int semihosting_enabled = 0;
- int autostart = 1;
-+const char *qemu_name;
- int time_drift_fix = 0;
- const char *cpu_vendor_string;
-
-@@ -6227,12 +6228,10 @@ void main_loop_wait(int timeout)
- IOHandlerRecord **pioh;
-
- for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) {
-- if (ioh->deleted)
-- continue;
-- if (FD_ISSET(ioh->fd, &rfds)) {
-+ if (!ioh->deleted && ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) {
- ioh->fd_read(ioh->opaque);
- }
-- if (FD_ISSET(ioh->fd, &wfds)) {
-+ if (!ioh->deleted && ioh->fd_write && FD_ISSET(ioh->fd, &wfds)) {
- ioh->fd_write(ioh->opaque);
- }
- }
-@@ -6404,6 +6403,7 @@ void help(void)
- #if defined(TARGET_PPC) || defined(TARGET_SPARC)
- "-g WxH[xDEPTH] Set the initial graphical resolution and depth\n"
- #endif
-+ "-name string set the name of the guest\n"
- "\n"
- "Network options:\n"
- "-net nic[,vlan=n][,macaddr=addr][,model=type]\n"
-@@ -6570,6 +6570,7 @@ enum {
- QEMU_OPTION_daemonize,
- QEMU_OPTION_option_rom,
- QEMU_OPTION_semihosting,
-+ QEMU_OPTION_name,
- QEMU_OPTION_incoming,
- QEMU_OPTION_tdf,
- #if defined(__linux__)
-@@ -6668,6 +6669,7 @@ const QEMUOption qemu_options[] = {
- #if defined(TARGET_ARM)
- { "semihosting", 0, QEMU_OPTION_semihosting },
- #endif
-+ { "name", HAS_ARG, QEMU_OPTION_name },
- { "tdf", 0, QEMU_OPTION_tdf }, /* enable time drift fix */
- #if defined(__linux__)
- { "no-rtc", 0, QEMU_OPTION_no_rtc },
-@@ -7389,6 +7391,9 @@ int main(int argc, char **argv)
- case QEMU_OPTION_semihosting:
- semihosting_enabled = 1;
- break;
-+ case QEMU_OPTION_name:
-+ qemu_name = optarg;
-+ break;
- case QEMU_OPTION_tdf:
- time_drift_fix = 1;
- #if defined(__linux__)
-@@ -7616,7 +7621,9 @@ int main(int argc, char **argv)
- if (nographic) {
- dumb_display_init(ds);
- } else if (vnc_display != NULL) {
-- vnc_display_init(ds, vnc_display);
-+ vnc_display_init(ds);
-+ if (vnc_display_open(ds, vnc_display) < 0)
-+ exit(1);
- } else {
- #if defined(CONFIG_SDL)
- sdl_display_init(ds, full_screen);
-diff -rupN kvm-35.orig/qemu/vl.h kvm-35.new/qemu/vl.h
---- kvm-35.orig/qemu/vl.h 2007-08-14 23:17:30.000000000 -0400
-+++ kvm-35.new/qemu/vl.h 2007-08-27 17:08:38.000000000 -0400
-@@ -118,6 +118,7 @@ void hw_error(const char *fmt, ...);
- extern const char *bios_dir;
-
- extern int vm_running;
-+extern const char *qemu_name;
-
- typedef struct vm_change_state_entry VMChangeStateEntry;
- typedef void VMChangeStateHandler(void *opaque, int running);
-@@ -943,7 +944,10 @@ void sdl_display_init(DisplayState *ds,
- void cocoa_display_init(DisplayState *ds, int full_screen);
-
- /* vnc.c */
--void vnc_display_init(DisplayState *ds, const char *display);
-+void vnc_display_init(DisplayState *ds);
-+void vnc_display_close(DisplayState *ds);
-+int vnc_display_open(DisplayState *ds, const char *display);
-+int vnc_display_password(DisplayState *ds, const char *password);
- void do_info_vnc(void);
-
- /* x_keymap.c */
-diff -rupN kvm-35.orig/qemu/vnc.c kvm-35.new/qemu/vnc.c
---- kvm-35.orig/qemu/vnc.c 2007-08-14 23:17:30.000000000 -0400
-+++ kvm-35.new/qemu/vnc.c 2007-08-27 17:11:58.000000000 -0400
+diff -up kvm-36/qemu/vnc.c.vnc kvm-36/qemu/vnc.c
+--- kvm-36/qemu/vnc.c.vnc 2007-08-21 10:09:33.000000000 -0400
++++ kvm-36/qemu/vnc.c 2007-09-04 15:15:09.000000000 -0400
@@ -30,6 +30,28 @@
#include "vnc_keysym.h"
@@ -952,23 +756,7 @@
vs->width = vs->ds->width;
vs->height = vs->ds->height;
-@@ -1109,8 +1259,13 @@ static int protocol_client_init(VncState
-
- vnc_write(vs, pad, 3); /* padding */
-
-- vnc_write_u32(vs, 4);
-- vnc_write(vs, "QEMU", 4);
-+ if (qemu_name)
-+ size = snprintf(buf, sizeof(buf), "QEMU (%s)", qemu_name);
-+ else
-+ size = snprintf(buf, sizeof(buf), "QEMU");
-+
-+ vnc_write_u32(vs, size);
-+ vnc_write(vs, buf, size);
- vnc_flush(vs);
-
- vnc_read_when(vs, protocol_client_msg, 1);
-@@ -1118,23 +1273,587 @@ static int protocol_client_init(VncState
+@@ -1126,23 +1276,587 @@ static int protocol_client_init(VncState
return 0;
}
@@ -1563,7 +1351,7 @@
return 0;
}
-@@ -1147,9 +1866,10 @@ static void vnc_listen_read(void *opaque
+@@ -1155,9 +1869,10 @@ static void vnc_listen_read(void *opaque
vs->csock = accept(vs->lsock, (struct sockaddr *)&addr, &addrlen);
if (vs->csock != -1) {
@@ -1575,7 +1363,7 @@
vnc_flush(vs);
vnc_read_when(vs, protocol_version, 12);
memset(vs->old_data, 0, vs->ds->linesize * vs->ds->height);
-@@ -1162,16 +1882,8 @@ static void vnc_listen_read(void *opaque
+@@ -1170,16 +1885,8 @@ static void vnc_listen_read(void *opaque
extern int parse_host_port(struct sockaddr_in *saddr, const char *str);
@@ -1593,7 +1381,7 @@
VncState *vs;
vs = qemu_mallocz(sizeof(VncState));
-@@ -1180,7 +1892,8 @@ void vnc_display_init(DisplayState *ds,
+@@ -1188,7 +1895,8 @@ void vnc_display_init(DisplayState *ds,
ds->opaque = vs;
vnc_state = vs;
@@ -1603,7 +1391,7 @@
vs->lsock = -1;
vs->csock = -1;
-@@ -1205,16 +1918,232 @@ void vnc_display_init(DisplayState *ds,
+@@ -1213,16 +1921,232 @@ void vnc_display_init(DisplayState *ds,
memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row));
vnc_dpy_resize(vs->ds, 640, 400);
@@ -1838,7 +1626,7 @@
}
uaddr.sun_family = AF_UNIX;
-@@ -1228,40 +2157,53 @@ void vnc_display_init(DisplayState *ds,
+@@ -1236,40 +2160,53 @@ void vnc_display_init(DisplayState *ds,
addr = (struct sockaddr *)&iaddr;
addrlen = sizeof(iaddr);
@@ -1907,3 +1695,199 @@
- }
+ return qemu_set_fd_handler2(vs->lsock, vnc_listen_poll, vnc_listen_read, NULL, vs);
}
+diff -up /dev/null kvm-36/qemu/d3des.h
+--- /dev/null 2007-08-31 09:05:50.271024097 -0400
++++ kvm-36/qemu/d3des.h 2007-09-04 15:15:08.000000000 -0400
+@@ -0,0 +1,51 @@
++/*
++ * This is D3DES (V5.09) by Richard Outerbridge with the double and
++ * triple-length support removed for use in VNC.
++ *
++ * These changes are:
++ * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
++ *
++ * This software is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++/* d3des.h -
++ *
++ * Headers and defines for d3des.c
++ * Graven Imagery, 1992.
++ *
++ * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
++ * (GEnie : OUTER; CIS : [71755,204])
++ */
++
++#define EN0 0 /* MODE == encrypt */
++#define DE1 1 /* MODE == decrypt */
++
++extern void deskey(unsigned char *, int);
++/* hexkey[8] MODE
++ * Sets the internal key register according to the hexadecimal
++ * key contained in the 8 bytes of hexkey, according to the DES,
++ * for encryption or decryption according to MODE.
++ */
++
++extern void usekey(unsigned long *);
++/* cookedkey[32]
++ * Loads the internal key register with the data in cookedkey.
++ */
++
++extern void cpkey(unsigned long *);
++/* cookedkey[32]
++ * Copies the contents of the internal key register into the storage
++ * located at &cookedkey[0].
++ */
++
++extern void des(unsigned char *, unsigned char *);
++/* from[8] to[8]
++ * Encrypts/Decrypts (according to the key currently loaded in the
++ * internal key register) one block of eight bytes at address 'from'
++ * into the block at address 'to'. They can be the same.
++ */
++
++/* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
++ ********************************************************************/
+diff -up kvm-36/qemu/configure.vnc kvm-36/qemu/configure
+--- kvm-36/qemu/configure.vnc 2007-08-21 10:09:33.000000000 -0400
++++ kvm-36/qemu/configure 2007-09-04 15:15:08.000000000 -0400
+@@ -86,6 +86,7 @@ alsa="no"
+ fmod="no"
+ fmod_lib=""
+ fmod_inc=""
++vnc_tls="yes"
+ bsd="no"
+ linux="no"
+ kqemu="no"
+@@ -228,6 +229,8 @@ for opt do
+ ;;
+ --fmod-inc=*) fmod_inc="$optarg"
+ ;;
++ --disable-vnc-tls) vnc_tls="no"
++ ;;
+ --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; user="no"
+ ;;
+ --disable-slirp) slirp="no"
+@@ -303,6 +306,7 @@ echo " --enable-coreaudio enable
+ echo " --enable-alsa enable ALSA audio driver"
+ echo " --enable-fmod enable FMOD audio driver"
+ echo " --enabled-dsound enable DirectSound audio driver"
++echo " --disable-vnc-tls disable TLS encryption for VNC server"
+ echo " --enable-system enable all system emulation targets"
+ echo " --disable-system disable all system emulation targets"
+ echo " --enable-linux-user enable all linux usermode emulation targets"
+@@ -548,6 +552,16 @@ else
+ fi # -z $sdl
+
+ ##########################################
++# VNC TLS detection
++if test "$vnc_tls" = "yes" ; then
++ `pkg-config gnutls` || vnc_tls="no"
++fi
++if test "$vnc_tls" = "yes" ; then
++ vnc_tls_cflags=`pkg-config --cflags gnutls`
++ vnc_tls_libs=`pkg-config --libs gnutls`
++fi
++
++##########################################
+ # alsa sound support libraries
+
+ if test "$alsa" = "yes" ; then
+@@ -632,6 +646,11 @@ else
+ fmod_support=""
+ fi
+ echo "FMOD support $fmod $fmod_support"
++echo "VNC TLS support $vnc_tls"
++if test "$vnc_tls" = "yes" ; then
++ echo " TLS CFLAGS $vnc_tls_cflags"
++ echo " TLS LIBS $vnc_tls_libs"
++fi
+ echo "kqemu support $kqemu"
+ echo "kvm support $kvm"
+ echo "Documentation $build_docs"
+@@ -776,6 +795,12 @@ if test "$fmod" = "yes" ; then
+ echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
+ echo "#define CONFIG_FMOD 1" >> $config_h
+ fi
++if test "$vnc_tls" = "yes" ; then
++ echo "CONFIG_VNC_TLS=yes" >> $config_mak
++ echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_mak
++ echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_mak
++ echo "#define CONFIG_VNC_TLS 1" >> $config_h
++fi
+ qemu_version=`head $source_path/VERSION`
+ echo "VERSION=$qemu_version" >>$config_mak
+ echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
+diff -up kvm-36/qemu/vl.c.vnc kvm-36/qemu/vl.c
+--- kvm-36/qemu/vl.c.vnc 2007-09-04 15:15:08.000000000 -0400
++++ kvm-36/qemu/vl.c 2007-09-04 15:15:08.000000000 -0400
+@@ -184,6 +184,7 @@ const char *option_rom[MAX_OPTION_ROMS];
+ int nb_option_roms;
+ int semihosting_enabled = 0;
+ int autostart = 1;
++const char *qemu_name;
+ int time_drift_fix = 0;
+ const char *cpu_vendor_string;
+
+@@ -6231,12 +6232,10 @@ void main_loop_wait(int timeout)
+ IOHandlerRecord **pioh;
+
+ for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) {
+- if (ioh->deleted)
+- continue;
+- if (FD_ISSET(ioh->fd, &rfds)) {
++ if (!ioh->deleted && ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) {
+ ioh->fd_read(ioh->opaque);
+ }
+- if (FD_ISSET(ioh->fd, &wfds)) {
++ if (!ioh->deleted && ioh->fd_write && FD_ISSET(ioh->fd, &wfds)) {
+ ioh->fd_write(ioh->opaque);
+ }
+ }
+@@ -6408,6 +6407,7 @@ void help(void)
+ #if defined(TARGET_PPC) || defined(TARGET_SPARC)
+ "-g WxH[xDEPTH] Set the initial graphical resolution and depth\n"
+ #endif
++ "-name string set the name of the guest\n"
+ "\n"
+ "Network options:\n"
+ "-net nic[,vlan=n][,macaddr=addr][,model=type]\n"
+@@ -6574,6 +6574,7 @@ enum {
+ QEMU_OPTION_daemonize,
+ QEMU_OPTION_option_rom,
+ QEMU_OPTION_semihosting,
++ QEMU_OPTION_name,
+ QEMU_OPTION_incoming,
+ QEMU_OPTION_tdf,
+ #if defined(__linux__)
+@@ -6672,6 +6673,7 @@ const QEMUOption qemu_options[] = {
+ #if defined(TARGET_ARM)
+ { "semihosting", 0, QEMU_OPTION_semihosting },
+ #endif
++ { "name", HAS_ARG, QEMU_OPTION_name },
+ { "tdf", 0, QEMU_OPTION_tdf }, /* enable time drift fix */
+ #if defined(__linux__)
+ { "no-rtc", 0, QEMU_OPTION_no_rtc },
+@@ -7393,6 +7395,9 @@ int main(int argc, char **argv)
+ case QEMU_OPTION_semihosting:
+ semihosting_enabled = 1;
+ break;
++ case QEMU_OPTION_name:
++ qemu_name = optarg;
++ break;
+ case QEMU_OPTION_tdf:
+ time_drift_fix = 1;
+ #if defined(__linux__)
+@@ -7620,7 +7625,9 @@ int main(int argc, char **argv)
+ if (nographic) {
+ dumb_display_init(ds);
+ } else if (vnc_display != NULL) {
+- vnc_display_init(ds, vnc_display);
++ vnc_display_init(ds);
++ if (vnc_display_open(ds, vnc_display) < 0)
++ exit(1);
+ } else {
+ #if defined(CONFIG_SDL)
+ sdl_display_init(ds, full_screen);
More information about the fedora-extras-commits
mailing list