Archive for August 2007

Your personality as defined by your choice of compression utility

  • .zip – you’re very popular but a little shallow, you get invited to most of the parties but you’re not considered part of the really really cool crowd. You’re also accident prone.
  • .Z – you’re a dinosaur, get out of your mother’s basement and mingle, explore the world and upgrade your life.
  • .zoo,.lzh – you secretly are still a kid, time to put down the Amiga/Atari ST and move on, I’m sure your significant other would be much happier if you let go of the past
  • .gzip – You’re the cool kid, you can get into most parties and no one will sneer at your decision.
  • .rar – You are a rebel, girls look at you like you’re pirate and you don’t mind sharing the fact, you like porn.
  • .bz2 – You are very serious, detail oriented and concerned with optimizing anything no matter how small the return, you spend much of your time alone
  • .hqx – You’re an iconoclast, you love swimming against the current, you want everyone to know it but you’re not willing to share.
  • .uue – You’re a lowest common denominator kind of person, KISS – keep it simple stupid, and you like porn.
  • .sit – You’re an iconoclast with money and you like to flaunt it, the only thing is, you don’ really know what’s going on in the world.

Automating your subversion backups

This is a pretty handy article on automating your subversion backups good stuff to know and implement, seen via

Why hasn’t the fact that the “expat” install is broken, been discovered before this

I’m porting the Blogmatrix platform to Solaris and of course all kinds of little things are popping up, like expat’s install is broken for include files, and I’m assuming it’s a Murphey’s law sorta thing that it hasn’t been discovered before, at least I haven’t found the problem Googling for it.

Here’s the gist, the installer drops a number of files into assorted places, for instance a library, a man page and two header files. Looking at the we have the following, in particular the last line.

APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h

installlib: $(LIBRARY) $(APIHEADER)
        $(mkinstalldirs) $(libdir) $(includedir)
        $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY)
        $(INSTALL_DATA) $(APIHEADER) $(includedir)

The last line translates to the following on Solaris:

conftools/install-sh -c -m 644 ./lib/expat.h ./lib/expat_external.h  /your/install/dir/include

Which seems reasonable enough, except for the fact that install-sh ignores anything between the first file and the last directory directive on the command line, nice. On other platforms configure uses a different install script provided by the system instead of install-sh included in the package, bummer, it would make sense to fix install-sh but it won’t be pretty. So I’ve patched the Makefile instead, ugly but much smaller and it should work every where.

< installlib: $(LIBRARY) $(APIHEADER)
> installlib: $(LIBRARY) installinc
<       $(INSTALL_DATA) $(APIHEADER) $(includedir)
>       #$(INSTALL_DATA) $(APIHEADER) $(includedir)
> installinc: $(APIHEADER)
>       for exHeader in $(APIHEADER); do\
>               $(INSTALL_DATA) $${exHeader} $(includedir);\
>       done

Shell Script Portability Hints (or so much for POSIX)

The first rule is to never assume anything is where you think it is, /usr/bin/env is your friend, especially in combination with #!

Use commands in preference to environment variables, although it’s nice that environment variables like $PWD and $USER maybe set they aren’t always what you are looking for. For instance on FreeBSD if you are in your home directory, $PWD will probably read /home/user_name, but if you want the absolute path you should use $(pwd -P) or $(/bin/pwd)  (shell built-in vs command) which will yield /usr/home/user_name, two very different results. On Solaris $USER isn’t set, you need to use $LOGNAME instead or better $(/usr/ucb/whoami)

I’m not sure why the command line double-dash option, for example”–something” came into being, but it is not very portable when it comes to basic UNIX commands like “ln”, “tar”, or anything else for that matter, always use the short form for your scripts,  so “ln -s -f” instead of “ln -s –force”

Use indirection, create your own set of environment variables/functions that have the correct platform dependent references set upon initialization and then you can change your platform without modifying your main scripts. Your script may be a little uglier but it will run much better.

Pipelining is still your friend, many commands like tar have shortcuts to avoid piplining for instance “tar zxf” to automatically decompress the file before untaring it, nice and easy to write but not very portable. Instead use the long form “gzcat filename | tar xf – “, also you will probably need to “cd dirname” to your directory instead of using “-C  dirname” which isn’t supported on all platforms.

For cross platform testing (if you care about such things or need to worry about it) get yourself a copy of VMWare and set up your target test environments and start testing as destructively as you like, this beats dual booting or running multiple machines, you can have one virtual QA environment setup, VMWare Server is particularly good for this.

Building Python 2.4 Shared Libraries (.so)

Prone to fits of rage? avoid OpenBSD

Are you prone to fits of rage, do you get easily frustrated? If so, avoid OpenBSD. Just when I thought an operating system couldn’t get any worse than FreeBSD, OpenBSD lowered the bar, yah!

The installer is pretty lame, instead of having a directory with a bunch of files and other crap in it, including very poorly written documentation, what would be nice is the entire release in one CD image, not spread all over hell’s half acre. Of course there is no BASH shell included, oh there is a binary package but there are a number of shared libraries required, and the package doesn’t really indicate any dependencies that bash has, so off to play detective, folks I have better things to do with my time than figure out what packages contain what shared libraries that are needed. Just to add insult to injury the binary package is linked with a very old version of libintl, thanks for coming out, this is easy enough to cheat.

