[svlug] RANT: Ubuntu is Evil

Chris Miller lordsauronthegreat at gmail.com
Fri Jan 15 18:26:24 PST 2010


Yes, it is evil.  Pure.  Unadulterated.  Evil.

Allow me to explain.

I work as an intern at an iPhone app development startup.  Awesome job, I've done most everything from OpenGL ES debugging to programmer-analyst -like Ruby scripting, to Facebook and Twitter programming to J2EE programming.  Oh, and I washed dishes on the job.  How's that for variety?

Anyways, this all started with the J2EE part.  We built this app called "Hottie Spotter," which is a geotagging service for hotties (people).  You have your iPhone, you see a hot babe or hot guy (depending on which way you swing - we're not making value judgements over here, it's just a service, not a sermon) and press this big button on this app and it uploads your current GPS coordinates to a server, tagging the location where you saw the hottie.

These are then aggregated onto a map (via Google Maps mashups on a website and via MapKit on the phone itself, which is kind of like Google Maps anyways).  Using this data the theory is that you could use the information to decide where to go clubbing or whatever.  Or just peoplewatching.  Evidently people do that.  I live in a cave and write software, so I wouldn't know.

So I was the guy who wrote the server component, a nice little J2EE app which spits out XML.  The website uses the XML, the phones use the XML.  XML everywhere.  When writing it, I almost reached the level of insanity I did when working with regular expressions.  Well this all works just fine while working on my laptop.  NetBeans starts the app just fine, and then you can bounce requests off it all day.  Connects to databases without throwing a fit, and overall a rather excellent little server.  Built on GlassFish v2, we deployed it to an Amazon EC2 server running Ubuntu Server x86_64 9.04, and I thought that I'd never have to worry about it again.


Amazon servers are kind of expensive, and so we found that we could get away with downgrading to a "medium" sized server (whatever that means).  So my boss tells me that we now have a new EC2 server and to set it up.  SQL migrations are dead easy once you figure out how to use mysqldump and scp.  The real problem was with GlassFish and Java.

I prefer to use the Sun JRE.  No real reason, only that I've been using the Sun JRE since 1.4.2 and I just don't want to change.  I don't want to have to figure out what's different, or anything.  The Sun JRE is free as in the free samples at Costco, and I've never had any problems with it.

Now, onto why exactly Ubuntu is evil.

The new EC2 instance runs Ubuntu Server 9.10.  Evidently you cannot get the Sun JRE from an Ubuntu repository in 9.10.  Thank you for wasting 30 minutes of my life, Ubuntu, trying to figure this out.  So I guess that OpenJVM or whatever its name is will suffice.  I install that, but unfortunately the GlassFishv2 package is also missing from the 9.10 repository.  I know better than to try and mix and match repositories.  It might work for a little bit, but ultimately the dependency checker will freak out and you'll be left with a hopeless mess.

