Adventures in tinderbox 2


If you stumbled into this post first you may want to have a look over this previous post as we are building upon steps covered there.

So far we have got our world binaries built and these are the foundation of the environments we setup for testing our port builds. From here we create a tinderbox build. Within tinderbox a build refers to a combination of world binaries (the tinderbox jails we setup before) and a version of the ports files. It is probably a rare case but it would appear that you could setup a build using say netbsd pkgsrc system or similar, the most likely alternative to the official ports system would be an internal development branch of the ports source.

The first step is to setup the ports files to be used. A cvs checkout is shown in the docs and you could adjust the svn usage from yesterday if you have your own local svn repo (official ports are still in cvs at this point). The examples in the docs show a source checkout that is unique to your tinderbox setup. I think using the system installed ports will be enough for what I want and will bypass the confusion of three copies of the ports files. Personally I use portsnap to update my system ports tree and create or update a port there to test and develop it. Then I have a copy within my home folder that is an svn checkout from my redports account that I transfer changes to that I want to keep, and commit as desired from there. While my personal folder is just the ports I make changes to, I don't want a third copy just for test builds, so what I will use here is a user defined update method that will run portsnap anytime I want to update the ports tree. We have two options here, 1. create a portsTree with no update method leaving us to run portsnap manually as desired. 2. create a portsTree with a user update method. The first option is straight forward and acceptable for most but I want to look at option 2 here.

Reading the docs you may jump straight in and use a command like cd /usr/local/tinderbox/scripts ./tc createPortsTree -p FreeBSD -u USER -m /usr/ports and get errors and no ports tree setup. The docs don't help here so I went digging through the scripts and found the answer. When you create a portstree with a user defined update method it looks for the update script when it is first setup. The solution is simple. If we are creating a portstree called FreeBSD then we create a file in tinderbox/portstrees/FreeBSD and call it update.sh and for this example I want it to run portsnap so I use the following contents - #!/bin/sh portsnap fetch update Then run the createPortsTree command with the -u USER option. Simple and a good basis of any custom update you want to setup. You could even use this to run portsnap and then merge files from your personal ports repo automatically. This setup script is run with the command ./tc updatePortsTree

You may also want to share your local distfiles with tinderbox. Pretty easy and the one setup is shared across all portstree configs -

cd /usr/local/tinderbox/scripts ./tc configDistfile -c /usr/ports/distfiles

Now that we have our jails and portsTree setup it is time for the build. Remember a tinderbox build is a combination of a specific jail and portsTree and is straight forward -

cd /usr/local/tinderbox/scripts ./tc createBuild -b 10-CURRENT-clang -j 10-CURRENT -p FreeBSD -d "10-CURRENT building with clang"

The name I used there may raise a few questions but first lets consider what variations of builds we want to use.

The aim of using tinderbox is to test building under a variety of conditions, in this case primarily different system versions. To that end we started by creating 2 jails with different versions of world binaries, you may have extended that number and I encourage you to do so but I use two in these examples. From FreeBSD 9.0 we are moving away from a  dependency on gcc as the main compiler and now include clang within the base system. Being in the early transition of this is a bit awkward as not all ports build with the old gcc v4.2 that is included with base and not all ports build with clang either. Well ports changes need to be tested with each compiler so we may get a full ports build happening on any system install. One option we have is to specify what version of gcc is used to build our port. Easy till we get linking issues with something like boost installed with gcc42 and not linking with a gcc46 built port (that is my early guess and may not be the location of a solution). So anyway I am suggesting that a number of builds are setup to test building with clang as well as gcc. This will only apply to 9.0 and higher, 8.3 has just entered beta1 and doesn't appear to include clang. The other question you may have is that I only put clang in the name, how does it know to build with clang? It doesn't yet - that comes in a minute.

Well using the two jails we built yesterday lets setup the builds -

