Tinderbox extra scripts


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.

#!/bin/sh cd /usr/local/tinderbox/scripts/etc/env rm build.* ## set CC options ############################################### for BNAME in `../../tc listBuilds | grep clang` do cat > build.$BNAME <<CCOPTIONS export CC=clang export CXX=clang++ export CPP=clang-cpp export NO_WERROR= export WERROR= CCOPTIONS done for BNAME in `../../tc listBuilds | grep gcc` do cat > build.$BNAME <<CCOPTIONS export CC=gcc export CXX=g++ export CPP=cpp export NO_WERROR= export WERROR= CCOPTIONS done ## set the ARCH ############################################### for BNAME in `../../tc listBuilds | grep i386` do cat >> build.$BNAME <<CCOPTIONS export ARCH=i386 CCOPTIONS done for BNAME in `../../tc listBuilds | grep amd64` do cat >> build.$BNAME <<CCOPTIONS export ARCH=amd64 CCOPTIONS done ## optionally set the CPUTYPE - fixes some build issues ############################################### if [ "$1" = "cpu" ] then for BNAME in `../../tc listBuilds | grep i386` do cat >> build.$BNAME <<CCOPTIONS export CPUTYPE=pentium2 CCOPTIONS done for BNAME in `../../tc listBuilds | grep amd64` do cat >> build.$BNAME <<CCOPTIONS export CPUTYPE=nocona CCOPTIONS done fi

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 -

setenv OPTPORTLIST `pkg_version -vL= | awk '{print $1}' | xargs pkg_info -oq` compileport -B 9-STABLE

will compile every port that needs updating against the 9-STABLE builds you have setup. This leads into what I plan to talk about in my next post - using tinderbox to build your own packages.


AttachmentSize
gencompilerenvfiles.bz2451 bytes
compileport.bz22.53 KB

1480 comments

online payroll los angeles's picture

Hi this is kinda of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML.
I'm starting a blog soon but have no coding know-how so I
wanted to get advice from someone with experience. Any
help would be greatly appreciated!

Joe Olujic's picture

Hi there! Someone in my Facebook group shared this site with us so I
came to check it out. I'm definitely loving the information. I'm bookmarking
and will be tweeting this to my followers! Wonderful
blog and outstanding design and style.

Brandon Colker's picture

Excellent, what a webpage it is! This weblog provides useful
information to us, keep it up.

Salvatore's picture

Hi i am kavin, its my first time to commenting anywhere, when i read this
post i thought i could also create comment due to this good piece of writing.

tickle's picture

Good answers in return of this difficulty with genuine arguments and telling all concerning that.

Au Nue Youth Restore's picture

What's up, this weekend is fastidious for me, since this time i am reading this enormous educational
paragraph here at my residence.

michele frazier's picture

You're so interesting! I don't suppose I have read through something like that before.
So nice to find someone with a few unique thoughts on this subject.
Really.. thank you for starting this up. This site
is something that is required on the internet, someone with a little originality!

Lee Trotman's picture

Heya i'm for the first time here. I came acroses this board and I find It really
useful & it helped me out much. I hope to give something back and help others like you helped
me.

Karl Jobst DDS's picture

It is not my first time too go to see this web site, i am browsing this web page dailly and take pleasant
facts from here all the time.

Sebastian Hirsch's picture

This is very attention-grabbing, You're an overly professional blogger.

I've joined your rss feed and look ahead to in search of more of your excellent post.
Additionally, I've shared your website in my social networks

Ian Andrews HFC's picture

Have you ever considered publishing an ebook or guest authoring
on otherr sites? I have a blog centered on the
same topics you discuss and would really like to have you share some stories/information. I
know my visitors would appreciate your work. If you're even remotely interested, feel free to shoot me an email.

sebastian hirsch's picture

I was able to find good info from your blog posts.

environmentalist Luke Weil's picture

I've been exploring for a little bit for any high quality articles or weblog posts in this kind of area .
Exploring in Yahoo I eventually stumbled upon this site.
Studying this info So i am glad to convey that I've
an incredibly good uncanny feeling I came upon exactly what I needed.
I such a lot unquestionably will make sure to do not put out of your mind this site and provides it a look on a constant basis.

Live Cell Research's picture

Hi there, always i used to check webpage posts here in the early hours in the break of day, for the reason that
i like to gain knowledge of more and more.

Sebastian Hirsch's picture

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 complicated
and very broad for me. I'm looking forward for your next post,
I'll try to get the hang of it!

Ian Leaf HFC's picture

Very good post. I am experiencing a few of these issues as
well..

Corey Park's picture

Excellent blog right here! Also your web site lots up fast!
What web host are you the usage of? Can I get your associate link to your host?
I wish my site loaded up as quickly as yours lol

Karl Jobst DDS's picture

It's not my first time to visit this site, i am browsing this site dailly
and take pleasant data from here every day.

Ian Leaf Book's picture

This post is in fact a pleasant one it helps new internet users,
who are wishing for blogging.

buy email list's picture

Hi, yup this post is truly fastidious and I have learned lot of things from it regarding blogging.
thanks.

Luigi Wewege's picture

Hello There. I found your blog using msn. This is a really well written article.

I will make sure to bookmark it and come back to read more of your usedful
info. Thanks for the post. I will certainly return.

Michele Frazier's picture

Hey there just wanted to give you a quick heads up.
The words in your article seem to be running off the
screen in Safari. I'm not sure if this is a forma issue or something to do
with browser compatibiloity but I thought I'd post to let you know.

