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


31963's picture

Incredible points. Solid arguments. Keep up the good work.31963

http://startupbiz.com.ua's picture

You actually make it seem really easy together with your presentation however I in finding this topic to be actually something that I think I
would by no means understand. It seems too complicated and extremely extensive for
me. I'm having a look forward on your next put up, I will try to get
the dangle of it!

zika's picture

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

something in my mind freezes up from time to time's picture

What's up i am kavin, its my first time to commenting anyplace, when i read this article i
thought i could also make comment due to this brilliant post.

m88's picture

Good post! We will be linking to this particularly great
article on our site. Keep up the great writing.

Free Slot Machines's picture

What's up to all, how is everything, I think every one is getting more from this web site, and your views are nice designed for new

全身脱毛 沖縄 脱毛サロン's picture

[Er Du toMao gaSheng etekonaiYong Jiu Tuo Mao gasitai] toXin niJue metara,Zui You Xian deJian Tao suruBi Yao gaarunoga,sarondeyarukakurinitukudeyarukatoiukotodesune.
konoShuang Fang nihaTuo Mao noFang Fa niWei igaJian raremasu.
Tuo Mao kurimuniGuan simasiteha,Te Bie naNei Rong Cheng Fen demudaMao woRong Jie surutoiu,Yao surunikemikarunaFang Fa deTuo Mao suruZhi Pin dearukotokara,oJi gasorehodoQiang kunaiRen gaYong imasuto,Ji nogasatukiyaYang miyaZhong renadonoYan Zheng noYuan tonarukotomoShao nakuarimasen.
konotokoronoLiu Xing ritosite,Shui Zhao woZhao Yong suruShi Ji woXiang Ding site,Chi zukasiiSi iwosinaiyounisurutoiukotogaMu De dehanaku,Zhong Yao naShen dasinamitosite,Mi Mi Li niVIOTuo Mao woShou keruRen gaDuo kunatuteimasu.
Tuo Mao esutenoShu gaZeng etatohaie,Shi Shu Liao Jin gaDi E de,Shi Shu noZhi gaiiLiang iPing Pan noTuo Mao esutewoXuan Ze sitaChang He ,Ren Qi gaGao sugite,Rong Yi nihaYu Yue Ri Shi woQue Bao surukotogadekinaitoiukotomoDuo inodesu.
Ru Hui sitaTuo Mao saronhehaHe kaYue monoJian Zu woYun bukotoninarunode,Tong unogaLe natokoroniWei Zhi suruTuo Mao saronnisimasu. Chu Li Zi Ti ha1Shi Jian Yi Nei deJi mimasukara,Zu woYun buShi Jian gaChang kuGan ziruto,Ji Sok surukotogaNan sikunarimasu.
Shou Shun De nihaVIOTuo Mao woKai Shi suruQian ni,Shi Qie niandaheanoChu Li gaJi masareteirukawo,saronnosutatuhugaDiao betekuremasu. Shi Fen naDuan saninatuteinakatutara,zuibuntoXi kaiChang Suo madekatutositekuremasu.
[sarongaShi Shi siteirunohaYong Jiu Tuo Mao tohaYi narunodesiyo?] toiuyounakotoga,Shi niYu rarerukotogaarimasuga,Zheng Shi naPan Duan wosureba,sarondeyatuteShi uTuo Mao haYong Jiu Tuo Mao tohaHu benaitoiunohaQue kadesu.
Zui Jin Hua Ti woHu ndeiruQuan Shen Tuo Mao de,100%Shi Shang garumadeniha8~12Hui kurainoShi Shu gaBi Yao tonarimasuga,Shang Shou ni,He toYan tutemoDi Jia Ge deTuo Mao surukotowoWang ndeirunara,You Neng nasutatuhugairusarongaosusumedatoYan emasu.
Quan Shen Tuo Mao saronwoQue Ding suruShi ni,Zui moZhong Yao nanoga,[Yue E Zhi kosuwoShe keteiruQuan Shen Tuo Mao saron] woserekutosinakerebanaranaitoiukotodesu.

camera wifi gia si's picture

What's Going down i'm new to this, I stumbled upon this I've
discovered It positively useful and it has helped me
out loads. I'm hoping to contribute & assist different users like its aided
me. Good job.

Ramonita's picture

Hello, every time i used to check website posts here in the early hours in the
morning, because i like to find out more and more.

peinados para pelo largo's picture

Thank you a bunch for sharing this with all folks you actually recognise what you're speaking about!
Bookmarked. Kindly also visit my website =).
We can have a link trade arrangement among us

solar power generator's picture

Jim Grasso, a government relations consultant who works with
energy-industry clients, says Access Northeast is more likely to materialize under a Trump presidency than it would have been if
Hillary Clinton had won the election.

Stop by my blog :: solar power generator

Solar Power India's picture

One of additional advantage is that the excess power produced by the solar refrigerator can be
used for the other domestic purposes.

Also visit my web page: Solar Power India

empresas dedetização brasilia df's picture

Como ciclo reprodutivo dos pombos e regulado pela
oferta de alimento, e de grande importancia a diminuicao
desta oferta, seja por um melhor acondicionamento e coleta de lixo, melhoria da limpeza publica e a restricao dos
acessos destas aves a portos de desembarque de graos ou
industrias de processamento de graos e de racoes.

Stop by my blog empresas dedetizacao brasilia df

cheap jerseys from china's picture

In fact no matter if someone doesn't understand afterward its up to
other viewers that they will assist, so here it occurs.

cheap jerseys from china

buy desktop Pc's picture

I always spent my half an hour to reaad this website's content
every day along with a mug of coffee.

Here is my blog post :: buy desktop Pc

Coconut oil for skin's picture

I think the admin of this site is actually working hard in favor
of his web page, because here every information is quality based information.

http://www.remasegypt.com/?option=com_k2&amp;view=itemlist&amp;task='s picture

If someone receives a mold infection in the or her lungs, there is 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. Cracks, tears, and rot within your roofing material do
understand signs that water damage has occurred.

Best Cholesterol Drug's picture

Hi there, after reading this remarkable piece of writing
i am as well happy to share my know-how here with friends.

du an luxgarden's picture

I'm not sure why but this weblog is loading extremely slow for me.

Is anyone else having this problem or is it a problem on my end?
I'll check back later and see if the problem still exists.

La Grande Terche News's picture

Good day! Do you know if they make any plugins to safeguard against hackers?
I'm kinda paranoid about losing everything I've worked hard on. Any suggestions?

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

www.moyakmermer.com's picture

Everyone loves what you guys are usually up too. This sort of
clever work and reporting! Keep up the terrific
works guys I've incorporated you guys to our

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


Add new comment