Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 2000 11:20:20 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        Jin Guojun <jin@george.lbl.gov>
Cc:        freebsd-bugs@FreeBSD.ORG, n_hibma@calcaphon.com
Subject:   Re: bin/18373: pkg_delete shouldn't insist on root
Message-ID:  <20000505112020.C2724@mithrandr.moria.org>
In-Reply-To: <200005042054.NAA12166@george.lbl.gov>; from jin@george.lbl.gov on Thu, May 04, 2000 at 01:54:26PM -0700
References:  <200005042054.NAA12166@george.lbl.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu 2000-05-04 (13:54), Jin Guojun wrote:
> Neil Blakey-Milner stated:
> > Ok, I'm going to give it away.  Unless PKG_DBDIR is set, '/var/db/pkg'
> > is the default location.  _If_ it is set, it uses PKG_DBDIR instead of
> > '/var/db/pkg'.
> 
> Ok, PKG_DBDIR is not very meaningful for regular use at this point.

It works fine.  I've even just tested it.

(nbm@scratch) /usr/ports/devel/portlint> make
WRKDIRPREFIX=/home/nbm/fs/obj PREFIX=/home/nbm/fs BINOWN=nbm BINGRP=nbm
MANOWN=nbm MANGRP=nbm PKG_DBDIR=/home/nbm/fs/var/pkg install

===>  Installing for portlint-2.2.2
Warning: not superuser, you may get some errors during installation.
Warning: not superuser, can't run mtree.
You may want to become root and try again to ensure correct permissions.
install -c -o nbm -g nbm -m 555
/usr/ports/devel/portlint/src/portlint.pl /home/nbm/fs/bin/portlint
install -c -o nbm -g nbm -m 444 /usr/ports/devel/portlint/src/portlint.1
/home/nbm/fs/man/man1
===>   Generating temporary packing list
===>   Compressing manual pages for portlint-2.2.2
===>   Registering installation for portlint-2.2.2

(nbm@scratch) /usr/ports/devel/portlint> cd ~/fs/var/pkg/
(nbm@scratch) /home/nbm/fs/var/pkg> ls -la
total 3
drwxr-xr-x   3 nbm      nbm           512 May  5 10:17 ./
drwxr-xr-x   3 nbm      nbm           512 May  5 10:17 ../
drwxr-xr-x   2 nbm      nbm           512 May  5 10:17 portlint-2.2.2/
(nbm@scratch) /home/nbm/fs/var/pkg> ls -lad ~/fs/bin/portlint
-r-xr-xr-x   1 nbm      nbm         46140 May  5 10:17 /home/nbm/fs/bin/portlint

> (1)
> Why should I do "setenv PKG_DBDIR path..." instead of doing "su" which is
> much simple?

If you don't have root, and want to install a program with ports, and
delete it with pkg_delete.  If you do have root, but want to install a
program in your private "namespace".

> PKG_DBDIR is just an alternative if /var is not big enough, or some
> particular reason (not this one), such as for temp use, so the pkg
> location can be changed.

No, symlinks are the alternative in that case.

> (2)
> If the package needs to be instead into /usr/bin /usr/lib
> /usr/local/{bin, lib} etc., you will need root privilege anyway unless
> these directories are also world rw-able. Remember that
> /usr/local/{bin, lib} is defaulted root W only, and most package will
> go into there.

PREFIX.  Set PREFIX into your home directory, and things should work
fine.  Why do you think we like to be PREFIX-clean?

> (3)
> If you create a package not going to be installed into
> common/standard, such as /usr/local/{bin, lib} area, you probably can
> just create an installation script instead of using package. Then, you
> won't have such problem.

I'm not creating packages not to be installed into /usr/local.  I'm
using ports to install stuff into my home directory.  I'd like to be
able to use pkg_delete to delete them, but it's making a stupid
assumpton.  Since I'm running an operating system that doesn't like
having stupid assumptions all over the place, I try to get it fixed.

Replace the first person with whomever submitted this report? (Ben?)

Neil
-- 
Neil Blakey-Milner
Hacker In Chief, Sunesi Clinical Systems
nbm@mithrandr.moria.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000505112020.C2724>