The style and design look great though! Hope you get the issue fixed soon. Thanks

Michele Frazier's picture

Idon't even know the way I finished up right here, however I believed this publish was once great.
I don't realize who you're but definitely you are going
to a famous blogger when you are not already. Cheers!

Sebastian Hirsch's picture

Hey! I know this is kinda off topic but I was wondering if you knew
where I could locate a captcha plugin for my comment form?
I'm using the same blog platform as yours and I'm having trouble finding one?

Thanks a lot!

Cash Camp System Reviews's picture

Excellent way of describing, and nice piece of writing to get information regarding my presentation focus,
which i am going to deliver in institution of higher education.

Kion Kashefi's picture

excellent submit, very informative. I'm wondering why the other specialists of this sector do not realize
this. You must proceed your writing. I am confident, you have a huge readers' base already!

Sebastian Hirsch's picture

I love what you guys tend to be up too. This kind of clever work
and coverage! Keep up the great works guys I've added you guys to my blogroll.

Sebastian Hirsch's picture

Simply wish to say your article is as surprising. The clarity in your publish is simply nice and that i can think you're a professional in this subject.
Fine together with your permission let me to clutch your RSS feed to keep
updated with drawing close post. Thanks 1,000,000 and please carry on the enjoyable work.

Ian Leaf's picture

Definitely believe that which you said. Your favorite justification appeared to be on the web the easiest thing to be aware of.

I say to you, I definitely get irked while people consider worries that they
just don't 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 probably be back to get more. Thanks

Clive Electrician's picture

So long as the qualified supervisor meets competence requirements,
the individual carrying out the work does
not necessarily have to be a professional
electrician.

Michele Frazier's picture

excellent post, very informative. I wonder why the other experts of this sector do not
notice this. You should proceed your writing. I'm sure, you have a
huge readers' base already!

Michele Frazier's picture

Nice post. I used to be checking continuously this blog and I'm inspired!
Very helpful information particularly the last section :
) I deal with such info a lot. I was looking for this certain information for a very
lengthy time. Thank you and good luck.

Michele Frazier's picture

I'm more than happy to discover this page. I want
to to thank you for your time due to this fantastic read!!
I definitely savored every little bit of it and i also have you saved to fav to check out new information on your website.

Brandon Colker's picture

Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear."
She put the shell to her ear and screamed. There was a hermit crab inside
and it pinched her ear. She ndver wants to go back! LoL
I know this is totally off topic but I had to tell someone!

Joe Olujic's picture

You really make it seem really easy with your presentation however I iin finding
this matter to be really something that I think I would by no
means understand. It kind of feels too complex and very vast for me.
I am looking ahead for your subsequent post, I'll try
to get the hold of it!

Michele Frazier's picture

Do you mind if I quote a couple of your articles as long as I provide credit and sources
back to your website? My blog is in the exact
same area of interest as yours and my visitors would truly benefit
from some of the information you present here.
Please let me know if this okay with you.
Many thanks!

Brandon Colker's picture

I loved as much as you'll receive carried out right here. The sketch
is attractive, your authored subject matter stylish.
nonetheless, you command get got an edginess over that you
wish be delivering the following. unwell unquestionably come
further formerly again since exactly the same nearly very often inside case you shield
thos increase.

Brandon Colker's picture

I am extremely inspired with your writing abilities and also with the
format to your blog. 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 peer
a great blog lke this one these days..

Michele Frazier's picture

It's hard to find knowledgeable people in this particular subject, however,
you sound like you know what you're talking about!
Thanks

fat secrets's picture

Heya! I understand this is somewhat off-topic however I had to ask.
Does running a well-established website like yours require a large amount
of work? I'm brand new to blogging but I do write in my diary daily.

I'd like to start a blog so I can share my personal experience
and feelings online. Please let me know if you have any suggestions or
tips for brand new aspiring blog owners. Appreciate it!

Sebastian Hirsch's picture

This design is steller! You definitely know how to keep a
reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!)
Wonderful job. I really loved what you had to say, and more than that, how you presented it.
Too cool!

Sebastian Hirsch's picture

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

You Exist In My Song lyrics 我的歌聲裡 歌詞's picture

Wow that was odd. I just wrote an incredibly long somment
but after I clicked submit my somment didn't appear. Grrrr...
well I'm not writing all that over again. Anywau,
just aanted to say great blog!

Michele Frazier's picture

I go to see day-to-day some web sites and blogs
to read articles or reviews, except this blog provides feature
based posts.

Michele Frazier's picture

Hi there friends, good post and fastidious urging
commented here, I am genuinely enjoying by these.

Sebastian Hirsch's picture

WOW just what I was searching for. Came here by searching for
Sebastian Hirsch

Sebastian Hirsch's picture

I think the admin of this web site is really working hard in favor of his site, since
here every data is quality based stuff.

Sebastian Hirsch's picture

When I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I
get several e-mails with the same comment. Is there any way you can remove people from
that service? Many thanks!

Michele Frazier's picture

Hi there! I realize this is sort of off-topic but I needed to ask.
Does managing a well-established blog such as
yours take a large amount of work? I'm completely new to
running a blog but I do write in my journal every day.

I'd like to start a blog so I will be able to share my own experience and feelings online.
Please let mee know if you have any kind of recokmendations or tips for brand new aspiring bloggers.
Thankyou!

Michele Frazier's picture

Asking questions are truly fastidious thing if you are not understanding something totally,
but this paragraph offers good understanding even.

Pages

Add new comment