iocage specific 12.0-RELEASE -> STABLE/12

Matthew Seaman matthew at FreeBSD.org
Thu Jan 17 10:01:34 UTC 2019


On 16/01/2019 20:41, Russell L. Carter wrote:
> Greetings,
> 
> While I wait on poudriere to build both firefox and chromium (32
> threads, and it will still take a while), so that I can install iocage
> and dive into this newfangled technology called "jails" ;-), I have a
> basic question.
> 
> I had a flash in the brain (be nice, I'm a geezer and slow, it's only
> taken me 20 years to figure this out) and realized I might be able to
> use iocage jails to quickly spin up dev environments that are skeletal
> compared to my desktop environment and so can minimize package version
> collisions that happen when I try to port stuff to FreeBSD.  So I want
> the FreeBSD version of the jail to match the commit of my stable/12
> host, including packages.  However the iocage docs don't seem to
> mention this possibility.  Is this something people do?  I am guessing
> I can nfs mount my (different) build box's /usr/src, /usr/obj, and my
> package export directories into the jail, and use my source upgrade
> scripts and pkg upgrade as usual, correct?  Are there any gotchas I
> should be aware of?  Will the template mechanism make it easy to do
> the configuration just once, or is iocage expecting a point RELEASE,
> as suggested by the docs?

I do almost exactly this, except I use a bunch of home-grown ansible 
code to create and configure jails.  It's reasonably quick, but I don't 
tend to spin up and discard jails that frequently.

I typically dedicate a ZFS heirarchy to each jail, and I install FreeBSD 
from my build tree by setting DESTDIR:

    /usr/src:# make installworld DESTDIR=/jails/somejail
    etc. etc.

Then I have my own pkg repo behind a webserver for handling installed 
software.  Works pretty well.

Of course, that's the other big use of jails in the way that you 
describe: poudriere will spin up some number of jails for build 
environments, and these are very much use-and-discard jails.

> I got to this point pondering how to install gnutls with guile
> bindings, so that I can see if I can get guix working on stable/12.

Yes -- creating youself a clean environment to build and test without 
needing to worry about conflicts with all sort of other software you 
have installed is definitely a job for jails.

	Cheers,

	Matthew




More information about the freebsd-questions mailing list