Visualizzazione post con etichetta debian. Mostra tutti i post
Visualizzazione post con etichetta debian. Mostra tutti i post

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

giovedì 11 giugno 2009

turbogears 1.0 in debian is broken

turbogears 1.0 in debian is broken.
So how to fix it?

easy_install "turbojson=1.1.4"
easy_install "turbojson<1.2"
easy_install "TurboCheetah>=1.0"
easy_install "TurboGears>=1.0.8"

mercoledì 10 giugno 2009

How to retrieve a .dsc file giving only the pkg name

pkgurl=$(dcontrol $1 | grep ^Filename | head -1 | cut -d' ' -f 2 | sed s/_[a-zA-Z0-9]*.deb/.dsc/) dget -q http://ftp.uk.debian.org/debian/$pkgurl
dpkg-source -x $(basename $pkgurl)

mercoledì 11 febbraio 2009

Kernel needs initramfs

When you recompile your kernel and you want to use initramfs remember to select this option:


General Setup --->
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support


And if you want to generate your initramfs with kernel-package in debian remember the option --initrd.

domenica 14 dicembre 2008

NSLU2 && lighttpd && esmtp

This morning I came up with an idea. How could I know when someone access to my lighttpd webserver installed on my NSLU2?

The answer is easy, denever, active mod_accesslog and then take a look to the access.log!

Ok, but if I want to reaceive a mail for each access? :)

Reading there, I discovered that it is possible to redirect the access.log to a process.

So I wrote this line in the /etc/lighttpd/lighttpd.conf on my NSLU2:

accesslog.filename = "| mail -i -s Webaccess my_email@anywhere.com"


The I installed and configured esmtp on my NSLU2:

apt-get install esmtp

Editing /etc/esmtprc:

hostname=smtp.googlemail.com
username=yourname@gmail.com
password=yourpass
starttls=enabled

But there is a problem: lighttpd write access.log only when is stopped...
So I shall not receive an email on each access on my webserver.
I will receive an email on each restart of lighttpd.