rpms/xen/devel xen-block-readonly.patch, NONE, 1.1 xen-hotplug-error-reporting.patch, NONE, 1.1 xen-vnc-mouse-buttons.patch, NONE, 1.1 xen.spec, 1.166, 1.167

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Feb 8 18:30:42 UTC 2007


Author: berrange

Update of /cvs/dist/rpms/xen/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv1459

Modified Files:
	xen.spec 
Added Files:
	xen-block-readonly.patch xen-hotplug-error-reporting.patch 
	xen-vnc-mouse-buttons.patch 
Log Message:
Fix VNC mouse button > 3. Better hotplug error reports. Readonly loopdevice fix

xen-block-readonly.patch:
 block |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

--- NEW FILE xen-block-readonly.patch ---
diff -r 2e80cd715047 tools/examples/block
--- a/tools/examples/block	Thu Feb 01 11:42:50 2007 +0000
+++ b/tools/examples/block	Thu Feb 01 11:58:38 2007 -0500
@@ -367,7 +367,13 @@ mount it read-write in a guest domain."
           fatal 'Failed to find an unused loop device'
         fi
 
-        do_or_die losetup "$loopdev" "$file"
+        cmode=`canonicalise_mode $mode`
+        if [ "$cmode" == 'r' ]
+        then
+          do_or_die losetup -r "$loopdev" "$file"
+        else
+          do_or_die losetup "$loopdev" "$file"
+        fi
         xenstore_write "$XENBUS_PATH/node" "$loopdev"
         write_dev "$loopdev"
         release_lock "block"

xen-hotplug-error-reporting.patch:
 examples/vif-bridge                     |    7 ++++++
 examples/xen-hotplug-common.sh          |    5 ++--
 python/xen/xend/server/DevController.py |   33 ++++++++++++++++----------------
 3 files changed, 27 insertions(+), 18 deletions(-)

--- NEW FILE xen-hotplug-error-reporting.patch ---
diff -rup xen-3.0.4_1-src/tools/examples/vif-bridge xen-3.0.4_1-src.new/tools/examples/vif-bridge
--- xen-3.0.4_1-src/tools/examples/vif-bridge	2007-01-08 10:00:48.000000000 -0500
+++ xen-3.0.4_1-src.new/tools/examples/vif-bridge	2007-02-08 13:20:13.000000000 -0500
@@ -46,6 +46,13 @@ then
   fi
 fi
 
+RET=0
+ip link show $bridge 1>/dev/null 2>&1 || RET=1
+if [ "$RET" -eq 1 ]
+then
+    fatal "Could not find bridge device $bridge"
+fi
+
 case "$command" in
     online)
 	setup_bridge_port "$vif"
diff -rup xen-3.0.4_1-src/tools/examples/xen-hotplug-common.sh xen-3.0.4_1-src.new/tools/examples/xen-hotplug-common.sh
--- xen-3.0.4_1-src/tools/examples/xen-hotplug-common.sh	2007-01-08 10:00:48.000000000 -0500
+++ xen-3.0.4_1-src.new/tools/examples/xen-hotplug-common.sh	2007-02-08 13:20:13.000000000 -0500
@@ -28,14 +28,15 @@ export LANG="POSIX"
 unset $(set | grep ^LC_ | cut -d= -f1)
 
 fatal() {
-  xenstore_write "$XENBUS_PATH"/hotplug-status error
+  xenstore_write "$XENBUS_PATH/hotplug-error" "$*" \
+                 "$XENBUS_PATH/hotplug-status" error
   log err "$@"
   exit 1
 }
 
 success() {
   # Tell DevController that backend is "connected"
-  xenstore_write "$XENBUS_PATH"/hotplug-status connected
+  xenstore_write "$XENBUS_PATH/hotplug-status" connected
 }
 
 do_or_die() {
diff -rup xen-3.0.4_1-src/tools/python/xen/xend/server/DevController.py xen-3.0.4_1-src.new/tools/python/xen/xend/server/DevController.py
--- xen-3.0.4_1-src/tools/python/xen/xend/server/DevController.py	2007-01-08 10:00:50.000000000 -0500
+++ xen-3.0.4_1-src.new/tools/python/xen/xend/server/DevController.py	2007-02-08 13:20:41.000000000 -0500
@@ -152,7 +152,7 @@ class DevController:
     def waitForDevice(self, devid):
         log.debug("Waiting for %s.", devid)
         
-        status = self.waitForBackend(devid)
+        (status,err) = self.waitForBackend(devid)
 
         if status == Timeout:
             self.destroyDevice(devid, False)
@@ -162,25 +162,22 @@ class DevController:
 
         elif status == Error:
             self.destroyDevice(devid, False)
-            raise VmError("Device %s (%s) could not be connected. "
-                          "Backend device not found." %
-                          (devid, self.deviceClass))
-
+            if err is None:
+                raise VmError("Device %s (%s) could not be connected. "
+                              "Backend device not found." %
+                              (devid, self.deviceClass))
+            else:
+                raise VmError("Device %s (%s) could not be connected. "
+                              "%s" % (devid, self.deviceClass, err))
         elif status == Missing:
             # Don't try to destroy the device; it's already gone away.
             raise VmError("Device %s (%s) could not be connected. "
                           "Device not found." % (devid, self.deviceClass))
 
         elif status == Busy:
-            err = None
-            frontpath = self.frontendPath(devid)
-            backpath = xstransact.Read(frontpath, "backend")
-            if backpath:
-                err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE)
-            if not err:
-                err = "Busy."
-                
             self.destroyDevice(devid, False)
