Implementation Qemu-kvm 0.15.0,Spice Server and Spice-Gtk-0.7 on Ubuntu 11.10 KVM Server the most recent approach

**********************************************************************************************
UPDATE on 09/21/11 Ubuntu 11.10 beta-2 will be released tomorrow.
Ubuntu 11.10 (Oneiric Ocelot) final release on 10/14/11
**********************************************************************************************
1. Set up Qemu-kvm 0.15.0(spice enabled), Spice Server (0.8.2), Spice-Gtk-0.7-2(via Debian)
Stable Qemu-kvm-0.15.0+noroms(spice enabled), Spice Server&Client 0.8.2, Spice-Gtk-0.7-2 (via Debian)

2. First view :-

Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)


3. Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric). Experimental PPA Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)
View also “Howto” Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)
************************************************************************************************
Following bellow seems to be the best way to implement Qemu-kvm 0.15.0 spice enabled, Spice Server 0.8.2 and Spice-Gtk-0.7 with GObject-introspection enabled on Ubuntu 11.10 in meantime close to Beta 1. It’s based on PPA Building Spice-Gtk-0.7 via Debian Unstable with Gobject-introspection enabled published on 08/20/11. The original version of Spice-Gtk-0.7-2 came from Debian Unstable didn’t support GObject-introspection. Original version 0.7-2 was not supposed to install files like *.gir and *.typelib. View projects /collab-maint/spice-gtk.git/ summary. No tag “unstable/0.7-3”.It also clearly shows that introspection went into Git Repo on 09/01/11. View [2] also regarding this issue. Original version 0.7-2 also required fixes for debian/control and debian/rules. To understand better why this step should be undertaken, please , view Introspection Overivew

Now I feel myself like a detective whose 4 weeks old case, somebody wants to drop. It’s really funny, because lack of understanding GObject-introspection when porting Spice-Gtk-0.7 from F16 do Debian (Ubuntu) is not a crime.

