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.


886 comments

Nur eine Stunde Ruhe online schauen's picture

Hello there, I found your site by means of Google whilst looking for a similar subject,
your site got here up, it looks great. I have bookmarked it in my google
bookmarks.
Hi there, simply became alert to your blog thru Google, and found that it's
truly informative. I'm going to watch out for brussels.
I'll be grateful should you proceed this in future. Many people will likely be benefited from your writing.
Cheers!

Reefs2Go's picture

My programmer is trying to persuade me to move to .net from
PHP. I have always disliked the idea because of the expenses.
But he's tryiong none the less. I've been using WordPress on various websites for about a year and am
anxious about switching to another platform. I have heard great
things about blogengine.net. Is there a way I can import all my
wordpress posts into it? Any kind of help would be really appreciated!

make money online fast paypal's picture

How To Make Money Online Guaranteed Udemy Course
100% Free

Video Link: http://tinyurl.com/odxl2c6

boucler ses cheveux's picture

In short, the hat must with face collocation is proper, can manifest the aesthetic feeling
of symmetry. If not, you might be hunting for a new wig much sooner
than expected. Hair vitamins should contain about
35 mg of niacin per tablet.

www.nexopia.com's picture

We stumbled over here coming from a different website and thought I might as well check things out.
I like what I see so i am just following you.
Look forward to finding out about your web page again.

The Trion Towers's picture

Howdy I am so delighted I found your web site, I really
found you by error, while I was browsing on Aol for something else, Anyways I am here now and would just
like to say thanks for a remarkable post and a all round exciting blog (I also love
the theme/design), I don't have time to read
through it all at the minute but I have bookmarked it and also added in your RSS feeds, so when I have time I will be
back to read much more, Please do keep up the great job.

drivers lessons's picture

In less than five minutes I was out the
door again with my backpack in place and heading down to the lobby to hand in the keycard.
This Essential Driver Training Program finally brings together what we have all
known for a very long time. Siobhan Dowd weaves the story of sacrifice
of a young Irish man in 1981 and a young woman who lived during the Iron Age.

solar.physics.montana.edu's picture

Wat u ook nog zou kunnen bekendmaken. Een stuk
over deze trappenlift.

home designs and ideas's picture

My relatives every time say that I am wasting my time
here at net, however I know I am getting knowledge everyday by reading such fastidious
content.

Ketone Burn DIet's picture

Wow, incredible blog structure! How lengthy have you ever been blogging for?

you made blogging glance easy. The overall glance of
your web site is wonderful, let alone the content material!

Reefs2Go's picture

Hey! Icould have sworn I've been to this website before but after reading
through some of the post I realized it's new to me. Nonetheless,
I'm definitely happy I found it and I'll be bookmarking and checking back frequently!

My ez cash creator review's picture

Awesome! Its truly remarkable paragraph, I have got much clear
idea about from this post.

Dr Sherri Worth's picture

We are a group of volunteers and opening a new scheme in our community.
Your site offered us with valuable info to work on. You've performed a formidable job and our whole neighborhood might be thankful to you.

gostosas Del mundial 2014's picture

Natividad Buceta ha desarrollado la mayor parte de su carrera en puestos de responsabilidad tecnica,
comercial y de advertising en el Grupo Siemens.

Reefs2Go's picture

you are in point of fact a excellent webmaster.

The website loading pace iis amazing. It kind of feels that you're doing
any distinctive trick. In addition, The contents are masterwork.
you've done a excellent process in this topic!

web site's picture

Good day! Would you mind if I share your blog with my twitter group?
There's a lot of folks that I think would really enjoy your content.
Please let me know. Thanks

question's picture

I am truly thankful to the holder of this website who has shared this great post at at
this place.

Dermakin Cream's picture

Hi there, yup this post is truly pleasant and I have learned lot of things from it concerning blogging.
thanks.

british royalty commemoratives's picture

At this moment I am ready to do my breakfast, after
having my breakfast coming again to read more news.

minnesota web design company's picture

