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.


5016 comments

four corners alliance group coach van's picture

Good day! I know this is somewhat off topic but I was wondering which blog platform are you using for this site?
I'm getting sick and tired of Wordpress because I've had issues with hackers and I'm looking at options for another
platform. I would be fantastic if you could point me
in the direction of a good platform.

freemoneyssystem.com's picture

t understand exactly whast auto insurance does-and therefore, they
choose not to buy any. The entire procedure occurs in no more than 15 minutes.
The lenderrs assess the veicle with Kelley Bluee Boook to determine the maximum loan amount for every individual applicant.

Here is my weblog - auto money machines review (freemoneyssystem.com)

real racing 3 generator's picture

The story weaves the usual blend of familiar faces with new characters as yet
another twisted bunch of evil doers have released yet another hideous strain of infection on an unsuspecting populace.
senior analyst at Cahners In-Stat Group said on the CNN web
site. If the web application functions that deal with user authentication and session management are not implemented
properly, precious user data including their passwords and credit card information can be sent to an attacker.

payday loans no credit check's picture

Wonderful blog! I found it while searching on Yahoo News.
Do you have any suggestions on how to get listed in Yahoo
News? I've been trying for a while but I never seem to get there!
Thanks

quest bars's picture

If some one wishes to be updated with latest technologies afterward he must be go
to see this site and be up to date daily.

Doorway to destiny review's picture

DESTINY chats to Rosmarin about how the show will help entrepreneurs grow their businesses even further.

thomasnet reviews's picture

hello!,I love your writing very so much! proportion we
be in contact more about your article on AOL?

I require an expert in this area to resolve my problem.
Maybe that is you! Taking a look forward to look you.

secret money vault scam's picture

Below is sone information that was brought to my attention. These
undercover devices allow young sleuths to hold their owwn covert conversations.
A physiologist named Giovanni Cavagna, determined in his
research that walking is very much like an inverted pendulum.

Feel free to visit my weblog :: secret money vault scam

front row sports's picture

Pretty! This was an extremely wonderful post.
Many thanks for providing this info.

creature academy astuces's picture

This chat might be activated from the visitor or even the
operator seeing the adventure with the prospect to help
you and guide them. One from the most popular games
on the market are first person shooters,
which type of game is also a fun approach to relax if you are feeling stressed.

Keeping with your Facebook friends might be a time consuming.
Of course, there are legitimate home based businesses on the
market. Subsequently viewing nobody could get the many styles hidden. The goal with the game is drive to
the helicopter which has just landed. Hope you should have
much fun from it and preserve your precious games with
the aid of legal backups as well as the right game copy software.

The downloads are very quickly, and also you usually get unlimited downloads too.

In gambling the violent element of rage
is silent but unfortunately the uncontrolled part exists.
Children which can be naturally gifted at math are often very confident
when it is taught in their normal class curriculum.
Back betting is basically putting a bet on the selection to win a competitive sport, be it a
race, match, election or TV program etc. So, in case you wish to style your gaming system to complement another components of
your entertainment system, all you need to do is visit.
Multi-playing is really nice in playing fighting games. Once awake, it should not be allowed to lie longer during intercourse, but ought to be encouraged
to arise immediately. It's like the mixture
of Zynga's imposing games Farmville, Cityville and Chefville.
You will have additional time let's focus on your other works and scheduled outings.
You might placed her around jeans, shorts or skirts to
obtain a imaginary lazy daytime with pals.
This means the use of florescent colors for your pictures that gives a surreal and imaginative touch to it.
You get a a lot of extra weapons and can easily customize your characters.
Play continues until there is one person left ' the winner.
Say if in addition to running a PSP, you might have an I-pod or I-phone; you will probably be in a position to
also download movies to observe with your other entertainment devices.
Anyone can use the website recommended here to download the games, it can be easy to utilize, and you will find
no restrictions, no limits with out rules. Now we are
going to make an attempt to explain it to you about it games
as well as the forms of RPG games, therefore it is going to be easier that you should decide which kind you might be likely to start playing it.
You simply make chaos and wreckage without the need to worry about a thing.
Children are tech savvy these days and they need no special skills to use computer or laptops.

rival stars basketball cheat tool's picture

In these tracks, many many of them are good winners. Leveraging geoarbitrage as a life
hack will certainly improve the quality of your
life. For instance, while the horse you have identified as a contender may be at 4-1 with a projected payoff of $10 to win, if it is seriously under bet by the crowd
in the place pool, it may be a better place bet.

blood brothers cheats's picture

