martedì 29 dicembre 2009

Crosscompilation for armel with emdebian

First of all create a chroot with debootstrap:

debootstrap lenny armchroot

Then let's go to fix locales:

mount none -t proc armchroot/proc
chroot armchroot
@armchroot: apt-get update && apt-get install locales&& dpkg-reconfigure locales && apt-get install localepurge

The last important part is to install emdebian-tools

@armchroot: apt-get install emdebian-tools


@armchroot: apt-get update && apt-get upgrade

Now we have to edit /etc/emsource.conf to use stable

targetsuite: lenny

Now it's time to setup emdebian. We want to crosscompile to armel so:

@armchroot: emsetup -a armel

This last command will install and configure the toolchain.

Gitweb with Lighttpd on a debianized NSLU2

First of all install Lighttpd gitweb and git

apt-get install lighttpd gitweb git-core

Then add a lighttpd configuration file.

server.modules += ( "mod_cgi" )
url.redirect = ( "^/git$" => "/git/" )
alias.url += ( "/git/" => "/usr/lib/cgi-bin/" )
$HTTP["url"] =~ "^/git/" {
cgi.assign = ( ".cgi" => "" )
index-file.names = ( "gitweb.cgi" )
}

Wrote this in /etc/lighttpd/conf-available/10-gitweb.conf.
The copy the three files in /usr/share/gitweb in /var/www.
Now edit projectroot field in your gitweb configuration file in /etc/gitweb.conf:

$projectroot = "/your/directory/git";

Save /etc/gitweb.conf and enable gitweb configuration for lighttpd:

lighttpd-enable-mod gitweb
invoke-rc.d lighttpd force-reload

An UML2 Diagram editor for Linux

Googling I found Gaphor. Iwas bored of Dia. Gaphor uses dia canvas but it's more UML2 oriented ant it's write in python!
Unfortunally debian package of gaphor depends on python-zope.interface that is broken.
So I decided to use python-virtualenv to install gaphor.

As root:

root@thelemasys:~# aptitude install python-virtualenv


And then as user:

denever@thelemasys:~$ virtualenv gaphor
denever@thelemasys:~$ cd gaphor
denever@thelemasys:~/gaphor$ source bin/activate
(gaphor)denever@thelemasys:~/gaphor$ easy_install gaphor
(gaphor)denever@thelemasys:~/gaphor$ gaphor