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

best vaporizer's picture

Giving users a soft as well as clean vape as a result of its ceramic chamber, the Matrix finesses completing brands by giving
customers the capability to use wax and also oil concentrates as well, through attachments.

Also visit my web blog :: best vaporizer

leone asset management's picture

This is a topic which is near to my heart... Take care!
Where are your contact details though?

Environ's picture

What's Taking place i am new to this, I stumbled upon this
I have found It absolutely helpful and it has helped me
out loads. I am hoping to give a contribution & help different customers like its aided me.

Good job.

ฟ่านปิงปิงบนหลังม้า's picture

Hey There. I found your blog using msn. This is a very
well written article. I will make sure to bookmark it and
come back to read more of your useful information. Thanks for the post.

I will certainly comeback.

design your own tshirts's picture

Howdy! Do you know if they make any plugins to assist with Search Engine Optimization? I'm trying
to get my blog to rank for some targeted keywords but I'm not seeing
very good results. If you know of any please share.
Thank you!

maryland attorney's picture

Thank you for the good writeup. It in fact was a
amusement account it. Look advanced to far added agreeable from
you! By the way, how can we communicate?

local builder's picture

I love it when folks get together and share opinions.
Great website, continue the good work!

web cash system scam's picture

Pretty section of content. I just stumbled upon your blog and in accession capital to
assert that I get in fact enjoyed account your blog posts. Any way I'll be subscribing to your feeds and even I
achievement you access consistently quickly.

pirater un compte facebook gratuitement's picture

Interestingly, you should also never use fabric softeners with your towels as they will limit the amount of water
that can be absorbed by the towel. Copyright (c)
2007 The Janitorial Store - Article Source: Hanson is co-founding member of The Janitorial Store (TM), an online community that offers weekly tips, articles, downloads, discussion forums, and more for anyone who would like
to learn how to start a cleaning business. Sprinkle equal amounts of baking
soda and salt on dry carpet.

nonamewarez.com's picture

I doo not even know thhe way I styopped up here, but I berlieved thhis publish was once great.
I don't recognise who you are howefer certainlyy you're
goong too a famous blogger when you are not already.
Cheers!

elite green coffee diet's picture

Everything is very open with a very clear explanation of the issues.
It was really informative. Your website is extremely helpful.

Thank you for sharing!

Sonia's picture

My spouse and I absolutely love your blog and find many of your
post's to be precisely what I'm looking for. Does one offer guest writers to write
content for you? I wouldn't mind composing a post or elaborating on most
of the subjects you write in relation to here. Again, awesome site!

podcasts format's picture

This is a very good tip especially to those new to
the blogosphere. Short but very accurate info... Appreciate your sharing this one.
A must read post!

Ahmad's picture

Thanks for finally writing about > Add new comment | Shaneware.biz
< Loved it!

choosing business lawyers's picture

hello there and thank you for your info - I have
certainly picked up something new from right here. I did however expertise some technical issues using
this web site, since I experienced to reload the
web site many times previous to I could get it to
load correctly. I had been wondering if your web host is OK?
Not that I'm complaining, but slow 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'm adding this RSS to my e-mail and could
look out for much more of your respective intriguing content.
Ensure that you update this again soon.

where your begins shirt's picture

I think this is among the most important info for me.
And i am glad reading your article. But wanna remark
on some general things, The site style is wonderful, the articles is really great : D.
Good job, cheers

Power Testro's picture

You really make it seem so easy with your
presentation but I find this topic to be actually something that I think I would never understand.
It seems too complicated and extremely broad for me.
I am looking forward for your next post, I will try to
get the hang of it!

Joe Olujic's picture

What's up, yes this paragraph is genuinely nice
and I have learned lot of things from it about blogging.

thanks.

Lee Trotman's picture

Thank you a bunch for sharing this with all people you
really understand what you're speaking approximately!
Bookmarked. Kindly also visit my web site =). We may have a
hyperlink change arrangement among us

Michele Frazier's picture

Thanks for sharing such a pleasant thinking, piece of writing is nice, thats why i have read it entirely

Richard Harborne's picture

I got this web site from my buddy who shared with me on the topic of this
site and now this time I am browsing this web site and reading very
informative content at this time.

youtube video's picture

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

Michele Frazier's picture

Hello to every body, it's my first visit of this web site; this web site consists of amazing and really excellent material in favor of readers.

look at here now's picture

Hello! I know this is sort of off-topic however I had to ask.
Does building a well-established website like yours
require a lot 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 will be able to share
my experience and feelings online. Please let me know if you have any suggestions or tips for
brand new aspiring bloggers. Thankyou!

Kerri's picture

Hello! I know this is somewhat off topic but I was wondering if you knew where I could find 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!

Ian Leaf's picture

Very great post. I simply stumbled upon your weblog and wished to say that I've really enjoyed surfing around
your blog posts. In any case I'll be subscribing on your rss feed and I'm hoping
you write once more soon!

Ian Leaf's picture

Nice blog right here! Additionally your site loads up
fast! What web host are you using? Can I get your affiliate link to your host?

I desire my site loaded up as fast as yours lol

basketball gear code roblox's picture

Hey there! I know this is kind of off topic but I was wondering if
you knew where I could locaqte a capgcha plugin for my comment form?
I'm using the same blog platform as yours andd
I'm having problems finding one? Thanks a lot!

Feel free to visit my site :: basketball gear code roblox

きゅきゅっと小町's picture

It's really very complicated in this active life to listen news on Television, therefore
I simply use web for that purpose, and take the hottest news.

Plumber In St. Louis's picture

Hmm it appears like your blog 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 everything. Do you have any tips for beginner blog writers?
I'd definitely appreciate it.

ファーストクラッシュ's picture

