Subject: Re: running (DE)INSTALL scripts vs. noexec mounted /var
To: Hubert Feyrer <>
From: Martin Weber <>
List: tech-pkg
Date: 11/10/2001 02:54:13
On Sat, Nov 10, 2001 at 02:08:14AM +0100, Hubert Feyrer wrote:
> On Fri, 9 Nov 2001, David Brownlee wrote:
> > 	I think we should really move PKGDBDIR under PREFIX - it should
> > 	never have been under /var/db in the first place.
> > 
> > 	Maybe a new version of the pkgtools which would automatically
> > 	detect an old installation, copy the db across to a tmpdir under
> > 	PREFIX, then if all OK rename to the new location, and rename away
> > 	the old. Then we bump PKGTOOLS_REQD :)
> Yeah, right. And what solution do you propose for having multiple pkg DBs?
> /usr/pkg, /usr/X11R6, /usr/pkg/cross, etc.?
> Things like (the core of) pkg_info etc. need to be adjusted to
> "know" where to look for stuff. 

If we always could assume that people install packages from
source, what about the PREFIX the package wants to install
itself ? Like for most 'sane' packages (dunno the exact name
of the variable) prefix would be '/usr/pkg/' where we could
have a 'db/' subdir.

Or, even more sane imho, have some file in /etc tell the
system where to keep the package database (with configuration
for a per-prefix store of db and/or one global one) like
a /etc/pkg.conf with a syntax somehow similar to fstab:
# Always 'best match' selected
# prefix     db-path     special
#            abs path   ro,rw, ru, rwu
*            /var/db      rw     # 'system' packages allowed (yuck ;)
/usr/X11R6   /usr/X11R6/db ro    # do not allow further X11 package installs !
/usr/pkg     /usr/pkg/db  rwu    # allow only updates of existing packages in /usr/pkg
/home/*      /home/db     ru     # install fake pkg info in /home/db/* to allow users
                                 # explicit personal install of those mentioned there

Well, this comes from a mind of a tired person, feel
free to flame it away if it doesn't make sense to you ;)

Uhm whatcha say ?

Martin Weber