Tinderbox extra scripts

Submitted by Shane on Wed, 04/07/2012 - 9:52pm

Continuing on from my previous two ramblings let's have a look at two scripts I use with my tinderbox setup. It may not be the best place but I decided to keep these within the tinderbox/scripts folder.

The first script is gencompilerenvfiles which I have expanded a little since my previous post.

So the changes since my previous post are fairly small and obvious - first I added NO_WERROR and WERROR which allows some ports to finish building that only generate warnings. Some ports are setup to treat warnings as errors causing the build to stop. While it can make sense with some ports, others it isn't of concern and only gets annoying that the builds stop and you take 10 minutes to figure out that it's all because of a simple warning.

The next change is the addition of ARCH - when building for the same arch as the base system this is of no concern but some ports have a problem building on an amd64 system when the compiler is generating x86 code. The ARCH definition overcomes that issue.

The other change is the conditional addition of CPUTYPE. This is added by calling the script with an argument of cpu. I found a couple of ports that have trouble compiling when targeting the minimum cpu features. While the cpu types used can be adjusted I chose pentium2 as the minimum 32bit as i686 is a common base but sometimes the lack of mmx causes problems, pentium2 is the next one up that has mmx support, pentium4 or prescott are other good choices if you know the minimum cpu your builds need to run on or if you need sse. For amd64 I chose nocona as the first Intel 64bit cpu, not sure that core2 would be any advantage but this can be changed to corei7 to include sse4.2 support. Other options for amd cpu's can be used if you want to test against amd specific features.

The other script I showed previously I called testbuilds.sh. I have expanded this script quite a bit and now call it compileport - while it is now a lot longer than the previous example it's not really more complex. The extra length is from many case and if statements than any real complexity. You can download it below if you want to use it or just read through it.

For the most part you should be able to figure it out based on the comments and help (-h) included within the script. To compile a port we want to know 4 things - sysversion arch compiler and port, sysversion arch and compiler default to current i386/amd64 and gcc/clang and can be left out if you wish to use that combination. That leaves us with specifying the port, giving a minimum of compileport -P <category/portname> to compile against 10-CURRENT.

A few bonus options for sysversion are for preset searches - all current stable and release should be obvious, with releng being a moving target based on system releases. Currently this is set to 9.0 8.3 and 7.4 - being the highest minor release of each major version. Over time this should be updated to include newer releases and drop the less than current releases. So when 9.1 goes beta or RC1 it would be added to the list and after release we can remove 9.0.

If you want to setup default values you can do that through environment variables, which can also be setup in your shell rc files like any other variable. So if you always compile for 9-STABLE you can set OPTBASEVERS to 9-STABLE and it will be used without you having to specify -B 9-STABLE every time. This is where the upper/lower case options come into play. If you have the OPTBASEVERS set to 9-STABLE then compileport -b 8-STABLE will build the port for both 9-STABLE and 8-STABLE but if you use compileport -B 8-STABLE then it will ignore the environment settings and just compile for 8-STABLE. The real advantage to environment settings comes when you want to compile a list of ports. This may be a preset list of all the ports you maintain or you can do something like -

setenv OPTPORTLIST `pkg_info -aoq`
compileport -B all

will compile every port you have installed on your system with every tinderbox build you have setup - or -

Thanks , I have recently been searching for information approximately this subject for ages and yours is the greatest I
have discovered till now. But, what concerning the conclusion? Are you sure about the
supply?

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

I did look in several of the nationally known cookbooks having sections on baking cookies just to see if any
author had the inkling that any of their readers would seek out such an idea.
The majority of the vegetable recipes include carrots as one of the staple ingredients.
Some of these juicer machines actually claim themselves
as well, just by you adding warm water and turning on the juicer to let it run.

Thank you a bunch for sharing this with all of us you really recognise what
you are speaking approximately! Bookmarked. Please additionally
talk over with my web site =). We will have a link exchange contract among us

