-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Carlos E. R. wrote:
> The Sunday 2007-04-29 at 23:04 +0200, Johannes Nohl wrote:
> ...
>> Most sources configured will install to /usr/local. I usually change
>> this with --prefix to /usr. What I always wanted to know is if there's
>> a global config to change it to /usr.
> 
>> Is anything wrong with /usr/local? SUSE don't use it as I could see.
> 
> No, you should use "/usr/local", not "/usr", you got it wrong. The local 
> tree is reserved precisely for those packages compiled /locally/, whereas 
> the packager of the distro uses "/usr". This way it is easy to know which 
> version is the "official" one and which is yours.
> 
> Some people use a separate partition for /usr/local, so that we can format 
> "/" while keeping our /usr/local intact.

No, I mean it: use /usr, not /usr/local

So, you make a package "foo" yourself, e.g. with checkinstall.
You prefix it to /usr/local because you don't redistribute it, because
it's a "local package" (whatever that means: a package is either in the
RPM database or not, there is no "local RPM database").

Now you install 10.3 on it, by using "new installation" instead of
"system upgrade", because you've got /home and /usr/local on their own
partitions.

Guess what, the RPM database is in /var/lib/rpm, not in /usr/local.

If you wipe / (but not /usr/local), it'll be broken anyway because the
RPM database won't know anything about your "local package" in /usr/local

Furthermore, maybe one day that package is provided by a SUSE repository
(or packman, or build service, or suser-jengelh, or mine, ...), possibly
with a different package name...
You might install that package, but as your "local" and the
"redistributed" packages use different prefixes, they will not conflict
on files. Hence you'll end up with both versions installed.
But if both packages are used as dependencies (read: shared libs or
script interpreters), you might get into some rather funny behaviour.

Quoting the FHS [1]:
"/usr/local : Local hierarchy
The /usr/local hierarchy is for use by the system administrator when
installing software locally. It needs to be safe from being overwritten
when the system software is updated. It may be used for programs and
data that are shareable amongst a group of hosts, but not found in /usr.
Locally installed software must be placed within /usr/local rather than
/usr unless it is being installed to replace or upgrade software in /usr."

[1]http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY

But what they're not accounting for is the RPM database.
As I explained above: if you wipe /, you'll also wipe the RPM database
and hence, the files of your package in /usr/local won't be in the RPM
database (which is the same as having installed it with "make install"
in the first place).

> Ie, SuSE does not use "/usr/local" because it is reserved for *you*. ;-)

No, I stick with what I said: /usr/local is for what you install with
"make install", not for RPMs (including RPMs built with checkinstall).

> One more detail: you will see that users may have the /usr/local/bin first 
> in their path, but often root does not even have it included - on purpose 
> so as to execute "official" programs only.

Define "official". Packages redistributed in the openSUSE Build Service,
Packman, Guru, suser-*, etc... are all prefixed to /usr and not /usr/local.

cheers
- --
  -o) Pascal Bleser     http://linux01.gwdg.de/~pbleser/
  /\\ <[EMAIL PROTECTED]>       <[EMAIL PROTECTED]>
 _\_v The more things change, the more they stay insane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGNZimr3NMWliFcXcRAnaOAJ0dM8bsc2k7kWkO4hj9OhuX0AXH/wCaAqsD
wni/WkmalpgxDy0DD0Gw9EI=
=mE/G
-----END PGP SIGNATURE-----
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to