Sugar on Debian: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
-------
-------
= Installing sugar on Debian Unstable =
= Installing sugar on Debian Unstable =

You pretty much need to use sugar-jhbuild. However, you can minimize the work it does without undue strain on your system (i.e., without resorting to use of experimental packages and the like).


== Get sugar-jhbuild ==
== Get sugar-jhbuild ==
Line 27: Line 25:
aptitude install libtool libsqlite3-dev libnspr4-dev docbook-xsl intltool
aptitude install libtool libsqlite3-dev libnspr4-dev docbook-xsl intltool


Now, this is ALL you need if you want to spend many hours compiling many packages. If you want to save yourself some work, there are some packages that can be installed through apt rather than via build-base:
Now, this is ALL you need if you want to spend many hours compiling many packages:

== The Dependencies ==

You have two ways to get the dependencies: Build-base and building/installing packages manually from experimental archives.

=== Alternative 1: Build Base ===

This is easy, but it takes a long time and builds custom versions of all the dependencies (rather than getting them through apt).

./sugar-jhbuild build-base

This takes a long time, but will work. After that, do 'build' and 'run'.

=== Alternative 2: Get packages from Experimental ===

If you don't want to compile everything, add the experimental repository to your /etc/apt/sources.list.

There are some packages that can be installed from unstable:


aptitude install darcs libdbus-1-dev libenchant-dev libfribidi-dev libgconf2-dev libgsf-1-dev libgstreamer-plugins-base0.10-dev libxslt1-dev libxul-dev python-avahi python-cairo-dev xserver-xephyr xulrunner
aptitude install darcs libdbus-1-dev libenchant-dev libfribidi-dev libgconf2-dev libgsf-1-dev libgstreamer-plugins-base0.10-dev libxslt1-dev libxul-dev python-avahi python-cairo-dev xserver-xephyr xulrunner


But we're still missing python2.5 and some python2.5 modules that need separate compilation.
But we're still missing python2.5 and some python2.5 modules that need separate compilation.

==== Prerequisites ====

Python 2.5 is installable from Debian testing but, as of 2007 Feb 16,
it is "unsupported" in the sense that python modules are not
compiled with support for 2.5 by default.

To cause Python 2.5 be supported, you can edit
<tt>/usr/share/python/debian_defaults</tt>.

<pre>
[DEFAULT]
# the default python version
default-version = python2.4
# all supported python versions
supported-versions = python2.4, python2.5
# formerly supported python versions
old-versions = python2.3
# unsupported versions, including older versions
unsupported-versions = python2.3
</pre>

Shown above is a copy of my <tt>debian_defaults</tt>.
Yours might look a little different.
The important thing is to check where python2.5 is listed.

