Subject: Re: pkgsrc as non-root?
To: Jeremy C. Reed <reed@reedmedia.net>
From: Pierre Bourgin <pierre.bourgin@pcotech.fr>
List: tech-pkg
Date: 10/05/2003 14:02:16
hello,

it's sounds terrific ;-)

For now, in order to build packages under Solaris, I was used a chrooted 
environment to build them safely, avoiding to pollute the real 
filesystem at all.

(see http://pierre.bourgin.free.fr/solaris_setup_chroot.tar.gz for a 
scripted chroot env under solaris).

So the packages built by your method, are they usable to be installed in 
the regular way, I mean by root in PKG_DBDIR=/var/db/pkg and 
LOCALBASE=/usr/pkg or are they only usable by the user used to build them ?

Regards,

Pierre Bourgin




Jeremy C. Reed a écrit:
> I have done some pkgsrc builds and installs as a normal user. Here is my
> mk.conf.
> 
> I set MAKECONF to this ~/mk.conf so it is used.
> 
> SU_CMD= sh -c
> PKG_DBDIR=${HOME}/var/db/pkg
> LOCALBASE=${HOME}/pkg
> BINOWN=reed
> BINGRP=users
> ROOT_USER=reed
> ROOT_GROUP=users
> PKG_TOOLS_BIN=${HOME}/pkg/sbin
> SHAREOWN=reed
> SHAREGRP=users
> #INSTALL_DATA=install -c -o ${BINOWN} -g ${BINGRP} -m 444
> CHOWN=true
> CHGRP=true
> WRKOBJDIR=             ${HOME}/tmp   # build here instead of in pkgsrc
> OBJHOSTNAME=           yes               # use work.`hostname`
> VARBASE=        ${HOME}/var
> 
> Here is an example of what I installed (this was in July on this system):
> 
> reed@www:~$ ~/pkg/sbin/pkg_info
> bison-1.875nb1      GNU yacc(1) replacement
> digest-20021220     Message digest wrapper utility
> libtool-base-1.4.20010614nb14 Generic shared library support script (the
> script itself)
> m4-1.4              GNU version of Unix m4 macro-processor
> mit-krb5-1.3        MIT Kerberos 5 authentication system
> openldap-2.0.27nb3  Lightweight directory access protocol server and
> client pack
> pth-2.0.0           GNU Portable Thread library
> readline-4.3pl5     GNU library that can recall and edit previous input
> samba-3.0.0beta3    SMB/CIFS protocol server suite for UNIX (v3)
> autoconf-2.57       Generates automatic source code configuration scripts
> 
> As an example of problems ...
> 
> In July, I suggested ...  It may be useful to have a few more variables
> for chmod permissions, for example:
> 
> I wasn't sure what to name them, so I suggest some generics like:
> 
> MODE0500?=      0700
> 
> The reason: I am doing pkgsrc without any superuser privileges. And some
> pkgsrc builds (like samba) will change permissions and then later the
> non-root user can't place new files or remove files without manually
> making them writable again.
> 
> (Some mode variables are defined in bsd.own.mk.)
> 
> 
>    Jeremy C. Reed
>    http://bsd.reedmedia.net/
> 
>