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?


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.


camp2014-stage.qed42.webfactional.com's picture

Write more, thats all I have to say. Literally, it seems
as though you relied on the video to make your
point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your site
when you could be giving us something enlightening to read?

www.youtube.com's picture

What's up Dear, are you really visiting this web site regularly, if so
after that you will definitely take nice know-how.

Flat Earth's picture

What's up, just wanted to tell you, I liked this blog post.
It was funny. Keep on posting!

quote life's picture

Quality articles is the secret to be a focus for the visitors to visit the web
site, that's what this site is providing.

electricity for preschoolers's picture

Great post. I will be facing some of these issues as well..

middletown new jersey hotels's picture

Saved as a favorite, I really like your blog!

Bidwarriors - Enjoy Cashback's picture

Heya just wanted to give you a quick heads up and let you know a few of the pictures aren't loading properly.

I'm not sure why but I think its a linking issue.
I've tried it in two different internet browsers and both show the same results.

7 days to die episode 1's picture

Great information. Lucky me I came across your
website by chance (stumbleupon). I've saved as a favorite
for later!

vip cheap print's picture

Only beneficial data is provided by this web site and that I
am subscribing to it this instant! Thankyou guys!

Que Caro Estoy Pagando's picture

With havin so much content and articles do you ever run into
any problems of plagorism or copyright violation? My blog has a lot of completely unique content
I've either written myself or outsourced but it seems
a lot of it is popping it up all over the web without
my permission. Do you know any solutions to help prevent content
from being stolen? I'd really appreciate it.

www.youtube.com's picture

Thankfulness to my father who stated to me concerning
this weblog, this website is genuinely amazing.

dealers solutions group richie bello's picture

Very descriptive post, I enjoyed that bit. Will there be a part 2?

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

For hottest information you have to pay a visit internet and on world-wide-web I found this web site as a most excellent
web site for latest updates.

congratulations's picture

Everyone loves it whenever people get together and share opinions.
Great website, stick with it!

traditional village barra da lagoa's picture

My partner and I stumbled over here by a different website and
thought I should check things out. I like what I see so now i'm following you.
Look forward to looking into your web page again.

hewan's picture

Fantastic goods from you, man. I have take note your stuff previous to and you're just too magnificent.
I really like what you've received right here, certainly like what
you are stating and the way during which you say it. You are making
it enjoyable and you continue to care for to stay it sensible.
I cant wait to learn much more from you. This is actually a terrific

gordon ramsay dash cheat's picture

Just want to say your article is as astonishing. The
clearness in your post is just excellent 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 enjoyable work.

electricity monitor's picture

If you wish for to get a good deal from this post then you have
to apply such techniques to your won web site.

wikopedia's picture

Yes! Finally something about cape canaveral hotels.

mitsubishi car website's picture

Please let me know if you're looking for a article author for your weblog.
You have some really great articles and I think I would be a good asset.

If you ever want to take some of the load off,
I'd really like to write some material for your blog in exchange
for a link back to mine. Please blast me an email if interested.


mitsubishi car website's picture

Please let me know if you're looking for a article author for your weblog.
You have some really great articles and I think I would be a good asset.

If you ever want to take some of the load off,
I'd really like to write some material for your blog in exchange
for a link back to mine. Please blast me an email if interested.


iphone se broken screen's picture

Thanks for finally writing about > Add new comment | Shaneware.biz < Loved it!

www.youtube.com'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 emails with the same comment. Is there any way you can remove people from that service?
Thanks a lot!

working at home'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 recommendations?

Ministry of Realms's picture

Hi everyone, it's my first visit at this web site, and paragraph is truly fruitful in favor of
me, keep up posting these types of content.

coloring book for kids's picture

I am regular visitor, how are you everybody? This
piece of writing posted at this web page is truly nice.

เบอร์สวย 789's picture

This website was... how do you say it? Relevant!!
Finally I've found something that helped me. Many thanks!

Bunny Rabbit funny's picture

Excellent way of describing, and good piece of writing to obtain data on the topic of my
presentation subject, which i am going to convey in academy.

zoo's picture

This information is priceless. How can I find out more?

Madden NFL 17's picture

I visit day-to-day a few web sites and sites to read
articles, but this web site gives feature based articles.

www.youtube.com's picture

