GIF now unungif’d

The GIF format, or rather the LZW format it uses, is no longer patent-encumbered.   (GIF patent worries led to the creation of the PNG format, if I’m not mistaken)  Matthias Drochner has changed pkgsrc to use giflib instead of libungif.

According to Wikipedia, the patent expired more than 5 years ago, so this isn’t really news other than some packages need to be rebuilt.  Still, memories of the general Internet Outrage from a decade ago are interesting compared to the events of today.

pkgsrc current and 2.9, plus shallow pulls

There’s two recent changes for pkgsrc and DragonFly:

The best way to fix up pkgsrc…

… is to make its patches unnecessary, by getting the changes needed for any program to compile on DragonFly built right into the program.  (Often called “pushing patches upstream”)  That usually means creating a patch and then tracking down the program authors to get them to include those changes in the next release of a project.  That tracking down can be a majority of the work.  In that case: thanks, Rumko!

Update: Also, thanks, Matthias Rampke!  He did the same thing for pcc.

Binary pkgsrc updates: an experiment

So, I felt lucky recently.  I updated shiningsilence.com from DragonFly 2.6 to DragonFly 2.8, and wanted to upgrade my pkgsrc packages from pkgsrc-2010Q3 to pkgsrc-2010Q4.

You can do this with pkg_rolling-replace, or various other tools, but I wanted to see if I could do it completely with binary packages.  I used pkg_radd -uv <pkgname> for each of the major packages I had installed.

Surprisingly, it worked, for every package.  I had to force-install some Perl modules because I was moving from 5.10 to 5.12, but I think I may have been able to use an additional -u switch to get by that problem.  I did use pkg_leaves to identify packages I didn’t need, and removed them to reduce the number of items to upload.

It was exactly what I wanted.  Previous pkgsrc upgrades had taken most of a day, as I had to build from source and figure out what went where.  We’ve had a better success rate in bulk builds recently, and this paid off in an upgrade process that only took perhaps an hour.

bin-install does it all

If you’ve ever installed pkgsrc packages from source, you probably typed ‘bmake install’.  There’s a ‘bin-install’ target that will use binary packages if they are available, but you have to set the appropriate environment variables to do so.

It’s now much easier, on DragonFly.  If you have pkgsrc-current as of yesterday or later, or pkgsrc-2011Q1 when it arrives, you can type ‘bmake bin-install’ for a pkgsrc application and it will download the binary package automatically, if it’s available, and build from source if it’s not.

This is a setup I’ve wanted for a while – the speed of a binary install, plus a fallback if the binary isn’t available.