Home » rant

Category: rant

Let’s talk about OS package management.

This post is quite long so here are some links to the relevant material:

Introductions

On most modern operating systems there is a package manager that does the following: installs, un-installs, updates, and downgrades packages (software). The names vary by operating system as do the command(s) to invoke the package manager. (For anyone thinking that Mac OS X doesn’t have a package manager: I’m counting the Mac App Store as a package manager since it does the above. It is a smaller subset of packages and they all have to be blessed by Apple but it still performs the functions listed.)

I’ll be writing about YUM and RPM since those are the systems that I know. From conversations I’ve had with people who run Linux versions that use apt, apt-get, or aptitude most of what I’ve written here applies to it as well.

The most used versions of Linux: Ubuntu (Debian) and Red Hat the package managers are written in the Python programming language. The choice of programming language doesn’t really matter; the fact that it is tied to the version of Python installed on the machine is the problem. This brings me to a set of rules on which a better package manager should be based.

The Rules

1. Package managers should never be dependent on the system version of anything.

Perhaps you, dear reader, haven’t had the opportunity to re-install every RPM on a production machine because they were all deleted somehow. I have had that displeasure and it was not a good time. A package manager that becomes broken when the main version of Python on the system is upgraded from Python 2.4 to Python 2.5 or Python 2.6 is completely worthless. A package manager that no longer works if the system’s Python packages become corrupt is worthless.

This is not to say that the package manager versions shouldn’t be tied to a specific OS versions. Having a YUM 5.x for CentOS/RHEL 5.x makes sense. This means that the package manager is completely self sufficient and self contained.

2. Package managers should never be allowed to un-install themselves or their own dependencies.

This goes with rule number 1. The package manager shouldn’t depend on the system version of anything. No package manager should be able to break itself by un-installing its own dependencies e.g., you can use YUM to un-install glibc, a .SO file on which EVERYTHING in Linux depends. This would be fine if you were able to use YUM to install glibc again but you cannot because it depends on glibc to fucking work. The YUM version in RHEL 5 and up include a re-install command. If you’d think it would work in this case, you’d be wrong.

3. Package managers should be able to upgrade you from one version of an operating system to another with minimal downtime and minimal configuration.

Ah the days of CentOS 6’s release! All the awesome new features with a more sane default filesystem: ext4. (I wrote more sane; it’s still not a production file system.) How great and wonderful, we can upgrade CentOS 5 machines to it, right? NOT A FUCKING CHANCE LOSER. The official answer about upgrading between them was: re-install the machine. Wow, what a fantastic idea; just re-install the machine and restore all of its data and all of your customers’/users’ data, they won’t mind at all.

The only time I’ll accept the answer ‘re-install’ is when moving from a 32-bit OS to a 64-bit OS since that is a major ABI change. However, I still think there should be a way to upgrade from a 32-bit OS to a 64-bit OS with minimal downtime and minimal hassle.

Where’s the Code?

This is just my idea for a better package management system that would actually fucking work. I’m extremely hateful towards YUM and RPM because I’ve been burned too many times by just how shitty they both are.

There are no pull requests with this post, there’s no code, and there’s no suggestions for how to implement any of this because trying to change the way a Linux vendor does anything is pointless. Unless, you want to fork the project and spend the rest of your life maintaining it.

If you think it cannot possibly be that bad to change the way a Linux vendor does things: spend a couple days following some sysadmins and software developers on Twitter. You’ll see plenty of people who have tried to add their software to a distro or just update it and are met with constant bureaucracy.

If you write your own software and want to make it available for people to use: You are far better off building OS packages on your own using tools like FPM, or RPM itself and whatever Debian based systems use. You can host your own YUM/APT repo for pretty cheap and there’s 0 bureaucracy with which to deal. Another acceptable method for making your software available would be putting your code up on GitHub and include a Makefile that will build .deb and .rpm packages.

Conclusions

