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.


849 comments

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
yet.

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

Madden 17 Traits's picture

That is a very good tip especially to those fresh to the blogosphere.
Simple but very accurate information... Thanks for sharing this one.
A must read post!

Bunny Rabbit funny's picture

Hello there, I discovered your site by the use of Google while searching
for a related subject, your web site got here up,
it seems to be great. I have bookmarked it in my google
bookmarks.
Hello there, just changed into aware of your weblog through Google, and found that it's really informative.
I'm gonna be careful for brussels. I will appreciate if you happen to proceed this in future.
Many other folks will probably be benefited out of your writing.

Cheers!

www.youtube.com's picture

Thanks for ones marvelous posting! I definitely enjoyed reading it, you may be a great author.
I will always bookmark your blog and will often come back later in life.
I want to encourage you continue your great work, have a nice weekend!

gordon ramsay dash cheats's picture

I'm not sure where you are getting your info, but good topic.
I needs to spend some time learning more or understanding more.
Thanks for wonderful info I was looking for this info for my mission.

tickle's picture

I have been surfing on-line more than 3 hours these days,
yet I by no means found any interesting article like yours.
It's pretty worth enough for me. In my view, if all webmasters and bloggers
made good content material as you probably did, the internet might be a lot more useful than ever before.

tempi di un legamento d&#039;amore's picture

Thanks in support of sharing such a fastidious opinion, paragraph is good, thats why i have read it fully

79Sidney's picture

I must say you have high quality posts here.
Your website can go viral. You need initial traffic only.

How to get it? Search for: Etorofer's strategies

Tim Decapua's picture

Hi there! I simply wish tto offer you a huge thumbs up
for the great info you have got right here on this post.
I am coming back to your site for more soon.

play doh's picture

Hi there, I enjoy reading all of your post. I wanted to write a little comment to support you.

Luftaufnahme vor 40 Jahren und von Heute's picture

Undeniably believe that which you stated. Your favorite justification seemed to be on the
web the simplest thing to be aware of. I say to you,
I definitely get irked while people think about worries that they
plainly do not know about. You managed to hit the nail upon the top
as well as defined out the whole thing without having
side effect , people can take a signal. Will
likely be back to get more. Thanks

nhl 16 eashl's picture

Awesome article.

Madden 17 Traits's picture

Howdy! I know this is somewhat off topic but I was wondering which blog platform are you using for this site?
I'm getting sick and tired of Wordpress because I've had issues
with hackers and I'm looking at options for another platform.
I would be great if you could point me in the direction of
a good platform.

วิธีทำของชำร่วย's picture

I was curious if you ever thought of changing the page layout of your
site? Its very well written; I love what youve got to say.

But maybe you could a little more in the way of content so
people could connect with it better. Youve got an awful lot
of text for only having 1 or 2 images. Maybe you could
space it out better?

back shoulder workout's picture

At this time it appears like Drupal is the preferred blogging
platform out there right now. (from what I've read) Is that what you're
using on your blog?

vinyl-bodenbeläge's picture

Great post! We will be linking to this particularly great article on our site.
Keep up the great writing.

flat belly overnight guide's picture

Eat moringa leaves or extracts with your morning breakfast to kick-start your metabolism.
Begin that one thing, and continue that one thing, and follow through on that one thing.
One thing, one exercise thing, can be any activity.

commission's picture

What's up friends, its fantastic piece of writing regarding tutoringand completely defined, keep it up
all the time.

inpatient drug rehab's picture

Aw, this was an incredibly good post. Taking the time and actual effort to produce a really
good article... but what can I say... I put things
off a whole lot and never manage to get anything done.

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

Simply want to say your article is as astonishing.

The clarity on your put up is simply great and i can assume
you are a professional in this subject. Fine along
with your permission let me to grab your RSS feed to stay up to date with coming near near post.
Thanks a million and please continue the rewarding work.

Clash of Kings Cheat's picture

Hi, I do think this is a great website. I stumbledupon it ;)
I may return once again since I saved as a favorite it.
Money and freedom is the best way to change, may you be rich and continue to
guide other people.

dealers solutions group richie bello's picture

It's very effortless to find out any matter on net as compared to books,
as I found this paragraph at this web site.

youtu.be's picture

Hello just wanted to give you a quick heads up. The text in your post seem to be running
off the screen in Safari. I'm not sure if this is
a formatting issue or something to do with browser compatibility but
I figured I'd post to let you know. The design and style look great though!
Hope you get the problem solved soon. Thanks

rahaongelmat's picture

Hello There. I found your weblog the use of msn. This is a really well
written article. I'll be sure to bookmark it and return to read extra of your
helpful info. Thanks for the post. I'll definitely comeback.

hostgator coupon's picture

I've read several excellent stuff here. Certainly price bookmarking for revisiting.
I wonder how much effort you set to make such a magnificent informative site.

otthoni internetes munka's picture

Hi there to every single one, it's really a good for me
to pay a quick visit this site, it includes useful Information.

Arbeitssuchend's picture

Excellent blog here! Also your website loads up fast!

What web host are you using? Can I get your affiliate link to your host?
I wish my site loaded up as quickly as yours lol

chill's picture

hey there and thank you for your information - I have certainly picked up
something new from right here. I did however expertise a few technical
points using this web site, as I experienced to reload the site
a lot of times previous to I could get it to load correctly.
I had been wondering if your web hosting is OK? Not that I am complaining,
but sluggish loading instances times will sometimes affect your placement in google
and can damage your high quality score if ads and marketing with Adwords.

Well I am adding this RSS to my email and could look out for a lot more
of your respective interesting content. Ensure that you update this again very
soon.

first look's picture

Thanks for any other informative web site. The
place else could I get that type of info written in such an ideal means?
I've a challenge that I am simply now working on, and I have been on the glance out for such information.

Fibo Machine Pro Review's picture

Excellent beat ! I wish to apprentice while you amend your
website, how can i subscribe for a blog website?
The account aided me a acceptable deal. I were tiny bit familiar of this your broadcast offered vibrant transparent idea

freight car's picture

I am regular reader, how are you everybody?
This paragraph posted at this website is in fact good.

Madden 17 Connected Franchise's picture

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

Thanks!

Pages

Add new comment