Have you ever considered about adding a little bit more than just your articles?
I mean, what you say is valuable and everything. However think
bout if you added some great pictures or video clips to give your posts more, "pop"!
Your conntent is excellent but with pics and video clips, this website could undeniably be one
of the most beneficial in its field. Amazing blog!

Would you be interested in exchanging links or maybe guest authoring a blog
post or vice-versa? My site discusses a lot of the same topics
as yours and I think 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! Fantastic blog by the way!

After exploring a handful of the blog posts on your website,
I honestly like your technique of blogging. I saved as a favorite it to my
bookmark site list and will be checking back
soon. Please check out my web site as well and tell me your opinion.

It's appropriate time to make a few plans for the long run and it
is time to be happy. I have learn this submit and if Imay just I want to
recommend you some attention-grabbing things
or suggestions. Perhaps you could write subsequent articles
referring to this article. I desire to learn more issues approximately it!

Howdy would you mind stating which blog platform you're working
with? I'm planning to start my own blog in the near future but I'm having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your layout seems different
then most blogs and I'm looking for something completely unique.

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

I think this is one of the most vital information for me.
And i am glad reading your article. But wanna remark on few general things, The web site
style is ideal, the articles is really nice : D.
Good job, cheers

Good day! This post couldn't be written any better! Reading through this
post reminds mme of myy gookd old room mate! He always kept chatting about this.
I will forward this artcle to him. Pretty sure
he will have a good read. Many thannks for sharing!

Truly, naturally-prepared beauty products, especially hair beauty products,
are simply the real naturally nourishing options. But at the same time roses have
sharp thorns, so they are beautiful but far from being helpless.
This Rhine stone is very gorgeous and that is why jewelry that is made with this stone looks really beautiful and attractive.

The water damage is most marked in the rainy season but may not be limited to it.
Flood barriers are one with the most effective ways of preventing flood waters
from entering your home. It's vital to get hold of a business that specializing in fire damage restoration immediately.

Its like you read my mind! You appear to
know so much about this, like you wrote the book in it or something.
I think that you can do with some pics to drive the message home
a bit, but instead of that, this is excellent blog. A fantastic
read. I'll certainly be back.

My programmer is trying to convince 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 a number of websites for about a year and am anxious about switching to another platform.
I have heard very good things about blogengine.net. Is there a way I can import all my wordpress content
into it? Any help would be greatly appreciated!

Excellent post. I was checking constantly this blog and I'm inspired!
Extremely helpful information specifically the final part
:) I deal with such info much. I used to be seeking this certain information for a long time.
Thanks and good luck.

Hello There. I found your blog using msn. This is an extremely well written article.
I will be sure to bookmark it and come back to read more of your useful information.
Thanks for the post. I'll certainly return.

Hello there, just became alert to your blog through Google, and found that
it's really informative. I'm going to watch out for brussels.
I'll be grateful if you continue this in future. Many
people will be benefited from your writing. Cheers!

I like the valuable information you provide in your
articles. I will bookmark your weblog and check again here frequently.
I'm quite certain I'll learn lots of new stuff right here!
Best of luck for the next!

You really make it seem so easy with your presentation but I
find this matter to be really something that I think
I would never understand. It seems too complex
and very broad for me. I'm looking forward for your nerxt post, I'll try tto gett the hang of it!

First off I would like to say awesome 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 before writing. I've had a hard time
clearing my thoughts in getting my thoughts out there. I
truly do take pleasure in 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 tips?

I do believe all of the ideas you have presented for your post.
They are really convincing and can certainly work.
Still, the posts are too quick for starters. Could you please lengthen them a bit from next time?
Thank you for the post.9712

Appreciating the time and energy you put into
your blog and detailed information you provide. It's awesome
to come across a blog every once in a while that isn't the
same old rehashed information. Excellent read! I've saved your site and I'm adding your RSS feeds to my Google account.

The water damage is most marked inside the rainy season but is probably
not tied to it. This is why acting fast and becoming the lake out in the carpet and cleaning everything up
properly is the best bet in restoring its condition and quality.
If the water damage inside your basement comes from a minor spill, you'll be able to likely care for it in your own.