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.


10188 comments

diy valentine&#039;s day gifts for her's picture

Choose something that echoes your feelings for your beloved and expresses your feelings
adequately. Unknown - "I don't understand why Cupid was chosen to represent Valentine's Day. You can buy this from any of the big departmental store.

ace fishing wild catch hack tool's picture

This is question that I have been seeking the answer to forever.
Users of the game Diablo III have had many of their online valuables
wrongfully stolen from them. With this game the player learns
the importance of obeying rules.

https://delicious.com/'s picture

you're actually a just right webmaster. The web
site loading pace is amazing. It seems that you are doing
any unique trick. In addition, The contents are masterpiece.
you have done a great job in this matter!

Criminal and Human rights law and more.Let your voice be 's picture

Do you have a spam issue on this site; I also am a blogger,
and I was wanting to know your situation; many
of us have created some nice procedures and we are looking
to trade strategies with others, be sure to shoot me an e-mail
if interested.

reklama's picture

I constantly spent my half an hour to read this weblog's content everyday along
with a cup of coffee.

friendfeed.com's picture

In fact no matter if someone doesn't understand afterward its up
to other visitors that they will help, so here it happens.

hay day hack's picture

With any kind of click on the get, you could without high of a stretch
out download this kind of Hay Day hack programming close-by do the extraordinary making that you must
do. Hay's show includes both Men at Work and solo material, as
well as some hilarious stories about life as a professional musician. At the
time, he was on 1 qt Trotter (Blue Seal) am and pm, plus he received a joint supplement and he was on a thick field
of lush grass every day.

psychic seduction's picture

Hi to all, how is all, I think every one is getting more from this site, and your views are
fastidious in favor of new people.

handyortung's picture

Useful info. Fortunate me I discovered your web site accidentally, and I am surprised why this coincidence did not
happened in advance! I bookmarked it.

haydayastuce2015.wordpress.com's picture

For more information about the Long Beach Comic Con head over to.
The lone cantina is almost always completely empty, populated by only a few lonely looking NPC's or a weird Vulcan who's decided
dancing on top of tables is absolutely hilarious and totally within character.

Well bring the clone trooper and the imperial security officers'
and that's how I ended up on the red carpet event in character with my two escorts.

jurassic park builder generator's picture

Probably one of the most known voices for both young and old is that of the
iconic Mario, he and other similar characters such as:
Luigi, Warjo, Waluigi, Baby Mario and Baby Luigi are all done by Mr.

Hasbro really seems to be marketing this current batch of toys straight to kids and not as much to
collectors. Stephen: Yeah Tarkin wanted to inspect the episodes of Clone Wars to see if they were
really documentaries or propaganda against the Empire.

Genevieve's picture

Appreciating the commitment you put into your site and
in depth information you offer. It's awesome to
come across a blog every once in a while that isn't the
same unwanted rehashed information. Fantastic read!
I've bookmarked your site and I'm adding your RSS feeds to my Google account.

hay day piratage's picture

Its conditions are so bad with surface temperatures of 2500
degree F hat it makes earth look like a paradise.

This involves an ongoing education; knowing how to adapt to market conditions.
Set an alarm clock to wake you up at the right time.

Tiendas's picture

Are you l?oking fog information about a house or apartments rent in Dominican Republic?
By the use of a adds internet free service is a right place tto find this information. CompraVaina.com is
tthe best web where discover data anout home rental costdz per locations and a wide
ranjge other rroducts and gooddz that can be buyed on Dominicana.
Never earlioer had being smple find thee rest
rental hme of your dreams, with images and details of plentiful ready to take places.
This is achievable becasse ComwraVaina.com provide a no
cost internet web posting to full Dominican Republic rental association or ownerships that
can painledzs with a no efforts publish their rental wroperties.
If you expect inn go to live in Dominicana, idz painless find info about great house or apartments availale for
sale in Dominicana, with various of goods listed for
sale iin aall the regions. free web site Had also a wide range incredible
cheap ccar deals, you can purchase a used car for less than 4000 US dolpars
or other vehicles lkke mot?rcycle or sport cars.
By use CompraVaina web site you can no cost sale your
used cag or vehicles, his is one oof the reason this web site had plentiful annnounces related to vehicles
sell.

candy crush soda saga hack no survey's picture

If you don't have security, and want to protect your computer from viruses I recommend visiting a website that reviews the latest Computer Security programs.

But in no time, he discovers that although he's a mite cowardly, he really is a
gunslinger at heart. 'Mario Kart 8' ' kart racing for Wii U
' Release date: Spring 2014.

monster high games dress up cleo's picture

Online, there are hundreds of girls dress styles available in classic white or ivory
with choices in color sashes.

teeth cleaning products 2014's picture

I will right away take hold of your rss feed as I can't find
your e-mail subscription hyperlink or e-newsletter service.
Do you have any? Please allow me understand
in order that I could subscribe. Thanks.

Hack Moviestarplanet's picture

With a couple of quick internet suggestions, you can ease into a fundamental, open up, mild and compelling website.
Safe mode is a troubleshooting option for Windows that starts your computer in a limited state and try to determine what is causing it to not function correctly.
This is no wonder simply because it is the house of the greatest movie studios in the world this
kind of as Walt Disney and Common Studios.

Michael Kors Coat's picture

Your mode of explaining everything in this piece of writing
is truly fastidious, all be capable of without difficulty know it, Thanks a lot.

тесты для девушек's picture

I am sure this post has touched all the internet users, its really really good paragraph on building up new web site.

قالب سایت's picture

Hey very interesting blog!

superior test x muscle reviews's picture

Appreciate the recommendation. Let me try it out.

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?

Pages

Add new comment