Debian amd64 adventures

grantm on 2006-02-23T08:35:26

We recently installed Debian Sarge on an AMD64 box and were surprised to find regexes in Apache were broken so this type of thing wouldn't work:

RedirectMatch  ^/oldprefix/(.*)  /newprefix/$1

It turns out this was a known bug which has been fixed, but unfortunately the fix didn't make it into the recent Debian stable release. The developers suggested I recompile the Sarge version with the patch. So then I had to find out how to do that. It was remarkably straightforward:

First I had to download the source and also install any packages required by the build process:

apt-get source apache
apt-get build-dep apache
cd apache-1.3.33

Then I installed the patch file (linked above) as debian/patches/516_amd_regex and tweaked it so the first two lines read:

--- build-tree/apache_1.3.33/src/regex/regexec.c        1998-09-15 15:47:45.000000000 -0400
+++ build-tree/apache_1.3.33.new/src/regex/regexec.c    2004-11-05 02:05:17.265970608 -0500

Then I edited debian/changelog to describe the change and define a version number for my package. Finally I built new .debs:

./debian/rules binary

After a surprisingly short time (it is a fairly quick box after all), the packages were built and ready to install:

cd ..
dpkg -i apache-common_1.3.33-6grant1_amd64.deb apache-dev_1.3.33-6grant1_all.deb apache-perl_1.3.33-6grant1_amd64.deb

The fact that none of this involved manually locating and downloading tarballs, running config scripts or researching obscure build options is fantastic. The fact that I now have a set of packages I can deploy on similar boxes is a lovely bonus. Yay Debian!

PS: The reason I installed the -dev package was because I needed it for a similar exercise to fix the broken Apache::Request package.


Debian == Good

ajt on 2006-02-24T17:33:04

Some people claim that Debian is a bit stuffy, but it's a well thought out and integrated distribution that normally "just works". I've been running Sarge/AMD64 and Etch/AMD64 for 6 months, and it's been a trouble free exercise. I've had the odd problem on Etch(testing), but nothing that has persisted for more than a week or so.