Contributed by deanna on from the S&M dept.
I've been working on a particular set of ports, off and on, for a few months now. The reason why it's off and on is that the quality of the free software for this particular task is sometimes demotivating. Such a claim is useless without examples, right?
Here's one: the distfile hasn't changed in two years, and is also one of the top search results for free software in this area. Must be a stable release, right? Not quite. Besides the usual differences (I showed a friend a block of the code and he squealed, closed his eyes and told me to make it go away), one of the source files is actually missing a semicolon. How do you let your project sit around for two years with a missing semicolon? Who knows, maybe it is intentionally left broken to keep the kiddies from abusing it. ;-)
Another... the distribution is about 50% emacs backup~ and #swap# files.
And another... the latest version was announced in early November, but the distribution is a zero-byte file.
But the last one is what really got me thinking: glibc functions _GNU_SOURCE #defines all over the place. Why would anyone release free software that is so non-portable? And this isn't systems programming, it's just a not-very-exciting everyday app. I don't get it. The Linux man pages are actually nice enough to tell you when something isn't portable; and you don't see fmt_scaled(3) all over pf and OpenBGPD.
Now, to be fair. I've recently started a new job where my desktop machine runs Solaris, and there's nothing I can do about that. Naturally, the first thing I had to do was port mg(1), since I can't live without it. Surprise, the amount of [Open]BSDisms in that program probably equals or exceeds the Linuxisms in the program I just mentioned. But, mg is an OpenBSD base system utility, so the comparison isn't really valid. What's more, OpenSSH's compatibility library makes porting this much easier. And, unlike Linux, Solaris has safe string functions.
I'm not quite finished with mg for Solaris -- at this point when I try to open a file, I end up in dired. But I'm in no hurry, since this gives me something fun to do when I need the hacking equivalent of a bubble bath. :-)
I don't really mean to condemn anyone here. I have no right to complain about what's given freely, and if porting were simple and mindless, it wouldn't be any fun. The time I spent working on Gnash made it very clear to me how hard it is to write portable code -- it seemed like those guys committed as many autoconf macros as they did actual program source. The resulting configure script was 1.5MB (!) and it runs on everything from IRIX to RISC OS to Haiku. But that's way above and beyond what we need to make a decent port. The challenge isn't people who don't write for OpenBSD, it's the ones who go to the other extreme by writing OS-specific code which locks us out.
(Comments are closed)