The gift materials for your 6th anniversary are iron (traditional:
U. For those who prefer that their chocolate flies solo,
the classic Hershey's Kiss with its elegant silver foil wrapper
and paper "kiss" tab is always a favorite of people of
all ages. The NHTSA estimates that the new car roof standard
would probably save 135 lives and prevent 1,065 personal injuries annually.

Rudolph's picture

Very good info. Lucky me I ran across your blog by accident (stumbleupon).
I have saved as a favorite for later!

شركة تنظيف شقق بالرياض's picture

I'm curious to find out what blog platform you happen to be working
with? I'm having some small security issues with my latest
blog and I would like to find something
more risk-free. Do you have any solutions?

http://iogenmod.com/'s picture

This post is worth everyone's attention. When can I find out more?

Fury En Entier Streaming VF's picture

Je suis tres vraiment inspire avec
vos capacites et aussi Structure pour votre weblog .
Est-ce que ce theme ou ne vous personnaliser
il vous ? Quoi qu'il en soit garder le excellente
qualite ecriture , il est rare voir un grands
blog comme celui-ci aujourd'hui ..

marvel avengers alliance cheat engine 2014's picture

Wow, this post is good, my sister is analyzing these kinds of things,
thus I am going to convey her.

minecraft.exe's picture

Howdy just wanted to give you a quick heads up. The words in your article seem to be running off the screen in Chrome.

I'm not sure if this is a format issue or something to do with web browser compatibility
but I figured I'd post to let you know. The design and style look great though!
Hope you get the issue solved soon. Many thanks

mujeres hermosas's picture

Great article. mujeres hermosas Cosarmelindo

jurassic park builder hack's picture

3:00 3:45pm Creator Spotlight: Bernie Wrightson (Room 12AB).
Hasbro really seems to be marketing this current batch of toys straight to kids and not as much to collectors.
The game Key for Star Wars The Old Republic and the SWTOR
Preorder Key that is needed to get into the early access,
are available at favorable prices from MMOGA.

gezilecek romantik yerler's picture

Hello just wanted to give you a quick heads up.
The words in your post seem to be running off the screen in Firefox.
I'm not sure if this is a formatting issue or something to do with internet browser compatibility
but I thought I'd post to let you know. The design and style look great though!
Hope you get the problem fixed soon. Thanks

mobilemoneygame.com's picture

Follow these 6 stepps and you will have ann empire of auto blogs
createdd in no time. You can actually kedep control on a giant blog empire for
yourself right from your pc without having to feel the hassles of continually publishing
neew content and deaing with hundreds of money making
weblogs as well. To really save money on car insurance, make sure the chwapest auto
insurance company is also financially capable of covering any
damages to youur car.

Visit my site: auto money machines review - mobilemoneygame.com,

bread-machine-review.com's picture

I simply couldn't leave your website before suggesting that
I actually loved the usual information a person supply to your visitors?
Is gonna be back incessantly in order to inspect new posts

how to get a bigger penis's picture

Right here is the perfect blog for anyone who wants to understand this topic.
You realize a whole lot its almost tough to argue with you (not that I actually would want to...HaHa).
You certainly put a fresh spin on a subject that has
been written about for decades. Excellent stuff,
just great!

real racing 3 trainer's picture

Microsoft baseline security analyzer can be used to test the security configuration.
Last year, 130 skeptical German scientists
co-signed an Open Letter of protest to German Chancellor Angela Merkel, asserting, among other things, that
a "growing body of evidence shows anthropogenic CO2 plays no measurable role" in Earth's climate.
You'll work toward this achievement naturally through normal gameplay.

garage in legno fai da te's picture

Naturalmente il prezzo varia a seconda delle dimensioni
e del tipo di legno che si va a scegliere.

Angeles's picture

Whether or notReduce a coupleis sex enjoyment or may increase is upto every couple.

Also visit my homepage :: scaricare video (Angeles)

las mujeres mas hermosas de brasil 2014's picture

Howdy! This post couldn't be written any better! Reading this post reminds me of my good old room mate!
He always kept chatting about this. I will forward this post to him.
Fairly certain he will have a good read. Many
thanks for sharing!

period tracker's picture

Studies have found that this doesn't affect the nutrition a great deal but it does make the hay
look bad and it generally is sold for less. Lawyer's Farm,
in Thurmont, MD opens its 2014 autumn season on Friday, Sept.
The space has been completely remodeled and features an all-you-can-eat buffet of sushi, Chinese favorites,
and hibachi dishes.

legion of heroes hack's picture

We that way you like to play it and have completely everything that you oblige reviewing this picking center for taking satisfaction throughout.

Originally devised for the government to counter terrorist attacks,
Finch now uses it to predict the probability that a violent crime will
be connected to any individual (think 'Minority Report').
Each Gemini must find or purchase, physically place in their current home or
dwelling and subsequently read over the next 3 months their
all time favorite literary series when each set of Twins
was between the ages of 6-12.

darkness reborn tricherie's picture

Publishing a similar title might doubtlessly cannibalize
Clash of Clans' person base, consuming into its revenue stream and jeopardizing its longstanding
management place on the i - OS prime grossing chart.
We Encourage that you download this part on the off chance that you have to get a kick out of this change.
This is because huge companies are realizing that the information market
is another huge trend in helping to make making.

match.com free trial's picture

This is my first time go to see at here and i am really impressed to read all
at single place.

www.match.com's picture

What's up all, here every one is sharing these knowledge, thus it's nice to read this
web site, and I used to go to see this blog daily.

logical reasoning's picture

Appreciating the commitment you put into your site and in depth information you present.
It's nice to come across a blog every once in a while that isn't the same out of date rehashed material.

Fantastic read! I've saved your site and I'm
adding your RSS feeds to my Google account.

magic of making up course http://howtogetmyexback.info's picture

We have all been wired from birth to seek this out.

m88's picture

My spouse and I absolutely love your blog and find almost all of your post's to be what precisely I'm looking
for.Would you offer guest writers to write content for you personally?

I wouldn't mind publishinng a post or elaborating on a number of
the subjects you wrjte regarding here. Again, awesome blog!

Have a look at my page m88

m88's picture

Excellent post. I will be facing some of these issues as
well..

Also visit my weblog:m88

instagram followers hack's picture

These sticks are made of diverse materials to go well with each player, and their dimensions
depend on the player's tallness. The first level reduces it by 50%,
and the second reduces it completely. When Jean-Paul gets too cozy with the nubile young guest,
grave consequences follow.

cheapest place to buy quest bars canada's picture

I'm not that much of a online reader to be honest but your sites really nice, keep it up!
I'll go ahead and bookmark your website to come back down the road.

All the best blogesaurus.com quest bars

amazongiftcardgeneratorupdate.wordpress.com's picture

As near as I can tell, this is the first time Apple has included
any videos with app descriptions in the App Store.
First of all, find a vendor that sells starter
tattoo kits. to the house near you, when you enter a lady will come and introduces herself,.

m88's picture

Hello, i believe that i noticed you visited my website
thus i came tto go back thee desire?.I am attempting to find things to
improve my web site!I assume its good enough to make
use of some of your concepts!!

Also visait my homepage :: m88

pinoytambayn's picture

Generally I do not read post on blogs, however I wish to say that this write-up
very compelled me to try and do it! Your writing taste has been surprised me.
Thanks, very great article.

http://totaltreadmillreviews.com/best-Smooth-Treadmill-'s picture

Hey, I think your website might be having browser compatibility issues.
When I look at your blog in Safari, it looks fine but when opening in Internet Explorer,
it has some overlapping. I just wanted to give you a quick heads up!
Other then that, superb blog!

spider-man unlimited hack's picture

Keep in mind, of course, that many of the parents or guardians of these children are also
going to be in attendance, which means you should choose
candy items that will appeal to adults, also.
They are a renowned leader in concession stand equipments.
Not too great for the waistline but my taste buds say thank you every time.

star wars commander hack's picture

Michael Bay is rumored to be fighting the studios, who want to 3D-ize Transformers 3
after the fact. Gastronomic culture can be experienced in the local farmer's markets that happen daily in the main square.
In days gone by Hermanus was a whaling station, today it is a sanctuary for
whales.

my singing monsters hack's picture

I don't know if I can remember them all off the top of
my head, they are all so wonderful and great groups of people that all do amazing
charity work, it's worldwide it's really great. The force is back in the attraction again for another
weekend of Star Wars fun where family and LEGO fans who have always dreamed of having their picture taken with
a stormtrooper. NPC dialogue is painfully bland and the
environments start to look painfully uninspiring.

tax accountants karratha wa's picture

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

payday loans uk bad credit's picture

constantly i used to read smaller content that also clear their motive, and that is
also happening with this post which I am reading here.

game of war fire age cheats's picture

It is a single of the speediest becoming rated variety 9 at Muscle autos checklist of the quickest muscle
mass vehicles. Layout - Nook Color and Kindle Fireplace
each characteristic straightforward design and style with a excellent holdability factor.
Men In Black (1997)In director Barry Sonnenfeld's hip sci-fi romp,
a streetwise New York City cop is enlisted
to work with a seasoned government agent on a top-secret team that monitors
space aliens living on planet Earth, unbeknownst to the general public.

موقع بروكسيالمواقع المحظورة's picture

lyk hdh lmwq` proxyarab.com lftH jmy` lmwq` lmHjwb@ bdwn lHj@ lst`ml brnmj

Pages

Add new comment