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.

gencompilerenvfiles.bz2451 bytes
compileport.bz22.53 KB


link vao 12 bet's picture

What i do not realize is in reality how you're not actually a lot more
neatly-favored than you may be now. You are so intelligent.
You recognize therefore considerably on the subject of
this matter, produced me in my view believe it from numerous varied angles.
Its like women and men don't seem to be
interested except it's something to accomplish with Woman gaga!

Your individual stuffs nice. Always take care of it up!

m88asia's picture

I just couldn't leave your web site before suggesting that I
extremely enjoyed the usual information an individual provide to your guests?
Is going to be again continuously in order to check up
on new posts

http://ahmadalhabsyi.com/halkomentar-141-23328.html's picture

Hey! I understand this is somewhat off-topic however I had to ask.
Does running a well-established blog like yours require a lot of work?
I'm brand new to operating a blog but I do write in my journal everyday.
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 recommendations or tips for new aspiring bloggers.

chelsea scott blackhall's picture

Why users still use to read news papers when inn this technological globe everything is existing on web?

dau tu beontel nhu the nao's picture

great submit, very informative. I ponder why the other specialists
of this sector do not understand this. You must continue your
writing. I'm sure, you've a huge readers' base already!

gate opener's picture

wonderful put up, very informative. I ponder why the opposite specialists of this sector
do not understand this. You must continue your writing. I'm sure, you have a great readers' base already!

vrakov.net's picture

I'm now not sure the place you're getting your info,
but good topic. I must spend a while finding out much more or figuring out
more. Thank you for fantastic info I used to be searching for this info for my

vrakov.net's picture

I'm now not sure the place you're getting your info,
but good topic. I must spend a while finding out much more or figuring out
more. Thank you for fantastic info I used to be searching for this info for my

nhà cái m88's picture

Do you mind if I quote a couple of your posts as long as I provide credit and sources
back to your website? My website is in the very same niche as yours and my users would genuinely benefit from some of the information you present here.
Please let me know if this alright with you.
Many thanks!

ミネラル酵素ドリンク's picture

Wonderful work! That is the kind of information that are meant to be
shared across the net. Disgrace on the seek engines
for not positioning this put up upper! Come on over and consult with my website .

Thank you =)

Ayrshire website designer's picture

Piece of writing writing is also a excitement, if you be acquainted with after that you can write otherwise it
is complex to write.

脱毛器 トリア's picture

Jia Ting deBen Ge De narezaTuo Mao gadekimasu. osusumesuruTuo Mao Qi ha,kotira>>

wrentham septic tank's picture

The verry beginnin of the company was method basck
in 1917 when the mother or fathewr compan Tkeuchi Mining business based the corporate Komatsu Iron Works.

Also visit my blog post ... wrentham septic tank

Sean Hannity's picture

Hi! This post could not be written any better! Reading
through this post reminds me of my previous room mate!
He always kept talking about this. I will forward
this write-up to him. Pretty sure he will have a good read.
Thank you for sharing!

animal lovers sydney's picture

magnificent issues altogether, you simply gained a emblem new reader.

What would you recommend about your publish that you
simply made a few days ago? Any certain?

Visit my blog post :: animal lovers sydney

tech updates's picture

Thank you for every other great post. Where else
may just anybody get that kind of information in such a perfect manner of writing?
I have a presentation subsequent week, and I'm on the look for such info.

FIFA Mobile Soccer Cheats's picture

Hi there everybody, here every person is sharing such familiarity, thus it's fastidious to read this web site,
and I used to go to see this blog everyday.

top american brands in london,'s picture

all the time i used to read smaller content which as well clear their motive,
and that is also happening with this post which I am reading now.

tradewindschemist.com's picture

If someone receives a mold infection as part of his or her lungs,
you've got a real problem in your hands. This is why acting fast and having the lake out with the carpet and
cleaning everything up properly is the best option in restoring its
condition and quality. If water damage with your basement comes from a minor spill, then you can likely take care of
it on your own.

Virgil's picture

Whether or not your insurance plan would cover damages caused depends upon the nature with the flooding.
Flood barriers are one from the most effective ways of preventing flood waters
from entering your premises. After the flooding, water remains inside building for
a long period, that causes extensive mold growth.

landscaping supplies birmingham al's picture

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

Scot's picture

Once water moved you need to deal with the carpets or
any other flooring. First your household must decide if your things around the house which have touched the sewage are worth saving.
After the flooding, water remains inside the building for some time, which causes extensive mold growth.

android tv box fully loaded's picture

Heya i am for the first time here. I found 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.

10bet's picture

With havin so much content do you ever run into any issues of plagorism
or copyright infringement? My site has a lot of completely unique content I've
either written myself or outsourced but it appears a lot of
it is popping it up all over the internet without my authorization. Do you know any techniques to help reduce content from being ripped off?
I'd definitely appreciate it.

sawyersecuritysystems.com's picture

Moldy odors are a sign of a large problem that ought to
be resolved. After it can be determined which possessions and structures
could be salvaged, the permanently damaged materials will likely be hauled
away, as well as the drying process can begin. Water damage repair companies need to basically be capable of perform according towards demand
and requirement through the work.

bucetas gostosas's picture

Apenas ca voce encontra os melhores contos de sexo,
contos eroticos e tambem contos porno do brasil completamente sem onus.

cycling tour companies's picture

Hmm it seems like your site ate my first comment (it was
extremely long) so I guess I'll just sum it up what I had written and say,
I'm thoroughly enjoying your blog. I as well am
an aspiring blog writer but I'm still new to the whole thing.
Do you have any recommendations for beginner
blog writers? I'd certainly appreciate it.

