Alien::SVN - Installing SVK now 521% easier!

schwern on 2007-09-21T02:23:11

As some of you know, installing SVK can be a pain in the ass. Aside from a huge pile of normal dependencies, it depends on SVN::Core, the Perl bindings to the SVN libraries. SVN::Core lies deep inside the Subversion source tree. It does not get installed by default, you have to rebuild Subversion and run some additional stuff. Maybe you're lucky and your vendor supplies a package for it, but it's something that makes SVK installation non-automatable.

So I got to thinking, why not just ship a wrapper around Subversion that does all that work for you? So I did. Alien::SVN comes with a full Subversion source tree. It builds Subversion and installs just the libraries. Now authors can depend on SVN::Core and let the normal dependency resolution figure it out.

There's still warts. I've only tried it on OS X and Ubuntu. You still need all sorts of dependencies for Subversion like APR (Apache Runtime) and I think Python and Neon. It's highly unlikely to work on Windows. What I'm likely to do is add an option to download and install the binaries if things go sour.

Using Module::Build made the code to do this amazingly straight forward. You can look at how it works without wanting to claw your eyes out. I can't even fathom how I'd get MakeMaker to do it. Ironically, it needs make and has to interact with a Makefile.PL to build SVN::Core.


Win32 support...

Alias on 2007-09-21T03:54:58

Binaries would probably be by far the best way to add Win32 support.

Nifty

grinder on 2007-09-21T12:20:48

Oh you slack bastard Schwern! I wish you had done this last week.

I butchered my FreeBSD ports system on my laptop to install bleadperl as an official port, to see what breaks. After a certain amount of grief, I made it work.

Of course, all XS modules with stuff in 5.8.8/mach and the like evidently stopped working. So for svk, I had to reinstall SVN::Core. Here I ran into Configure hell where sometime /usr/bin/perl (5.8.8) was used, and elsewhere /usr/local/bin/perl (5.10). And so it could never find the libraries. Took me about 8 hours on and off playing with PERL5LIB, PATH and /etc/make.conf trying to get everyone to dance to the same tune.

This module would have saved me a lot of time. Schwern++ for actually having written this.