What they did have was a series of packages for glassfish (that I had to take on blind faith were version 2, as Ubuntu's package version numbers are notorious for having a weak correspondence to the actual version of the software in question).  glassfish-j2ee and a bunch of others that didn't look like anything I needed.  So I installed glassfish-j2ee and hoped for the best.

In Ubuntu 9.04, glassfishv2 installs an actual glassfish installation to /usr/share/glassfish, which you can use and enjoy.  In Ubuntu 9.10, glassfish-j2ee installs some JAR files into /usr/local/share/java with no instructions or anything about what the heck they do.

Ubuntu is evil because it breaks existing software.

So I decide to uninstall GlassFish and download an official release from the Glassfish site, and unpack that to /opt.  Call me weird, but I like putting stuff in /opt.  If it didn't come with the OS, it goes in /opt for me.  Probably not the most UNIX-ish pattern, but what the heck.  Works for me.

So after an overall of two hours I have the application back up and running, in spite of Ubuntu's efforts to completely undermine my attempt to repeat what I had done on Ubuntu 9.04.

Later on I'm on the actual company website trying to update the project management software we use, called Redmine.  Redmine is a Ruby on Rails application, which I installed to /opt.  Because I'm lazy, I used the version of Ruby and Ruby Gems from Ubuntu.  I was trying to update Redmine 0.8.7 to the newly released 0.9.0 version, though this is obviously not going to happen so easily.

I switched the SVN repository that Redmine was checked out from to the 0.9.0 tag with no problems.  I tried running rake to migrate the database with major problems.  Evidently it would kill the rubygems package maintainer to put /var/lib/gems/1.8/bin on the PATH.  Now /var/lib/gems/1.8/bin/rake db:migrate tells me that my version of Ruby Gems is out of date, and to run gem update --system.  Fine.

gem update --system tells me that this version of Ruby Gems was installed by Ubuntu, and should be upgraded by Ubuntu.  Fine and dandy.

Aptitute says that I have the latest version of Ruby Gems.  This is Ubuntu 9.04.  With a feeling of impending doom, I began the dist-upgrade to 9.10.  My premonition of more BS to come was absolutely correct.

Ubuntu decided that upgrading Apache was absolutely necessary.  I don't know why, the old version of Apache was working just fine.  Was there a reason to update?  No.  Just to appease the little monster that is the package version resolver or something.

This takes /var/www and moves it to /var/www-backup, and changes all the permissions to root as well.  Not that they ever tell me they're replacing my web directory with the Apache default - which they don't.  Evidently I'm supposed to be clairvoyant and simply know that they're going to wipe my user data while they're upgrading what should only be to the application binaries and what not.

Anyways, I upgrade to 9.10, which lets me increase my version of Ruby Gems by 1 minor version.  Hooray.  I run rake db:migrate, which still isn't on the PATH.  I run /var/lib/gems/1.8/bin/rake db:migrate and it demands I upgrade Rails.  I do so.  I run rake again and it tells me to upgrade rails.  I change a Ruby file which gets rake to pull its head out of its rear end and look in the gems folder instead of echoing the reminder to me a million times.  I run rake again, and it's a smashing success.  I go to the site and get a 404.  I go to the root of the site and get "Yes, it works!"

Thank heavens I know that's the default Apache page for Ubuntu, because if I didn't I might have removed a few bolts of my own hair.  No, it's not necessarily working you clod of a system.  It should have redirected me from munera.com to munera.com/blog, which it didn't.

After poking through /etc/apache2/sites-available (and looking through /etc/apache2/sites-enabled, just to be sure) I determined that /var/www is the web directory (as it very well should be!)  I look at the web directory and it's an Apache default one.  I'm absolutely horrified.  I wasn't the one who installed Wordpress, so for all I know I just wiped out the entire freaking customer-facing website without knowing it.  Which is depressing, because I had dutifully backuped up the MySQL database beforehand, as well as /opt.

Anyways, I find out that Wordpress was installed by Ubuntu, so /var/www/blog was actually a symlink to /usr/share/wordpress.  Finally, one point for Ubuntu.  I then notice there's a /var/www-backup, with the old web directory there.  Hooray, I axe the default one and mv /var/www-backup /var/www.  munera.com complains that it can't read the web directory.  chown -R www-data:www-data /var/www, amidst many grumblings.  By now it's 3:00 AM, because I absolutely refuse to take websites offline during daylight hours.  It's just bad form.

Now Redmine doesn't work because of some obscure passenger error, but I can ignore that because the customer-facing blog is complaining that it can't find the configuration file.  The configuration file for localhost is still in /etc/wordpress.  After much work with Google, I determine that the Internet doesn't have the answer.

This is the point where I start reading source code.  I find the PHP file which is supposed to load the configuration file, I find the variable which has the filename it's trying to load.  Instead of erroring with a message, I tell it to error with the name of the file it can't find.

Yes, instead of /etc/wordpress/config-localhost.php, it wants /etc/wordpress/config-www.munera.com.php.  How.  Freaking.  Asinine.  I mv config-localhost.php to config-www.munera.com.php and the blog works fine now.  Hooray.

3:45 AM and the thing I set out to upgrade is still broken.  So now it's on to figuring out why Passenger (a kind of mod_rails extension for Apache which makes running Ruby on Rails stuff easier) refuses to give me any joy with Redmine.  I figure out that there was some annoying thing I forgot what it was, and now it just gives me 404s.  After less and shift+g through the logs, it seems that Passenger is telling a Rails application with root staff/ that it should find the controller and view for staff/.  This is WRONG.  It should be finding the controller and view for /, as the root is staff/.  After another half hour of trying various things that might or might not work, I randomly decide to upgrade Passenger.

By upgrading Passenger ONE minor version, the problem goes away and I can finally go to bed.

Granted that some of the horror story isn't exclusively Ubuntu's fault, but I still fault Ubuntu.  Why?  Because when you upgrade Ubuntu, you break all the existing software.

Personally, I will pick Debian over Ubuntu any day of the week.  Debian never changes.  Therefore it never breaks.  Even when I have upgraded Debian, it still hasn't broken in quite the same way that Ubuntu has managed to.

I cannot understand people who enjoy Ubuntu.  They say "it just works."  It doesn't.  "Just works" is something that Debian does.

Perhaps being a cut-throat user of OS X, Windows, and Linux has given me this perspective, but Linux is no longer the king of stability.  Where SOME Linux distros shine is cheap, reliable operation.  Like Debian.  If you set it up right all you have to to is remember to keep paying the bill.  Unlike Ubuntu, where if you run apt-get update; apt-get upgrade you might be in for three hours of pain and frustration.


Registered Linux Addict #431495
For Faith and Family! | John 3:16!

More information about the svlug mailing list