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 -

Hey there! This is kind of off topic but I need some guidance from an established blog.
Is it very difficult to set up your own blog?
I'm not very techincal but I caan figure things out pretty quick.
I'm thinking about makjng my own but I'm not sure where to begin. Do you
have any points or suggestions? Appreciate it

Hey there! This is kind of off topic but I need some guidance from an established blog.
Is it very difficult to set up your own blog?
I'm not very techincal but I caan figure things out pretty quick.
I'm thinking about makjng my own but I'm not sure where to begin. Do you
have any points or suggestions? Appreciate it

Hello, i think that i noticed you visited my web
site so i came to go back the prefer?.I am attempting to find issues to improve my
web site!I assume its good enough to make use of some of your ideas!!

Heya fantastic blog! Does running a blog such as this require a lot
of work? I've very little expertise in coding but
I was hoping to start my own blog in the near future.
Anyhow, if you have any ideas or tips for new blog owners please
share. I know this is off topic but I simply had to ask.
Many thanks!

Very good site you have here but I was curious if you knew of any discussion boards that cover the
same topics discussed in this article? I'd really like to be a part of group where I can get
suggestions from other experienced individuals that share the same interest.
If you have any recommendations, please let me know.
Many thanks!

I just like the helpful info you provide for your
articles. I'll bookmark your blog and take a look at again here frequently.
I'm moderately sure I will learn plenty of
new stuff proper here! Best of luck for the next!

I don't know if it's just me or if perhaps everybody else experiencing problems with your website.
It appears as though some of the text on your content
are running off the screen. Can someone else please provide feedback and let me know if this is
happening to them as well? This may be a issue with my
internet browser because I've had this happen before.
Thank you

Thank you for another informative website. The place else may I am
getting that kind of info written in such an ideal manner?
I have a challenge that I'm simply now running on, and I've been on the look out for such info.

Do you have a spam problem on this site; I also am a blogger, and I was curious about your situation; many of us have created some nice procedures and we
are looking to swap techniques with others, please shoot
me an email if interested.

I blog frequently and I really thank you for your information. Your
article has really peaked my interest. I will book mark your blog and keep checking for new details about once per week.
I subscribed to your Feed too.

Hello just wanted to give you a quick heads up and let you know a few of the
pictures aren't loading correctly. I'm not sure why
but I think its a linking issue. I've tried it in two different web browsers and
both show the same outcome.

Hi there! This blog post couldn't be written much better!
Looking at this post reminds me of my previous roommate! He constantly
kept talking about this. I'll send this article to him.
Fairly certain he will have a good read. Thank you for sharing!

hi!,I like your writing very a lot! proportion we keep up a correspondence extra about
your post on AOL? I require an expert on this space to resolve my problem.
May be that is you! Having a look ahead to peer you.

I have to thank you for the efforts you've put in penning this website.
I really hope to view the same high-grade content by you later
on as well. In truth, your creative writing abilities has motivated me to get my very own site now ;
)

I'd like to thank you for the efforts you have put in writing this website.
I'm hoping to check out the same high-grade
blog posts by you later on as well. In truth, your creative writing abilities
has motivated me to get my own, personal blog now ;)

I was pretty pleased to uncover this site. I wanted to thank you for
your time for this particularly wonderful read!!
I definitely savored every little bit of it and i also have
you saved as a favorite to see new things on your web site.

It is the best time to make some plans for the future and it's time to be happy.
I have read this post and if I could I wish to suggest you
ssome interesting things or tips. Maybe you can write next articles referring to this article.
I want to read more things about it!

I am extremely impressed with your writing skills as
well as with the layout on your weblog. Is this a paid theme or
did you customize it yourself? Either way keep up the excellent quality writing, it's rare to see a
great blog like this one these days.

I believe everything published made a ton of sense.
But, think on this, suppose you were to create a killer headline?
I mean, I don't want to tell you how to run your blog, however suppose you added
a headline that makes people want more? I mean Add new comment | Shaneware.biz is kinda vanilla.
You could peek at Yahoo's home page and see how they create post titles
to get viewers to click. You might try adding a video or a related pic
or two to get people interested about everything've written. In my opinion, it could bring your website
a little bit more interesting.

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.