Wandering Thoughts archives

2008-02-08

Why /usr/local is now useless (and where it came from)

Right from the early days of vendor provided Unix, two things were relatively obvious to people: first, you were going to need to add a bunch of local programs to make the system really useful to your users, and second, adding local programs to vendor areas like /bin or /usr/bin was a pretty sure road to doom and disaster. So people started putting them somewhere else.

(The most famous example is that BSD Unix put a bunch of their additions in /usr/ucb, which then turned into a vendor area of its own that you shouldn't add commands to yourself.)

Eventually, a rough consensus emerged that /usr/local was the default place for 'locally added programs'. Not everyone used it, but enough did that things like configuration systems started defaulting to putting things there if you didn't tell them otherwise.

The downfall of /usr/local was some vendors getting excessively clever (or just excessively lazy) and shipping programs that installed into /usr/local. Since vendors might now randomly dump things into /usr/local, it was no longer safe to use for your own local programs; it had effectively become a vendor area, and people abandoned it. At the same time most vendors avoided it, because it was after all supposed to be a local area.

The result has been to turn /usr/local into a no man's land, where it's not safe for anyone to install anything.

(There were two sorts of bad vendors here. The operating system vendors decided that clearly they should ship their packaged versions of free software to install into /usr/local (after all, that was the default); the third party software vendors decided that since everyone seemed to put software in /usr/local, they should ship their packages to install there too (after all, they weren't the OS vendor). Both badly misunderstood the real need and use for /usr/local.)

UsrLocalOrigin written at 00:47:57; Add Comment

2008-02-04

The origins of /usr/share

A modern Unix system carries around with it all sorts of historical relics. One of them is /usr/share, which was a relic of another era until recently (when multi-architecture machines started appearing).

Once, by now long ago, disk space was a lot more limited and heavily NFS dependent networks were much more common. Because disk space was so scarce, you didn't put big locally-built programs like TeX or Emacs or the latest X Windows on every machine's disk; generally you put them in one place and NFS mounted them on everything. Also, it wasn't uncommon to be running machines of multiple architectures, so you'd need to build these programs for several architectures.

A lot of programs have a bunch of files that are the same across all architectures. When you don't have much disk space, the last thing you want to do is have more than one copy of the same thing sitting around. This pushed the makers of free software into packaging their systems so that things could be split up this way, and the idea started spreading.

Although I'm not sure, I think that /usr/share itself first appeared in SunOS, due to Sun's introduction of the Sun 4. Diskless computers were still reasonably popular, and being able to have only one copy of half of /usr on the NFS server was an obvious and attractive thing.

(Sun wasn't the only Unix vendor supporting multiple architectures, but I seem to remember that they were the one that took the issues most seriously, partly because they'd put a lot of work into supporting diskless machines.)

UsrShareOrigin written at 23:31:06; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.