Teng Tian nikorugaimezikiyarakutadeYou Ming nanikibiJi Yu Fang Xi Yan huomueibonnohuasutokuratusiyuhaShi tuteimasuka?
nikibiJi noYuan Yin tonaruMao Xue noJie mariyaYu Fen naPi Zhi ,Gu kunatutaJiao Zhi nadowosaritiruSuan gasitukaritoLuo tositekuremasu.
Wu rewoChe Di De niLuo tositekurerukaratoitutesonoHou Ji gatutuparunantekotohaarimasen.

yutiyarihuekisuwohazimetosita8tunoBao Shi Cheng Fen gaWu rewoXi Jing sitaHou Bao Shi sitekurerunodeturuturunoJi ninarimasu.

sou,huasutokuratusiyuhaXi Jing dakedenakusonoHou noPei Lu yatoritomentomadesitekureru3in1nonikibiJi Yu Fang aitemudesu.
koreYi Ben denikibiFang Zhi gaKe Neng nanode,Bao kiyasukute[Ji Sok Chu Lai nai|Sok kanainantekotomonakuShou Jian Yao razu.
Sem Xi naRi Ben Ren noJi nimoYou siiCai Liao deChu Lai teirunodeJi toraburuniNao masareruShi moarimasen.
sukurabuJi gaPei He sareteirutonikibihenoCi Ji tonarimasugahuasutokuratusiyuhasukurabuJi gaRu tuteinainodeAn Xin .

tinaminihuasutokuratusiyuhaLe Tian yoriGong Shi Tong Fan deMai unogaZhi Duan mooDe tuteZhi tuteimasitaka?
sonoShi nituitenoAn Nei hakokonosaitoniShu itearimasunodeKou kominadoXing Wei noaruRen hatietukusitemitekudasai.

Transfer's picture

You should take part in a contest for one of the best sites
on the net. I most certainly will recommend this blog!

thoatvidiademlung.com's picture

I really like your blog.. very nice colors & theme.
Did you create this website yourself or did
you hire someone to do it for you? Plz respond as I'm looking to create my
own blog and would like to find out where u got this from.
kudos

Internet fortune review's picture

We are a bunch of volunteers and opening a brand new
scheme in our community. Your web site offered us with valuable information to work on. You've performed a formidable task and our entire group will be grateful to you.

Karin's picture

If nothing comes up at all this is also a bad sign. And I will tell you that one of
my online marketing friends is making around $700 per week with his blogs.
Ro - R is an open source web application development framework written in Ruby language.

regalospromocionales.pw's picture

Para hacer una buena campana promocional el regalo debe de llevar el logotipo de la
empresa Un medio de contacto: telefono, e-mail, pagina etcetera

http://www.grovid.pl/doladowanie-telefonu-karta-visa-debit/'s picture

The professionally managed web designing companies can provide you with
several advantages as a customer. Costenoble Histogram Generator: In this tool, you have to
enter the group or category (like, 25-30 or 30-35 in the above example)
to the top row and respective frequency values in the bottom row.
Many marketers make use of this technology in order to give a vivid demonstration of the
products.

regały magazynowe wrocław's picture

I'm extremely impressed along with your writing talents and
also with the layout in your weblog. Is this a paid theme or did you modify it yourself?
Either way keep up the excellent quality writing, it's
uncommon to peer a nice blog like this one today..

walmart canada online shopping'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 four e-mails with the same comment.

Is there any way you can remove people from that service?
Thank you!

Jared's picture

Many entrepreneurs put it off for a long time, or start
and stop over and over. What you need to focus on is convincing people to
go on with the sign up or purchase. Ro - R is an open source
web application development framework written in Ruby language.

Web Cash Concepts's picture

It's difficult to find well-informed people on this subject, but you seem like you
know what you're talking about! Thanks

http://www.sunfrogshirts.com/'s picture

Hi there, You have done an excellent job. I'll definitely digg it and personally
recommend to my friends. I am sure they'll be benefited from this site.

Discounthotelwebsites.net's picture

Hi, I do believe your website could be having internet browser compatibility problems.
When I take a look at your blog in Safari, it looks fine
however, when opening in Internet Explorer, it has some overlapping issues.

I just wanted to provide you with a quick heads up!
Besides that, wonderful blog!

pristine derma's picture

First of all I would like to say fantastic blog! I had
a quick question which I'd like to ask if you don't mind.
I was interested to find out how you center yourself and clear your thoughts prior to writing.

I have had difficulty clearing my thoughts in getting my thoughts out.

I do take pleasure in writing but it just seems like the first 10 to
15 minutes are generally lost just trying to figure out how to begin. Any ideas or hints?
Thanks!

place bets's picture

Great weblog here! Additionally your web site a lot up fast!

What host are you using? Can I get your associate hyperlink in your host?
I wish my web site loaded up as fast as yours lol

daily cleanse's picture

Nice replies in return of this difficulty with firm arguments and explaining everything concerning
that.

contemporary r&amp;b's picture

Appreciate this post. Will try it out.

skinology snake venom trial's picture

I'm curious to find out what blog platform you are utilizing?

I'm having some small security problems with my latest website
and I would like to find something more safe.
Do you have any suggestions?

flagler village fort lauderdale - Limited Edition Living's picture

If you own a nativity set, like I do, and want to place
it in your front yared to great effect, you must separate it from other
'big' items. Whete there is little natural light you could
still landfscape - but without using any plants or just a few of those plants that thrive of poor lighting conditions.
so you won't have to settle for the limited , mediocre , annd typical designs you see on magazines or
on a lot off websites.

Enid's picture

Hmm is anyone else having problems with the
images on this blog loading? I'm trying to find out if its a problem on my end or
if it's the blog. Any responses would be greatly appreciated.

Pages

Add new comment