Universal tinderbox


Tinderbox's main purpose would be as a developer tool to assist in FreeBSD port maintainers in getting various software packages available to FreeBSD users, but can it be used for more than that - yes. It is based on the scripts used by pointyhat to constantly compile ports to test for errors as well as create packages that are available to download through the various mirror sites. Which means it also gives you the ability to compile your own packages repository. If you want to make it do other things you would need to get into the scripts and adjust it to suit. Basically it is a set of scripts that sets up a clean system environment then compiles ports within it. That is a series of preset commands with some runtime options. There is no reason it can't be adjusted to run any automated task that you want to test within multiple clean systems.

So why would you want to build your own packages repository? Maybe you want your packages built with extra options turned on. Maybe you want to compile your ports with -O3 or CPUTYPE=corei7 to get a bit more performance. Or you support a range of servers and desktops that are not all the same OS versions and company policy prevents binary downloads from external sources being installed on your systems. Or you just want to build your own ports but want to know everything builds successfully before changing anything on your base system.

That last one comes in handy if you want to compile everything with clang. While effort is being made to move away from gcc and have everything built with clang, we aren't there yet. When you build your own ports in your base system various dependencies are built and installed before the port that needs them. This leads to newer libraries installed that may not work well with older versions of packages that use them and this mixed bag gets left that way when one port breaks. So it can be useful to know that everything compiles that is needed before anything in the base system gets changed. If you are using zfs then you could also use snapshots to rollback after a bad upgrade, but that's another story.

If you make changes to your ports tree to fix build issues then share the fixes with others by submitting a problem report. Chances are others would like to use the same fixes you made.

But tinderbox also lets you build against system versions that you don't have installed. How does that help you? Maybe you have an old 7.4 machine that you want to upgrade, you can build all the ports you want for that machine against FreeBSD 9.0 so they are all ready before you upgrade. It is often recommended that you recompile your ports after major system version updates. But then what if your upgrade goes bad and you want to go back to your old system? With tinderbox you could also build your ports against an older version and downgrade with confidence. While no-one would recommend you do that, it can give you peace of mind knowing that you have a way to fall back when changes don't work the way you want. If you want the option to fallback you may want to build both package versions before you upgrade.

In previous posts I have talked about setting up builds with a variety of system versions and configuring the environment options for each so I won't repeat that here. If you are wanting to build your own ports then you may want to expand the environment settings a bit. While you don't get the flexibility that you have with the /etc/make.conf you can add most of the options you would normally use there. The main limitation is you don't get conditional sections so anything you setup will be applied to every port you build. I previously showed you how to set the cputype used and you should be able to figure out how to add your own CFLAGS to the environment settings.

The recent options changes within the ports infrastructure (referred to as optionsng) does provide a way to set options for every port - tinderbox limitations prevent you using that within the environment settings for every port, but you can set some global options or turn on a few important options if that is all you want to do. Options set in the environment file will be applied to each port build, whether you choose to build with non-default options or not. If you want to configure options for a lot of ports then use the standard option config dialogs to set them up. My compileport script from the previous post allows you to use the -O option to use non-default options for each port.

So what are some options that you may want to add to your environment?

export PAPERSIZE=a4 export QT4_OPTIONS="CUPS QGTKSTYLE" export WITHOUT_JAVA=true export OPTIONS_SET="PGSQL SQLITE" export OPTIONS_UNSET="MYSQL JAVA" export PERL_VERSION=5.16.0

Well PAPERSIZE seems obvious. QT4_OPTIONS shows that any values with a space needs to be quoted, without the quotes only the first item is recognized. Within the environment file you can't use variable+=addvalue to set your variables gradually - you only get variable=value. The OPTIONS_SET and OPTIONS_UNSET provide a way to globally turn on or off common options. While a lot of options are unique to each port there is some consistency with naming that may also be expanded over time, with optionsng already adding some common ones like THREADS and DOCS to replace the NOPORTDOCS option that was previously available. To set an option only for a specific port use <uniquename>_SET. To get the ports uniquename use make -V UNIQUENAME eg -

cd /usr/ports/devel/py-gdata make -V UNIQUENAME py27-gdata cd /usr/ports/x11-toolkits/py-gtk2 make -V UNIQUENAME py-gtk2

While there is some consistency you can't always guess the ports uniquename from the portname. You may also want to look in /var/db/ports/<portname>/options for installed ports to see what values you have already used and what is available.

By default tinderbox isn't setup to store the port options you configure. You need to do that manually. To make it work you need to create a directory called options at the top of the tinderbox directory and inside that create a directory for each buildname you want options saved. As standard in unix the directory can be a link to another so you can use your existing options. To compile the ports with non-default options you need to build the ports with the -O option (or -o option to clear existing options and then set options)

So now all there is to do is create a build environment for your ports and start building. If you've been following along and have the base jails setup then -

