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


basketball gear store's picture

Hi, Neat post. There's a problem together with your site in internet explorer, would test this?
IE nonetheless is the marketplace leader and a big
part of other filks will leave out your excellent writing due to this problem.

Feel ree to visit my blog :: basketball gear store

poker games in Desert Safari's picture

I needed to thank you for this very good read!! I definitely enjoyed every little bit of it.
I have you saved as a favorite to look at new things you post...

link vao M88'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 problems finding one?
Thanks a lot!

硬碟資料救回's picture

Howdy would you mind letting me know which web host you're working
with? I've loaded your blog in 3 different browsers and I must say
this blog loads a lot faster then most. Can you recommend a good web hosting provider at a reasonable price?
Thanks a lot, I appreciate it!

Arnaldo Tocani,'s picture

Hi it's me, I am also visiting this site on a regular
basis, this web site is truly fastidious and the visitors are
truly sharing good thoughts.

sony's picture

Hi there! Ijust wish to offer you a huuge thumbs up ffor the excellent
information you have right here on this post. I will be
coming back to your site forr more soon.

Here is my web page ... sony

sony's picture

Hi there! Ijust wish to offer you a huuge thumbs up ffor the excellent
information you have right here on this post. I will be
coming back to your site forr more soon.

Here is my web page ... sony

www.avmgames.com's picture

I am sure this piece of writing has touched all the internet
visitors, its really really fastidious article on building up new webpage.

resultphenq.page.tl's picture

Hello there, You have done an excellent job. I will definitely digg
it and personally recommend to my friends. I'm confident they will
be benefited from this web site.

sony's picture

Hi there! Ijust wish to offer you a huuge thumbs up ffor the excellent
information you have right here on this post. I will be
coming back to your site forr more soon.

Here is my web page ... sony

pobierz's picture

Wow, fantastic blog layout! How long have you been blogging for?
you make blogging look easy. The overall look of your website is excellent, as well as the content!

Augusto de Arruda Botelho's picture

Thanks for a marvelous posting! I definitely enjoyed reading it,
you happen to be a great author. I will be
sure to bookmark your blog and will eventually come back later on. I want to encourage
that you continue your great posts, have a nice afternoon!

kik login's picture

Yes! Finally someone writes about kik on pc.

oferty pracy w Holandii hydraulik bez znajomości języka's picture

These are genuinely enormous ideas in regarding blogging.
You have touched some good factors here. Any way keep up wrinting.

semínka marihuany autoflowering's picture

WOW just what I was looking for. Came here by
searching for marihuana semena cena

Karla's picture

Excellent blog here! Also your site loads up fast!
What web host are you using? Can I get your affiliate link to your host?
I wish my web site loaded up as quickly as yours lol

Also visit my weblog - garcinia cambogia xt diet (Karla)

https://youTU.Be/M1FjIootpZ8's picture

I got this site from my buddy who shared with me concerning this website and at the
moment this time I am browsing this web site and
reading very informative articles or reviews at this time.

シルキーカバー's picture

I take pleasure in, result in I discovered exactly what I was having a
look for. You have ended my four day lengthy hunt! God Bless you man. Have a nice day.


まとめサイト's picture

Xia tubusihaMian Bai kunakerebadasaidesu.
tadauzaidakenoXia tubusihasorehaXia tubusidenaku,Ku Tong desu.
Xia tubusihaokasikuGuo gositekosoXia tubusininarundesu. sousitabakagetaXia tubusinomatomesaitonomatomesaitodesu.
Mian Bai idesuyo. konoXia tubusinomatomesaitonomatomesaitoha.
nanisiro,katusiikaraXia tubusigadekirunodesukarane.
Ji Tong woWo Man siteireba,sorehaXia tubusitohaYan emasen.

http://trade-farm.ru/?option=com_k2&amp;view=itemlist&amp;task=user&amp;'s picture

* If possible, install your washer on either the other floor in your home
or within the basement to relieve the impact and seriousness of damage if failure were to occur.
After it's determined which possessions and structures could
be salvaged, the permanently damaged materials will probably be
hauled away, and also the drying process can begin.
After the flooding, water remains inside building for years, that causes extensive mold growth.

Home's picture

Definitely believe that which you stated. Your favorite justification seemed to be
on the net the simplest thing to be aware of. I say to
you, I definitely get annoyed 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-effects , people can take a signal.
Will likely be back to get more. Thanks

kelliebee.spottydog06.n.isaev.info's picture

Hi just wanted to give yyou a brief heads uup andd
let you know a few of the pictures aren't lading correctly.

