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


Gia's picture

Magnificent beat ! I wish to apprentice even as you amend your
website, how can i subscribe for a blog site? The
account helped me a ahceptable deal. I had been tiny bit acquainted of this your broadcast offered bright transparent concept

Review my website; Gia

3 week diet kindle's picture

ӏ coulԁn't refrdain from commenting.
Ԝell written!

Ⅿу site :: 3 week diet kindle

nucific review's picture

You can also eat functional fiber, which is the gummy fiber
found in oatmeal and similar foods. However, if your body is suffering from
an imbalance of 'friendly' bacteria (microflora) ' that is where
supplements such as a probiotic-infused yogurt can help to balance
our appetite, keep us feeling full and keep us losing weight.
Liquid vitamins are a practical asset to the potential of your long-term

Nayoksanya points out to make him believe's picture

There's certainly a great deal to know about this issue.
I like all the points you've made.

tratamiento de queratina para el pelo's picture

La prueba: me habian hablado de los tratamientos con keratina,
sin decirme nada de alisados ni nada, sencillamente de
que dan vida al pelo.

Ex-Cons in Society's picture

Pretty! This was an extremely wonderful article. Thank you for supplying
this information.

testing's picture

Great beat ! I would like to apprentice even as you amend your web site,
how could i subscribe for a blog web site? The account aided me a applicable deal.
I had been tiny bit familiar of this your broadcast provided shiny clear idea

Pinehills Interior decorator's picture

Designer Nate Berkus says it's actually one of the extra
widespread bed room design missteps.

Also viseit my weblog ... Pinehills Interior decorator

Dr Field Harison Mint Dentistry's picture

My brother suggested I might like this blog. He was entirely right.
This post truly made my day. You cann't imagine just how much time
I had spent for this information! Thanks!

iphone screen protector's picture

Way cool! Some very valid points! I appreciate you writing this write-up and also the rest of the
site is really good.

buy computers online usa's picture

Good response in return of this question with real arguments and explaining the whole thing regartding that.

Here is my blog pist ... buy computers online usa

Andina CEO Luke Weil's picture

Wonderful website you have here but I was wondering if you knew of any community forums
that cover the same topics talked about here?
I'd really love to be a part of group where I can get feed-back from other experienced individuals that share the
same interest. If you have any recommendations, please let me know.

harga oppo f1's picture

Pada seri asphalt 8 ini kamu bisa memainkannya secara on the web dengan beragam tantangan atau misi
yang harus kamu selesaikan untuk menjadi yang terbaik.

seo vps's picture

I believe what you composed was very logical.
But, think on this, suppose you wrote a catchier post title?
I am not suggesting your content isn't good., but suppose you added
a headline that grabbed folk's attention? I mean Add new comment | Shaneware.biz is kinda vanilla.
You could look at Yahoo's front page and note how they create post headlines to get people
interested. You might add a related video or a related picture or two to grab readers excited about what you've written. Just my opinion, it
would bring your website a little bit more interesting.

Lifetime's picture

Heya i am for the first time here.I founhd thyis bord and I
find It truly useful & it helped me out much. I hope
to gkve something back and aid others like you
aided me.

Here is my blog ... Lifetime

outbound puncak's picture

In fact when someone doesn't understand afterward its up
to other viewers that they will help, so here it happens.

basketball shoes for kids boys's picture

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

Also visit my homepage - basketball shoes for kids boys

New Hindi Songs 2017's picture

This blog was... how do I say it? Relevant!! Finally I have found something that helped me.

car camera's picture

Genuinely no matter if someone doesn't understand then its
up to other users that they will help, so here it takes place.

cheap ncaa jerseys's picture

That is a good tip especially to those fresh to the blogosphere.
Brief but very accurate information... Many thanks for sharing this one.
A must read post!cheap ncaa jerseys

cheap ncaa jerseys's picture

That is a good tip especially to those fresh to the blogosphere.
Brief but very accurate information... Many thanks for sharing this one.
A must read post!cheap ncaa jerseys

Jody Rookstool's picture

I do not even know how I ended up here, but I thought this post was great.
I do not know who you are but definitely you are going to a
famous blogger if you are not already ;) Cheers!

thebaysidesalon.com's picture

It's the best time to make some plans for the
future and it is time to be happy. I have read this post and if I could I desire to suggest you some interesting things or suggestions.
Maybe you can write next articles referring to this article.
I wish to read more things about it!

repairing service agency's picture

Keep on writing, great job!

Ian Leaf's picture

Hi there Dear, are you really visiting this web site regularly, if so afterward you will absolutely
get nice know-how.