Moreover file http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc (been located at http://mentors.debian.net/package/spice-gtk) doesn’t exist on the Net any longer,which has been used by myself for :
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc

and spice-gtk-0.7-2 was a base I used to rebuild debian packages with introspection enabled, view my PPA
“Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled”. It means I did it on my own . Everything had been done by myself from scratch.
I really did it from scratch but in different way and at different time. View another my PPA : Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10 as of 08/10/11 and my article at LinuxToday Set up Spice-Gtk-0.7 on Ubuntu 11.10
******************************************************************************************************************
UPDATE on 09/12/11. Bug – https://bugzilla.redhat.com/show_bug.cgi?id=734680 doesn’t show up when running with spice (0.8.2) enabled qemu-kvm 0.15.0 with Oneiric patching
******************************************************************************************************************
UPDATE on 09/06/11. As of 09/05/11 Mentioned error has been fixed. Packaging schema changed vs been used on 09/01/11. Original version 0.7-2 (as of 08/16/11) may be viewed now only at QA page http://qa.debian.org/developer.php?login=bluestonechina%40gmail.com. Front page doesn’t contain it any longer. However, page Debian Tracking System shows the history and build logs 0.7-2 pretty clear.View projects /collab-maint/spice-gtk.git/ summary.

Version 0.7-3
Information
Version: 0.7-3
Uploaded: 2011-09-05 15:30
Source package: http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-3.dsc
Section: misc
Priority: optional
Closes bugs: 639936 640136 640138

View PPA Build Spice-Gtk-0.7 via Debian Unstable as of 09/06/11

View also : http://packages.qa.debian.org/s/spice-gtk.html
TODO section :-
mentors.debian.net has version 0.7-3 of this package, you should consider sponsoring its upload.

*****************************************************************************************************************
Now back to rebuild spice-gtk-0.7-2 from Debian (08/16/11) to enable introspection , which had been done on 08/20/11
*****************************************************************************************************************
Port Debian Unstable Spice Server (been built with embedded libcelt051) to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice/spice_0.8.2-2.dsc
$ dpkg-source -x spice_0.8.2-2.dsc
Port Debian Unstable version of Spice-Gtk-0.7 to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc
It requires rebuild to enable gobject-introspection,which was done in PPA "Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled" for Ubuntu 11.10.

Details may be viewed here :
Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled

In particular,

1. Added –enable-introspection to debian/rules dh_auto_configure.

dh_auto_configure -B/build/buildd/spice-gtk-0.7/build-gtk3 -- \
--enable-smartcard=no --with-gtk=3.0 --disable-static --enable-introspection


dh_auto_configure -- \
--enable-smartcard=no --with-gtk=2.0 --disable-static --enable-introspection

2. Updated debian/control and added required dependencies

Build-Depends:
debhelper (>= 8.0.0),
libspice-protocol-dev (>= 0.8.1),
libspice-server-dev,
libpixman-1-dev (>= 0.17.7),
libgtk2.0-dev,
libgtk-3-dev,
libglib2.0-dev (>= 2.22),
libcairo2-dev (>= 1.2.0),
libpulse-dev,
python2.7,
python-gtk2-dev (>= 2.0.0),
python-pyparsing,
intltool,
libsasl2-dev,
libjpeg8-dev,
gobject-introspection, <=
libgirepository1.0-dev <=

The last two lines have been added.

3.Several debian/package_name.install files have been updated by adding right full path to corresponding library to accommodate installation of :-

/usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib
/usr/share/gir-1.0/SpiceClientGLib-2.0.gir
/usr/share/gir-1.0/SpiceClientGtk-3.0.gir

which otherwise won’t be installed.

Added to libspice-client-glib-2.0-4.install
line usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib

Added to libspice-client-gtk-2.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib

Added to libspice-client-gtk-3.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib

Added to libspice-client-glib-2.0-dev.install
line usr/share/gir-1.0/SpiceClientGLib-2.0.gir

Added to libspice-client-gtk-3.0-dev.install
line usr/share/gir-1.0/SpiceClientGtk-3.0.gir

Qemu-kvm 0.15.0 was built with changed dependencies in the same PPA
Packages from https://launchpad.net/~bderzhavets/+archive/test-deb2 installed with no conflicts on Oneiric daily build 08/27/11. Spice sessions (via VirtManager) in QXL mode (64M vram) for install and for runtime have been run.
******************************************************************************************************
The most recent snapshot for seabios supporting 64M vram for QXL device uploaded to ppa:bderzhavets/test-deb2,ppa:bderzhavets/test-deb1
******************************************************************************************************
Please, view regarding this issue [Qemu-devel] -vga qxl

To install packages from PPA

$ sudo add-apt-repository ppa:bderzhavet/test-deb2
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
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 spice-client \
seabios

$ 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
$ sudo reboot

In case trouble with “apt-get update” run :-

# sudo apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys 5CC1785DC05C1EB5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.IbkrNcyBsB --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 5CC1785DC05C1EB5
gpg: requesting key C05C1EB5 from hkp server keyserver.ubuntu.com
gpg: key C05C1EB5: public key "Launchpad PPA for Boris Derzhavets" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
# sudo apt-get update

Normal install looks like :-

$ sudo apt-get install qemu-kvm qemu qemu-common \
> 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 spice-client \
> seabios
[sudo] password for boris:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
bridge-utils cpu-checker libaio1 libcegui-mk2-1 libdevil1c2 libfreeimage3 libspice-server1
libxerces-c28 msr-tools vgabios
Suggested packages:
kvm-pxe mol-drivers-macosx openbios-sparc ubuntu-vm-builder uml-utilities
The following NEW packages will be installed:
bridge-utils cpu-checker libaio1 libcegui-mk2-1 libdevil1c2 libfreeimage3
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
libspice-server1 libxerces-c28 msr-tools python-spice-client-gtk qemu qemu-common qemu-kvm
seabios spice-client spice-client-gtk vgabios
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,977 kB of archives.
After this operation, 35.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y







References
1. Debian Tracking System
2.http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg3124003.html

One Response to Implementation Qemu-kvm 0.15.0,Spice Server and Spice-Gtk-0.7 on Ubuntu 11.10 KVM Server the most recent approach

  1. […] Implementation Qemu-kvm 0.15.0,SpiceServer and Spice-Gtk-0.7 on Ubuntu 11.10 KVM Server the most rec… […]

Leave a comment