I'm not sure why but I think its a linking issue. I've tried
it iin two different browsers and both show the same outcome.

Also visit my site - buy used computers online [kelliebee.spottydog06.n.isaev.info]

3 week diet belly fat's picture

Wonderful beat ! Ι ԝould ⅼike to apprentice while үοu amend үour website, how сɑn і subscribe fοr ɑ blog site?
Τһе account helped me а acceptable deal.
Ⅰ һad ƅееn ɑ
little Ƅіt acquainted of tɦіѕ ʏοur broadcast ρrovided bright clear idea

Heere іs mʏ web site; 3 week diet belly fat

comment localiser un portable's picture

Localiser un portable avec un numero de telephone portable (Gratuit).

Telechargement et installation en 2 min ! Aujourd'hui
lorsque vous detenez un telephone

https://twitter.com/jirawatisme?lang=th's picture

After I initially left a comment I seem to have clicked the -Notify me when new
comments are added- checkbox and from now on every time a comment is added I
receive four emails with the same comment. Is there a way you are able to remove me from that service?
Thanks a lot!

fashion jewelry made in india's picture

And in case you discover a particular designer you want, you may maintain going again for more items to create a cohesive assortment of sterling silver jewellery.

woking's picture

Hey there! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up losing months of hard work due to no data backup.

Do you have any methods to prevent hackers?

Cheri's picture

Moldy odors are a signal of a big problem which will be resolved.
This is why acting fast and getting water out with the carpet and cleaning everything up
properly is the best option in restoring its condition and quality.
If the river damage within your basement comes from a minor spill, then you can certainly
likely care for it on your own.

p13351's picture

Hi there! Quick question that's completely off topic. Do you know how
to make your site mobile friendly? My website looks weird when browsing from
my iphone. I'm trying to find a theme or plugin that might be able to correct this problem.
If you have any recommendations, please share.
Appreciate it!

Bonita's picture

I absolutely love your blog and find nearly all of your post's to be just what
I'm looking for. Does one offer guest writers to write content
for you? I wouldn't mind producing a post or elaborating on a few of the subjects you write related to here.Again, awesome weblog!

memek mulus tante's picture

Pretty nice post. I just 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 to your feed and I hope you write again very

セルライト エステ's picture

matusazi|rinpamatusazi|Zhi Ya matusazisitadakedehanakanaka|Si uyouni|sumuzunisurimuni|Xi ku|sutukirinatutekurenaiZu |Xia Ban Shen |Jiao mawarinigatukarisiteiru|Can Nian niSi tuteiru|Bei sikuSi tuteiruChang He hamotiron,souiuZhong deTe niZu Shou Zhou Bian |Xia Ban Shen |Tai momonomukuminadodeNao ndeiruFang desuto,Shi siniYi Du |Yi Hui Shi Ti Yan |Ti Yan |Jing Yan sitemoraitaitoSi useruraito esutegaSi iFu kabimasu|arimasu|osusumedesu. Yi Wai niSi wareru|Zhi ranai|Kan Wei isiteiruFang moDuo i|Shao nakunai|takusanirutoSi imasuga,esute|esutesaron|Shou Shen esutetoha,Yuan Lai natiyuraru|Wu Li nonai|Zi Ran nakeakaraCheng riLi tuteite,Ti |Shen Ti |bodeinoNei Ce deXin Chen Dai Xie |tanoba|Xi Bao noSheng mareBian wariwoLiang kusite|Gai Shan |Zheng eteWu Ti noYi Ge wobesuto|Zui Gao naZhuang Tai |Zui Liang niJin dukeyou|Jin duketeiku|Zheng eteikutoiuYi Ge wokonasu,Wu Ti |Shen Ti |bodeiniokeruMei Rong Ji Shu ninarimasu. Ji Ji De Xiu Xi |riratukusu|rirakuzesiyonmoJu imasu. konoseruraitonoZheng Ti toha|ha|desuga,Zeng ki|Ji mawasii|Ku "siiPi Xia Zhi Fang ,aruiha|mataha|mosikuhaPi Xia Zhi Fang Jian woLiu reruXi Bao Jian Ye deari,soreranoyounaYao Su |sorera|koreragaKuai toHua si|Bian Hua si|natute,Ji "sikumo|Kun tutakotoni|Bei sikumosoregaJi noBiao Mian nimo|he|madeJin ndeXing tute|Dong iteiki|Jin Xing siteiki,soretowakarudekobokositaZhuang Tai woChu Lai Shang garaseteimasu|ninarimasu|heBian Hua siteikimasu.

お金借りる's picture

