23/02/2009 @10:14:54 ^11:43:53

Issues and improvements arising from Lenny upgrade

I thought I'd write down a bunch of things that happened during/after upgrading my system to Lenny last week.

I tend to hand-hold and micro-manage the upgrade process rather a lot, only doing a few packages at a time and so forth. I guess if you had dozens of servers to upgrade and you didn't particularly care about any of them you'd just do the usual dist-upgrade incantation, but I prefer to be more careful.


Aptitude is a bit different. One difference is it is less likely to remove automatically installed packages. It wouldn't remove libdevmapper1.02 despite it being automatically installed and having no dependents - I can only assume it didn't do this because it is priority "required". It also doesn't automatically remove automatically installed packages that are only recommended by some other package.

It has a new long-hand form of search options (?priority(required) is the same as ~prequired, for example) I haven't yet worked out how I can make it find all packages on the system that are only there because of recommends. To put it another way, I want to see if aptitude can do what deborphan does.

dpkg triggers

Whenever I installed a packages with manual pages in it the process would pause noticably running "triggers for man-db" - I assume this was rebuilding the man page index, but it was repeatedly scanning half the disk which was slow and got irritating after a few times. I suppose the assumption is that you wouldn't be doing hundreds of install runs for a couple of packages at a time, you'd be doing one big one and sorting out the consequences later. But as I said I don't work that way...

The point of triggers is to speed things up, the idea is you install or remove a bunch of packages and then at the end of the install run, execute the trigger once, instead of in previous releases which would run a trigger after every package. However in previous releases there was no such thing as a manpage trigger, you'd just wait until the next time the man-db cron job rebuilt all the indexes. And man used to be able to find newly-installed manpages just fine if called by name, they just wouldn't show up in the output of apropos, etc.


This file has been deprecated since etch and is now no longer processed by /etc/init.d/networking so you have to move the things it does into /etc/sysctl.conf. Also it might be worth using net.ipv4.conf.all instead of .default as the comment in the file says. .default only affects the default value for new interfaces, existing ones won't get the setting.

Actually instead of editing /etc/sysctl.conf I notice there is a /etc/sysctl.d so you could make a file named local-netoptions in there so you don't get bothered by dpkg demanding you to tell it whether to keep the old modified /etc/sysctl.conf or install a new version for the rest of eternity...

(I wonder if there's a kernel build option that makes net.ipv4.conf.*.forwarding default to 1 without having to do it on boot..?)


Locate went missing. That's the program that you can use to quickly search for filenames because it makes a daily cache into a database of the state of your disks. This used to be in findutils but is in a separate package that didn't get automatically pulled in because I don't have recommended packages automatically installed.

Might try mlocate, it's apparently better.


Tar appears to have gained an option -a which means "use the compression format specified by the filename". This is great. No more going tar -zxf and tab-completing a filename only to notice it ends .bz2 and having to go back and turn the z into a j. You just put -axf and it does what you mean.

gcc 4.3

As usual, upgrading gcc made compiling rboom start spewing warnings again. Sigh. I had spent several hours last November getting rid of them all again. I cheated, and turned off -Winline, which shut the new ones up. From my commit logs:

I realise that just disabling the warnings is cheating, but the gcc man page says "seemingly insignificant changes in the source program can cause the warnings produced by -Winline to appear or disappear." and who wants to deal with that?

Indeed various sources argue we shouldn't bother with inline at all, and instead leave it up to the compiler to sort itself out...

libsmpeg-dev autoconf warnings

They fixed that bug where whenever I did autoreconf on an SDL app it would spew a bunch of warnings about underquoting (or was it overquoting) in libsmpeg's autoconf stuff. Not important, but still nice.

curl ssh

Is curl meant to support ssh protocols? libcurl now depends on some package called libssh, but doing "curl ssh://something" just says protocol unsupported. I need to investigate this.

*two minutes later* okay, it's not ssh, it's scp. Output of curl --version lists supported protocols, and I just used the wrong name. However using scp:// just says "authentication failure". Still need to investigate this.

dhcp-client to dhcp3-client transition

I guess it was a bit too much to expect that the forced transition from dhcp2 to dhcp3 would transparently handle the customisations I had made (I have hook scripts to run ddclient, that sort of thing) It also didn't restart the daemon, but then I suppose it probably shouldn't (if it did, and the restart failed, you'd be left without a net connection!)

Some investigation revealed all I really needed to do was copy /etc/dhclient-{enter,exit}-hooks inside /etc/dhcp3/ and then ifdown/ifup eth0. (Of course I probably should have done this ages ago, dhcp2 has been obsolete for ages, but it just worked and I didn't care enough)

vim modelines

Vim has a bunch of improvements like syntax highlighting for git commit messages but one thing I did notice rather quickly was that it seemed to be defaulting to not process modelines. Putting set modeline in my .vimrc fixed this, but it was a bit weird, and not mentioned in any of the NEWS.Debian files I read.

*update* it's mentioned in README.Debian. See even doing an upgrade ridiculously slowly I still miss stuff!

xdm authorisation key matches an existing client

That infuriating problem that used to happen about once every three times I tried to start an SDL application, where it would bomb out with an error similar to the preceeding title, has apparently been fixed. Oh glorious day! The number of times I'd gone "doom2 -warp 1" and it'd refused to run, and I'd had to go up arrow return up arrow return over and over again until it did run was driving me mad.

firefox 3

Firefox 3 is one big issue all by itself!

All right that's pretty unfair, upgrading it wasn't too much of a disaster, it mostly carried over my old config tweaks. It failed to import bookmarks automatically, though. However I notice all its internal files are sqlite databases, which makes them hackable.

I have to say though, 3 does seem noticably faster than 2.

Oh and I mean Iceweasel of course!

vlc and mplayer

I replaced vlc with mplayer. I think I prefer mplayer. Its only drawback is you can't seem to skip around a video in less than 10 second increments. However it has proper softsub support which rules so much I can't believe I put up with vlc for so long.

The Kernel

I'm still on a 2.6.18 kernel which I built from etch's kernel source package. I should probably upgrade it to a 2.6.26 one built from lenny's kernel source package. Haven't done this yet because it's kind of daunting. Trying to start from a 2.6.18 kernel config threw up a bunch of warnings about missing options. Maybe I should just stop faffing around and use a distribution kernel.

And Finally, The Usual Complaint About Increased Disk Usage

-rw-r--r-- 1 root root 924M 2009-02-15 14:57 etch.tar
-rw-r--r-- 1 root root 872M 2009-02-22 14:09 lenny.tar

Wait, what? It's smaller? It usually goes up by like 50%!