Set up Spice-Gtk-0.7.4X (USB redirection support), LibUsbredir 0.3.1, Qemu-kvm-0.15.0 (spice enabled), Spice Server&Client 0.9.1 on Ubuntu 11.10

Following bellow is attempt to reproduce Hans de Goede blog entry at http://planet.spice-space.org/ on Ubuntu 11.10 with intent to build Spice-Gtk-0.7.4X up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk working stable with development Spice version 0.9.1. Build done on Ubuntu Oneiric include USB redirection support , but due to obvious reasons stays just a feature which cannot be used for real redirection. If USB redirection will appear to be in Qemu-kvm upstream, then Ubuntu will be ready to pick it up.
Packaged version version of Spice-Gtk-0.7.4X is built up on mentioned git repository with GTK2 and GTK3 as two sets of packages.
Libusb-1.0-2:1.0.9-3ubuntu9 is built up on git://people.freedesktop.org/~jwrdegoede/libusb (pre 1.0.9). Usbredir-0.3.1-1ubuntu5 is built up on official release usbredir-0.3.1.tar.gz. Of course no usb redirection really happens due to version of Qemu-kvm 0.15.0,compare with series of qxl and usbredir patches on top of 0.15.0 in Fedora 16. Version of Libvirt and etc. However, this version of Spice-Gtk >= 0.7.39 and should work stable with Spice 0.9.1
*********************************************************************************************************************
Running autogen.sh with exported environment variable NOCONFIGURE allows to perform it in one build per Debian’s Spice-Gtk-0.7-3 building schema.It has been already done as well. View:-
Spice-Gtk-0.7.46-314c been built per debian’s 0-7.2 schema
*********************************************************************************************************************
GTK2 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="2.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

Original file spice-gtk-3/gtk/Makefile.am was updated to handle GTK3 build, otherwise GTK3 build failed building spicy.

--- spice-gtk.orig/gtk/Makefile.am      2011-10-03 20:00:55.150133286 +0400
+++ spice-gtk/gtk/Makefile.am   2011-10-03 20:06:51.446137091 +0400
@@ -352,6 +352,7 @@
        libspice-client-glib-2.0.la             \
        $(XRANDR_LIBS)                  \
        $(GTHREAD_LIBS)                 \
+        $(GTK_LIBS)                     \
        $(NULL)

 spicy_CPPFLAGS =                       \

GTK3 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="3.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir3
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
spice-client seabios \
libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk

To install Livbirt and virtinst tools :-

$ sudo apt-get install virtinst virt-manager virt-viewer

You might have to disable apparmor profile for libvirtd

$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
$ sudo adduser $USER kvm

Link to PPA

Following builds have been debianized in current PPA :-

Spice-Gtk 0.7.46-314c
==============

prefix: /usr
c compiler: gcc -std=gnu99

Coroutine: ucontext
Audio: pulse
Target: Unix
SASL support: yes
Smartcard support: no
USB redirection support: yes
Gtk: 2.0

Now type ‘make’ to build spice-gtk

Spice-Gtk 0.7.46-314c-dirty
==============

prefix: /usr
c compiler: gcc -std=gnu99

Coroutine: ucontext
Audio: pulse
Target: Unix
SASL support: yes
Smartcard support: no
USB redirection support: yes
Gtk: 3.0

Now type ‘make’ to build spice-gtk

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: