June 16th, 2007
There’s an interesting write-up of a speech given by Mark Shuttleworth at the Linux Foundation Collaboration Summit here. Basically, he urges cross-distro collaboration on bug tracking and patching, which is certainly a laudable goal.
Here’s the response I mailed to his secretary (you know you’re too important for your own good when you need a secretary to read your mail…):
Mark, if you really want to help in this area, there’s one very simple thing you could do: push for Debian and its derivations to use a better format for patching packages.
Currently, as I’m sure you know, Debian packages basically consist of the original tarball plus one bigass compressed .diff file which contains:
1. Every single patch
2. All the stuff to turn the source into a Debian-style package
This is horribly unwieldy and hard to work with. For instance, take a look at the Firefox diff in Feisty:
would you enjoy trying to isolate a single fix from that?
In the RPM system, there’s a spec file which does the actual package building stuff, and several separate patches which are processed by the spec file. In the best case, there’ll be a comment in the spec file or the header of the patch to tell you what the patch does. In the worst case, at least the filename of the patch generally gives you a clue (e.g. appname-gcc4-fixes.patch), and at least since each patch is _separate_, it’s easier to check out each one at a time and see what it does.
To compare with the Debian example, here’s the SOURCES directory for Firefox in Mandriva SVN:
as you can see – there’s the original tarball, and all the patches we apply to the build, each one separate and with a useful name. You’d see much the same thing in Fedora’s package.
When I’m packaging something and come across an issue that may be fixed in another distro – for e.g., I’m updating an old package and it has problems building with GCC 4 or on x86_64 or something – the top of my list of other distros to check for patches is Fedora and the bottom is Debian (and Ubuntu). Not because Debian / Ubuntu is unlikely to have a patch or because Debian / Ubuntu’s patches are bad – this is obviously not the case – but simply because it’s so damn hard to isolate patches from Debian-style packages.