Subject: RE: Installing local packages and NetBSD guide
To: Magnus Eriksson <magetoo@fastmail.fm>
From: De Zeurkous <zeurkous@nichten.info>
List: netbsd-users
Date: 09/25/2007 15:26:07
Haai,

On Tue, September 25, 2007 14:01, Magnus Eriksson wrote:
> On Tue, 25 Sep 2007, Jeremy C. Reed wrote:
>[snip]
>
> Personally, I've installed such "third-party" things under /usr/local.  It
> seems like the most logical choice, and it works - but now that you
> mention it, I don't recall ever reading that it was the *right* place to
> use.
>
>
>>> So shouldnt man hier mention /usr/local ?
>
> Hm, it does: (at least on my system)
>
>                  local/    local executables, libraries, etc.
>
> But it isn't very descriptive.  "local executables" may make perfect sense
> if you already know what it means, but it could be clearer.  "site local
> ..." maybe, or "executables ... unique to the system", or something.

Personally, I ran into similar problems, and have been using this setup
for some packages for a while:

/ -> Basic system-supplied packages (in this case, NetBSD)

Identical to current situation.

/pkg/ -> Basic (for example, shells) and boot-dependent packages managed by
         the native package system (in this case, pkgsrc)

Also, SMB, FUSE, etc.

/pkg/site/<sitename>/ -> Site-specific non-native basic and boot-dependent
                         packages, to be named and managed by the sysadmin

Multiple <sitenames> allowed; not in default PATH due to unpredictability.

/pkg/local/ -> Host-specific non-native basic and boot-dependent packages,
               to be managed by the sysadmin

Should be obvious.

/usr/ -> Non-trivial and non-boot-dependent system-supplied packages

Identical to current situation.

/usr/pkg/ -> Non-trivial and non-boot-dependent packages managed by the
             native package system

Should be obvious.

/usr/pkg/site/<sitename>/ -> Non-trivial, non-native site-specific packages,
                             to be named and managed by the sysadmin

See above.

/usr/pkg/local/ -> Non-trivial, non-native host-specifc packages, to be
                   managed by the sysadmin

Should be obvious.

For this to work in the long run, we should omit the prefix from paths in
pkgsrc packages (perhaps add a +DEFAULT_PREFIX file?).

A similar structure I plan to use for the package database:

/var/db/syspkg/ -> Base system packages (wasn't someone working on this
                                         already?)
/var/db/pkg/ -> Packages managed by the native package system (includes
                installation anywhere)
/var/db/pkg.site/<sitename>/ -> Site-specific packages managed by the
                                sysadmin (idem)
/var/db/pkg.local/ -> Host-specific packages managed by the sysadmin (idem)

However, I've not yet been able to find a utility to create a package from
a tree which only includes DESCR, COMMENT, and other strictly custom
files. This is a virtual necessity when dealing with non-pkgsrc installs.

All this administrative bloat (hopefully, /useful/ bloat beyond NichtNet)
should also allow us to shrink the base system somewhat or at least
inhibit future growth.

Baai,

De Zeurkous
-----------

Friggin' Machines!

>
>
> Take care,
> MAgnus
>
>