Adventures in tinderbox


For those that don't know anything about FreeBSD it is an operating system that traces it's heritage back to the original unix development at AT&T starting in 1970. FreeBSD uses what is called ports to build a whole range of software that you can use. If you know linux and say well we just use yum to install binary programs, that's fine, ports is the structure holding up the FreeBSD equivalent, which is called packages. So you get two options, 1. use a port to compile the software yourself or 2. have a pre-built binary package installed. The port needs to be setup and working before you can get a binary package to install.

Being in the process of helping fix issues related to getting programs to compile within the FreeBSD ports system I have gone and setup tinderbox on my machine. Basically tinderbox allows you to setup virtual systems to test the build process of the port you are working on. This means you can test that the port builds on any number of FreeBSD versions, which is a good starting point to allowing others to use it. Yeah, I said a good starting point, someone will find that it won't work on their machine while program x is installed. But hey that's one of the joys of programming. ;-)

Anyway to the point of this post - setting up tinderbox. While there is some decent documentation it doesn't fully cover all features, maybe these are the newer features. Anyway this is the first of a series of posts that cover my exploration into setting up tinderbox my way.

Tinderbox uses some terms a little different than you may expect so lets start with the first building block - a tinderbox jail. Within tinderbox a jail is a copy of a FreeBSD install of a particular version, that is what you get when you run make buildworld installworld from /usr/src. The idea is you have a few of these jails setup, I will use 10-CURRENT and 9-STABLE as examples here. One area here that isn't covered in the docs is using subversion to get your source files, so that is what I will use. The main FreeBSD development changed to using svn several years ago now but with them keeping the cvs repo mirrored to the svn updates there doesn't appear to be much info on using svn yet. This wiki page seems to be the best info available.

So to get started install tinderbox - from ports of course.

cd /usr/ports/ports-mgmt/tinderbox make install clean

Before install you can run make config to change a few options - personally I swapped mysql with PostgreSQL and csup with cvsup, which I didn't end up using. Installing will put all the scripts in /usr/local/tinderbox/scripts and I will assume that is where your setup is. Beside the scripts dir you will also find several other empty dirs at this point, I'll mention them as we get to the relevant parts.

I won't go into the setup step here as what you need to know is in the docs (tinderbox/scripts/README) basically create the database to be used and save a few options into config files.

Then you stat by creating some jails, you obviously need to give it some info for that.

usage: tc createJail -j <jailname> -u CSUP|CVSUP|LFTP|SVN|USER|NONE [-t <tag>] [-d <description>] [-C] [-P <protocol>] [-H <updatehost>] [-D <updatehostdirectory>] [-m <mountsrc>] [-I] [-a <arch>]