Feel free to visit my blog :: cycling tour companies

Philip's picture

Two goals must be achieved when dealing with hair
loss. If you live in an area where ticks are prevalent (your vet
will advise), then check his coat for ticks and use a tick powder
regularly. A veterinarian can provide a series of
suggestions on how to further prevent parasite infestation.

basketball shoes that make you jump higher's picture

Woah! I'm really enjoying the template/theme of this website.
It'ssimple, yett effective. A lot of times it's difficult to get that "perfect balance" between superb usability and appearance.
I must sayy that you've one a awesome jjob with this.
In addition, the blog loads extremely quick foor me onn Firefox.

Excellent Blog!

Here is my web site; basketball shoes that make you jump higher

化粧水 おすすめ 人気 ランキング's picture

konbanha,Ying Yuan sitakunarusaitodesita. Jin Hou moakusesusimasu. Zi Fen nohomupehamadamadakorekaradesu.

products's picture

Hi there would you mind stating which blog platform you're using?

I'm going to start my own blog in the near future but I'm having a hard time
selecting between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design seems different then most blogs and I'm looking for something
unique. P.S Sorry for getting off-topic but I had to ask!

s384262051.online.de's picture

Whether or not your insurance coverage would cover the harm
caused depends upon the type from the flooding. First you
and your family must decide if the household items that have touched
the sewage are worth saving. After the flooding, water remains in the
building for a long period, that causes extensive mold growth.

Pokemon Go How To play's picture

This text is worth everyone's attention. When can I
find out more?

Gold Grillz's picture

I cling on to listening to the newscast speak about receiving
boundless online grant applications so I have been looking around for the best site
to get one. Could you tell me please, where could i acquire some?

kosmotay.top's picture

Your mode of explaining everything in this post is truly nice,
all be capable of effortlessly be aware of it, Thanks a lot.

CHUAN BI MO BAN DU AN CHUNG CU KOSMO TAY HO http://www.kosmotayho.top/
Kosmo tay ho, kosmo tay ho, chung cu kosmo tay ho,
chung cu kosmo tay ho, du an kosmo tay ho, du an kosmo
tay ho

Mellissa's picture

If someone gets a mold infection as part of his or her lungs, you do
have a real problem on the hands. The problem becomes bigger because unknown towards
the property manager, carpet cleaner, and janitorial service the bottom from the
carpet is wet. If the river damage within your basement comes from a
minor spill, you'll be able to likely take care of it on your own.

http://conf.ncku.edu.tw's picture

These are coating technologies for high-performance structural applications
for products like camera and computer displays, eyeglasses and similar products that make use of glass materials.

Crime scene investigation is also a field in itself with attractive possibilies for advancement.

In future the trend of providing charging points is surely going to spread across other businesses and states.

Kerajinan tangan dari barang bekas's picture

These are truly great ideas in about blogging.

You have touched some pleasant factors here.

Any way keep up wrinting.

dog care's picture

Hello there, I found your blog via Google whilst looking for a related topic, your website got here up, it appears good.
I have bookmarked it in my google bookmarks.[X-N-E-W-L-I-N-S-P-I-N-X]Hello there,
simply become aware of your weblog thru Google, and found that
it is truly informative. I am going to watch out for brussels.
I will be grateful if you happen to proceed this in future.
Numerous other folks can be benefited out of your writing.

Badoo Credit informatio's picture

I go to see everyday some websites and information sites to read articles,
except this blog offers feature based writing.

nhà cái M88's picture

You're so cool! I don't believe I have read something like
that before. So wonderful to discover someone with some genuine thoughts on this topic.
Seriously.. thank you for starting this up. This website is
something that is needed on the web, someone with a little originality!

คลิปโป้'s picture

No matter if some one searches for his necessary
thing, therefore he/she needs to be available that in detail, so that thing
is maintained over here.

m8m8id.com's picture

I am extremely inspired with your writing talents and also
with the structure on your weblog. Is that this a
paid topic or did you modify it yourself? Anyway keep up the nice quality writing, it's rare to peer a nice blog
like this one nowadays..

red wine glass's picture

I have been exploring for a bit for any high quality articles
or blog posts on this kind of area . Exploring in Yahoo I
finally stumbled upon this site. Reading this information So i'm happy to show that
I've an incredibly just right uncanny feeling I discovered just what I needed.

I so much certainly will make certain to don?t forget this web site and give it a glance

My webpage red wine glass

film bokep asia's picture

What's up, after reading this remarkable post i am as well cheerful to share
my knowledge here with colleagues.

cortes de cabello para hombres's picture

If you wish for to grow your knowledge only keep visiting this web site and be updated
with the hottest news update posted here.

hosting's picture

Nice post. I learn something new and challenging on blogs I stumbleupon every day.
It will always be useful to read articles from other authors and use
a little something from other web sites.

m88's picture

Hi there would you mind letting me know which webhost you're working
with? I've loaded your blog in 3 different internet browsers and
I must say this blog loads a lot quicker then most.
Can you recommend a good internet hosting provider at
a honest price? Thank you, I appreciate it!

sales-letter copywriters's picture

I get pleasure from, lead to I discovered just what I used to be
looking for. You have ended my four day lengthy hunt! God Bless you man. Have a nice day.

ミネラル酵素グリーンスムージー's picture

I am not sure where you are getting your info,
but great topic. I needs to spend some time learning
more or understanding more. Thanks for magnificent information I was looking for this information for my mission.


Add new comment