From 63b6812c4351c5b6a8084d6caae72b060be647a2 Mon Sep 17 00:00:00 2001 From: Stephen Tweedie Date: Sep 20 2006 21:51:09 +0000 Subject: Don't strip qemu-dm early, so that we get proper debuginfo (danpb) Fix compile problem with latest glibc Update to xen-unstable changeset 11539 Threading fixes for libVNCserver (danpb) --- diff --git a/.cvsignore b/.cvsignore index d95beba..842a0ad 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,5 +1,2 @@ -xen-unstable-10712.tar.bz2 -xen-unstable-11251.tar.bz2 -LibVNCServer-0.8pre.tar.gz LibVNCServer-0.8.2.tar.gz -xen-unstable-11405.tar.bz2 +xen-unstable-11539.tar.bz2 diff --git a/sources b/sources index 698237e..08df713 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ -0f64d31cf34cf3c92508569cb89c1ee6 xen-unstable-11251.tar.bz2 17a18e398af6c1730f72068022a152aa LibVNCServer-0.8.2.tar.gz -e6e29722170d184a9d504d2b862406ba xen-unstable-11405.tar.bz2 +86677a4e84c51b59bca37e06ed407bf6 xen-unstable-11539.tar.bz2 diff --git a/vnc-thread-fixes.patch b/vnc-thread-fixes.patch new file mode 100644 index 0000000..1cce39b --- /dev/null +++ b/vnc-thread-fixes.patch @@ -0,0 +1,89 @@ +diff -ru xen-unstable-11405.orig/LibVNCServer-0.8.2/libvncserver/main.c xen-unstable-11405/LibVNCServer-0.8.2/libvncserver/main.c +--- xen-unstable-11405.orig/LibVNCServer-0.8.2/libvncserver/main.c 2006-05-28 16:38:26.000000000 -0400 ++++ xen-unstable-11405/LibVNCServer-0.8.2/libvncserver/main.c 2006-09-12 14:23:09.000000000 -0400 +@@ -454,13 +454,10 @@ + updateRegion = sraRgnCreateRgn(cl->modifiedRegion); + haveUpdate = sraRgnAnd(updateRegion,cl->requestedRegion); + sraRgnDestroy(updateRegion); +- } +- UNLOCK(cl->updateMutex); + +- if (!haveUpdate) { + WAIT(cl->updateCond, cl->updateMutex); +- UNLOCK(cl->updateMutex); /* we really needn't lock now. */ + } ++ UNLOCK(cl->updateMutex); + } + + /* OK, now, to save bandwidth, wait a little while for more +@@ -497,21 +494,25 @@ + while (1) { + fd_set rfds, wfds, efds; + struct timeval tv; +- int n; ++ int n, sock; ++ ++ LOCK(cl->updateMutex); ++ sock = cl->sock; ++ UNLOCK(cl->updateMutex); + + FD_ZERO(&rfds); +- FD_SET(cl->sock, &rfds); ++ FD_SET(sock, &rfds); + FD_ZERO(&efds); +- FD_SET(cl->sock, &efds); ++ FD_SET(sock, &efds); + + /* Are we transferring a file in the background? */ + FD_ZERO(&wfds); + if ((cl->fileTransfer.fd!=-1) && (cl->fileTransfer.sending==1)) +- FD_SET(cl->sock, &wfds); ++ FD_SET(sock, &wfds); + + tv.tv_sec = 60; /* 1 minute */ + tv.tv_usec = 0; +- n = select(cl->sock + 1, &rfds, &wfds, &efds, &tv); ++ n = select(sock + 1, &rfds, &wfds, &efds, &tv); + if (n < 0) { + rfbLogPerror("ReadExact: select"); + break; +@@ -523,16 +524,19 @@ + } + + /* We have some space on the transmit queue, send some data */ +- if (FD_ISSET(cl->sock, &wfds)) ++ if (FD_ISSET(sock, &wfds)) + rfbSendFileTransferChunk(cl); + +- if (FD_ISSET(cl->sock, &rfds) || FD_ISSET(cl->sock, &efds)) ++ if (FD_ISSET(sock, &rfds) || FD_ISSET(sock, &efds)) + rfbProcessClientMessage(cl); + +- if (cl->sock == -1) { +- /* Client has disconnected. */ +- break; +- } ++ LOCK(cl->updateMutex); ++ if (cl->sock == -1) { ++ UNLOCK(cl->updateMutex); ++ /* Client has disconnected. */ ++ break; ++ } ++ UNLOCK(cl->updateMutex); + } + + /* Get rid of the output thread. */ +diff -ru xen-unstable-11405.orig/LibVNCServer-0.8.2/libvncserver/rfbserver.c xen-unstable-11405/LibVNCServer-0.8.2/libvncserver/rfbserver.c +--- xen-unstable-11405.orig/LibVNCServer-0.8.2/libvncserver/rfbserver.c 2006-06-05 14:50:45.000000000 -0400 ++++ xen-unstable-11405/LibVNCServer-0.8.2/libvncserver/rfbserver.c 2006-09-12 13:02:06.000000000 -0400 +@@ -492,9 +492,9 @@ + do { + LOCK(cl->refCountMutex); + i=cl->refCount; +- UNLOCK(cl->refCountMutex); + if(i>0) + WAIT(cl->deleteCond,cl->refCountMutex); ++ UNLOCK(cl->refCountMutex); + } while(i>0); + } + #endif diff --git a/xen-compile-fixes.patch b/xen-compile-fixes.patch index df9437c..d5e46b4 100644 --- a/xen-compile-fixes.patch +++ b/xen-compile-fixes.patch @@ -34,3 +34,13 @@ AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld +--- xen-unstable-11539/tools/libxc/xc_ptrace.c.~1~ 2006-09-20 13:56:32.000000000 +0100 ++++ xen-unstable-11539/tools/libxc/xc_ptrace.c 2006-09-20 22:26:56.000000000 +0100 +@@ -617,6 +617,7 @@ + case PTRACE_POKEUSER: + case PTRACE_SYSCALL: + case PTRACE_KILL: ++ default: + goto out_unsupported; /* XXX not yet supported */ + + case PTRACE_TRACEME: diff --git a/xen.spec b/xen.spec index 679d688..bdc1d4d 100644 --- a/xen.spec +++ b/xen.spec @@ -1,17 +1,18 @@ %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -%define changeset 11405 +%define changeset 11539 Summary: Xen is a virtual machine monitor Name: xen Version: 3.0.2 -Release: 33 +Release: 35 Group: Development/Libraries License: GPL URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html Source0: xen-unstable-%{changeset}.tar.bz2 Source1: http://download.sf.net/libvncserver/LibVNCServer-0.8.2.tar.gz Patch1: xen-initscript.patch +Patch2: xen-nostrip-ioemu.patch Patch3: xen-compile-fixes.patch Patch6: xen-network-iptables-bridge.patch Patch8: xen-vmxballoon-hack.patch @@ -25,6 +26,9 @@ Patch103: xen-3.0.2-config-disable-reloc.patch # patches going upstream (pv framebuffer) Patch200: xen-pvfb.patch +# libVNCserver patches +Patch300: vnc-thread-fixes.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: transfig libidn-devel zlib-devel texi2html SDL-devel curl-devel BuildRequires: libX11-devel python-devel ghostscript tetex-latex @@ -81,6 +85,8 @@ virtual machines. %prep %setup -q -n xen-unstable-%{changeset} -a 1 %patch1 -p1 -b .init +# Don't strip qemu-dm early, so that we get proper debuginfo +%patch2 -p1 %patch3 -p1 -b .compile %patch6 -p1 #patch8 -p1 # FIXME: need to pull this one back @@ -94,6 +100,12 @@ virtual machines. # pv framebuffer patches %patch200 -p1 +# libVNCserver patches +pushd LibVNCServer-0.8.2 +# thread locking fixes +%patch300 -p2 +popd + %build # libvncserver first pushd LibVNCServer-0.8.2 @@ -197,6 +209,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.a %changelog +* Wed Sep 20 2006 Stephen C. Tweedie - 3.0.2-35 +- Don't strip qemu-dm early, so that we get proper debuginfo (danpb) +- Fix compile problem with latest glibc + +* Wed Sep 20 2006 Stephen C. Tweedie - 3.0.2-34 +- Update to xen-unstable changeset 11539 +- Threading fixes for libVNCserver (danpb) + * Tue Sep 5 2006 Jeremy Katz - 3.0.2-33 - update pvfb patch based on upstream feedback