cd /usr/local/tinderbox mkdir options cd options ln -s /var/db/ports 9-mypackages cd ../scripts ./tc createBuild -b 9-mypackages-amd64-clang -j 9.0-amd64 -p FreeBSD setenv OPTPORTLIST `pkg_info -aoq` ./compileport -O -B 9-mypackages -A amd64 -C clang

And if you are setting up your own packages to distribute through your network of FreeBSD machines you have a couple of options. To use them with the standard pkg_add you can either set PKG_PATH or PACKAGESITE to point to your packages. See man pkg_add for more details. If you use portmaster then you can set LOCAL_PACKAGEDIR to point to /usr/local/tinderbox/packages/9-mypackages-amd64-clang (or a common network mount) as well as PM_PACKAGES=first and PM_PACKAGES_LOCAL=pmp_local. Other package management tools should offer similar config options.


894 comments

agen bola tangkas's picture

Oregon Rams (Pacific Time Frame Zone web marketers). What do you believe have been the obstacles to reaching your
healthy goals. A team with 2 losses might have lost both games right before the upcoming
game, and be on a losing streak.

Marvel Future fight's picture

Marvel took back Punisher and Daredevil (and also on this recreation),
the rest will fall in place by some means.

how to organize your home's picture

Every weekend i used to go to see this web site,
because i wish for enjoyment, since this this website conations truly good funny information too.

New Bingo Sites's picture

Yоu rереаt thіѕ fоr ѕеvеn dауѕ аnd уоu wіll nо
tісе thе fruіtѕ.
In addition, many of the words used started to take on slightly different meanings, depending on the context in which they are
used. It's probably some mix of the two, so I have to give him props for not going
too far in either direction.

vehicle leasing's picture

Its like you read my thoughts! You appear to understand a lot about
this, such as you wrote the book in it or something. I think that you just could do with
some percent to drive the message house a little bit, however instead
of that, this is magnificent blog. An excellent read.

I will definitely be back.

consumer database's picture

I am regular visitor, how are you everybody?
This article posted at this website is truly good.

http://extremeathlete.co.uk/'s picture

It's going to be end of mine day, except before end I am reading this fantastic article to improve my knowledge.

Joe Olujic's picture

Hello I am so happy I found your webpage, I really found you by
mistake, while I was searching on Askjeeve for something else, Nonetheless I
am here now and would just like to say thanks a lot for a remarkable post and
a all round entertaining blog (I also love the theme/design), I don't have
time to read it all at the moment but I have saved
it and also added your RSS feeds, so when I have time I will be back to read
more, Please do keep up the fantastic jo.

social.xfire.com's picture

Loads of excellent writing here. I wish I saw it found the site sooner.
Congratulations!

casino bonus's picture

Every weekend i used to pay a quick visit this site, because i want enjoyment, since this
this site conations in fact nice funny stuff
too.

Tonye Cole's picture

bookmarked!!, I really like your blog!

heroes charge hack's picture

But is a touch of colour, a little bit of classy layout and a miniature sizing plenty of
for this mobile phone to contend. These were normally
wrapped close to Hershey Bars, and appeared cute.
Have you ever acquired any extras in the activity to get previous ranges.

Feel free to visit my web site heroes charge hack

www.fishfreegames.com's picture

Heb jij bovendien wat over de lift trap.

nouvebelle price's picture

Asking questions are really nice thing if you are not understanding
something completely, however this piece of writing presents good understanding yet.

site de rencontre gratuit pour hommes's picture

I absolutely love your blog and find almost all of your post's to be precisely what I'm looking for.
Does one offer guest writers to write content available for you?
I wouldn't mind writing a post or elaborating on a few of the subjects you write in relation to here.
Again, awesome web log!

Jeff Halevy's picture

You could certainly see your expertise within the article you write.

The arena hopes for even more passionate writers like you who
aren't afraid to mention how they believe. All the time go
after your heart.

Wrap Him Around Your Finger program's picture

The Language of Desire is a 10 module course online program
which is downloadable in PDF form.

liam neeson movies's picture

t wait to begin your extravaganza into the online entertainment world,
then you can get started right now, and just within a few clicks, an unlimited world of movies will be yours.

One of the most common things you'll find on this streaming service is TV series and movies.

Dream - Works Animation used Shrek to poke fun at traditional fairy tales
in a way no animated movie had up to that point.

Mo Howard West Virginia Football's picture

Link exchange is nothing else except it is just placing the
other person's web site link on your page at suitable
place and other person will also do similar for you.

Elle.com featured dentist's picture

Great web site you have got here.. It's hard to find high-quality
writing like yours nowadays. I really appreciate people like you!
Take care!!

senuke hosting's picture