I just want a working package manager that isn’t dependent on system libraries that it can un-install on its own and also be used to upgrade me to a newer version of the operating system I’m running.

Are there things out there like this? Yes. I keep a Joyent SmartMachine around for the times when I need a VPS. It’s fairly cheap, runs SmartOS, and has a production filesystem: ZFS. Upgrading SmartOS from one version to a new one works pretty well. You simply follow Joyent’s documentation. The documentation isn’t updated very often which irritates me but if you check that there is a newer Quarterly release and follow the instructions your machine gets upgraded. SmartOS uses pkgsrc which is available on numerous systems. After logging out and back in your SmartMachine should be in the state that it was. In some cases I’ve had to re-install Python packages I was using but I’m not sure if that is the case for everyone. While SmartOS upgrades seem to work this isn’t a production machine and I don’t use it for anything that would impact users.

Now that I’ve distilled this caremad into more than a thousand words I don’t know why the systems are set up they way they are now. Who thought it would be a good idea for a package manager to be dependent on the installed system software? Who thought it would be a good idea for the package manager to be able to un-install its dependencies? Who thought that making people re-install an OS in order to upgrade to the newest version was a good idea? Why would anyone think that this is a good idea? I’m happy to listen to any of the reasons behind this. If you’d like to discuss further @ reply me on Twitter (@klyntonj). If this is just some remnant of times when hard drive space was a precious commodity or when RAM was scarce; I’d love to see it die.

Republicans and Socialism

>In the U.S.A. Homeless go without eating.

>In the U.S.A. Elderly go without needed medicines.

>In the U.S.A. Mentally ill go without treatment.

>In the U.S.A. Troops go without proper equipment.

>In the U.S.A. Veterans go without benefits they were promised.

>Yet we donate billions to other countries before helping our own first. Have the guts to re-post this. 1% will re-post and 99% Won’t have the Guts

