Why Xhier?
Why do we want xhier on FreeBSD? BSD has many strengths, one of which is its packaging/ports system. Why replace that with something else? Can't we just use stock BSD and cfengine to distribute config files to it?
The answer to this is not simple. CSCF has a strong history of using xhier, and xhier makes many things easy. Staff members understand it, and it makes cross-platforms a bit less intrusive to the users: rather than knowing that OS foo stores package binaries in /usr/local/bin, while OS bar puts them in /usr/bin and OS baz puts them in /opt, xhier links everything together so all the user has to know is "setenv PATH `/bin/showpath standard u=m` and things will Just Work.
Why FreeBSD?
Why add another platform to the list we support? BSD has a long history and is a very stable platform. In addition, it has a strong presence on campus: Engineering Computing uses it extensively, the Offices of Development and Alumni Affairs have several servers running FreeBSD (the fault of
MikePatterson), and I've started deploying some applications (eg nagios, twiki) to oates, a BSD machine. I'd like to have the best of both worlds: nice and easy BSD packages, but the ease of configuration and administration that xhier can give us.
How are we doing this?
It occurred to me (last night, the 25th of August to be precise) that it might be possible to leverage the use of make.conf variables (specifically, those dealing with relocating package installs) to force FreeBSD to install package binaries and configuration to where xhier expects to find them. The default configuration files could be considered to be admin level files, binaries would go to the usual xhier places, as well as man pages and documentation. Most FreeBSD packages currently deal with this cleanly. **Update: it appears that's not workable; see
XhierOnFreeBSD. But an alternative is to use the NetBSD pkgsrc views. Except
NetBSD has a far smaller package selection. Given that xhier has a relatively small one too though, do we really care? See below as well.
However, there are potential issues in that FreeBSD seems to essentially have two bases for installing packages: /usr/local and /usr/X11R6 (since X11 is itself a port). There is potential for file foo from package bar to clobber the same filename foo from an X11 package baz if both are installed. Care will have to be taken, but the BSD ports team themselves may take this into account.
Potentially what could be done is, to add a new package:
- pkg_add it on the xhier archmaster
- double-check that the files all went to the places in which they are expected
- create /software/.admin stuff as required
- ensure xh-install works
- then xh-dist to the client machine just like a normal xhier package
Alternatively, we could build custom packages on the xhier archmaster (make package) and then just distribute that from the archmaster to the client machines. Then xh-install on the client just calls pkg_add. But that way it's a bit more difficult to distribute custom configurations, I think.
So what we need to do is research how, exactly, to do this redirect and if it's feasible to be able to redirect everything to where it's expected to be by xhier.
Another possible alternative is to provide package-vendor packages, that simply link into the /usr/{local,X11R6} hierarchy as required. This could cause some issues with packages like perl though - what if vendor packaging isn't what xhier expects? Maybe we don't care.
I think we'd have to create some infrastructure to allow config files of various levels to be merged.
--
MikePatterson - 26 Aug 2004