NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc as non-root user?



On 2 Apr 2011 at 18:19, David Chanters wrote:

> Hi all,
> 
> I'm reading the FAQ for pkgsrc which talks about using pkgsrc as a
> non-root user:
> 
> http://www.netbsd.org/docs/pkgsrc/faq.html#non-root-pkgsrc
> 
> But despite reading it a few times I am still unclear what it is I am
> supposed to do.  The first paragraph there says:
> 
> "If you want to use pkgsrc as non-root user, you can set some
> variables to make pkgsrc work under these conditions. At the very
> least, you need to set UNPRIVILEGED to "yes"; this will turn on
> unprivileged mode and set multiple related variables to allow
> installation of packages as non-root."
> 
> Which is fine -- I can edit mk.conf as apropriate.  But is the
> expectation that pkgsrc still resides under "/usr" -- and if so, am I
> supposed to manually fix up the permissions on /usr/pkgsrc/* myself so
> that a non-root user can rw there?
> 
> Furthermore, if that's not the case and the assumption is that for a
> non-root user to use pkgsrc they're to have /usr/pkgsrc in some other
> location, how does the editing of mk.conf as mentioned in the FAQ
> relate to this?
> 
> I hope this makes sense!
> 
> Thanks in advance,
> David

I've used the method in pkgsrc users guide. I have an
admin user and my /usr/pkgsrc and 
/usr/pkgsrc_distfiles directories are owned by the
non-root user. I can build but not install packages
as non-root. I use sudo to do the install step either
automated which sometimes (not often) hits permission
problems or manual "sudo make install".

I've never used UNPRIVILEGED but sometimes have 
compiled non pkgsrc packages as root in their chosen
locations or non-root in home or other directory. I
guess UNPRIVILEGED requires the install target paths
to be specified to locations that the user has 
permissions to write to.

Pkg_comp allows building and installing in a chroot
and I've done a build and install in the chroot with
intention of making packages on a build system and 
installing on target systems with pkg_add. 


David




Home | Main Index | Thread Index | Old Index