Tech

Hello world, Debian style

# apt-get install hello

# hello
Hello, world!

# hello --help
Usage: hello [OPTION]…
Print a friendly, customisable greeting.

-h, –help display this help and exit
-v, –version display version information and exit

-t, –traditional use traditional greeting format
-n, –next-generation use next-generation greeting format
-g, –greeting=TEXT use TEXT as the greeting message

Reliable rake task execution

My News Sniffer project needs to regularly do some back-end stuff like checking a bunch of rss feeds and downloading web pages. I do this with some rake tasks, which I call using the cron daemon.  Recently I’ve been having problems where some tasks take a bit longer than usual to complete and end up running in parallel. This slows things down, which means more tasks end up running in parallel and then my little virtual machine eventually falls on it’s face under memory pressure.

Xen on Ubuntu Edgy broken - Debian to the rescue

I found a great HOWTO on getting a Xen virtual machine up and running on Ubuntu Edgy. Unfortunately, Xen is pretty broken on Edgy. I managed to get one virtual machine running easily but on starting a second one, Dom0 panics and the whole box freezes. It’s been reported on launchpad but as it’s in universe I guess it’s just not a priority.

Encrypted partitions with Ubuntu/Debian

I figured out how to set up an encrypted partition on Ubuntu the other day. There are a bunch of ways of doing it but I found this to be the simplest. It should work on Debian too, since all the relevant packages are Debian ones anyway. In my example I’m encrypting an LVM partition (logical volume), but it should work with any device, including removable USB keys (see end notes). UPDATE: This is broken in Edgy but I figured out a simple fix, see below.

Install the cryptsetup package from apt
# apt-get install cryptsetup
Choose a partition you’d like to encrypt.

In my case, I’m encrypting an LVM logical volume on a sata harddisk:

Turck MMCache speediness on Debian Sarge

UPDATE: The info in this post is deprecated. See the new post about eAccelerator instead.

I installed Turck MMCache PHP accelerator and I got a big improvement.

ApacheBench reported 4.52 pages per second before and 12.47 pages after installation (a Wordpress 1.5.2 page on a 1.2Ghz PIII). That a 275% increase in performance, with currently no observed problems. I tested this with both Apache2 and lighttpd, and got a similar boost with both.

Epiphany and Firefox Dapper packages for Breezy

I’ve built Ubuntu Dapper Epiphany 1.9 and Firefox 1.4.99 packages for Ubuntu Breezy. I’ve also enabled the Epiphany Adblock extension which seems to work fine. You can’t specify your own advert signatures with a GUI yet (afaikt) but the built-in database seems to cover most bases.

I’ve only built for i386 as that’s all I need it for right now. Tbh, it’s really not that difficult to build you own, but here they are anyway:
UPDATE: I’ve setup an apt repository for all this nonsense.

deb http://johnleach.co.uk/downloads/ubuntu breezy backports

I don’t really have plans to keep this up to date, but I might expand it to a few other packages I want to play with, so feel free to use.

yum/up2date suck, new job

I’ve come to the realisation that yum and up2date completely and utter suck. Why is it yum has spent the last 20mins downloading rpm headers from the dag repository? Why is it up2date can’t search properly? why does yum return search results in an unreadable way? why do both of them, at the mere hint of something going wrong, spurt out a big python backtrace that is very little use to very many people. Why are these tools SO BAD? How difficult IS THE PROBLEM? Debian have got it right with apt. Headers are downloaded in 30 seconds, search supports regular expressions! There is even an RPM ENABLED version of apt. Why wasn’t this used in Fedora? Why up2date with it’s crappy secretive SSL and XML and SOAP and crapness.

Firestorm Debian packages

I’ve built some Firestorm debs for x86 from the latest snapshot (0.5.5-pre3). I had to remove a little bit of verbose debug code from the linux capture driver. available here..

Debian ipsec-tools for 2.4 kernel

The Debian ipsec-tools package doesn’t work properly with the Debian 2.4.21 kernel (you can’t specify “ipsec” as policy, it only recognises “discard” and “none”). Herbert Xu helped me out and I’ve rebuild the packages against the 2.4.21 kernel sources, and now it seems to work ok. I’ve made the packages available here.

Firestorm ethereal and RedHat Advanced Server

I’ve ported my Ethereal ELOG patch to the latest version (0.9.14) and fixed a bug handling pcap captured alerts. Created Debian debs for powerpc and i386. Matt is working on some RPMS for RedHat 9

RedHat’s latest change of support plans for RedHat Linux seems to be doing what was intended, getting more people to purchase Advanced Server (and the new Enterprise Server and Workstation) rather than leeching off them. Good for RedHat. There have been too many idiots selling RedHat Linux-based solutions expecting the coloured headgear company to do the hard work of beta testing, bug fixing etc.etc. for free.

mac/arpwatcher firestorm preprocessor and PIX tomfoolery

I’m currently working on a preprocessor for the Firestorm NIDS to detect dodgy looking arp activity. So far it keeps track of hardware and protocol addresses in arp packets and alert if things change. It will soon monitor IP traffic too (and IPX/Appletalk etc. I guess) and detect a bunch of other ettercap style trickery.

PowerPC and Debian

I’ve moved architecture and Linux distro by upgrading to a PowerBook G4.