From owner-freebsd-questions@freebsd.org Thu Jan 5 12:44:44 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 7B69ACA014C for ; Thu, 5 Jan 2017 12:44:44 +0000 (UTC) (envelope-from baho-utot@columbus.rr.com) Received: from cdptpa-oedge-vip.email.rr.com (cdptpa-outbound-snat.email.rr.com [107.14.166.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cdptpa-oedge", Issuer "cdptpa-oedge" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 445E81368 for ; Thu, 5 Jan 2017 12:44:43 +0000 (UTC) (envelope-from baho-utot@columbus.rr.com) Received: from [76.181.114.47] ([76.181.114.47:54040] helo=raspberrypi.bildanet.com) by cdptpa-omsmta02 (envelope-from ) (ecelerity 3.6.9.48312 r(Core:3.6.9.0)) with ESMTP id AD/41-28949-77F3E685; Thu, 05 Jan 2017 12:43:35 +0000 Received: from [192.168.1.40] (helo=desktop.example.org) by raspberrypi.bildanet.com with esmtp (Exim 4.84) (envelope-from ) id 1cP7OJ-0002tq-3T for freebsd-questions@freebsd.org; Thu, 05 Jan 2017 07:43:35 -0500 Subject: Re: Building base, other than by default To: freebsd-questions@freebsd.org References: <586D66D6.5070901@columbus.rr.com> <9e99b996-360d-2a9f-a5fc-5e2da45c551a@ShaneWare.Biz> From: scrat Message-ID: Date: Thu, 5 Jan 2017 07:43:34 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <9e99b996-360d-2a9f-a5fc-5e2da45c551a@ShaneWare.Biz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.7:25 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 12:44:44 -0000 On 01/05/17 00:49, Shane Ambler wrote: > 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. > > Ok thanks I will try that