NSLU2/Mercurial

Från Basvrak
Hoppa till navigering Hoppa till sök

Howto: Install Mercurial on OpenSlug

[redigera]

Scenario: You want to use "mercurial" on your OpenSlug-enabled nslu2, but you do not want to add the openwrt packages. (Why? My slug was seriously borked by ipkg upgrade after doing that).

1) Install the usual c development packages: gcc gcc-symlinks cpp cpp-symlinks libc6-devel binutils binutils-symlinks

You have to do some tweaking with update-alternatives during the build process later, to make it use the correct "ar" et cetera. Just installing coreutils and binutils does not mean that it replaces busybox for the relevant binaries, and busybox is crippled.

2) Install all python packages. (ipkg install `ipkg list | grep python | awk '{print $1}'`)

Why? The modules needed are thrown all around the available packages, I gave up trying to make sense of it.

3) Install gnu gettext. This will take about two hours configuring and compiling.

4) Install python gettext. Easiest done by installing "easy_install" http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install and then pointing easy_install to an "egg" of gettext. (http://pypi.python.org/simple/python-gettext/)

Unfortunately the base python for the slug (at least the one I got) does not contain all necessary files. You have to obtain "bisect.py", "heapq.py", and "tarfile.py" from somewhere and drop in /usr/lib/python2.4 before you try to install easy_install.

5) Build "mercurial". My python insisted on using ccache for the build. I tried locating where to change this, but ended up installing ccache on the slug instead. No, using -compiler gcc did not work.

6) Install mercurial. It will put its python files in /usr/local/lib somewhere. Copy them to the appropriate site-packages directory (I use a symlink from /usr/lib/python2.4 to /usr/local/lib/python2.4/site-packages)

7) Success.