Re: Wondering about usage of /usr/bin v /usr/local/bin...
Craig Skinner wrote on Thu, Jan 04, 2007 at 12:14:32PM +: On Wed, Jan 03, 2007 at 08:56:54PM +0100, Ingo Schwarze wrote: For example, on one small LAN with about 50 active users, i called that place /usr/usta: What does usta stand for? Oh, that's just kind of $site, see http://www.usta.de/ (in german). UStA = Unabhaengiger Studierenden-Ausschuss = independent student board, it's the executive committee elected by all the students of the University of Karlsruhe, working on student's social, political, cultural and economical affairs. The independent says that it's not organised in the (crippled) way prescribed by state and law, but instead in a more efficient and more democratic way decided upon in a public vote of all students held in 1977. but now have sort of settled on /usr/local/site/[s]bin, libexec,... for my local site specific scripts. Sounds very reasonable, imho.
Wondering about usage of /usr/bin v /usr/local/bin...
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. 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. 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) 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. 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. 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). Cheers, Dave. -- Dave Ewart - [EMAIL PROTECTED] - jabber: [EMAIL PROTECTED] - freenode: davee All email from me is now digitally signed, key from http://www.sungate.co.uk/ Fingerprint: AEC5 9360 0A35 7F66 66E9 82E4 9E10 6769 CD28 DA92
Re: Wondering about usage of /usr/bin v /usr/local/bin...
On 1/3/07, Dave Ewart [EMAIL PROTECTED] wrote: 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. 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) 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. From an installed app perspective, ports and packages are the same. In actuality, installing from a port does nothing more than building a package and then installing the package. As for where to install a third-party application, /usr/local/ is the directory tree that tends to root apps not part of the base OS. Typical exceptions to this are that /etc/ usually ends up with the config files and some things end up in /var/ such as logs, pid files, etc. You'll also commonly find applications stuck in /usr/local/myapp/ for example, to keep them contained and not scattered across /usr/local/{bin,sbin,share,lib,...}. You'll also find apps set up with /usr/local/ as the destination dir so that you DO end up with stuff scattered to the appropriate subdirectories there. There's no hard fast rules, more convention. It seems more important to keep stuff rooted under /usr/local/ *somehow* and to make sure you don't have it intermingled with the core OS. Exactly how isn't a matter of great debate. You might take a look at some ports and see how they install and where to. You might also consider just using packages where possible, and creating ports for applications that we don't have ports for (much easier in the long run.) DS
Re: Wondering about usage of /usr/bin v /usr/local/bin...
Hi Dave, Dave Ewart wrote on Wed, Jan 03, 2007 at 01:32:04PM +: 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