You also need to change the default python in your $PATH as well (unfortunate, but it's currently how the dependency checker in Sugar works):

<pre>
cd /usr/bin
sudo ln -sf python2.5 python
</pre>

==== Python Modules in 2.5 ====

Before beginning, install tools indicated in [http://www.debian.org/doc/maint-guide/ debian maint-guide]. Also,
you need to make sure the experimental source archive is listed
in <tt>/etc/apt/sources.list</tt>:

<pre>
deb-src http://ftp.debian.org/debian experimental main #important!

# Also may be required:
deb http://ftp.debian.org/debian testing main contrib non-free
deb http://ftp.debian.org/debian unstable main
deb http://ftp.debian.org/debian experimental main
</pre>

Now that Python 2.5 is "supported" on your Debian box,
you need to recompile any python packages which are required by sugar.
An easy way to do this is to use <tt>apt-src</tt>. For example:

<pre>
$ mkdir debian # keep your work somewhere temporary
$ cd debian
$ apt-src install python-dbus
Reading package lists... Done
Building dependency tree... Done
Need to get 471kB of source archives.
Get:1 http://ftp.au.debian.org experimental/main dbus-python 0.80.2-1 (dsc) [881B]
Get:2 http://ftp.au.debian.org experimental/main dbus-python 0.80.2-1 (tar) [453kB]
Get:3 http://ftp.au.debian.org experimental/main dbus-python 0.80.2-1 (diff) [16.2kB]
Fetched 471kB in 38s (12.2kB/s)
gpg: Signature made Tue 13 Feb 2007 11:34:43 PM IST using DSA key ID 5BE41F21
gpg: Can't check signature: public key not found
dpkg-source: extracting dbus-python in dbus-python-0.80.2
dpkg-source: unpacking dbus-python_0.80.2.orig.tar.gz
dpkg-source: applying ./dbus-python_0.80.2-1.diff.gz
$ cd dbus-python-0.80.2
$ dpkg-buildpackage -b -uc -rfakeroot # wait a long time
$ cd ..
$ sudo dpkg -i *.deb
</pre>

Here is a list (maybe incomplete) of python packages you will need to recompile:

* python-avahi
* python-cairo
* python-dbus
* python-gnome2-desktop
* python-gobject
* python-gtk2

If you neglect to recompile a python package which is indeed required by sugar
then hopefully you will get a helpful failure message indicating where you are
remiss.


-------
-------

Revision as of 17:24, 29 March 2007

This article is a stub. You can help the OLPC project by expanding it.


Please contribute instructions for getting Sugar to work with Debian GNU/Linux.


Installing sugar on Debian Unstable

Get sugar-jhbuild

aptitude install git-core

Get sugar-jhbuild through git as described on Sugar_with_sugar-jhbuild

Run sugar-jhbuild

cd sugar-jhbuild
./sugar-jhbuild update
./sugar-jhbuild build

Plenty of dependencies are likely to fail.

For build-base, you should need:

aptitude install libtool libsqlite3-dev libnspr4-dev docbook-xsl intltool

Now, this is ALL you need if you want to spend many hours compiling many packages:

The Dependencies

You have two ways to get the dependencies: Build-base and building/installing packages manually from experimental archives.

Alternative 1: Build Base

This is easy, but it takes a long time and builds custom versions of all the dependencies (rather than getting them through apt).

./sugar-jhbuild build-base

This takes a long time, but will work. After that, do 'build' and 'run'.

Alternative 2: Get packages from Experimental

If you don't want to compile everything, add the experimental repository to your /etc/apt/sources.list.

There are some packages that can be installed from unstable:

aptitude install darcs libdbus-1-dev libenchant-dev libfribidi-dev libgconf2-dev libgsf-1-dev libgstreamer-plugins-base0.10-dev libxslt1-dev libxul-dev python-avahi python-cairo-dev xserver-xephyr xulrunner

But we're still missing python2.5 and some python2.5 modules that need separate compilation.

Prerequisites

Python 2.5 is installable from Debian testing but, as of 2007 Feb 16, it is "unsupported" in the sense that python modules are not compiled with support for 2.5 by default.

To cause Python 2.5 be supported, you can edit /usr/share/python/debian_defaults.

[DEFAULT]
# the default python version
default-version = python2.4
# all supported python versions
supported-versions = python2.4, python2.5
# formerly supported python versions
old-versions = python2.3
# unsupported versions, including older versions
unsupported-versions = python2.3

Shown above is a copy of my debian_defaults. Yours might look a little different. The important thing is to check where python2.5 is listed.

You also need to change the default python in your $PATH as well (unfortunate, but it's currently how the dependency checker in Sugar works):

cd /usr/bin
sudo ln -sf python2.5 python

Python Modules in 2.5

Before beginning, install tools indicated in debian maint-guide. Also, you need to make sure the experimental source archive is listed in /etc/apt/sources.list:

deb-src http://ftp.debian.org/debian experimental main  #important!

# Also may be required:
deb http://ftp.debian.org/debian testing main contrib non-free
deb http://ftp.debian.org/debian unstable main
deb http://ftp.debian.org/debian experimental main

Now that Python 2.5 is "supported" on your Debian box, you need to recompile any python packages which are required by sugar. An easy way to do this is to use apt-src. For example:

$ mkdir debian   # keep your work somewhere temporary
$ cd debian
$ apt-src install python-dbus
Reading package lists... Done
Building dependency tree... Done
Need to get 471kB of source archives.
Get:1 http://ftp.au.debian.org experimental/main dbus-python 0.80.2-1 (dsc) [881B]
Get:2 http://ftp.au.debian.org experimental/main dbus-python 0.80.2-1 (tar) [453kB]
Get:3 http://ftp.au.debian.org experimental/main dbus-python 0.80.2-1 (diff) [16.2kB]
Fetched 471kB in 38s (12.2kB/s)
gpg: Signature made Tue 13 Feb 2007 11:34:43 PM IST using DSA key ID 5BE41F21
gpg: Can't check signature: public key not found
dpkg-source: extracting dbus-python in dbus-python-0.80.2
dpkg-source: unpacking dbus-python_0.80.2.orig.tar.gz
dpkg-source: applying ./dbus-python_0.80.2-1.diff.gz
$ cd dbus-python-0.80.2
$ dpkg-buildpackage -b -uc -rfakeroot    # wait a long time
$ cd ..
$ sudo dpkg -i *.deb

Here is a list (maybe incomplete) of python packages you will need to recompile:

  • python-avahi
  • python-cairo
  • python-dbus
  • python-gnome2-desktop
  • python-gobject
  • python-gtk2

If you neglect to recompile a python package which is indeed required by sugar then hopefully you will get a helpful failure message indicating where you are remiss.