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.


832 comments

kayros's picture

I like the helpful info you provide in your articles.
I'll bookmark your weblog and check again here frequently.

I am quite certain I'll learn many new stuff right here! Best of luck for the next!

megatoad's picture

Every weekend i used to pay a quick visit this web page,
for the reason that i wish for enjoyment, as this this web page
conations genuinely good funny data too.

lo que callamos las mujeres's picture

Does your website have a contact page? I'm having a tough time locating it but, I'd like to send you
an email. I've got some recommendations for your blog you might be interested in hearing.
Either way, great website and I look forward to seeing it expand over time.

7 Ways unleash the Genius in you's picture

Keep on writing, great job!

Que Caro Estoy Pagando's picture

Nice post. I learn something new and challenging on sites I stumbleupon on a
daily basis. It will always be helpful to read
content from other authors and practice a little something from other sites.

www.uefaeurogermanysoccerjersey.com's picture

I love what you guys are up too. Such clever work and exposure!

Keep up the wonderful works guys I've incorporated you guys to
my own blogroll.

http://123blog.duadmin.isaev.info's picture

They pay off careful attention to consumer
comments to regularly boost their mystic network.

Visit my web page; http://123blog.duadmin.isaev.info

www.adin.isaev.info's picture

Samantha is blessed to work as a medium and, prior to relaxing to raise a household Samantha created for the Sunday Express.

my homepage: www.adin.isaev.info

Videoportal's picture

Excellent, what a blog it is! This website gives useful information to us,
keep it up.

vinylböden's picture

Keep on writing, great job!

tax a5torney's picture

Call: 866-385-7441

Should you have an irs bank levy or an irs wage levy.
Release that irs levy with all the aid of a tax lawyer
who can get a release of tax lien via an offer in compromise with the IRS.

Que Caro Estoy Pagando's picture

I was recommended this blog through my cousin. I am not sure whether
this put up is written by him as no one else understand such targeted
about my trouble. You are wonderful! Thanks!

Donald Trump's picture

Fantastic beat ! I would like to apprentice while you amend your web site, how can i subscribe for
a blog web site? The account helped me a acceptable deal.
I had been tiny bit acquainted of this your broadcast offered bright
clear idea

Plumber Gresham's picture

For newest news you have to pay a visit web and on internet I found this website
as a most excellent site for most up-to-date
updates.

desire's picture

I'm curious to find out what blog platform you are using?
I'm experiencing some minor security issues with my latest website and I would like
to find something more safe. Do you have any recommendations?

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

I am in fact thankful to the owner of this web site who has
shared this fantastic paragraph at here.

sales funnel software's picture

Very good info. Lucky me I came across your site by accident (stumbleupon).
I've book-marked it for later!

moringa slim review's picture

First of all I want to say excellent blog! I had a quick question which
I'd like to ask if you do not mind. I was interested to find out how you center
yourself and clear your thoughts prior to writing. I've had
a tough time clearing my thoughts in getting my thoughts out.
I truly do take pleasure in writing however it just seems like the first 10 to 15 minutes
tend to be lost just trying to figure out how to begin. Any suggestions or tips?
Thanks!

campi calcio in erba sintetica's picture

First of all I would like to say wonderful blog!

I had a quick question in which I'd like to ask if you don't mind.
I was interested to find out how you center yourself
and clear your mind prior to writing. I've had a tough time clearing my mind in getting my ideas out.
I do enjoy writing however it just seems like the first 10 to 15 minutes
tend to be lost simply just trying to figure out how to begin.
Any ideas or hints? Appreciate it!

social media's picture

It's great that you are getting thoughts from this article as well as
from our argument made here.

breastcancerawarenesstshirts's picture

Hello my friend! I want to say that this post is amazing, nice written and come with approximately all significant infos.
I'd like to see more posts like this .

Compte Brazzers Gratuit's picture

Supplementaire sur la plupart des fins comparables sont contamines par des virus et des logiciels malveillants ou programme logiciels espions logiciels - Nous vous offrons une centaine% assurer que Brazzers Generateur compte Premium est clair et protege dans votre ordinateur moveable.

Believe that it is possible by Pastor Davis Byars's picture

I have been browsing on-line greater than 3 hours nowadays, but I never discovered any interesting article like yours.

It is pretty value sufficient for me. In my view, if all web owners and bloggers made just right content as you did, the
internet might be a lot more helpful than ever before.

Residential House Cleaning Portland's picture

WOW just what I was looking for. Came here by searching for discount auto parts

Pittsburgh IRS Bank Levy's picture

Call: 866-385-7441

In the event you have an irs bank levy or an irs wage levy.

Release that irs levy with all the assist of a tax attorney who can get
a release of tax lien via an offer in compromise with the IRS.

