From owner-freebsd-questions@FreeBSD.ORG Fri Oct 19 07:56:44 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A0ED950 for ; Fri, 19 Oct 2012 07:56:44 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [IPv6:2001:44b8:8060:ff02:300:1:6:4]) by mx1.freebsd.org (Postfix) with ESMTP id BD3888FC08 for ; Fri, 19 Oct 2012 07:56:43 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EANAGgVDLevdH/2dsb2JhbABFwWSCIAEBBAE4QQULCyETAw8JAwIBAgFFEwEHAQEXh2MFDL1Ri1gngniDIwOXAI8fgwKBSQ Received: from ppp247-71.static.internode.on.net (HELO leader.local) ([203.122.247.71]) by ipmail04.adl6.internode.on.net with ESMTP; 19 Oct 2012 18:26:42 +1030 Message-ID: <508105E2.5060208@ShaneWare.Biz> Date: Fri, 19 Oct 2012 18:18:50 +1030 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121017 Thunderbird/16.0.1 MIME-Version: 1.0 To: dweimer@dweimer.net Subject: Re: ZFS / Boot Environments / Jails / Upgrading form Source Code References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 07:56:44 -0000 On 19/10/2012 07:44, dweimer wrote: > First step replace the usr/src within the jail with new source using > svn, easy enough. Then start make buildworld... oops, I have a > problem now, the usr/obj/usr stuff is now under > /usr/obj/usr/jails/release91rc2..., However I want it to be under > /usr/jails/release91rc2/usr/obj/usr. If the jails base dir is /usr/obj/usr/jails/release91rc2 then it can only access files below that base dir. That is part of the jails security. If your jail is based at /usr/obj/usr/jails/release91rc2 then the jail by default will buildworld into /usr/obj of the jail system which translates to /usr/obj/usr/jails/release91rc2/usr/obj on the base system. You can adjust the settings within the jail but it will always be within the release91rc2 dir so you can't use the jail to install into /usr/jails of the base system. > From looking at the usr/src/Makefile It looks like I need to set the > MAKEOBJDIRPREFIX=/usr/jails/relase91rc2/usr/obj/usr/src/tmp > environment variable, but is that the best solution here? There's > also a /usr/obj/lib32 directory (system is running amd64, I assume > this is for 32 bit libraries), so I would likely need to do something > here as well, that I haven't gotten to yet. lib32 is part of the final system - you don't need to handle it separately. See man src.conf if you want to turn off the creation of 32bit libs. You can set MAKEOBJDIRPREFIX (default /usr/obj ) to define where the binary files are made. You can also set DESTDIR (default is / ) for the installworld step to define where they get installed. When you start a buildworld or buildkernel the compiled binaries are stored within MAKEOBJDIRPREFIX. When that is complete the installworld or installkernel steps install the files from MAKEOBJDIRPREFIX into DESTDIR to create a workable system. That prevents a failed build from destroying part of your running system. If you want to experiment with different versions then you can also try- mkdir /usr/jails cd /usr/jails svn co http://svn0.us-west.FreeBSD.org/base/releng/9.0 9.0-src cd 9.0-src set MAKEOBJDIRPREFIX = /usr/jails/9.0-obj set DESTDIR = /usr/jails/9.0-base make buildworld && make installworld cd /usr/jails svn co http://svn0.us-east.FreeBSD.org/base/releng/9.1 9.1-src cd 9.1-src set MAKEOBJDIRPREFIX = /usr/jails/9.1-obj set DESTDIR = /usr/jails/9.1-base make buildworld && make installworld > I know the /usr/obj/usr directory can be deleted after the > installation of the source, does the same go for the /usr/obj/lib32 > directory? if so Anything in MAKEOBJDIRPREFIX (/usr/obj) can be deleted after you have installed it, including lib32 which are libs to allow running 32bit programs on a 64bit system.