Theo Kills Your Pony12 Aug 2006
A few things.
First, Arlo is doing well:
Second, there's this.
Third, work has started on the world's most useless project: Theo Kills Your Pony, the aggressively destructive Unix-like system. (Thanks to Zen Render for the name!). I'm attempting to do things semi-right, and that means I've had to learn a bit more about how OpenBSD (and BSD in general) is put together.
Like what? Well, like the name for example. The OS is called TKYP, so
that's what I want to show up everywhere. I figured I would start with
the output of
uname(1), since that's the most Thing is, this took a
surprisingly long time to track down.
uname(1) is, as you might expect, a simple wrapper around the
uname(3) libc function, which is in turn a pretty simple wrapper
sysctl call. Through paths that, frankly, I'm still
tracking down, you finally get to
sys/conf/newvers.sh -- a simple
shell script that creates a file called
vers.c and sets the
osversion within it. (Paths are
/usr/src, BTW.) After that, the different
sys/arch/*/conf/Makefiles compile it --
sys/arch/i386/conf/Makefile.i386, for example -- and then include it
SYSTEM_LD. After that, <handwave>I think these values are
simply returned by
Okay, so now I've tracked that down; I rebuild and install the kernel, then reboot. (QEMU rocks for this sort of thing.) And yay, it works:
-bash-3.1# uname -a TKYP tkyp-qemu 0.1 GENERIC#0 i386
Now to rebuild world, right? Wrong: first, Apache kept refusing to
compile with an error about not being able to find
through the mailing lists only found one message mentioning a similar
problem, and no reply. The CVS tree showed that, since 3.9, a couple
minor changes had been committed to the httpd Makefiles mentioning
that OpenBSD has used its own dbm library for a while. I tried making
a few changes, but couldn't get it to work. So I cheated: I removed
usr.sbin/Makefile and moved on with my life.
Next problem: the GNU configure tools haven't heard of TKYP. (I'm
sure I emailed RMS about this...).
gnu/usr.bin/binutils is the
first thing compiled in
world that uses these tools, so that's where
I'm looking first. A little judicious editing of
guesses the OS and architecture),
configure (which figures out what
needs to be done for the OS/arch) and
config.sub (which says it's a
"configuration validation subroutine script"; I'm guessing a basic
sanity check) takes care of thing. They're fairly simple changes, as
it's pretty much just a matter of copying the OpenBSD entries.
And all this before I can even throw in anything nasty! I got big plans, of course -- SIGKILL replaced with SIGHUP, rot13 encryption for passwords, and the RTM worm pre-installed -- but I haven't even had a buildworld finish yet. Plus, there's the cautionary tale of MicroBSD to keep in mind...whatever else I do, I wanna make sure I piss off Theo for the right reasons. :-)
(Incidentally, the email to root is in
etc/Makefile installs it in the right place. I thought for sure it'd
share for some reason.
newvers.sh mentions this file, plus a
few others, that need to be changed to reflect new version numbers.)