Subject: Re: Updating pkg_install on NetBSD 4
To: None <pkgsrc-users@NetBSD.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: pkgsrc-users
Date: 09/24/2007 22:37:22
On Mon, 24 Sep 2007 17:14:33 -0400
"Johnny C. Lam" <jlam@buildlink.org> wrote:

> Joerg Sonnenberger wrote:
> > > So let's reiterate the problem. NetBSD insists on shipping
> > > pkg_install
> > with base. pkg_install gets updated in pksrc for new features.
> > NetBSD users now have a problem.
> > > (a) Overwriting /usr/sbin/pkg_* is bad -- you update your world
> > > and you
> > now have a different version, completely unexpected.
> > > (b) pkg_install could move away the old version in /usr/sbin.
> > > Same issue
> > as (a).
> > > (c) User modifies PATH or adds aliases.
> > > (d) pkg_install gets dropped from base. Oh wonder, now we have
> > > the same
> > situation as on all other pkgsrc platforms.
> 
> (e) Make pkg_install in base install into /usr/libexec/pkg_install
> and create a pkgwrapper(8) that works much like mailwrapper(8) and
> reads /etc/pkgwrapper.conf for configuration information.  Make
> pkg_install in pkgsrc install into ${PREFIX}/libexec/pkg_install and
> provides an example pkgwrapper.conf that can be copied into /etc to
> make pkgwrapper use the pkgsrc-installed versions of the pkg_* tools.
> 
> This choice avoids the problems with (a), (b) or (c).  Yes, this is
> more complex, but it does fix the problem without removing
> pkg_install from a base install of NetBSD.
> 
>
This is the best solution I've heard thus far.  I was going to propose
a "pkgsrc adaptation layer"; this is a very good way to do it.


		--Steve Bellovin, http://www.cs.columbia.edu/~smb