From owner-freebsd-questions@FreeBSD.ORG Thu Jul 21 17:19:41 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46867106566B for ; Thu, 21 Jul 2011 17:19:41 +0000 (UTC) (envelope-from DStaal@usa.net) Received: from mail.magehandbook.com (173-8-4-45-WashingtonDC.hfc.comcastbusiness.net [173.8.4.45]) by mx1.freebsd.org (Postfix) with ESMTP id 1866F8FC0C for ; Thu, 21 Jul 2011 17:19:40 +0000 (UTC) Received: from www.magehandbook.com (unknown [192.168.1.100]) by mail.magehandbook.com (Postfix) with ESMTP id 48B0AD49 for ; Thu, 21 Jul 2011 13:19:40 -0400 (EDT) Received: from 152.121.16.254 (SquirrelMail authenticated user daniel) by www.magehandbook.com with HTTP; Thu, 21 Jul 2011 13:19:40 -0400 Message-ID: In-Reply-To: <20110721153050.GA76083@external.screwed.box> References: <20110721100259.GA5326@external.screwed.box> <80674226c5ead62b213864dcd36b6a75.squirrel@www.magehandbook.com> <20110721153050.GA76083@external.screwed.box> Date: Thu, 21 Jul 2011 13:19:40 -0400 From: "Daniel Staal" To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: build ports from not a root user? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 17:19:41 -0000 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 => 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. ---------------------------------------------------------------