For completeness sake, your need the following two packages to complete the bash install libiconv and gettext which contains libintl, install in their respective usual places (/usr/local) and add a link for -> ./ or whatever version is in the current gettext package.

For the most part OpenBSD is a lot like FreeBSD but there are lots of things OpenBSD doesn’t support like bzip2 natively, this also means tar doesn’t support bzip either, all of which is very frustrating.

There is no MySQL Binary install for OpenBSD, which isn’t their fault, but it is an indicator of how important an OS OpenBSD is, not very.

ldconfig doesn’t work as expected as on other OS’s for non-root users, bummer.

There will probably be other updates to come, but I’m getting ready to abandon OpenBSD.

I kept with it, but I’m ready to take my LCD display and keyboard and throw them out the window I’m so frustrated with the incompetence that is OpenBSD. Apparently, IPv6 is installed by default and if you read the OpenBSD mailing lists there is no possible reason you would ever want to disable v6, since it is the “future.” Well OpenBSD’tards with Apache installed it wants to bind only to the IPv6 interface and since I don’t have any other IPv6 machines I cannot connect to Apache using our default configuration, I have to explicitly bind it to the IPv4 interface which means someone has to manually do this, what a joke. If I could disable IPv6 I could have figured out this issue much sooner, I don’t know if this is an Apache problem or strictly and OpenBSD but I’ve never run into this on any other OS.

Virtual PC, going, going, gone…

I’ve been pretty critical of VMWare, and I’ve been using Virtual PC since before Microsoft got their grubby little hands on it. Virtual PC in my opinion is generally easier to use and worked very well up until recently and for the most part supported Linux very well.

This weekend I tried to install Fedora Core 7 on Virtual PC 2004 (on my laptop) and of course it didn’t work, so I figured, hey I’ll upgrade to VPC 2007. After upgrading to 2007 the Virtual PC networking no longer worked so VPC was no longer of any use, after trying to fix the problem and jumping through all the stupid MS’isms I gave up and thought I’d downgrade to 2004, of course the network was totally screwed for 2004 as well. During this I also tried to install Fedora Core 5 on 2007 which I have working on another VPC instance on another machine, of course it doesn’t work anymore. Now if I was a conspiracy nut I’d be thinking MS has purposely tweaked VPC to prevent Linux from running, the jury is still out on this one.

So VMWare to the rescue, having finally setup VMWare server for Linux and getting all manner of OS’s running and being quite happy, I switched to VMWare and it worked perfectly, bye bye VPC.

So MS you may be giving VPC away, but if it can’t do the job what’s the point, I’d rather pay VMWare for a working product any day, MS’s loss is VMWare’s gain.

This looks interesting: an open source project manager

I saw this via Digg/Life hacker, an open source and free project manager called OpenProj. moving away from Windows is getting easier every day. The question is, move to what?

The latest Microsoft updates (appears unstable)

I installed the latest Microsoft updates last night, things went as they should, and then I turned off my machine (it gets a little warm in the office these days)

Only to wake up to my first system crash sans blue screen of death, it just spontaneously rebooted. I wasn’t doing much to stress the system either, reading blogs, email, listening to ATI FM radio and I had an ssh session going.

To that end, I’m blaming the MS’Tards for this instability. so I’d be wary of applying the patch until we here more about what’s happening out in the wild. Hopefully, there will be a patch to follow shortly.

Caveat emptor.


So far no more spontaneous reboots, but I’m always very wary when machines do strange things.

Update II:

Things are still fine which is reassuring, I’ve decided to upgrade my laptop we’ll see how things progress. 

FreeBSD – There’s a reason it’s FREE

So, I’ve been doing some testing with FreeBSD and boy has it been a long time since I’ve used a pure BSD implementation, and I have to say it feels very dated. The installer definitely errs on the expert user side of things. No wonder Linux has and does mop the floor with BSD.

I never realized how much I’ve come to like and depend on the System V’isms that are present in Linux and of course Solaris since they changed their numbering scheme way back.

There’s a bunch of little things like the installer is stuck back in 1997 and not very user friendly. Where the heck is curl? I installed all the supplemental packages and no curl annoying. Bash is in /usr/local/bin, what! bash isn’t a first class shell, all very odd. It’s probably me, but I don’t see any BSD in my future. There’s more things to come I’m sure, as I’ve just scratched the surface.

The default out of the box ssh is setup only for root/wheel sure it’s secure, but you might as well disconnect the Ethernet cable if you’re that worried about your server, stuff like this would drive a novice to distraction as opposed to being really really annoying, c’mon guys get a grip.

No SVN, I installed disc2 of the “extras” packages, no SVN, huh? No curl either which seems very odd.

No unzip either, have these guys been coding under a rock somewhere, time to wake up folks.

No dos2unix, I guess DOS is just to lowbrow for the FreeBSD crowd.

Oh FreeBSD why do you torment me so,  for heaven’s sake why on earth do you link /home to /usr/home you !@&#@? FreeBSDtards!