On Tue, Mar 22, 2016 at 12:19:37AM GMT, Karl O. Pinc wrote: > Hi Raf, > > Thanks for the reply. > > On Tue, 22 Mar 2016 00:02:58 +0000 > Raf Czlonka <rczlo...@gmail.com> wrote: > > > On Mon, Mar 21, 2016 at 03:03:15PM GMT, Karl O. Pinc wrote: > > > > OpenBSD 5.8-stable. > > > > > > I tried following the instructions in ports(7) > > > and the FAQ to build ports as an ordinary user. > > > I added to /etc/mk.conf: > > > > > > WRKOBJDIR=/usr/obj/ports > > > DISTDIR=/usr/distfiles > > > PACKAGE_REPOSITORY=/usr/packages > > > > If you leave the defaults and don't explicitly set any of the above, > > all the relevant directories will be under /usr/ports, which can > > make your life easier (see below): > > > > PORTSDIR=/usr/ports > > DISTDIR=${PORTSDIR}/distfiles > > WRKOBJDIR=${PORTSDIR}/pobj > > PACKAGE_REPOSITORY=${PORTSDIR}/packages > > But if I do this I have to make /usr/ports writable by my > user. Or parts thereof. See below. > > > > I then tried to build a port with: > > > > > > make package LOCKDIR= BULK=Yes > > > > > > I got permission errors writing the package list > > > since my user does not have permissions to write > > > in /usr/ports/. Apologies, I did not copy the > > > exact error. > > > > This is not a bug - the FAQ clearly states[0] what you need to do. > > I followed the FAQ where it says: > > It is possible to use a read-only ports tree by separating directories > that are written to during port building: > > The working directory of ports. This is controlled by the WRKOBJDIR > variable, which specifies the directory which will contain the > working directories. The directory containing distribution files. > This is controlled by the DISTDIR variable. The directory > containing newly built binary packages. This is controlled by the > PACKAGE_REPOSITORY variable. > > For example, you could add the following lines to /etc/mk.conf: > > WRKOBJDIR=/usr/obj/ports > DISTDIR=/usr/distfiles > PACKAGE_REPOSITORY=/usr/packages > > If desired, you can also change the ownership of these directories to > your local username and group, so that the ports system can create the > underlying working directories as a regular user. > > But the above is wrong, since setting PACKAGE_REPOSITORY is not > enough. If you follow the above you must be root (unless > frobbing the ownership of /usr/ports). In any case /usr/ports > is written to, although not the subdirectories that come in the > ports tarball. > > Of course it may not be possible to both build ports as an ordinary > user and have a read-only /usr/ports/ -- but this is not clear > from the FAQ. Hence my email. > > Regards, > > Karl <k...@meme.com> > Free Software: "You don't pay back, you pay forward." > -- Robert A. Heinlein
You have included a link which seems you have missed. Read it, please. Aslo, moving this to ports@ Raf