Pin Fan niterebideyatuteiru,Shui mogasonoCun Zai woZhi ruXiao Fei Zhe Jin Rong noJin Rong Ge She hahotondogasupidoShen Cha woyatuteite,Zui Duan deShou kerareruJi Ri Rong Zi niDui Ying surukotomoKe Neng desu. Shen Cha nikakaruShi Jian moZao itokorodatoZui moSu kute30Fen kuraidesu. Wu Li Xi sabisunoTe Dian ha,onoononoXiao Fei Zhe Jin Rong Hui She deBian watutekurunode,netutowoumakuHuo Yong siteiroironasaitowoBi Jiao siteQue Ren siteikukotode,Zi Fen niXiang iteiruBian Li natokorowoTan sukotogadekirutoSi imasu.

Tweets from Luke Weil'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 never wants to go back! LoL I
know this is entirely off topic but I had to tell someone!

losing weight technique's picture

Hmm it looks like your site ate my first comment (it was super long) so I guess I'll just sum
it up what I submitted 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 tips and
hints for rookie blog writers? I'd genuinely appreciate it.

haemorrhoiden symptome's picture

Look at these various activities you do and make adjustments to their frequency
for effective hemorrhoid treatment. This is great for some temporary
relief, but unfortunately you are practically guaranteed to flare
up again. Hemorrhoids Saviour is a holistic system designed
to treat hemorrhoids, and claims that it contains information that can be
a hemorrhoids cure.

Wohnung mieten's picture

Hi to all, how is thee whole thing, I think every one is getting more from this web page, annd
your views are pleasant in favor of new users.

purpose of methadone maintenance programs's picture

Your telephone call is routed to the nearest situation center in the national network purpose of methadone maintenance programs
greater than 150 crisis facilities.

best survival gear of 2016's picture

Headaches can begin as soon as 24 hours after missing sleep.

By eliminating distracting elements from a room, you will be able to study for longer
periods of time, and will retain the information much better.

If we don't adapt in a healthy manner, we will get left behind or stay stuck in an unhealthy rut.

basketball gear list's picture

This site was... how do you say it? Relevant!! Finally I've found something that helpoed me.
Appreciate it!

Here is my web page ... basketball gear list

Mariano's picture

Very nice post. I just stumbled upon your blog and wished to say that I've truly
enjoyed browsing your blog posts. In any case I'll be subscribing to your feed and I hope
you write again soon!

labs.ww.isaev.infoww.isaev.info's picture

This is the perfect website for everyone who hopes
to understand this topic. You know a whole lot its lmost tough
to argue with youu (not that I actually would want to...HaHa).
Youu definitely put a new spin on a topic that has besen written about for many years.
Wonderful stuff, just excellent!

Review my web page :: computers usa online (labs.ww.isaev.infoww.isaev.info)

Saul's picture

Each year, Google transforms its search formula around
500-600 times.2015 has actually already been a rollercoaster for online marketers that are attempting to monitor
Google ... as well as we could anticipate far more yet ahead.

my blog ... dallas seo - Saul -

online casino Malaysia's picture

Hey there fantastic blog! Does running a blog such as this take a great deal of work?
I have very little understanding of programming but I had been hoping to start my own blog in the near future.
Anyhow, should you have any ideas or techniques for new blog
owners please share. I know this is off subject however I just needed to ask.
Thank you!

global-discourse.com's picture

Your style is very unique in comparison to other people I've read stuff from.
Many thanks for posting when you've got the opportunity,
Guess I'll just book mark this site.

basketball shoes for men clearance's picture

Have you ever considered about including a little bit more than just your articles?
I mean, what you say is important and everything.
But imagine if you added some great photos or video clips to give your posts more, "pop"!

Your content is excellen but with images annd videos, this blog could certainly be one of the very best in its field.
Wonderful blog!

My web blog: basketball shoes for men clearance

testing's picture

Very nice article, exactly what I needed.

basketball shoes with Good arch support's picture

I all the time used to read article in news papers but now as I am a user oof net thus from
now I am using net for articles, thanks to web.

My weblog basketball shoes with Good arch support

Adele's picture

Once the river adjusted you will have to handle the carpets or another flooring.
After it can be determined which possessions and structures can be salvaged, the permanently damaged
materials is going to be hauled away, along with the drying
process can begin. Cracks, tears, and rot within your roofing material are
evident signs that water damage has occurred.

Cabo San Lucas Private Yacht Rentals's picture

always i used to read smaller posts which as well clear their motive, and
that is also happening with this post which I am reading
at this time.


Add new comment