Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Apr 2003 18:05:29 +0200
From:      Anton Berezin <tobez@tobez.org>
To:        Mike Patterson <mpatters@cs.uwaterloo.ca>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Building ports in a chrooted tree
Message-ID:  <20030422160529.GC91014@heechee.tobez.org>
In-Reply-To: <1051027119.75648.25.camel@comrie>
References:  <1051027119.75648.25.camel@comrie>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike,

On Tue, Apr 22, 2003 at 11:58:39AM -0400, Mike Patterson wrote:
> I'm interested in creating a clean build environment for ports,
> something like the one used on bento.  (See last paragraph for my
> reasons, and feel free to let me know if I've apparently been smoking
> substances of doubtful legality.)
> 
> I've had a look through the porters handbook and it doesn't seem very
> clear the best way to go about this.  Looking at bento, I found the two
> tarballs it uses to create a chrooted environment, except the problem is
> they appear to be for 4-stable or 5-current: my machine is RELENG_5_0.
> 
> So, I assume that what I'll have to do is have a look at how
> /usr/src/release does it.  Is that the best way to proceed?  Did I miss
> some documentation somewhere?  Is there a HOWTO anywhere for this?  If
> not, should there be?)
> 
> [0] I have a couple of reasons for this: currently my office has only a
> handful of FreeBSD machines, and the only one I can reasonably build
> ports on is my workstation.  I'd like to be able to, for example, build
> apache+modphp without interfering with my apache+modssl+modperl
> installation.  I also want to test a new port and don't want to have to
> pkg_delete -a on my workstation to make sure it builds cleanly.  I've
> solved this problem in the past by simply creating a machine that
> mirrors my server environment and does all the ports building, but I
> don't have that luxury now.

In my opinion, the easiest way to do it is to just create a proper jail
(you can always use an aliased IP from RFC 1918).  It can be pretty
minimal, just the base system and the ports collection (which can easily
be rsynced or cpduped from the host environment) and without any
packages installed (which greatly simplifies pkg-plist checks, should
you perform any).  For jail creation, please see jail(8).

=Anton.
-- 
Perl is strongly typed, it just has very few types. -- Dan Sugalski



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030422160529.GC91014>