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.


836 comments

peejay.bloggplatsen.se's picture

Hoezo blog jij niets aangaande lifttrappen.

http://earthyunderworl85.shutterfly.com/earthyunderworl85's picture

Remember: You always have the right to fire your lawyers if you feel they are not representing you to your complete satisfaction. Apart from head related injuries, the attorney should be conversant with
the proper knowledge to handle such cases. However, this method of looking for a good lawyer to
represent you will not necessarily yield results especially if the people in your social and work circle should
not have sufficient information about like matters.

Berita Terkini's picture

Hi there to every one, because I am actually keen of reading this
web site's post to be updated on a regular basis. It consists of pleasant data.

arts and craft kitchens,home projects for christmas,home 's picture

Hi, just wanted to mention, I enjoyed this post.
It was funny. Keep on posting!

gold ira birch's picture

Benefits Of Rare-Earth Elements Investing

utah jazz basketball tickets's picture

Do you mind if I quote a few of your articles as long as I provide credit and sources
back to your website? My blog site is in the exact same area of interest as yours and my users would really benefit
from a lot of the information you present here. Please let me know if this okay
with you. Thank you!

http://www.pramesnet.com/new/home-2/item/1962-h-1-pilpres-'s picture

Its like you read my mind! You seem to know a lot about this, like you wrote the book
in it or something. I think that you can do with a few pics to drive the
message home a little bit, but other than that, this is fantastic
blog. An excellent read. I will certainly be back.

http://gewinnspiele.es's picture

Dacht even wat hierover schrijven. Is wat betreffende
trap lifen.

wat.tv's picture

Howdy this is kimda oof off topic but I waas wanting to know if
blogs use WYSIWYG editors or if you havce tto manually code with HTML.

I'm strting a blog sooon but have nno coding skills sso I wanted to geet
advice from someone with experience. Any help would
be greatly appreciated!

http://commentgrossirdesseins.fr's picture

Beher went onto to say, "Wait until she grows to a 400 pound woman. How unhinged does Harvey get to grow to be before he is dealt with. Tougher to drink breast milk from the source than you might think.

apex t's picture

I was able to find good information from your blog posts.

Making You Smile's picture

Today, while I was at work, my cousin stole my iphone and
tested to see if it can survive a 40 foot drop, just so she can be a youtube sensation. My iPad is now
destroyed and she has 83 views. I know this is totally off topic but I had to share it with someone!

threadless.com's picture

I every time spent my half an hour to read this web site's
posts everyday along with a mug of coffee.

restaurants near me's picture

I'm pretty pleased to uncover this site. I need to to thank you for your
time just for this fantastic read!! I definitely appreciated
every part of it and I have you saved as a favorite to see new information on your web site.

restaurants near me colerain ohio restaurants near me

affinitygarden.com's picture

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

Do you have any solutions to protect against hackers?

Que Caro Estoy Pagando's picture

When I initially commented I clicked the "Notify me when new comments are added" checkbox and now
each time a comment is added I get four e-mails with the same comment.
Is there any way you can remove me from that service?

Thank you!

Fibo Machine Pro Review's picture

Hello there! I could have sworn I've been to this website before but
after browsing through some of the post I realized it's new to me.

Nonetheless, I'm definitely glad I found it and I'll be bookmarking and checking back often!

the art institute new york's picture

I think this is one of the most vital info for me. And i am glad reading your article.
But should remark on some general things, The website style is wonderful, the
articles is really nice : D. Good job, cheers

aimexpress com's picture

Pretty! This was an extremely wonderful article.
Thanks for supplying these details.

landing page builder's picture

Hi! I know this is kinda off topic however , I'd figured I'd ask.
Would you be interested in exchanging links or maybe
guest authoring a blog post or vice-versa? My blog addresses a lot of the same topics as yours and
I believe we could greatly benefit from each other. If you're interested feel free
to shoot me an e-mail. I look forward to hearing from you!
Excellent blog by the way!

forum-digital.net's picture

Thanks very interesting blog!

Harris's picture

I simply could not leave without saying thank you from the bottom of my heart, after looking over this great blog!

Jimmy's picture

I wanted to work with a local firm, and Software Tailor impressed me. They are professional yet friendly -- experts in the product. They were the perfect partner to take us from our legacy system to the new solution.

Software Development

Hằng lồn to's picture

