Re: [opensuse] building RPMs



-----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/
/\\ <pascal.bleser@xxxxxxxxx> <guru@xxxxxxxxxxx>
_\_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: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: Redhat to Freebsd
    ... >>researching security updates or in performing kernel or package updates. ... >>I assume it is only the Redhat distro that has the ease of RPM installation? ... So you can build from sources with ports, or install binaries ...
    (comp.unix.bsd.freebsd.misc)
  • Re: ./configure command
    ... The package is not available. ... machines which don't even have an OS at all, let alone RPM, ... There is not a "the tool to package and install on Fedora". ... If he wants to avoid trouble, ...
    (Fedora)
  • Errors applying kernel patch 118833-36
    ... install of Solaris 10 11/06. ... However, once the package list is done, I see a worrisome message: ... Below is the complete console output of the patch run. ... Changes for package SUNWnfsskr will not be applied to the system. ...
    (SunManagers)
  • Re: [SLE] deCSS
    ... >> Anyone know of a reasonably easy decss program to copy DVDs to my hard ... This let's you compile from source but converts it to an rpm ... Then instead of make install you type checkinstall. ... package to meet the dependencies it may not be recognized by the other ...
    (SuSE)
  • Re: RH 9.0, Putting Samba on Linux with RPM?
    ... I need to install Samba with RPM. ... downloading the various manuals in the package forms. ...
    (linux.redhat.misc)