Luke Weil was quoted as saying's picture

Hi! This is my 1st comment here so I just wanted to give a quick shout out and say I
genuinely enjoy reading through your articles. Can you recommend any other blogs/websites/forums
that deal with the same subjects? Thank you!

Who We Are's picture

Hi there, just became alert to your blog through Google, and found that it is really informative.
I am gonna watch out for brussels. I will be grateful if you
continue this in future. A lot of people will be benefited from your writing.

managed vps hosting's picture

When itt comes tto functionality a VPS capabilities exactly the
same as any devoted server but shares server assets with the opposite VPS on the identical server.

Here is my site managed vps hosting

prediksi taruhan bola hari ini's picture

Not to be confused with the rune system found in League of Legends which allows upgrades to be purchased with Influence Points (IP).
Some skillshots will go through regular creeps but many of them
require excellent positioning and timing to connect with
their intended targets, and can be stronger than regular "point and click" abilities.
The quests listed from Maurice de Audeur are as follows:

Alicja po drugiej stronie lustra lektor pl's picture

Ogladaj film Alicja po drugiej stronie lustra online, Johny Depp znowu
wciela sie w role Szalonego Kapelusznika,
Obejrzyj film z lektorem online lub Pobierz fim Alicja po drugiej
stronie lustra.

Pure Detox Max's picture

You have made some decent points there. I looked on the web to find out more about
the issue and found most people will go along with your views on this web site.

Sebastian Hirsch's picture

We're a group of volunteers and starting a new schemne in our community.
Your website offered us with valuable information to work on. You've done a formidable job and our entire
community will be thankful to you.

tirnanogclinic.optimageeks.com's picture

Greetings! Very helpful advice within this post! It is the little changes that make the most significant changes.
Thanks for sharing!

Septic Tank cleaning athens ga's picture

Hi, I wish for to subscribe for this web site to obtain most recent updates, thus where can i do it please help out.

biurowe-olsztyn.totalh.net's picture

Piekne wnetrza, czyste, jasne...bardzo podoba mnie sie podloga w salonie - innymi slowy to jakas konkretna biznes
i barwa, chetnie takowa bym dostrzegala u siebie.
Prosze o namiary: ) Magda

Brandon Colker's picture

I'd like to find out more? I'd want to find out more details.

how to get rid of cellulite naturally's picture

Howdy this iis somewhat of off topic but I was wondering if blogs use
WYSIWYG editors or iff you have to manhually code with
HTML. I'm startinbg a blog soon but have nno coding know-how soo I wanted tto get advfice
from someone with experience. Any help would be enormously appreciated!

Judi's picture

And I'm simply visiting neglect the outrageous idea that people visit a
post-graduate, professional institution looking for worths.

Visit my web site; Judi

mind power's picture

I had a nardrow limited view that meditation needed
tto be me sitting in a darkish room, respirayory and mentally
vacant for hours.

Feel free to visit my web blog - mind power

read me's picture

For the reason that the admin of this website is working,
no hesitation very quickly it will be well-known, due to
its quality contents.

seo blog's picture

Hi would you mind letting me know which hosting company you're working with?
I've loaded your blog in 3 different web browsers and I must say this blog loads a lot quicker then most.

Can you suggest a good hosting provider at a reasonable price?
Kudos, I appreciate it!

Augusto de Arruda Botelho's picture

fantastic points altogether, you just gained a brand new reader.
What might you suggest about your publish that you made some days ago?
Any positive?

Amelie's picture

Using stock pictures in your work is an effective way to add
variety to the positioning or writing.

Ian Leaf Tax's picture

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

http://fssmlp.com/'s picture

Great post. I was checking constantly this blog and
I am impressed! Extremely useful information specially the last part :) I care for
such information much. I was seeking this particular information for a
long time. Thank you and good luck.

Ian Andrews Fraudster's picture

Hi, Neat post. There is a roblem with your site in web explorer, could check this?

IE still is the marketplace leader and a huge part of folks will pass over
your great writing due to this problem.

Brandon Colker's picture

Its like you learn my thoughts! You seem to understand a
lot approximately this, like you wrote the e book in it or something.
I feel that you can do with some percent to power the message house a
little bit, but other than that, this is wonderful blog.
A fantastic read. I'll certainly be back.

buy instagram followers blog's picture

Thanks for the marvelous posting! I truly enjoyed reading
it, you are a great author.I will ensure that I bookmark your blog and will eventually come back in the future.
I want to encourage that you continue your great writing, have a nice

Brandon Colker's picture

It's an amazing piece of writing in support of all the internet users; they will obtain benefit from it
I am sure.


Add new comment