cd /usr/local/tinderbox/scripts ./tc createBuild -b 10-CURRENT-clang -j 10-CURRENT -p FreeBSD -d "10-CURRENT building with clang" ./tc createBuild -b 10-CURRENT-gcc -j 10-CURRENT -p FreeBSD -d "10-CURRENT building with gcc" ./tc createBuild -b 9-STABLE-clang -j 9-STABLE -p FreeBSD -d "9-STABLE building with clang" ./tc createBuild -b 9-STABLE-gcc -j 9-STABLE -p FreeBSD -d "9-STABLE building with gcc"

Now we have four builds setup to test our ports in. As I suggested before you should also consider having at least an 8-STABLE jail setup and maybe even a 7-STABLE one as well if not more. As clang is not included in 7 or 8 there is no need to setup two builds for each, I would still use gcc in the build name though.

At this point you will find a few directories have been created. The first you will probably see is tinderbox/{BUILDNAME} so if your following along you will have four there corresponding to each build you setup. The next ones are inside tinderbox/builds and have the same names as the four we just looked at. The dirs inside builds contain a Makefile with all the package  dependencies and although you may think make.0 and make.1 are makefiles they are in fact logs containing the log of the last compile done, each port compile is run in two phases, and a more than likely empty duds file. The top level dirs are where all the work is done. For each port you make, tinderbox will extract the tarball found in the corresponding jail build and mount the various points needed for portstrees/distfiles/devfs/procfs. From that you can work out that each build starts up in a unique environment (it uses chroot) completely isolated for your test make. Each environment is cleaned up after each test make and the log files will include files left behind if you get your pkg-plist incorrect.

Now to configuring the compiler to use. When you first test making your port and look at a log file you may notice that the timestamp at the start is all wrong. That will be a wrong timezone setting and gets us close to the compiler settings. First lets set the timezone, so edit the file tinderbox/scripts/etc/env/GLOBAL and add the following line (adjusted to match your timezone of course)

export TZ=Australia/Adelaide

You can see that it uses a bash style environment setting. Within the same folder we want to create a config file for each build we setup using the name build.{BUILDNAME} and have it contain the CC options that we wish to use. Before you go thinking about copying all your /etc/make.conf settings consider the purpose of this - testing against a minimum system config to ensure your port is as compatible as possible. Those with a custom edited make.conf need to handle their own port build conflicts with the options they want to use. So here all we want to do is set the compiler to use. To make this easy let's make a script, I will put this inside tinderbox/scripts and lets call it gencompilerenvfiles.sh

#!/bin/sh cd /usr/local/tinderbox/scripts/etc/env for BNAME in `ls ../../../builds | grep clang` do if [ ! -e build.$BNAME ] then cat > build.$BNAME <<CCOPTIONS export CC=clang export CXX=clang++ export CPP=clang-cpp CCOPTIONS fi done for BNAME in `ls ../../../builds | grep gcc` do if [ ! -e build.$BNAME ] then cat > build.$BNAME <<CCOPTIONS export CC=gcc export CXX=g++ export CPP=cpp CCOPTIONS fi done

Pretty straight forward if you know some shell scripting, if it's a bit beyond what you know it simply gets a list of dirs from within builds and outputs three lines to a corresponding config file for each one. The script won't touch files that already exist, so delete them if you want a clean slate or adjust if you want to add to existing files. The first loop uses grep to get clang named builds the second gcc. Is it overkill specifying gcc for the gcc builds - yep - but it keeps things consistent and also gets the CC setting output to the log file to remove any confusion when looking over them later, or more to the point when you get someone else to look over them for some help.

Now your all setup to use tinderbox to test your ports building. While the docs say you can do an adhoc build with just the tinderbuild command I find that not to be the case, the two command you use are

cd /usr/local/tinderbox/scripts ./tc addPort -b 10-CURRENT-clang -d graphics/blender ./tc tinderbuild -nullfs -b 10-CURRENT-clang graphics/blender

The first time you build a port it may take a while - it will build each  dependency needed, basically running make package-recursive for your port. Next time it will just pkg_add each dependancy and build the port you ask it to. The -nullfs option is needed if you setup the nullfs mount for portstree as shown above (or maybe it is for distfiles?). This adds some more dirs for you as well.

