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.


876 comments

awning singapore's picture

Hi, I do believe this is an excellent website. I stumbledupon it ;) I may revisit yet again
since i have book marked it. Money and freedom is the best way to
change, may you be rich and continue to help others.

Jewish Singles's picture

Good day! This is kind of off topic but I need some guidance from
an established blog. Is it hard to set up your own blog?

I'm not very techincal but I can figure things
out pretty quick. I'm thinking about setting up my own but
I'm not sure where to start. Do you have any points or suggestions?
Many thanks

3D Animation's picture

Hey there, You've done a grat job. I will definitely digg it and personally suggest to mmy friends.
I'm ure they'll be benefited from this web
site.

film xxx beaucoup gonzo d&#039;une nymphomane candide's picture

Sujet follement cultivant !!!

Wiley's picture

What i do not realize is in fact how you're not actually much more smartly-appreciated than you might be right
now. You're so intelligent. You understand therefore considerably with regards to this topic, made me in my opinion imagine
it from so many varied angles. Its like men and women are not interested unless it's one thing to do with
Lady gaga! Your personal stuffs outstanding. At all times
handle it up!

trouver un dj Thetford Mines's picture

I read this paragraph completely about the difference of newest
and preceding technologies, it's amazing article.

Dana Sibilsky's picture

Wow, this piece of writing is good, my sister is analyzing these things, so I am going to tell
her.

claires coupon print's picture

Do you mind if I quote a few of your posts as long as I provide credit and sources back to your
website? My website is in the exact same niche as
yours and my users would truly benefit from some of the information you provide here.
Please let me know if this alright with you. Regards!

http://codghostshacks.org/'s picture

With havin so much content and articles do you ever run into any problems of plagorism or copyright infringement?
My site has a lot of exclusive content I've either written myself or outsourced
but it looks like a lot of it is popping it up all over the
web without my agreement. Do you know any ways to help prevent content from being ripped off?

I'd really appreciate it.

Binäre Optionen's picture

Hey there! Do you know if they make any 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 success.
If you know of any please share. Thank you!

play-doh's picture

This post gives clear idea in favor of the new viewers of blogging,
that actually how to do blogging and site-building.

jvzoo's picture

I got this site from my friend who told me about this web site and
at the moment this time I am browsing this web page and reading very informative content here.

https://www.youtube.com/watch?v=rUX8ZVSSX4g's picture

I visited multiple web pages however the audio quality for
audio songs present at this site is in fact marvelous.

dealers solutions group richie bello's picture

Yes! Finally something about annualcreditreport com.

youtube.com's picture

We're a group of volunteers and starting a new scheme in our community.

Your web site offered us with valuable information to work on. You have done a formidable job and
our whole community will be thankful to you.

george carlin's picture

Hello colleagues, its impressive paragraph about teachingand entirely explained,
keep it up all the time.

Forward Head Posture Fix review's picture

Hmm is anyone else encountering problems with the pictures on this blog loading?
I'm trying to figure out if its a problem on my end or
if it's the blog. Any feed-back would be greatly appreciated.

sword fish wooden boats's picture

Great article, exactly what I needed.

Lawyer's picture

What i don't realize is in reality how you're now not actually much more neatly-preferred than you may be right now.

You are so intelligent. You know therefore significantly when it comes to this subject, produced me for my part imagine it from numerous numerous angles.
Its like men and women are not fascinated until it's something to do with
Lady gaga! Your individual stuffs nice. At all times take care of it up!

Luca's picture

wonderful points altogether, you simply gained a brand new reader.

What might you recommend in regards to your put up that you simply made a few
days in the past? Any certain?

ryhome.cn's picture

It's so difficult to find valuable material nowadays, but this surely
qualifies together. Departing certainly will definitely come back quickly and pleased!

Overpriced garbage's picture

It is actually a great and helpful piece of info.
I'm satisfied that you shared this useful information with us.
Please stay us up to date like this. Thank you for sharing.

SniperWolf's picture

Hey very nice blog!

potato masher's picture

Hey there would you mind sharing which blog platform you're
using? I'm planning to start my own blog in the near future but I'm having
a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your layout seems different then most blogs and I'm looking for something completely unique.
P.S Sorry for getting off-topic but I had to ask!

BryanElCampVEVO's picture