Because the admin of this web page is working, no hesitation
very shortly it will be well-known, due to its quality contents.

stoel lift's picture

Dacht even wat schrijven. Is wat aangaande trap lifen.

gold ira buyers guide's picture

Joined Gold Direct A Great Option For Prospective Retirees

mesin kasir's picture

After going over a few of the blog posts on your web site, I really appreciate your way of writing a blog.
I book-marked it to my bookmark webpage list and will be checking
back in the near future. Please check out my website as
well and tell me how you feel.

KickAss Torrents's picture

However, with Zhang Ziyi in the film and actual life, the less
appropriate, its image began to decline, starring Zhang Ziyi of
"geisha", because the film's plot touches some sensitive Sino-Japanese sentiments among resulted in dissatisfaction users.

Bhaktapur is surely an ancient town east of Katmandu inside Katmandu Valley.
When the films are available around the internet, several many people will get full access by paying membership
fees.

trap lift's picture

Ik moest even wat schrijven. Is wat over trapliften.

elite test 360's picture

Someone necessarily help to make severely posts I'd state.
This is the first time I frequented your web page and
to this point? I amazed with the analysis you made to create this actual
post amazing. Wonderful process!

www.123total.biz's picture

Je me rermets de publier ce petit commentaire afin de
congratuler l'auteur

http://www.daate.eu's picture

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

Red Payments's picture

I loved as much as you'll receive carried out right here.
The sketch is attractive, your authored subject matter stylish.nonetheless, you command get bought
an edginess over that you wish be delivering
the following. unwell unquestionably come more formerly
again as exactly the same nearly very often inside case you shield this hike.

top eleven cheats engine's picture

I'm not sure exactly why bbut this web site is loading incredibly slow for me.
Is anyone else having this problem or is it a prolem on my end?
I'll check back later and see if the problem still exists.

home buyers's picture

Very nice post. I absolutely appreciate this site.
Keep writing!

http://Ikeyur.com/cgi/wp/?p=39's picture

Waarom schrijf je tot nu toe niets aangaande trap lifen.

traplift's picture

Toch even wat hierover bijvoegen. Een essay aangaande de lift trap.

http://dragonballxenoverse.net's picture

I love what you guys are up too. Such clever work and coverage!
Keep up the excellent works guys I've incorporated you guys to
blogroll.

Amy's picture

We are very happy with Software Tailor. They are reliable, responsive and extremely customer focused.
Software Outsourcing HK
http://www.softwaretailor.com

Kindergeburtstag boehringer laboratories's picture

Der HIGH-MOVES Klettertreff - jeden Montag von 18:30 Uhr bis 21:30 Uhr.
An Aktionstischen konnen Besucher eigene Beobachtungen machen und experimentieren. Festnetz, Mobilfunk max.

placidwall4004.blogs.Experienceproject.com's picture

Mince je pensais justement faire un petit poste semblable a celui ci

actos claims's picture

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

fq.jens.hk's picture

Hey there! I know this is kind of off topic but I was wondering which blog platform are you using for this website?

I'm getting fed up of Wordpress because I've had problems with hackers and I'm
looking at alternatives for another platform.
I would be awesome if you could point me in the direction of a good platform.

Reefs2Go's picture

Great article.

website design minneapolis's picture

whoah this weblog is fantastic i really like reading your posts.
Keep up the great work! You know, many persons are hunting
around for this information, you could help them greatly.

Firoz Patel's picture

When I initially left a comment I seem to have clicked on the -Notify me when new comments are added- checkbox and from now on each time a comment is added I recieve four emails with the same comment.
Is there a way you can remove me from that service?
Thanks!

phodic simpsons tapped out's picture

It takes only a few minutes to download and start using the program after you make your
purchase. Leave the old habits and questions back there in those other years.
Episode 41 (Like Father, Like Clown) Air Date: 10-24-1991.

sexe's picture

?uel hasar? je comptais justement ecrire un petit poste similaige au tiens

Ian Leaf's picture

If you wish for to take much from this post then you have to apply these strategies to your won web
site.

monitoare emag's picture

Have you ever thought about including a little bit more than just your articles?

I mean, what you say is fundamental and everything.
However just imagine if you added some great photos or video clips to give your
posts more, "pop"! Your content is excellent but with pics and clips, this site could definitely be one of the best in its
field. Awesome blog!

Pages

Add new comment