At this time it appears like Expression Engine is the best blogging
platform out there right now. (from what I've read) Is that what you are using
on your blog?

1300-ans-mont-saint-michel.com's picture

Heb jij ook wat aangaande de stoellift.

Karl Jobst's picture

Keep on writing, great job!

animals's picture

A fascinating discussion is worth comment.I do believe that you ought to pubkish more on this
subject, it might not be a taboo subject but generally folks don't speak about such topics.
To the next! Cheers!!

pirater un compte facebook's picture

Unquestionably consider that which you stated. Your favorite reason appeared to be at the net the simplest factor to remember of.
I say to you, I certainly get irked at the same time as folks think about issues that they just do not realize about.
You managed to hit the nail upon the top and defined out the entire thing
without having side effect , other folks could take a signal.
Will likely be back to get more. Thank you

Firoz Patel's picture

Keep on working, great job!

Mark Dubowitz's picture

We are a group of volunteers and opening a new scheme in our community.
Your site provided us with valuable information to work on. You
have done an impessive job and our whole community will be
grateful to you.

animals's picture

Hey are using Wordpress for your blog platform? I'm new to the blog world but I'm
trying to get started and set up my own.
Do you need any html coding knowledge to make your own blog?

Any help would be greatly appreciated!

cheap shirts's picture

If you wish for to improve your experience simply keep visiting
this web page and be updated with the most recent news posted here.

Karl Jobst's picture

Currently it appears like Expression Engine is the top blogging platform out there right now.
(from what I've read) Is that what you are using on your blog?

ขายส่งเครื่องสำอาง's picture

Pretty nice post. I just stumbled upon your weblog and wished to say
that I've really enjoyed browsing your blog posts.
After all I will be subscribing to your
feed and I hope you write again soon!

jp natural cosmetic's picture

Pretty component to content. I simply stumbled upon your web site and in accession capital to claim that I acquire actually enjoyed
account your blog posts. Any way I'll be subscribing on your augment and even I fulfillment
you get admission to persistently fast.

www.racerevolt.org.uk's picture

Thankfulness to my father who informed me on the topic of this
blog, this website is really remarkable.

animals's picture

Very good info. Ludky me I ran across your site by chance (stumbleupon).
I have book-marked it for later!

animals's picture

I like what you guys tend to be up too. This sort of clever work and exposure!
Keep up the very good works guys I've incorporated you guys
to our blogroll.

get your ex Girlfriend Back fast's picture

Immedaitely He casted the spell an told me not to panic that my ex will come back
to me that every little thing is finished.

ForskolinExtractPure.com's picture

Great site you have here but I was curious if you knew of any forums that cover the same topics talked about in this article?
I'd really like to be a part of community where I can get suggestions from
other experienced individuals that share the same interest.

If you have any suggestions, please let me know.
Appreciate it!

Newport Beach Doctor's picture

Pretty section of content. I just stumbled upon your weblog and in accession capital to assert
that I get actually enjoyed account your blog posts. Anyway I will be subscribing to your
feeds and even I achievement you access consistently fast.

ดูแลผู้ป่วย's picture

Hi, after reading this amazing piece of writing i am as well glad
to share my experience here with mates.

a140409p26's picture

Admiring the time and energy you put into your blog and in depth information you provide.
It's great to come across a blog every once in a while that isn't the same old
rehashed information. Fantastic read! I've saved your site and
I'm incluring your RSS feeds to my Google account.

Cognitine Brain's picture

It's actually very difficult in this full of activity life to
listen news on Television, so I only use world wide web for that reason, and get the most
recent news.

how to get free donuts in simpsons tapped out's picture

He throws together anything he can think of and simply waits to see if any of it will gel
together. The Adventures Of Paddington Bear (1997)This charming animated series recounts the adventures of Paddington, the bear in the Wellington boots and duffel coat, whose
innocent point of view (and occasional "hard stare") have made him a
favorite with generations of children. By rebooting the phone, just
like with a computer, it flushes out the memory and helps to prevent
overload.

trapliften's picture

Alwaar is het item betreffende de stoel lift.

Joe Olujic's picture

You ought to take part in a contest for one of the best
blogs online. I will recommend this blog!

Luigi Wewege's picture

Hi there! I know this is kind of off topic but I was wondering if you knew where I could get
a captcha plugin for my comment form? I'm using the same blog platform as
yours and I'm having problems finding one? Thanks a lot!

slide1's picture

Hey! Do you know if they make anyy plugins to help with
SEO? I'm trying to get my blog to rank for some targeted keywords but I'm
not seeing very good results. If you know of any please share.
Appreciate it!

Testo Xtrm Review's picture

Hi! This is my 1st comment here so I just wanted to give a quick shout out and tell you I really
enjoy reading through your articles. Can you
recommend any other blogs/websites/forums that deal with the same topics?

Thanks a ton!

click's picture

Whats up are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and create my own. Do you require any coding knowledge to make
your own blog? Any help would be greatly appreciated!

เกมส์'s picture

Hi there! This is my first visit to your blog!
We are a collection of volunteers and starting a new project in a
community in the same niche. Your blog provided us beneficial information to work on. You have done a marvellous job!

Haarausfall Therapie's picture

Hey there! This is my first visit too your blog! We are a collection of volunteers and
starting a new initiative in a communikty in the same niche.
Your blog provided us valuable information tto work on.
You have donbe a wonderful job!

Pages

Add new comment