Plumber Gresham's picture

I'm truly enjoying the design and layout of your
site. 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 designer to create your theme?
Great work!

Digitalradio's picture

We are a group of volunteers and opening a new
scheme in our community. Your website provided us with valuable info to work
on. You've done an impressive job and our entire community
will be grateful to you.

Böttcher's picture

Undeniably believe that which you stated. Your favorite reason seemed to be
on the internet the easiest thing to be aware of. I say to you, I definitely get annoyed while people consider worries that they just do not
know about. You managed to hit the nail upon the top and also
defined out the whole thing without having side-effects , people could take a signal.
Will likely be back to get more. Thanks

animals's picture

It's nearly impossible to find experienced people in this particular subject, however,
you sound like you know what you're talking about!

Thanks

hilarious fail video's picture

Nice answer back in return of this matter
with solid arguments and describing the whole thing concerning that.

Social Kickstart The Best Tool's picture

I think the admin of this site is really working
hard in favor of his web page, as here every data is quality based data.

lego friends's picture

Hi there! I know this is somewhat off-topic however I
had to ask. Does running a well-established blog like yours
take a massive amount work? I am brand new to running a blog but I do write in my diary every day.
I'd like to start a blog so I can easily share my personal experience and views online.
Please let me know if you have any kind of suggestions or tips
for new aspiring blog owners. Appreciate it!

uk charts's picture

Why viewers still make use of to read news papers when in this technological
world everything is presented on net?

natural health's picture

bookmarked!!, I love your blog!

Hogan Donna 2015's picture

I truly love your blog.. Great colors & theme. Did you develop
this amazing site yourself? Please reply back as I'm hoping to create my own blog and want to find out where
you got this from or what the theme is named. Cheers!

arma 3 desolation review's picture

Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your site?

My blog site is in the very same area of interest as yours
and my visitors would really benefit from a lot of the information you provide here.
Please let me know if this alright with you. Thank you!

Auto Repair Portland's picture

Hello, the whole thing is going fine here and ofcourse every one is sharing facts, that's really fine,
keep up writing.

youtube.com's picture

This paragraph presents clear idea designed for the new viewers of blogging, that in fact
how to do blogging.

web.toysvoc.com's picture

Fine way of describing, and good post to get data concerning my presentation focus, which i am going to present in university.

battlehandhack.wordpress.com's picture

The Book of Recipes adds a huge amount of variety to the already existing recipes.
A Secure Hash Algorithm, such as SHA1 or MD5, produces a unique, hash value based on the contents of the file and ensures that even a single character changing in a file will be
detected. The easiest way to remember this is - it's right smack
in the middle of the Ticket Hall flag.

Wehrmacht's picture

Hello friends, how is all, and what you would like to say concerning this piece of writing, in my view
its in fact amazing designed for me.

clash of clans hack apk's picture

Hmm is anyone else having 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 feedback would be greatly appreciated.

building muscle's picture

What's up it's me, I am also visiting this site on a regular basis, this web site is truly
good and the visitors are actually sharing nice thoughts.

surprise eggs's picture

Hi there, I found your site by way of Google while looking
for a related matter, your website came up, it appears good.
I have bookmarked it in my google bookmarks.
Hi there, just was aware of your blog thru Google, and located that it is truly informative.
I am gonna watch out for brussels. I'll be grateful in case you proceed this in future.
A lot of other folks might be benefited out of your writing.
Cheers!

Fun winter activities for kids's picture

Just want to say your article is as surprising. The
clarity in your post is simply nice and i could assume you're an expert on this
subject. Fine with your permission let me to grab your RSS feed to
keep updated with forthcoming post. Thanks a million and please keep up the gratifying work.

funny jokes's picture

I pay a quick visit daily a few web sites and blogs to read articles
or reviews, but this website offers quality based articles.

tickle's picture

Tremendous things here. I am very satisfied to look your article.

Thank you a lot and I'm looking ahead to touch you.

Will you kindly drop me a e-mail?

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

Hey I know this is off topic but I was wondering if
you knew of any widgets I could add to my blog that automatically tweet
my newest twitter updates. I've been looking for a plug-in like
this for quite some time and was hoping maybe you would have some experience with something like this.
Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to
your new updates.

Mattie's picture

Hey! Quick question that's totally off topic. Do you know
how to make your site mobile friendly? My web site looks weird when browsing from
my iphone. I'm trying to find a template
or plugin that might be able to correct this problem.
If you have any recommendations, please share. Many thanks!

muñoz ferrada's picture

I am curious to find out what blog system you are working with?
I'm having some small security issues with my latest site and I'd
like to find something more safe. Do you have
any recommendations?

Pages

Add new comment