Nice post. I used to be checking continuously this weblog and I'm impressed!
Very useful info specifically the ultimate phase :) I maintain such information a lot.
I used to be looking for this certain information for a long time.
Thanks and good luck.

Middan&#039;s Home And Garen Shop's picture

Have you ever considered creating an e-book or guest
authoring on other websites? I have a blog based on the same information you discuss and
would really like to have you share some stories/information.
I know my subscribers would enjoy your work. If you are even remotely interested, feel free to shoot me an email.

Kerri's picture

Wetherspoon said it used " While the episode and incidents will need to have been horrifying and unpleasant, they were not life-threatening lasting or," the
lawyer of the company's said. When it comes to finding the right transmission specialist, however, it might seem difficult to know if he or she
is giving you a run for your money or not.
With specific conditions, make sure the dentist
has experience or training in taking care of it.

Brain fire's picture

Very good article. I definitely love this site. Stick with it!

animals's picture

Post writing is also a excitement, if you know after that you can write otherwise it is
complicated to write.

animals's picture

Thanks , I've just been looking for info about this subject for a while and yours is the greatest I have found out till now.

But, what about the bottom line? Are you sure in regards to the source?

repossessed cars's picture

You should purchase any of the automobiles inside your funds and get an prompt return and profit on your funding.

Caverta's picture

I'd like to thank you for the efforts you've put
in writing this blog. I'm hoping to check out the same high-grade content by you in the future as well.
In truth, your creative writing abilities has motivated me to get my very own site now ;
)

Pure Testo Xplode Reviews'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.

Aurora Mineral Plus's picture

Heya i am for the first time here. I found this board and I find
It truly useful & it helped me out a lot. I hope to give something back and help others
like you helped me.

Luigi Wewege's picture

I was very happy to uncover this great site. I wanted to thank you for
your time due to this wonderful read!! I definitely loved every bit of it and I have
you saved to fav to see new things on your website.

Tamil Christian song's picture

Hello to all, it's truly a fastidious for me to visit this website,
it contains priceless Information.

Bunny Rabbit funny's picture

Wow! At last I got a blog from where I be able to in fact take helpful facts concerning my study and knowledge.

youtubevideos.site's picture

Hi! This is my first comment here so I just wanted to give a quick shout out and say I truly enjoy
reading your articles. Can you suggest any other blogs/websites/forums that
cover the same topics? Thanks a ton!

Feel free to surf to my blog ... youtubevideos.site

nba 2k16 tips's picture

If some one desires expert view regarding blogging afterward i suggest him/her to pay a visit this blog,
Keep up the fastidious work.

house buyers's picture

If some one needs to be updated with newest technologies
then he must be pay a visit this web site and be up
to date daily.

coloring book for kids's picture

What's up to every one, for the reason that I am actually
eager of reading this website's post to be updated on a regular basis.

It consists of fastidious data.

color books for kids's picture

Great blog here! Also your site loads up fast!
What host are you using? Can I get your affiliate link to your host?

I wish my web site loaded up as quickly as yours lol

paid to give away phones's picture

I read this piece of writing completely on the topic of the comparison of most recent and previous technologies, it's
awesome article.

traditional village barra da lagoa's picture

This design is incredible! You certainly know how to keep a reader entertained.

Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Great job.
I really enjoyed what you had to say, and more than that, how you presented it.
Too cool!

madden mobile 17 hack's picture

I'd like to find out more? I'd want to find
out more details.

ithebes.com's picture

Wow! I am definitely clicked with by this blog and I
could claim nothing significantly less than I enjoy it!

gros nichons vidéos gros seins's picture

Splendide article : j'en paglerai dans la journee avec ?es amis

Garcinia Cambogia Direct's picture

Thank you for sharing your info. I really appreciate your efforts and I will be waiting
for your further post thank you once again.

Youlanda Zachmann's picture

Hello! I've been geading your web site for
some time now and finally got the courage to go ahead and give yos a shout out from Atascocita Tx!
Just wanted to say keep up the good work!

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!

Pages

Add new comment