tinderbox/packages/{BUILDNAME} will contain all the packages created by that build. You will find a folder for each category containing links to the corresponding package inside the All dir.

tinderbox/logs/{BUILDNAME} will contain log files of each port compiled for that build.

tinderbox/errors/{BUILDNAME} will contain copies of the log files that had errors - this is probably all your really interested in.

That's about all you need to get up and running with tinderbox. I think I will do one more post covering some housekeeping and other notes. To close off I'll show a script I use to automate running any number of ports inside every build you have configured, I save it in tinderbox/scripts and call it testbuilds.sh

#!/bin/sh ## auto build passed ports for every tinderbox build setup ## works on assumption that /usr/ports is used for tinderbox portstree ## to test that the portname is correct cd /usr/local/tinderbox/scripts if [ ! $# -gt 0 ] then echo "Usage: ${0##*/} [category/portname ...]" echo "Multiple ports can be listed - space separated list" exit 1 fi for TESTPORT in "$@" do if [ ! -e "/usr/ports/$TESTPORT" ] then echo "********************" echo " /usr/ports/$TESTPORT doesn't exist" echo "********************" else for BNAME in `ls ../builds` do echo "***** Building $TESTPORT" ./tc addPort -b $BNAME -d ${TESTPORT} ./tc tinderbuild -nullfs -b $BNAME ${TESTPORT} done fi done

So to make use of the script

cd /usr/local/tinderbox/scripts ./testbuilds.sh graphics/blender graphics/luxrender ports-mgmt/tinderbox

and it will go through and compile each port with every tinderbox build you have setup.


6713 comments

http://Caps-lock-indicator.com's picture

Hi there! I simply would like to give a huge thumbs up for the good data you have here on this post.
I will probably be coming again to your weblog for more
soon.

