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

warm hoodies's picture

Hello there, just became alert to your blog through
Google, and found that it's really informative. I am going to watch out for brussels.

I will appreciate if you continue this in future. Numerous people will be benefited from your writing.

Cheers!

Jeff Halevy's picture

Hello There. I found your blog using msn. This is a really well written article.
I'll make sure to bookmark it and come back to read more of your useful information. Thanks for the post.
I'll definitely comeback.

Firoz Patel's picture

It is appropriate time to make a few plans for
the long run and it is time to be happy. I've learn this put
up and if I could I desire to recommend you few attention-grabbing issues or tips.

Maybe you could write next articles referring to this article.
I wat to read even more issues about it!

restaurantsnearme.space's picture

This design is wicked! You certainly know how to keep a reader amused.
Between your wit and your videos, I was almost moved to start
my own blog (well, almost...HaHa!) Excellent job. I really enjoyed what you had
to say, and more than that, how you presented it. Too
cool!

My weblog - restaurantsnearme.space

nature renew cleanse's picture

Truly no matter if someone doesn't be aware of after that its up to other people that they will assist, so
here it happens.

Joe Olujic's picture

Thanks for sharing your thoughts about marketing.
Regards

Facebook money maker review's picture

Hello There. I found your blog the usage of msn. That is an extremely smartly written article.
I will make sure to bookmark it and come back to learn extra of your useful info.

Thank you for the post. I will definitely comeback.

Vincent Malfitano's picture

This is really interesting, You are a very skilled blogger.
I've joined your feed and look forward to seeking more of your fantastic post.
Also, I've shared your website in my social networks!

vimeo.Com's picture

I know this site gives quality dependent articles and other material, is there any other web site which offers these kinds of things in quality?

Mark Dubowitz's picture

I'm really loving the theme/design of your site.
Do you ever run into any web browser compatibility issues? A couple of my blog visitors have
complained about my website not working correctly in Explorer
but looks great in Safari. Do you have any adcvice
to help fix this issue?

celebrity dentist Dr. Sherri Worth on Elle.com's picture

Yes! Finally someone writes about web domain purchase.

bandar bola's picture

I simply could not leave your website before suggesting that I really enjoyed the usual info a person provide on your visitors?
Is gonna be again steadily in order to inspect
new posts

www.dossierempresarial.com's picture

La pesima situacion economica global obligaba a los clientes del servicio a buscar opciones mas asequibles a la hora del cafe.

El humano esta educado en la supervivencia.

Joe Olujic's picture

This page really has all of the information I needed concerning this subject and didn't
know who to ask.

Revival Beauty's picture

First off I would like to say awesome blog!
I had a quick question that I'd like to ask if you do not mind.

I was interested to know how you center yourself and clear your head prior to writing.
I've had a tough time clearing my thoughts in getting my thoughts
out there. I do take pleasure in writing however it just seems like the first 10 to 15
minutes are generally wasted just trying to figure out how to begin. Any recommendations or hints?
Appreciate it!

Karl Jobst's picture

Hi! I've been reading your blog for a long time now and finally got the bravery to go ahead and give you a
shout out from Austin Tx! Just wanted to mention keep up the good work!

sweat shirts's picture

Quality articles or reviews is the important
to attract the people to pay a quick visit the web page,
that's what this web page is providing.

Brandon Colker's picture

Howdy just wanted to give you a quick heads up. The text in your content seem to be running off the
screen in Firefox. I'm not sure if this is a format issue or something to do with web 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

animals's picture

Greetings! Very helpful advice within this post!
It's the little changes which will make the most significant changes.
Thanks a lot for sharing!

mark dubowitz's picture

Attractive secttion 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 augment and even I achievement you access consistently rapidly.

ayur skin reviews's picture

After checking out a few of the articles on your
web page, I really appreciate your technique of blogging.
I bookmarked it to my bookmark site list and will be
checking back soon. Take a look at my web site too and let me know
how you feel.

Jefferson's picture

T'hen lately, i discovered a folder, fsll of porn ( ahich he deleted in front of me)
and likewise sec moviers ?f him and his woman frens.

My webpage; linea erotica (Jefferson)

Dr. Sherri Worth's picture

Aw, this was an incredibly nice post. Finding the time and actual effort to
produce a great article... but what can I say... I put things off a lot
and never seem to get anything done.

Lemonade Diet Review's picture

Hello to every body, it's my first pay a quick visit of this blog; this
weblog contains remarkable and actually fine information for visitors.

bokep's picture

Thanks in support of sharing such a good thought, paragraph is nice, thats why i have read it fully

hacking facebook account's picture

Hi, all the time i used to check website posts here in the early hours in the daylight,
since i like to learn more and more.

Jeff Halevy's picture

Hey, I think your blog might be having browser compatibility issues.
When I look at your blog site in Ie, 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, fantastic blog!

daily cleanse review's picture

I do not even know how I ended up here, but I thought this post was good.
I do not know who you are but certainly you're going to a famous blogger if you aren't already ;) Cheers!

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

