Skip to content

There are no shortcuts

Once upon a time, I was playing golf at chimney rock in Napa.  The course has been replaced by a vineyard now.  But I remember playing a round with my brothers.  I’m not a very good golfer and I have a hook and a slice.  One of the holes had a sharp dogleg left around another hole.  I shanked my drive so badly I landed on the fairway of another hole.  But it took a shortcut through the dogleg and I had a good look at the pin.  (We didn’t recognize the out of bounds markers during our rounds).

Anyway I was squaring up for my shot when the course marshal rolled up in his cart.  He pulled within 20 feet or so and paused for a moment.  He didn’t get out of the cart.  It was just the two of us since my brothers had been lucky enough to keep their balls on the green.  I eyed him warily not sure what was going to happen.

“Son, there are no shortcuts in golf.”

After delivering this pearl, his golf cart roared to life and he was gone.  I pondered his advice as I took my next shot.  And the next.  And the next.  And so on.  It took me a while to get onto the green.

Anyway, I remembered this story today while I was trying to build a custom RPM for ruby.  You would think this would be pretty easy and maybe even irrelevant since ruby is pretty popular these days and Linux is a pretty mainstream platform too.  I thought for sure someone else would have already done the hard work.  Alas, no.

We are building some new OS images for use in templating virtual machine builds in the cloud.  All of our machines will be configured using puppet and capistrano because each of these tools make system administration easier.  And easy is a requirement if we are going to start proliferating cloud hosts.  Puppet and capistrano are built using ruby so we need ruby.  For some arcane reason involving ruby openssl libs, puppet would not work with our vintage ruby 1.8.7-p174 rpm so it was time to build some new hotness.

I can build and install from the tarball just fine.


tar xvfz ruby-1.8.7-p302.tar.gz
cd ruby-1.8.7-p302
./configure -prefix=/usr
make
make install

But I have this thing about installing all of my system software via the native package manager for the platform.  I really like to use RPM on Redhat.  Otherwise dependency resolution is impossible.  I found that the tarball install worked great but that my puppet recipes used yum to install several gems and other ruby-ness that require a base ruby install.  And since RPM didn’t know about the tarball install I needed to install these RPMs with –nodeps.  Unfortunately, puppet doesn’t use that flag.  Instead it would try to install dependencies including an old vintage version of ruby-1.8.5 from the vanilla EL5 distribution.  Installing this RPM breaks the host.  And our puppeteering and capistrano magic each require ruby features that are only available in ruby versions greater than 1.8.6.  The whole point of installing ruby is to make puppet and capistrano function.

Welcome to dependency hell.  This is what sysadmins do.  They solve annoying little situations like this.  I haven’t solved this particular one yet as the .spec file format for rolling your own RPM is not for the faint of heart.  But I will…

Post a Comment

Your email is never published nor shared. Required fields are marked *

Powered by WP Hashcash