I’ve been seeing this message posted around on Facebook and other social networking sites quite often over the last month. Rather than replying to each message and falling for the [someone is wrong on the Internet](http://xkcd.com/386/) trap I’m just going to passive aggressively write about it on my blog.

I’ve also noted that all of the people who do post this hate Obama, are Republicans, and say they are Christians of some variety. That has to cause a lot of internal conflict. Whining that we don’t provide enough social programs while you and your party vote against them, seeing people in need and not helping them when your religion says you should, and telling everyone that they are too “chicken” to repost the same thing doesn’t seem very Jesus-like.

Don’t worry, I know you are just posting this because all of your friends posted it and it seemed like a good idea at the time. I know you aren’t really that dumb; that you don’t actually vote with your party AGAINST the very things you think are wrong with this country. I know that you actually fact-checked it and thought it would be ironic if you changed your political affiliations to Republican and religious views to Christian before posting this; I know I would.

>In the U.S.A. Homeless go without eating.

Yes, that’s right, because having homeless shelters and other social programs to help homeless people is SOCIALISM.

>In the U.S.A. Elderly go without needed medicines.

Yep, that’s because having a Government run healthcare system that can care for them and pay for their medicines is SOCIALISM.

>In the U.S.A. Mentally ill go without treatment.

Hm, this still falls under the Government run healthcare system but we can’t have that because it is SOCIALISM.
>In the U.S.A. Troops go without proper equipment.

It’s been 10 years (almost) since we started the war so I’m kind of fuzzy on exactly why we didn’t have proper equipment but I’m pretty sure it had something to do with a Republican President deciding that we needed to go to war NOW…then after we’d just started that war, decided that we needed to invade ANOTHER country so there wasn’t enough equipment to go around.

>In the U.S.A. Veterans go without benefits they were promised.

Here we are with that Government run healthcare thing again, which is exactly what the Veteran’s (VA) hospitals are. I’ve not met any Veterans that haven’t received the benefits that they were promised so I cannot fully comment on this one, however, as I’ve noted hospitals that deal especially with Veterans are Government run. That means they come from SOCIALISM.

>Yet we donate billions to other countries before helping our own first. Have the guts to re-post this. 1% will re-post and 99% Won’t have the Guts

We do donate billions to other countries, we also spend billions of dollars a month fighting those 2 wars that that one Republican President started. Think about just how much a billion dollars is, hint: it is a metric fuck load of money, from [CostofWar.com](http://costofwar.com/en/) you can see how much we’ve spent already, now look at how much [1 trillion dollars is](http://www.pagetutor.com/trillion/index.html).

We do help our own country first, we spend a substantial portion of the country’s budget on programs like Social Security, Medicaid, Medicare, Pensions, and Welfare, which are all used to help the people mentioned above and SOCIALISM. Take a look at the [proposed](http://www.nytimes.com/packages/html/newsgraphics/2011/0119-budget/index.html) [budget](http://www.usgovernmentspending.com/budget_pie_gs.php).

Also, note that these programs are paid for from your [FICA](http://en.wikipedia.org/wiki/Federal_Insurance_Contributions_Act_tax) taxes (Social Security and Medicare). Note that the amount we’ve spent on the war already is more than the amount that we need to run [Health and Human Services](http://www.nytimes.com/packages/html/newsgraphics/2011/0119-budget/index.html) for an entire year. Another side note, if the FICA tax increased by the amount each American spends on private health care (while working for a Corporation who meets employees half way on the premiums, for those of you who work for yourselves you know just how much money you have to spend on health care each month without a Corporation to match it) Government run health care would be possible.

I know I’m glad we hate that evil SOCIALISM so much, it would be RETARDED (see what I did there) to let poor people who can’t afford health care have it. Also, why should my tax dollars go to pay for some homeless person’s frost bite? It’s not like I made him homeless, that’s his own damn fault.

Don’t even get me started on old people, they are old, they’ve lived a long time, they’ll probably die soon why should I pay for them to have health care? Everyone knows that old people have all sorts of diseases and expensive medicines, I don’t want to pay for that. Wait, what? So what if these old people helped stop Hitler, or helped keep South Korea its own country, or built the companies that we are working for now? What have they done for me lately? Nothing but take my FICA taxes, that’s what.

The Military is evil because they are the product of SOCIALISM. I don’t know of a single corporation in the world that could actually staff a standing military with the equipment/personnel our Government can. Even the major ones that are “armies” Xe (Blackwater) and Haliburton don’t have any where near the amount of money it takes to run an actual armed force or provide national defense. The Military is completely funded by the people and tax dollars, SOCIALISM, kind of like public schools, SOCIALISM, first time home buyer loans, SOCIALISM, college grants, SOCIALISM, public fireworks, SOCIALISM, public roads including Interstate highways, SOCIALISM, state parks, SOCIALISM, national parks, SOCIALISM, city parks, SOCIALISM, almost all infrastructure, SOCIALISM, and Libraries, SOCIALISM. See how that evil socialism sneaks its way into everything you ever liked?

So, America, let’s get rid of this shitty socialism thing that has crippled our nation for so long. We don’t need it!

“The Book of Eli” – don’t waste your money. *spoilers*

I normally don’t go to the theatre to watch movies (I have a nice size TV and a good surround system) but, occasionally, it is nice to go to the theatre and watch a movie. This was not one of those times.

Watching the trailers for “The Book of Eli” had me believe 3 things:

1. Denzel is a badass

2. He has a magic book

3.  Gary Oldman wants to take it from him

The first half of the movie is spent on establishing my number 1 assumption with Denzel fighting and killing dozens of people with a sword, gun, hands, and what ever else he could use. At the end of everyday he spends time reading assumption number 2. After he reaches the town that Gary Oldman runs the movie starts to go down hill as we learn that this book is “The Bible” not just any old magic book. (queue boredom) Gary Oldman wants to use the words of “The Bible” to make un-educated people follow him, tricking them into believing it, and thus set himself up as king of the world (how early Christian of him).

*More spoilers*

From there the movie gets boring and predictable, the only reason I didn’t leave (I’ve never walked out on a movie before) is that I wanted to find out what was out “west”. Turns out that “west” was Alcatraz where Alex (from “A Clockwork Orange) is a crazed looking old man who prints books to give back to the world. The only real plot twists from the middle to the end of the movie was:

1. The book is in braille

2. Denzel was blind the whole move (but God let him see so that the book could make it “west”, yay God!)

The book doesn’t make it “west” but luckily Denzel memorized the entire book so he could repeat it word for word when he got there (I know, right?).

Summary:

The movie, from the middle on, is shit. The first half is good for action. If you are going to watch it, wait until there is a decent torrent – there is no point wasting your money.

My Battle of Twitter Clients.

Recently (after upgrading to Snow Leopard) I have been forced to find other twitter clients than the one I had been using for almost a year, Nambu. As a part of the MacHeist offering I got a copy of Twitterrific which I tried for a couple weeks…I hated it. Here they are with their pros and cons:

Nambu (10.5 version):

Pros:

  • Multi-account setup is easy
  • Good layout

Cons:

  • On Snow Leopard, if left running will use 2.0GB of RAM

Nambu (Snow Leopard version):

Pros:

  • Smaller RAM usage
  • Free

Cons:

  • New UI is awful
  • The break outs of retweets
  • Resizing window doesn’t resize tweet field

Twitterific:

Pros:

  • None, simply awful

Cons:

  • Always on top
  • Horrible UI
  • It costs money

TweetDeck:

Pros:

  • Multi-column so you can see all of the info you want

Cons:

  • Ugly – even if the color scheme is changed
  • Adobe AIR
  • Multi-column

Tweetie:

Pros:

  • Beautiful UI
  • Wonderful multi-account setup
  • Overall, very enjoyable

Cons:

  • Pop out compose field
  • Search setup is odd and clunky
  • Dock icon doesn’t show number of tweets
  • Number of tweets isn’t shown anywhere

Echofon:

Pros:

  • Simple, clean interface
  • Number of tweets is clearly visible
  • Search is quick/easy to use
  • Compose bar is built in
  • Slide out drawer info is helpful

Cons:

  • Multi-user accounts are clunky

After my full evaluation of these clients I’ve found the perfect twitter client for me would be Echofon and Tweetie smashed together, giving me the in app compose bar with the left sidebar and the slick interface that Tweetie has.

I’m still unable to decide between Tweetie and Echofon so I am currently using both. (side note: leaving 4 twitter clients open at a time quickly reaches the API limit.)

WTF is with "developers" using Windows to write code? *updated*

Seriously, WTF? Demo? Check out this moron.

I read the #django-users’ list and it seems that, almost daily, there is someone that has a problem installing django on Vista or XP. Who would host a server running Vista or XP? I hope, NO ONE. What kind of moron would trust Microsoft with his/her data? Also, seriously, who runs server farm hosting businesses on Windows? I know people do, but, self flagellation would be a little less painful, really.
I read the mod_wsgi users’ list and it seems that, almost daily, someone has a problem installing mod_wsgi on Windows. (I have had my fair share of mod_wsgi problems (see below)) but a local Apache server on Windows, c’mon people.
Most of the screencasts I have seen about anything django or Python related has been done on Windows as well. Save us FSM (flying spaghetti monster).
I guess I have to applaud their efforts, these lost intellects, I got off the Windows juice many years ago. I have been consistently Windows free for the better part of 6 years. What should they use? Unix, almost any flavor. I was never much for the distros that had BSD in the name, my hardware was too advanced to install it (god I miss those days). Nowadays, I run OS X on my MBP and OpenSolaris on my in home staging server. Both Unix, both very powerful and all that. Both > Windows.
Seriously “developers” get an operating system that will allow you to actually have a key to the hood so you can fix your own itches.
(This kind of ended up as an opensource parade but it is still true; friends don’t let friends use Windows.)