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.


838 comments

dominio's picture

I leave a leave a response each time I especially enjoy a post on a site
or I have something to add to the conversation. It's caused by the
sincerness communicated in the post I read. And after this post Add
new comment | Shaneware.biz. I was moved enough to post a comment :) I do have
some questions for you if you tend not to mind.

Could it be just me or does it look like like a few of these
remarks look like they are left by brain dead folks?

:-P And, if you are writing at additional sites,
I would like to keep up with anything fresh you have to post.

Could you make a list every one of all your social pages like your Facebook page,
twitter feed, or linkedin profile?

Obama slide dance's picture

Wonderful blog! Do you have any hints for aspiring writers?

I'm hoping to start my own blog soon but I'm a little
lost on everything. Would you advise starting with a free platform like Wordpress
or go for a paid option? There are so many options
out there that I'm totally overwhelmed .. Any recommendations?
Cheers!

kalung couple termahal's picture

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

heroes charge guide outland portal's picture

Yes! Finally something about heroes charge hack no survey.

Extreme FX's picture

At this time it sounds like Movable Type is the best
blogging platform available right now. (from what I've read) Is
that what you're using on your blog?

เบอร์สวย ราคาถูก's picture

Good blog you've got here.. It's difficult to find quality writing like
yours these days. I honestly appreciate individuals like you!
Take care!!

clash of clans hack cydia ios 8,clash of clans hack cydia 's picture

Below are some nice features the device has however as there are so
many, we decided to stipulate an important.

business energy management's picture

Good replies in return of this matter with real arguments and describing all about that.

Best Pianist's picture

I do not leave many responses, however i did a few searching and
wound up here Add new comment | Shaneware.biz. And I actually do have a few questions for you if
you don't mind. Is it just me or does it look like a
few of these remarks come across like left by brain dead people?
:-P And, if you are writing at other social sites, I would like to follow anything fresh you have to post.
Would you make a list of all of your community pages
like your Facebook page, twitter feed, or linkedin profile?

friv games's picture

You have made some good points there. I checked on the internet for more info about
the issue and found most people will go along with your views on this web site.

Cleanse Colon 100's picture

These are genuinely enormous ideas in about blogging. You have touched some pleasant points
here. Any way keep up wrinting.

{clash of clans hack's picture

Je fixe la limite de telechargement a one hundred.000 par personne afin que le hack ne soit pas
detecte.

Michele Frazier's picture

Hello! I could have sworn I've been to this web site before but
after looking at many of the posts I realized it's
new to me. Anyhow, I'm definitely pleased I found it and I'll be bookmarking it
and checking back frequently!

Uber Driver's picture

May I simply just say what a comfort to uncover someone that truly understands what they're talking about over the internet.
You definitely understand how to bring an issue to light and
make it important. More and more people ought to
look at this and understand this side of your story. I can't
believe you're not more popular since you surely have the gift.

countrythundertickets.com's picture

I'm really enjoying the theme/design of your weblog.
Do you ever run into any browser compatibility issues?
A couple of my blog readers have complained
about my site not operating correctly in Explorer but looks great in Chrome.

Do you have any suggestions to help fix this problem?

Viral Videos's picture

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

cobra driver pack 2014 for xp's picture

Wow! After all I got a website from where I be able to truly obtain helpful facts concerning my study
and knowledge.

www.youtube.com's picture

Hi, just wanted to tell you, I enjoyed this post. It was practical.
Keep on posting!

AllCityLock.com's picture

Whether you are in Kennesaw, Atlanta or Marietta,
you can discover locksmith provider who offer
its consumers the very best quality services.

My website ... AllCityLock.com

kids coloring game's picture

I've learn some good stuff here. Definitely price bookmarking for revisiting.
I surprise how much attempt you place to create this sort of excellent informative web site.

brazil sword fish catch brazil's picture

Definitely imagine that which you said. Your favourite reason appeared to be
at the net the easiest factor to understand of. I say to you, I certainly get irked at the same time as
people consider concerns that they just don't realize about.
You controlled to hit the nail upon the highest and also defined out the entire thing with no need side effect , folks
can take a signal. Will probably be back to get more.

Thank you

madden nfl hack's picture

Yes! Finally something about best reverse mortgage.

Rosie's picture

Thanks to my father who told me on the topic of
this webpage, this web site is in fact remarkable.

clash of kings cheats's picture

Good day! I just would like to give an enormous thumbs up for the nice data
you've got here on this post. I can be coming again to your
blog for extra soon.

Joe Olujic's picture

constantly i used to read smaller articles or reviews which also clear their motive, and that iis also happening with this
post which I am reading at this time.

youtube video's picture

Pretty! This has been an extremely wonderful post.

Thank you for supplying these details.

dien dan rao vat an giang's picture

When I initially left a comment I seem to have
clicked the -Notify me when new comments are added- checkbox and now each time a comment is added
I get four emails with the exact same comment.
Is there an easy method you are able to remove me from that service?
Thank you!

Tonye Cole's picture

Greetings, There's no doubt that your site could
be having internet browser compatibility issues. Whenever I look at your blog in Safari, it looks fine however, when opening in I.E.,
it has some overlapping issues. I simply wanted to give you a quick heads up!
Apart from that, fantastic site!

popular music's picture

If you are going for best contents like me, simply visit this site
every day because it offers quality contents, thanks

award winning short film's picture

Good day! Do you know if they make any plugins to safeguard against hackers?
I'm kinda paranoid about losing everything I've worked hard on. Any tips?

Charlie's picture

Todas estas propriedades combinadas promover actividades mais rapido
de cura na anal pele.

Lelia's picture

Good day! Do you know if they make any plugins to assist 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. Cheers!

Minecraft Gratuit's picture

Thanks for the auspicious writeup. It if
truth be told was a amusement account it. Glance advanced to far
added agreeable from you! However, how can we be in contact?

find more info's picture

Its not my first time to go to see this site, i am visiting this web page dailly and take good facts from here everyday.

Nature Pure Forskolin's picture

I was excited to discover this site. I want to to thank you for ones time for this particularly fantastic read!!
I definitely savored every little bit of it and i also have
you book marked to look at new stuff on your blog.

buy twitter followers's picture

This post is genuinely a pleasant one it assists new internet people,
who are wishing in favor of blogging.

lose weight without exercise's picture

I think this is one of the most significant info for me.
And i am glad reading your article. But want to remark on few general things, The site style is great, the articles is really excellent : D.
Good job, cheers

www.youtube.com's picture

What i do not realize is in truth how you are not really much more smartly-liked than you might be right now.
You're very intelligent. You already know thus significantly in the case of
this matter, made me individually believe it from numerous numerous angles.
Its like men and women don't seem to be fascinated except it is something to accomplish with Girl
gaga! Your own stuffs excellent. Always deal with it up!

android app game's picture

It is really a nice and helpful piece of information. I am satisfied that you shared this useful information with us.
Please stay us up to date like this. Thanks for sharing.

toys for tots's picture

Saved as a favorite, I love your site!

dragon city hack's picture

Installing Meyers will net you a discount in Nash's store at the Mojave Express Store.

If you have 100 points in Lockpick, then you can just walk down the other pier and pick the very hard lock to get inside.
Other than that, you're done with all of Moira's
quests.

rpg online's picture

Hi! Do you know if they make any plugins to safeguard against hackers?
I'm kinda paranoid about losing everything I've worked hard on. Any
recommendations?

cheap apple ipod nano's picture

I think the admin of this website is really working hard in support of his site, since here every data
is quality based information.

rooster home decor's picture

You could certainly see your expertise within the article you write.
The sector hopes for even more passionate writers like you who
are not afraid to mention how they believe. All the time go
after your heart.

Oscar's picture

I love your blog.. very nice colors & theme.
Did you create 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

relaxphin review's picture

Heya! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up
losing months of hard work due to no data backup.
Do you have any solutions to stop hackers?

Michele Frazier's picture

I am regular visitor, how are you everybody? This iece of
writing posted at this website is really pleasant.

energy star's picture

Very rapidly this site will be famous among all blog visitors, due to it's nice posts

youtube.com's picture

Hi there! This is my first visit to your blog!
We are a team 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 outstanding job!

truck injury's picture

Each new age brought the criminal element forward with it.
, it is best to go for affiliate marketing being
an initial step into the world of generating impartial income from home.
To report stolen email addresses at Yahoo, click Yahoo.

Pages

Add new comment