Jailname sounds obvious - the catch is it must start with the main system version number so 10-CURRENT not FREEBSD-10, -u will be SVN and can be left out if you setup SVN as your default, protocol will be svn (this may also be http or svn+ssh but you'll need a login account for ssh access to the official repo), update host will be svn.freebsd.org unless you get fancy and run your own mirror, updatehostdirectory is the svn path to get to what you want. So for a jail based on the current head development we get

cd /usr/local/tinderbox/scripts ./tc createJail -j 10-CURRENT -P svn -H svn.freebsd.org -D base/head -d "FreeBSD 10-CURRENT tinderbox jail"

And for 9-STABLE we get

cd /usr/local/tinderbox/scripts ./tc createJail -j 9-STABLE -P svn -H svn.freebsd.org -D base/stable/9 -d "FreeBSD 9-STABLE tinderbox jail"

So you may notice that the FreeBSD svn setup is a little different than you might expect - they don't use tags or branches the way you expect. Instead the path defines the release tag as such. So you can see that you get 9-stable from base/stable/9 you can also get 9.0-release from base/releng/9.0 or 5.2.1 from base/release/5.2.1 (yes 5.2.1 was the last minor release update) If you want to know the difference between RELEASE and RELENG then read this page. I would say current along with 8 and 9 stable would be sufficient but some may want to add other main releases to their testing list and may need them to find a regression between updates.

At this stage you will find that within /usr/local/tinderbox/jails a folder is created that contains the source and build files for each jail you create. When it is finished there will be a nice tarball of the jails world setup. If you mess around and want to start again then run ./tc rmJail -j my-messed-up-jail (from within tinderbox/scripts) and then remove it's folder within jails. rmJail removes the info from your database but leaves the jail files in place for you - I think there should probably be an option to delete all the files along with the jail definition, note for a suggestion or patch.

Some other options for -D that may interest you are -

base/head base/stable/9 base/releng/9.0 base/stable/8 base/releng/8.2 base/releng/8.1 base/releng/8.0 base/stable/7 base/releng/7.4 base/releng/7.3 base/releng/7.2 base/releng/7.1 base/releng/7.0

Well building the jails will take a few hours, so stay tuned for the next exciting episode.


1085 comments

outdoor pizza oven kit's picture

Hey There. I discovered your weblog the usage of msn. That is a very neatly written article.
I'll be sure to bookmark it and return to read more of your helpful info.
Thanks for the post. I'll certainly comeback.

cet domain sz08 fsqph's picture

I'm not sure where you are getting your info, but great topic.
I needs to spend some time learning much more or understanding more.
Thanks for magnificent information I was looking for this info for my mission.

Work at home edu Review's picture

Wow, that's what I was seeking for, what a material!

existing here at this web site, thanks admin of this web
site.

cet domain sz08 fsqph's picture

I'm not sure where you are getting your info, but great topic.
I needs to spend some time learning much more or understanding more.
Thanks for magnificent information I was looking for this info for my mission.

http://mocha1blog.wordpress.com/2014/10/21/mes-cils-'s picture

It's a shame you don't have a donate button! I'd most
certainly donate to this excellent blog! I suppose for now i'll settle for bookmarking and adding your RSS feed to my Google account.

I look forward to new updates and will talk about this site with my Facebook group.
Chat soon!

peoples products's picture

Thank you for the good writeup. It actually was
a leisure account it. Glance complicated to far introduced agreeable from you!

However, how can we keep up a correspondence?

skin centric reviews's picture

Ridiculous story there. What happened after? Thanks!

testerone XL's picture

I was suggested this web site by means of my cousin. I am now not sure whether or not
this post is written by way of him as nobody else recognise such unique
approximately my trouble. You're wonderful!
Thank you!

Elizabet's picture

Hi to all, the contents existing at this web page are in fact amazing for people experience,
well, keep up the good work fellows.

zte concord v768 protector's picture

Do you mind if I quote a few of your articles as long as I provide credit and sources back to your weblog?
My blog is in the exact same niche as yours and my users would genuinely benefit from some of the information you present here.
Please let me know if this alright with you. Thanks!

learning the stock market's picture

I couldn't refrain from commenting. Exceptionally well written!

Paket Outbound Bogor's picture

Appreciate this post. Will try it out.

Outbound Puncak's picture

Have you ever considered about including a little bit more
than just your articles? I mean, what you say is fundamental and everything.
However just imagine if you added some great photos or videos
to give your posts more, "pop"! Your content is excellent but with pics and videos, this website
could definitely be one of the most beneficial in its niche.
Wonderful blog!

Softeclipse.com/Itunes/'s picture

I am not certain where you are getting your info, but great topic.
I must spend some time studying more or understanding more.
Thank you for wonderful information I was in search of this information for my mission.

http://szybkierandki24.pl's picture

Very great post. I just stumbled upon your weblog and wished to
say that I've truly enjoyed browsing your weblog posts.
After all I will be subscribing in your feed and I
am hoping you write again soon!

Leticia's picture

Nice weblog here! Also your site quite a bit up fast!
What host are you the use of? Can I am getting your associate
hyperlink to your host? I desire my site loaded up as fast as yours lol

Tap the App's picture

Appreciate the recommendation. Will try it out.

sd1300is usb data's picture

Greetings from Colorado! I'm bored to death at
work so I decided to browse your website on my iphone during lunch break.
I enjoy the info you present here and can't wait to take a look when I get home.

I'm surprised at how fast your blog loaded on my
phone .. I'm not even using WIFI, just 3G ..
Anyways, fantastic blog!

Idol Lips Review's picture

Hmm is anyone else having problems with the images on this blog loading?
I'm trying to figure out if its a problem on my end or if it's the blog.

Any feedback would be greatly appreciated.

water damage repair's picture

Right away I am going to do my breakfast, later than having
my breakfast coming yet again to read more
news.

Anaheim Hills Electrician's picture

I think I have gotten along well with over 90 percent of the
directors I have worked with, and many have remained friends.
Air conditioning London is very well ensured all these things by the expert air conditioning professional.
Other tasks often include fitting circuit breakers and installing back-boxed
into walls.

Donald's picture

I'll right away grasp your rss feed as I can not find your e-mail subscription hyperlink or e-newsletter service.
Do you've any? Kindly let me realize so that I may just subscribe.
Thanks.

Eminem songs's picture

Quality posts is the key to invite the viewers to go to see the
site, that's what this web page is providing.

impressionen aus berlin 2014's picture

Thanks for finally writing about > Add new comment | Shaneware.biz < Loved it!

hddrecovery12.blog.com's picture

Hi there i am kavin, its my first time to commenting
anyplace, when i read this post i thought i could also
create comment due to this brilliant article.

hddrecovery12.blog.com's picture

Hi there i am kavin, its my first time to commenting
anyplace, when i read this post i thought i could also
create comment due to this brilliant article.

eminem's picture

Hi, after reading this amazing paragraph i am too happy to share my familiarity here with
friends.

web based content management system's picture

Hi there! This blog post couldn't be written much better!
Reading through this post reminds me of my previous roommate!
He constantly kept talking about this. I'll forward this information to him.

Fairly certain he's going to have a great read.
I appreciate you for sharing!

Mimi's picture

Hallo! Fot me is the best eyelash enhancer www.gigalash.sk

les campings's picture

Hey very nice site!! Guy .. Excellent .. Amazing .. I'll bookmark your site and take the
feeds additionally? I am happy to seek out so many useful information right here within the submit, we want
work out more techniques in this regard, thanks for sharing.
. . . . .

Charlotte Professional Painting and Drywall's picture

Spot on with all the programming. Need to release new algorithms to combat a lot of false negatives.

www.quinceanos.xyz's picture

Very When I woke up from my appendectomy the person in the bed next to me in the recovery room started having a Not going to lie, it was kind of

babygirlinvitations.net's picture

I think he is a bit too serious to make Top Gear style Unless they make Top Gear a serious show like the first couple of As much as I loved Top Gear, i really hope they don't try to copy the old the format unless they can get some great

www.partykins.xyz's picture

less than that, I saw it a few minutes before reposting

Pages

Add new comment