Wow, superb weblog layout! How long have you been blogging for?
you made blogging glance easy. The full glance
of your website is great, as smartly as
the content!

replace iphone se screen's picture

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

disability insurance's picture

Hey there would you mind stating which blog platform you're using?
I'm going to start my own blog soon but I'm having a difficult time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.

The reason I ask is because your design seems different then most
blogs and I'm looking for something unique.
P.S Sorry for getting off-topic but I had to ask!

Air Conditioning Service's picture

It is appropriate time to make a few plans for the future and it's time
to be happy. I have learn this submit and if I could I want to suggest you few
fascinating issues or tips. Perhaps you can write subsequent articles referring to this article.

I wish to learn even more things about it!

Madden 17's picture

It's really a nice and helpful piece of information. I am happy that you just shared
this useful information with us. Please stay us up to date like this.
Thank you for sharing.

www.youtube.com's picture

What's Happening i am new to this, I stumbled upon this I have discovered It positively helpful and it has helped me out loads.
I am hoping to contribute & aid different users like its aided me.

Good job.

http://www.anchorg.com/en/node/362822's picture

Asking questions are truly good thing if you are not understanding anything fully, however
this post presents pleasant understanding

Hulk vs. Dad's picture

You really make it seem so easy with your presentation but I find this topic to be
actually something which I think I would
never understand. It seems too complicated and extremely broad
for me. I'm looking forward for your next post, I will try to get the hang of it!

Pokecoins's picture

I usually do not write many remarks, but i did some searching and wound up here Add new comment | Shaneware.biz.

And I do have 2 questions for you if it's allright.
Could it be simply me or does it look as if like
some of these remarks come across as if they are coming from
brain dead visitors? :-P And, if you are writing
on additional sites, I would like to follow anything fresh
you have to post. Could you list of every one of your communal sites like your twitter feed, Facebook page or linkedin profile?

nba 2k16 how to score mycareer's picture

I'm extremely impressed with your writing abilities
as well as with the layout for your weblog. Is this a paid subject matter or did you customize
it your self? Anyway keep up the excellent high quality writing, it
is uncommon to look a great weblog like this one nowadays..

nba 2K underrated's picture

An outstanding share! I've just forwarded this onto a co-worker who had been doing a
little research on this. And he actually ordered me lunch simply because
I stumbled upon it for him... lol. So let me reword this....
Thank YOU for the meal!! But yeah, thanx for spending the
time to discuss this subject here on your blog.

Ellen's picture

I used to be recommended this website by means of my cousin. I am not
certain whether or not this submit is written by means of
him as nobody else know such distinct approximately my difficulty.
You're wonderful! Thanks!

www.youtube.com's picture

This info is priceless. When can I find out more?

talousvalmennus's picture

Undeniably believe that which you stated. Your favorite reason appeared to be on the web the
easiest thing to be aware of. I say to you, I
certainly get annoyed while people think about worries that they just do not know about.
You managed to hit the nail upon the top as well as defined out
the whole thing without having side-effects , people could take
a signal. Will probably be back to get more. Thanks

5 new technology's picture

Howdy I am so grateful I found your website, I really
found you by error, while I was searching on Askjeeve
for something else, Nonetheless I am here now and would just like to say many thanks
for a incredible post and a all round exciting
blog (I also love the theme/design), I don't have time to look over it all at the
minute but I have bookmarked it and also added your
RSS feeds, so when I have time I will be back to read a great deal
more, Please do keep up the great work.

Video marketing's picture

Hmm it seems like your site ate my first comment (it was extremely long)
so I guess I'll just sum it up what I wrote and say, I'm
thoroughly enjoying your blog. I too am an aspiring blog blogger but I'm
still new to the whole thing. Do you have any tips for first-time blog writers?

I'd really appreciate it.

Judi Online's picture

Hello to every one, the contents present at this site are in fact remarkable for people experience,
well, keep up the nice work fellows.

smartengineer.kalvick.com's picture

Hello, I want to subscribe for this website to obtain latest updates, so where can i do it please help.

how it works electricity's picture

Because the admin of this site is working, no question very
rapidly it will be well-known, due to its feature contents.

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

Excellent blog right here! Also your site rather a lot up fast!

What host are you the usage of? Can I am getting your affiliate hyperlink in your host?
I want my site loaded up as fast as yours lol


Add new comment