From owner-freebsd-questions@freebsd.org Thu Jan 5 05:49:09 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39947C9F78C for ; Thu, 5 Jan 2017 05:49:09 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [150.101.137.143]) by mx1.freebsd.org (Postfix) with ESMTP id CD6B612B7 for ; Thu, 5 Jan 2017 05:49:08 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp118-210-147-181.bras1.adl6.internode.on.net (HELO leader.local) ([118.210.147.181]) by ipmail05.adl6.internode.on.net with ESMTP; 05 Jan 2017 16:19:06 +1030 Subject: Re: Building base, other than by default To: Baho Utot , freebsd-questions@freebsd.org References: <586D66D6.5070901@columbus.rr.com> From: Shane Ambler Message-ID: <9e99b996-360d-2a9f-a5fc-5e2da45c551a@ShaneWare.Biz> Date: Thu, 5 Jan 2017 16:19:05 +1030 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <586D66D6.5070901@columbus.rr.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 05:49:09 -0000 On 05/01/2017 07:49, Baho Utot wrote: > I am working on a script to build base and I want to build it in another > directory other than /usr/src. > I would also like to place the result binaries in another directory > other than /usr/obj. > I also would like to build as a non-root user. > > Is this possible and can I install base from the build. You can checkout the source code anywhere you want. The permissions on the directories should be the only factor preventing a user from compiling. In your environment set MAKEOBJDIRPREFIX to the path you want the buildworld binaries while compiling, you can pass DESTDIR to installworld to install into a different directory. env MAKEOBJDIRPREFIX=~/mybuild make buildworld make installworld DESTDIR=~/myworld You can also set __MAKE_CONF and SRCCONF to use different settings for each build. -- FreeBSD - the place to B...Software Developing Shane Ambler