Date: Thu, 21 Jul 2011 13:19:40 -0400 From: "Daniel Staal" <DStaal@usa.net> To: freebsd-questions@freebsd.org Subject: Re: build ports from not a root user? Message-ID: <bd3d6dc9b6b0040d29f741cc94972b02.squirrel@www.magehandbook.com> In-Reply-To: <20110721153050.GA76083@external.screwed.box> References: <20110721100259.GA5326@external.screwed.box> <80674226c5ead62b213864dcd36b6a75.squirrel@www.magehandbook.com> <20110721153050.GA76083@external.screwed.box>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, July 21, 2011 11:30 am, Peter Vereshagin wrote: > You'll never silence the voice of the voiceless, freebsd-questions! > 2011/07/21 11:04:57 -0400 Daniel Staal <DStaal@usa.net> => To > freebsd-questions@freebsd.org : > DS> > I'd like to build my ports from not a root user. > DS> > How can I tell the ports system that it should su ( switch user ) > before > DS> > to > DS> > build the dependencies? > DS> > Can portupgrade handle this? > DS> > Dependencies should be installed from a root user. > DS> > DS> Install sudo, and (as long as your permissions are set correctly) the > DS> ports system can do everything except the install and configure from a > DS> user in the 'wheel' group. > > Heck I know I can use su or sudo and after > > chown -Rf user00:group00 /usr/ports/ /usr/src/ /usr/obj > > I can build world or a single port with 'make'. It's easy. > > But with ports I know the dependencies will not follow my policy to > install the > every single port as: > > $ cd /usr/ports/category/port00 > $ make > $ su - > # cd /usr/ports/category/port00 > # make install > # exit > $ cd /usr/ports/category/port01 > ... and so on ... No, it'll _build_ each port as your user, and then try to go to root to install them. Which is why I suggested sudo: You can tune it's timeouts, and only have to enter your password occasionally. (Why do you trust a port's dependencies to be built as root if you don't trust the port itself, after all?) The other option would be to do something like this: $ su - # make depends # exit $ make $ su - # make install Which should be fairly close to what you are saying. Daniel T. Staal --------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bd3d6dc9b6b0040d29f741cc94972b02.squirrel>