John Leach

Tag: Debian

Puppet dependencies and run stages

Created · Tech · 8 comments

I'm using Puppet to manage some apt repositories on Ubuntu and have had a dependency problem. I want to write the source configs before running apt-get update and I want to run that before installing any packages.  Otherwise, a manifests that tries to install a package from a custom repository will fail, either because the repository is not configured or the apt metadata hasn't been retrieved yet.

Due to Puppet changes being idempotent, this is usually solvable by running puppet a few times (ew). Or you can do this properly by diligently setting all the dependencies for all of your packages on your apt-get update command, and having that depend on your source configs, but that's pretty fiddly.

Continue reading “Puppet dependencies and run stages” →

Hello world, Debian style

Created · Tech

# 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

Created · Last updated · Debian, Ruby on Rails, Tech, Ubuntu · 3 comments

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.

I could implement some locking in my application, but it's always good to avoid as much new code as possible so, in the good old *NIX fashion, I cobbled together a short bash script taking advantage of existing tools. What this does is executes the given rake task in the given rails root using the Debian/Ubuntu tool start-stop-daemon (provided by the dpkg package, which is therefore always installed). start-stop-daemon uses a pid file to keep track of the rake program for the given task, so it will never run a second concurrent instance of rake for this task. Cron just keeps trying to run it every 5 minutes or whatever, but it only runs once concurrently.

Continue reading “Reliable rake task execution” →

Xen on Ubuntu Edgy broken - Debian to the rescue

Created · Last updated · Debian, GNU/Linux, Tech, Ubuntu

Xen LogoI 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.

Continue reading “Xen on Ubuntu Edgy broken - Debian to the rescue” →

Encrypted partitions with Ubuntu/Debian

Created · Last updated · GNU/Linux, Security, Tech, Ubuntu · 16 comments

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.

Continue reading “Encrypted partitions with Ubuntu/Debian” →

Turck MMCache speediness on Debian Sarge

Created · Last updated · Tech

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.

Continue reading “Turck MMCache speediness on Debian Sarge” →

Epiphany and Firefox Dapper packages for Breezy

Created · Last updated · Tech, Ubuntu · 3 comments

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.

Continue reading “Epiphany and Firefox Dapper packages for Breezy” →

yum/up2date suck, new job

Created · Last updated · Personal, Tech

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.

Continue reading “yum/up2date suck, new job” →

Firestorm Debian packages

Created · Last updated · Tech

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

Created · Last updated · Tech

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.