Subject: Re: Pb using pkgsrc as unpriviledged user
To: =?ISO-8859-1?Q?Judica=EBl_Courant?= <Judicael.Courant@free.fr>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 11/04/2005 09:24:55
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-410301075-1131125095=:5425
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Fri, 4 Nov 2005, [ISO-8859-1] Judica=EBl Courant wrote:

> * After a checkout, in bootstrap, I have launched ./bootstrap
> --ignore-user-check
> * I have added the following to my .bash_profile:
> PATH=3D~/pkg/bin:$HOME/pkg/sbin:$PATH
> MANPATH=3D$HOME/pkg/man:$MANPATH
> export PATH
> export MANPATH
> export PKG_DBDIR=3D$HOME/pkg/var/db/pkg
>
> (BTW, I have seen no explanation about adding PKG_DBDIR to the env, did
> I miss anything?)

That PKG_DBDIR is not needed to be set in environment variable.

> * Experiencing various troubles, I modified mk.conf as follows :
> $ cvs diff mk.conf
> Index: mk.conf
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/pkgsrc/mk/defaults/mk.conf,v

You do not need to edit the "defaults" file.

The bootstrap creates a mk.conf file for you. The end of the bootstrap=20
script tells you to copy it into place. It tells you where to put it.

> < UNPRIVILEGED?=3D NO
> ---
>> UNPRIVILEGED?=3D YES

I am guessing that UNPRIVILEGED was already defined, so didn't get set to=
=20
YES.

> /usr/bin/install -c -o root -g root -m 555 'libtoolize'
> '/home/ports/pkg/bin/libtoolize'
> /usr/bin/install: cannot change ownership of
> `/home/ports/pkg/bin/libtoolize': Operation not permitted
> *** Error code 1

Maybe put the pkgsrc/mk/defaults/mk.conf back to original. And setup your=
=20
own mk.conf file.

I have been using pkgsrc on Linux, FreeBSD, and DragonFly (and other=20
platforms) as non-root and install into my home directory for over 1.5=20
years.

  Jeremy C. Reed

  =09  =09 =09 technical support & remote administration
 =09  =09 =09 http://www.pugetsoundtechnology.com/
--0-410301075-1131125095=:5425--