Your style is very unique compared to other folks I've
read stuff from. Thank you for posting when you've got the opportunity, Guess I will
just book mark this site.

adam and eve shopping's picture

It's the best time to make some plans for the future and it is time to be happy.
I have read this post and if I could I desire to suggest you few
interesting things or tips. Maybe you can write next articles referring to this article.

I desire to read more things about it!

apprendre la guitare's picture

Hello there! I could have sworn I've visited this website before but
after browsing through a few of the posts I realized it's new to me.
Anyways, I'm certainly delighted I discovered it and I'll be bookmarking it and checking
back often!

lead marketing automation's picture

At this time I am going to do my breakfast, later than having my breakfast coming yet
again to read other news.

Small penis's picture

I'm officially pleased with this website and that I wanted to take the time to thank you
from the base of my heart!

live web stats's picture

I'm really enjoying the design and layout of your website.
It's a very easy on the eyes which makes it much more enjoyable for me
to come here and visit more often. Did you hire out a developer to create your theme?
Exceptional work!

sex's picture

I've been browsing online more than three hours today, yet
I never found any interesting article like yours. It is pretty worth enough for me.
In my opinion, if all webmasters and bloggers made good content
as you did, the internet will be much more useful than ever before.

www canalrcn com's picture

Its such as you read my thoughts! You seem tto understand
a lot approximately this, such as you wrote the
ebook in it oor something. I think that you just could do with some % to power thee message house a bit, however other
than that, this is wonderful blog. A fantastic read.

I'll certainly be back.

stand up board aufblasbar vergleich'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 in the future.
Many thanks

עבודות אלומיניום בצפון's picture

First of all I want to say terrific blog! I had a quick question in which I'd like to ask if
you do not mind. I was interested to find out how you center yourself and clear
your head prior to writing. I have had a
tough time clearing my mind in getting my ideas out there.
I truly 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!

cabs for outstation in bangalore's picture

Hey there just wanted to give you a brief heads up and let you know a few of the pictures aren't loading correctly.
I'm not sure why but I think its a linking issue. I've tried it
in two different web browsers and both show the same outcome.

nail fungus cure's picture

It's in reality a great and helpful piece of information. I am satisfied that you simply shared this useful
information with us. Please stay us informed like this.
Thanks for sharing.

instrumental's picture

Today, I went to the beach with my children. 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
placed 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!

manutenção de piscinas's picture

Asking questions are truly good thing if you are not understanding anything totally, however this article offers fastidious understanding even.

potato masher's picture

Oh my goodness! Impressive article dude! Thank you, However I am having
issues with your RSS. I don't know the reason why I cannot join it.
Is there anybody having the same RSS issues? Anybody who knows the answer can you kindly respond?
Thanks!!

https://youtu.be/'s picture

whoah this weblog is wonderful i love reading your articles.
Keep up the great work! You already know, a lot of persons are hunting around for this information, you could aid
them greatly.

tickle's picture

I simply could not go away your website prior to suggesting
that I extremely loved the standard information an individual supply for your visitors?
Is going to be back continuously to investigate cross-check new
posts

Mickie's picture

Only important information is provided by this web site and that I am checking to it-this instant!
Thanks people!

manutenção de piscina's picture

I'm not sure why but this website is loading extremely slow for me.
Is anyone else having this problem or is it a issue on my end?
I'll check back later on and see if the problem still exists.

Pastor Milton Raul's picture

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

Dominique's picture

I enjoy reading websites similar to this! Causes me to feel
a comfortable rewarding experience as well as educated!
Thank you so much!

buy Xerox A3 Colotech paper'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.

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

Heya i'm for the first time here. I found this board and I
find It truly useful & it helped me out a lot. I hope to give something back and
help others like you aided me.

shop.bxlinggou.cn's picture

I really like reading websites similar to this! Causes enlightened and in addition me to feel a rewarding
that is warm sensation! Thankyou so much!

mariobet üyelik's picture

I used to be suggested this blog by way of my cousin. I am no longer
certain whether or not this publish is written via him as nobody else understand such certain about my trouble.
You are incredible! Thanks!

harrah&#039;s's picture

I was more than happy to uncover this great site.
I wanted to thank you for ones time due to this fantastic read!!
I definitely savored every part of it and i also have you book
marked to check out new stuff in your blog.

Pages

Add new comment