+            if err is None:
+                err = "Busy."
             raise VmError("Device %s (%s) could not be connected.\n%s" %
                           (devid, self.deviceClass, err))
 
@@ -475,17 +472,21 @@ class DevController:
         frontpath = self.frontendPath(devid)
         backpath = xstransact.Read(frontpath, "backend")
 
+
         if backpath:
             statusPath = backpath + '/' + HOTPLUG_STATUS_NODE
             ev = Event()
             result = { 'status': Timeout }
-            
+
             xswatch(statusPath, hotplugStatusCallback, ev, result)
 
             ev.wait(DEVICE_CREATE_TIMEOUT)
-            return result['status']
+
+            err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE)
+
+            return (result['status'], err)
         else:
-            return Missing
+            return (Missing, None)
 
 
     def backendPath(self, backdom, devid):

xen-vnc-mouse-buttons.patch:
 xen-3.0.4_1-src.new/tools/xenfb/vncfb.c  |    3 ++-
 xen-3.0.4_1-src/tools/xenfb/vncfb.c.orig |only
 2 files changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE xen-vnc-mouse-buttons.patch ---
diff -rup xen-3.0.4_1-src/tools/xenfb/vncfb.c xen-3.0.4_1-src.new/tools/xenfb/vncfb.c
--- xen-3.0.4_1-src/tools/xenfb/vncfb.c	2007-02-08 13:19:46.000000000 -0500
+++ xen-3.0.4_1-src.new/tools/xenfb/vncfb.c	2007-02-08 13:21:57.000000000 -0500
@@ -149,7 +149,8 @@ static int xk2linux[0x10000] = {
 };
 
 static int btnmap[] = {
-	BTN_LEFT, BTN_MIDDLE, BTN_RIGHT, BTN_FORWARD, BTN_BACK
+  BTN_LEFT, BTN_MIDDLE, BTN_RIGHT, BTN_SIDE,
+  BTN_EXTRA, BTN_FORWARD, BTN_BACK, BTN_TASK
 };
 
 static void on_kbd_event(rfbBool down, rfbKeySym keycode, rfbClientPtr cl)
Only in xen-3.0.4_1-src/tools/xenfb: vncfb.c.orig


Index: xen.spec
===================================================================
RCS file: /cvs/dist/rpms/xen/devel/xen.spec,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- xen.spec	30 Jan 2007 18:59:29 -0000	1.166
+++ xen.spec	8 Feb 2007 18:30:40 -0000	1.167
@@ -3,7 +3,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 3.0.4
-Release: 5%{dist}
+Release: 6%{dist}
 Group:   Development/Libraries
 License: GPL
 URL:     http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
@@ -15,6 +15,9 @@
 Patch13: xen-dumpdir.patch
 Patch14: xen-pygrub-memcorruption.patch
 Patch15: xen-vnclisten-config.patch
+Patch16: xen-hotplug-error-reporting.patch
+Patch17: xen-vnc-mouse-buttons.patch
+Patch18: xen-block-readonly.patch
 Patch20: xen-blktap-no-aio-epoll.patch
 Patch21: xen-blktap-error-returns.patch
 
@@ -95,6 +98,9 @@
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
 
 # blktap patches
 %patch20 -p1
@@ -229,6 +235,11 @@
 %{_libdir}/*.a
 
 %changelog
+* Thu Feb  8 2007 Daniel Berrange <berrange at localhost.localdomain> - 3.0.4-6.fc7
+- Setup readonly loop devices for readonly disks
+- Extended error reporting for hotplug scripts
+- Pass all 8 mouse buttons from VNC through to kernel
+
 * Tue Jan 30 2007 Daniel P. Berrange <berrange at redhat.com> - 3.0.4-5.fc7
 - Don't run the pvfb daemons for HVM guests (bz 225413)
 - Fix handling of vnclisten parameter for HVM guests




More information about the fedora-cvs-commits mailing list