So you want to port mooix eh? Be warned, it's probably not going to be
easy. Mooix is currently known to work on the following platforms:

	* Linux i386
	* Linux powerpc

Mooix is known to build on the following platforms, but I don't know how
well it runs:

	* Linux arm, alpha, hppa, ia54, m68k, s390, sparc, mips
        * FreeBSD [ compiles, may not install or run yet ]

Porting it to a new platform involves first getting libmooproxy working
(the very hard bit), then mood (the other very hard bit), and finally
everything else (shouldn't be too hard).

Porting libmooproxy is tough because this is a LD_PRELOADable library which
wraps many common C library functions, like open() and unlink(). Half the
time it passes these functions on to mood, the other half the time, it uses
libdl to look up the underlying libc function, and calls it. It has a
regression test suite ("make test") that makes it easy enough to see which
functions are being properly intercepted by the library. But porting this
kind of thing to various OS's and libc's is sure to involve deep magic.
Getting library preloading to work at all on some OS's is deep magic of its
own.

Porting mood presents some challenges as well. The daemon needs to do
some fairly scary things with unix sockets that are not particularly
standardized across unixes. Notably:
	* send and receive file descriptors over a unix domain socket
	  (libmooproxy does this too)
	* get the credentials of the client connected to the unix domain 
	  socket, so it knows what user has connected

Also, the daemon recognizes certain special methods as being "stackless",
which is roughly analogous to suid in the moo's security model. By default,
methods are stackless if they have their sticky bit set (chmod +t). This
bit was chosen because it has no meaning anymore when set on a regular file
on linux and some other unixes, and so it is safe to appropriate it for our
own ends. This probably won't work for all unixes, and another file
attribute might need to be picked; or even something aside from a file
attribute used. autoconf/makeinfo.in has a SETSTACKLESS variable that should
be a program that can make a file stackless.

The remainder should be easy, or easy compared to libmooproxy and mood,
anyway! It's mostly platform-independent perl, with some bits of plain jane
C and shell. There are a couple of shared libraries that might need some
Makefile magic to link on your OS.

At the moment, since it has not been ported much and has been developed
on only one system, you might also run into:
	* GNU-Make specific stuff in the Makefiles
	* inadvertent uses of glibc-specific stuff
	* non-POSIX-ism's
	
Do let me know about these, since I want to fix them all. And if you
succeed in a port, bravo! (And send me a patch..)

-- Joey Hess <joey@mooix.net>
