Hi Dave, Dave Ewart wrote on Wed, Jan 03, 2007 at 01:32:04PM +0000: > I'm fairly new to OpenBSD right now and at the stage where I'm > trying to understand the differences between what I've been used > to in the past (typically Debian) and OpenBSD.
Welcome. :-) > One thing I'm curious about is managing locally-maintained applications. > Under Debian, anything that was core to the system went into /usr/bin, > as did any Debian-supplied packages. In Debian, the location /usr/local > is, by policy, never touched by the OS at all, allowing its contents to > be preserved over reinstalls, or at least backed-up and managed > separately from everything else supplied with the OS. There is no standard place intended for exactly the same purpose in OpenBSD, at least none that i heard of. > With OpenBSD, it seems to work like this: > > /usr/bin - 'core' utilities/executables > /usr/local/bin - executables from OpenBSD packages (and presumably ports > too, althougth I've only used packages to date) That's correct, as Stuart already pointed out. > Where is the right place to install/locate a non-distributed > application, say, 'myapp'? I'm working under the assumption that > there is a generally-considered Right Place for this sort of thing. Well no, there isn't The One Right Place. Just make sure the place you choose doesn't conflict with anything else you intend to use. For example, on one small LAN with about 50 active users, i called that place /usr/usta: [EMAIL PROTECTED] $ mount | grep usta nfs:/raid/usta on /usr/usta type nfs (nodev, v3, udp, timeo=100) [EMAIL PROTECTED] $ ls -F /usr/usta OpenBSD/ common/ debian/ images/ [EMAIL PROTECTED] $ ls -F /usr/usta/common/ bin/ etc/ libdata/ man/ sbin/ share/ var/ [EMAIL PROTECTED] $ ls -F /usr/usta/OpenBSD/ bin32/ bin33/ bin34/ bin35/ bin36/ bin37/ bin38/ bin39/ bin40/ etc/ Ooops. Cleanup required. Time goes by... :) It's a matter of taste whether you put it below /usr/local. Sometimes, i use /usr/local/usta for non-nfs stuff. On my single-user private PC at home, i'm using directories like /home/bin and /home/lib rather than something below /usr. > Clearly, installing it to /usr/bin is wrong, but I'm unclear about > whether /usr/local/bin is the right place either, since that's where > the OpenBSD-supplied packages end up. Personally, i would suggest to avoid placing non-packaged stuff in /usr/local/bin. Certainly, some people will do that, but then, you can't use `find /usr/usta` to search just your non-packaged public files, or `tar -cvz /usr/usta` for backing them up. > Any comments or suggestions for docs I've missed which describe the > usual practice here? I've read the FAQ and also 'man hier' (which just > lists "Local executables, libraries, etc." as the usage description for > /usr/local). I'm not aware of anything you missed in particular. Yet, consider some more hints: - Try to minimize truely local stuff in the first place. That way, you simplify maintenance. - For one-time tests, just use $HOME/bin or some such. - When you decide that you regularly need some piece of software which has not yet been ported, consider building your own port and installing that exactly in the same way as the OpenBSD-supplied ones, instead of installing the software outside the package system. It is a bit more work than just ./configure; make; make install - but as long as done for private use only, it is not too difficult to learn and certainly not arcane science. From time to time, check whether in the meantime, anyone else did a serious job on it. For example, a few months ago, i built my own very rough mystuff/gocr, but in october, William Yodlowsky submitted graphics/gocr for -current and Antoine Jacoutot committed it to the CVS, so i shall soon switch to the official port. - When you have collected enough experience and when you have enough time to spare and if nobody else is quicker than you, consider submitting your port to ports@ and become its MAINTAINER. Good luck, Ingo