My homepage home remedies acne (http://Caps-lock-indicator.com)

dfs dsfke's picture

Wow, this piece of writing is pleasant, mmy sister is analyzing these kinds of
things, thus I am ts`oing to inform her.

https://www.youtube.com's picture

There is abundance of stuff you can carry out to construct your lips give the
impression of being fuller. Numis Community
is totally different in that folks cannot solely buy numismatic gold and silver
cash that are graded and authorized as "good" based on the
Sheldon Scale, as in a MS70 American Silver Eagle numismatic
coin, however additionally they supply a referral
advertising compensation plan which delivers commissions to individuals who refer others.
There was a section of the show with kid's games and there were lots
of 'let's get pretty, let's play dress up' opportunities for girls and women.

Online Success Review's picture

It's a pity you don't have a donate button! I'd most certainly donate to this outstanding
blog! I guess for now i'll settle for book-marking and adding your RSS feed to my Google account.
I look forward to brand new updates and will share this site with my Facebook group.
Talk soon!

go to website's picture

Right here is the perfect webpage for anybody who wants to find
out about this topic. You know a whole lot its almost tough to argue with you
(not that I really would want to...HaHa). You definitely put a
brand new spin on a topic which has been written about for decades.

Excellent stuff, just great!

minecraft pocket edition hack tool's picture

One of the great benefits of a tablet is that it is an all-encompassing fun machine.
See's Candies, Godiva not even Ghirardelli's can hold a light to the handmade chocolate and candies made my Nikki Bracy.
Many retail merchants offer specific reductions or credit towards the
next purchase when you trade your games in.

accounting jobs san diego's picture

Hello there! I could have sworn I've visited this website before
but after browsing through many of the articles I
realized it's new to me. Nonetheless, I'm certainly delighted I discovered it and I'll
be book-marking it and checking back often!

u trim garcinia cambogia's picture

I think what you said was actually very reasonable.
However, think about this, what if you composed a
catchier post title? I mean, I don't wish to tell you how to run your
blog, but suppose you added a title to maybe grab people's
attention? I mean Add new comment | Shaneware.biz is a little vanilla.
You could peek at Yahoo's home page and see how they create article titles to grab viewers to click.

You might add a video or a pic or two to get people interested about what you've got to say.
Just my opinion, it could bring your website a little livelier.

hotel booking's picture

s owner will decide to accept or decline the bid in next 3
hours. You can get an outline for selecting your appropriate hotel.
Such discounts are also available at more expensive hotels that wish to have confirmed bookings for their hotels.

beer house commercial's picture

As every single event that big, it is impossible not
to have some gift shops. Imperial stout is closer to dark brown than the typical black color of other stouts.
So the next time someone looks down their nose at you for the stories that you
tell about the night before and the beer that you drank.

madden nfl cheats's picture

If you travel about 100 miles north east from London, you will come to the
village of Walberswick on the Suffolk coast. It has many thought-provoking in nature shows and also contains interactive exhibits for children. Do not place the unit
near the water and watch the tides at the same time.

reklamy's picture

Wow, that's what I was exploring for, what a stuff! existing
here at this weblog, thanks admin of this web page.

squalidlesion5353.soup.io's picture

Magnificent beat ! I wish to apprentice whilst you
amend your site, how could i subscribe for a weblog website?
The account aided me a acceptable deal. I had been a
little bit acquainted of this your broadcast offered bright clear idea

moviestarplanet hack's picture

Continuing the tradition of high quality, handcrafted chocolates
and candies, still using much of the candy making equipment that her father and grandfather used, every holiday season, Nikki's home becomes a
real life Santa's Bake Shop, complete with snow and plenty of loyal
elves to her create these one of a kind chocolates and candies for their family and friends.
There are some points you may not understand about candy crush cheats and also this
article will offer you some insider tips. Block 16, The Sebastian's main restaurant,
is nearby and quite the jewel of dining.

hay day hack tool's picture

Yes, when you've got a hay_day hacker, you'll be able to enter the hay_day game and have a lot of fun while you do so.
At the time of the first bout, it seemed like a classic mismatch, reminiscent of the Greco-Roman superheavyweight gold-medal match
between Russian superstar Alexander Karelin and US dairy farmer Rulon Gardner
at the 2000 Sydney Olympics. The arms you're using may not have the short space needed or the weapon recoil is truly setting you somewhat off
target.

pomysł na Prezent dla Teściowej's picture

What's Happening i'm new to this, I stumbled upon this I've discovered It absolutely useful and it has helped me out loads.
I'm hoping to give a contribution & assist different users like its
aided me. Good job.

Jeff Halevy's picture

I've been exploring for a little for any high-quality articles or blog posts on this sort of space .

Exploring in Yahoo I at last stumbled upon this website. Reading this information So i am
happy to express that I have an incredibly good uncanny feeling I discovered
exactly what I needed. I such a lot surely will make certain to do not
overlook this web site and give it a glance on a continuing basis.

Www.youtube.com's picture

Reliv provides you the opportunity not only to work locally,
however conjointly Internationally. One medication used is short acting beta agonists, which when inhaled let
to bronchodilation. The cost of earning just one dollar from $85,000 to $85,001 can be the difference
for a Male in New York to be roughly $37,000 over the
course of his retirement.

marvel contest of champions hack's picture

George Lucas may have turned his attention to World
War II fighter pilots, but his marketing people are still focused completely
on that galaxy far, far away. 3: When you're playing Freeplay, they always give
you all the characters and vehicles. To find this hunter you need to keep throwing bombs at
the bottom window of the ship when the level starts.

Jeff Halevy has often been thought of as's picture

I'm curious to find out what blog system you are using? I'm having some minor security
issues with my latest website and I'd like to finbd something
more risk-free. Do you have any suggestions?

http://waisttrainingcanada.wordpress.'s picture

Excellent article. Keep writing such kind of information on your site.
Im really impressed by your site.
Hi there, You have performed a fantastic job. I will definitely
digg it and in my opinion suggest to my friends. I am confident they'll be benefited
from this site.

clash of clans hack's picture

Heya! I realize this is kind of off-topic however I had to ask.
Does building a well-established website such as yours take a massive amount work?
I'm completely new to operating a blog but I do write in my journal daily.
I'd like to start a blog so I can easily share my own experience and thoughts online.
Please let me know if you have any ideas or tips for new aspiring blog owners.

Appreciate it!

clash of clans hack
http://clashofclanshacks.us

clashofkingshack2015update.wordpress.com's picture

“I almost died and I wrote many of these songs coming out of that experience while I
was in the hospital for another week or so after that.
For those who are not accustomed to Supercell and their story, learn this text on their current $1.

Players can get to do battle with both laptop and player controlled islands which would earn them helpful resources in addition to medals which
would permit them to rank in world leaderboards.

%anchor_text%'s picture

Hello, its nice post on the topic of media print, we all know media
is a impressive source of data.

free slots games to play for fun's picture

Hi there to every body, it's my firsst pay a visit of this webpage; this website includes remarkable and actualkly exceellent information in support oof
visitors.

Pennsylvania debt collecting company's picture

Hey I know this is off topic but I was wondering if
you knew of any widgets I could add to my blog that automatically tweet my
newest twitter updates. I've been looking for a plug-in like this for quite some time
and was hoping maybe you would have some experience with something like this.
Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

cydiaforidevice.soup.io's picture

What else can you do now that you have unlocked your iPhone?
The alternate apps are plenty but you have to concentrate on your own demand.

Welcome to our universe, the universe of advancement.

Noemi's picture

Hey! Do you know if they make any plugins to protect against
hackers? I'm kinda paranoid about losing everything I've
worked hard on. Any suggestions?

dragonsofatlantishack2015update.wordpress.com's picture

Eddie takes notes on his newfound powers, associates, enemies and pretty much everything else in his aforementioned Tour Book, which comes in mighty handy.
Not to mention that should you use these methods you are damaging
Zynga, the provider in the game you love. It is fun just to barge
through rooms and smash through enemies, while some you will need to
develop a strategy for.

Jeff Halevy as seen on TV's picture

My coder is trying to convince me to move to .net from PHP.

I have always disliked the idea because of the expenses. But he's tryiong none the less.
I've been using Movable-type on a number of websites for about
a year and am nervous about switching to another platform.
I have heard excellent things about blogengine.net.
Is there a way I can import all my wordpress content into it?
Any kind of help would be greatly appreciated!

live nba playoffs's picture

It's really vesry difficult in this busy life to
listen news on Television, therefore I just use web for that reason, and gget the
newest news.

masker pemutih's picture

Excellent goods from you, man. I've understand your
stuff previous to and you're just too excellent. I actually like what you have acquired here,
really like what you are stating and the way in which you say it.
You make it enjoyable and you still care for to keep it smart.
I can not wait to read much more from you. This is really a tremendous website.

wizzard101 crown hack tool's picture

Did you then try to sift through the gobbledygook that
is part of the bounce message and determine you didn't send the email.
We know you want to get the best results possible, and that is the whole purpose to defining your goals.
Do not use anyone's name or user name (your own,spouse, kids,
pets, relatives, etc.

La Dame en Noir 2 : L’Ange de la Mort streaming vf iphone's picture

Pendant la Seconde Guerre mondiale, huit ecoliers accompagnes par la directrice de l'ecole et une jeune
enseignante, quittent Londres pour se mettre a
l'abri dans le petit village de Crythin Gifford. Ils s'installent dans une vieille demeure sur une petite ile au
large de la cote. Leur presence va bientot reveiller une
epouvantable force malefique...
Salut Hey ! Quelqu'un dans mon

jungle heat generator's picture

He should pop up once there's a couple of cracks on the window.
Shepard is enrolled with the Alliance Military and is lucky enough to have a chance at being a Spectre.
1: To destroy the command center, Super Speeders
are the best units for you when you are choosing from
different types of armies.

amway's picture

)Do you seriously want to take your Visalus home
business to a new level. As mentioned earlier, Visalus seriously isn't a gimmick.
For anybody who is scanning this report, I would guess that you are looking to register with Visalus and so are searching around for reputable information about Visalus Sciences.

jam swiss army's picture

Every sportsperson desires to find the perfect sports watches
that could really bring some stability to their sports life.
It makes sense to buy Rolex watches online or consider Patek Philippe watches
for sale online because of the monetary benefit associated
with these transactions. These Swiss fake watches are available
for most of the leading brands, hence you should not be
surprised if you find fake Swiss watches like fake Omega Swiss watch and
fake Rolex Swiss watch on the net.

Jeff Halevy from 2014 till today's picture

Greetings! Very useful advice within this post! It is the little changes
which will make the greatest changes. Many thanks for sharing!

Jeff Halevy's picture

What a stuff of un-ambiguity and preserveness of precious knowledge onn the topic
of unpredicted feelings.

worldventures's picture

Males, in particular, should not be consuming soy protein in any significant amount, let alone twice
a day every day as Visalus advises. This isn't the only reason that
we know Vi - Salus isn't a scam; the product is real,
and it's backed by real research in nutrition too.

Right after reading this Vi - Salus evaluation you are most likely thinking that Vi - Salus is an excellent opportunity as well as
are ready to get started.

dang tin rao vat nha dat's picture

Superb post but I was wanting to know if you could write a
litte more on this subject? I'd be very thankful if you could elaborate a little bit more.
Bless you!

Jeff Halevy's picture

I don't even know how I stopped up here, however I believed this post was great.
I don't realize who you might be however definitely you're going to a well-known blogger should you are
not already. Cheers!

automated posting to drupal's picture

I was wondering if you ever thought of changing the structure of your
blog? Its very well written; I love what youve gott to
say. But maybe you could a little more in thee way of content
so people could connect with it better. Youve got an awful lot of text for only having 1 or two pictures.
Maybe you could space it out better?

Jeff Halevy's picture

After looking into a number of the blog articles on your web page,
I truly appreciate your way of writinmg a blog. I book-marked it to my bookmark webpage
list and will be checking back in the near future. Please visit my web site
as well and let me know what you think.

dc seoul time difference's picture

The local SEO Company helps their client's website to achieve
high rankings in the search engines. Internet is a wide array of various networks; SEO Services USA
ensures that your sight receives the right traffic to ensure that you will end
up doing business with them. To get an idea
of how the SEO report look like, you can request them
to provide you with a sample.

Jeff Halevy TV show's picture

These are truly enormous ideas in concerning blogging.
You have touched some fastidious factors here.

Any way keep up wrinting.

Traffic Racer hack's picture

Gamers can spend hours searching for free games to play or they can visit a site like Baller -
Arcade, Racingames60, or Racing Games WS. * Too many
meaningless non-family relationships (is there a positive
exchange of service, knowledge, or value taking place.
The last thing you want to do is choose the wrong one or
your casino Traffic Racer hack
may suffer, hence cutting your profits.

Jeff Halevy's picture

This piece of writing will assist the internet visitors for building up new weblog or even a blog from start
to end.

Snjob.Naplay.Net's picture

That is the reason why many web sites have
sign ups for the person to have these funny movie quotes sent directly to their email mail box each
and every day. As good fortune would have it, our hero leaps into action and
begins his battle against the airborne reptiles. Add
some strategic fades and transitions or overlay two sequences on top of each other to create a flashback.

Here is my homepage Snjob.Naplay.Net

neurs's picture

They should be relatively challenging, but you should ensure that you can meet them, with a minimum of pain, every time.

Sweet diet snack: sweet potato You may be watching your
carbohydrate intake, but my experience is that healthy carbohydrates help me stick to a
diet, feel better, think more clearly, and have the energy I need
to exercise. 7 million which was up $ 110 million compared
to the year previous.

Pages

Add new comment