I just like the helpful information you supply to your articles.I'll bookmark your weblog and
take a look at once more here frequently. I am quite certain I'll learn a lot of
new stuff right here! Good luck for the next!

trapliften's picture

Evengoed even wat bijvoegen. Een stuk aangaande deze stoellift.

Mark Dubowitz's picture

Outstanding quest there. What happened after? Thanks!

Minerva's picture

Oh my goodness! Incredible article dude! Thank you
so much, However I am experiencing troubles with your RSS.
I don't understand why I am unable to subscribe to it.
Is there anybody else having similar RSS problems?
Anyone that knows the solution will you kindly respond? Thanx!!

custom tshirt's picture

We are a gaggle of volunteers and starting a brand new scheme in our community.
Your site provided us with useful information to work on. You have performed an impressive task and our whole group might be thankful to you.

Mark Dubowitz's picture

I'm really loving the theme/design of your weblog. Do you ever run into any browser compatibility problems?
A couple of my blog visitors have complained about my website not
working correctly in Explorer but looks great in Chrome.
Do you have any solutions to help fix this problem?

customized tee shirts's picture

It is appropriate time to make some plans for the long run and it is
time to be happy. I've learn this post and if I may just I desire to recommend you some attention-grabbing things or suggestions.
Perhaps you could write subsequent articles referring to this article.
I want to read more things about it!

agen bola tangkas's picture

Oregon Rams (Pacific Time Frame Zone web
marketers). What will prevent soccer from establishing itself as a major force
in the USA. Learn to be aware of your intuition, and you will get better over time.

example's picture

Today, I went to the beachfront with my kids. I found a sea
shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear."
She put the shell to her ear and screamed. There was a hermit crab inside and it
pinched her ear. She never wants to go back! LoL I know this is
entirely off topic but I had to tell someone!

m88 indonesia's picture

I love your blog.. very nice colors & theme.
Did you design this website yourself or did you hire someone to
do it for you? Plz answer back as I'm looking to design my own blog and would like
to know where u got this from. cheers

Joe Olujic's picture

Thanks for the auspicious writeup. It actually was once a leisure account it.

Glance complicated to far delivered agreeable from you!
However, how can we keep in touch?

sawyersecuritysystems.com's picture

Heya i'm for the first time here. I came across this board and I to find It really helpful
& it helped me out much. I am hoping to offer something back and aid
others like you aided me.

หน้า ขาว ใส เร่ง ด่วน's picture

I really like your blog.. very nice colors & theme.
Did you make this website yourself or did you hire someone
to do it for you? Plz respond as I'm looking to construct my own blog and
would like to know where u got this from. cheers

Brandon Colker's picture

Hello to all, how is everything, I think every one is getting more from this web
site, and your views are good in support of new visitors.

painful's picture

Hi there, always i used to check webpage posts here in the early
hours in the morning, because i enjoy to learn more and more.

how to make money online's picture

Hello, i think that i saw you visited my website thus i came to
"return the favor".I am trying to find things to enhance my website!I suppose its ok to use
some of your ideas!!

No Man&#039;s Sky Review's picture

Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you! By the way,
how could we communicate?

Anti Aging Secrets's picture

I tend not to drop a comment, but I looked at a lot of responses on this page Add new
comment | Shaneware.biz. I do have a couple of questions for you if you
don't mind. Could it be just me or does it give the impression like some of
the remarks appear as if they are written by brain dead folks?
:-P And, if you are writing on other online social sites, I would like to follow anything new you have to post.
Would you post a list of all of your social community sites like your twitter feed, Facebook page or linkedin profile?

retail electric providers's picture

I read this piece of writing completely about the difference of most recent and preceding technologies, it's
amazing article.

powur opportunity's picture

No matter if some one searches for his necessary thing, so he/she desires to be available that in detail, so
that thing is maintained over here.

пляжи пхукета в августе's picture

I go to see everyday some blogs and blogs to read articles or reviews,
however this webpage offers quality based posts.

pogo number's picture

Pogo is a free online gaming portal for anyone
owned by Electronic Arts Inc. in 1999 based in Redwood Shores, CA.
It is one of the most popular and desired destination for game lovers over years.
It has over hundreds casual games from the brands
like Hasbro and PopCap games. Pogo games are not only available for playing online but also downloadable
on the computer devices by paying for them you offline can play them too.Pogo offers a
range of card and board games like First class Solitaire and Monopoly to Puzzle, sports and word games like Scrabble.

WHY POGO CUSTOMER SUPPORT HELPLINE

We understand how important it could be talking to a live person when needed some real time support for any pogo
related games. People who are playing games for short time or
long time does not matter but while playing any game online
if something interrupts, you could be really frustrated and must
be looking for some instant human help. This is the purpose we discovered Pogo Customer Support so-that we could understand the users
problems and give them the right resolution over a
call or remote support process if needed.

Our Pogo Customer Support experts are friendly,
patient, professional and helpful in every situation. We understand customer and seek the real
deep problems and recommend & resolve. You can not only just
get real Pogo issues resolved by Pogo customer support
professionals but also you can ask about upcoming,
most popular or most suitable games & its features for you.

Pages

Add new comment