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

1456 comments

Brandon Colker's picture

Keep this goiing please, great job!

Jody Rookstool's picture

Hiya! I know this is kinda off topic but I'd figured
I'dask. Would you be interested in exchanging links or maybe guest
writing a blog article or vice-versa? My blog covers a lot of the
same subjects as yours and I believe we could greatly benefit from each other.
If you might be interested feel free to shoot me an e-mail.
I look forward to hearing from you! Awesome blog by the
way!

philanthropist Luke Weil's picture

I'd like to thank you for the efforts you have put in writing this site.

I am hoping to check out the same high-grade blog
posts from you later on as well. In truth, your
creative writing abilities has inspired me to get my own, personal site now ;)

Ian Leaf's picture

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

Brandon Colker's picture

Nice blog here! Also your website loads up very fast!
What web host are you the usage of? Can I am getting your affiliate hyperlink for your host?
I wish my site loaded up as quickly as yours lol

Trinity School Alumni Luke Weil's picture

I know this site provides quality dependent articles and other material, is there any other website which provides these information in quality?

Mr. Benjamin Luke Weil founded Tecnoglass Inc.'s picture

Hi! This is kind of off topic but I need
some guidance from an established blog. Is it very hard to set up your own blog?

I'm not very techincal but I can figure things out pretty fast.

I'm thinking aboujt setting up myy own but I'm not sure where to start.
Do you have any ideas or suggestions? Thank you

www's picture

If you desire to grow your experience only keep visiting this site
and be updated with the latest gossip posted here.

occasion auto's picture

It was a crib mattress , though, and I am building the bunk beds to different dimensions.

sydney aquarium's picture

It's going to be ending of mine day, however before end I
am reading this enormous piece of writing to improve my know-how.

My site ... sydney aquarium

飲む生酵素 効果's picture

Xiao Su woQu riRu retadaietutotoha,Sheng Ming woWei Chi surunoniBi Yao Bu Ke Qian naXiao Su woTi Nei niQu riRu reruShi niyori,onakagaKong itatoGan zinikukusite,mataTi nosamazamanaJi Neng woHuo Xing Hua siteShou seyasuiTi Zuo riwoMu Zhi sudaietutoFang Fa desu. Xiao Su woShe Qu sureba,Chang noDong kigasumuzuninari,Bian Mi Zheng noGai Shan nimotunagarimasu. Shi Shi woZhi Xian suruBi Yao ganainode,Wu Li ganaku,ribaundonoXin Pei haWu Yong desu. Xiao Su dorinkuwoYin ndeiyoutomoShou senaiFang moimasu. ikuradaietutonihaXiao Su dorinkugaXiao Guo aritohaitutemo,She tutadakedeJu De niShou serukotogadekiruwakedehaarimasen. Yi Ri noShi Shi noutidorekawoXiao Su dorinkuniZhi kiHuan etemitari,Jian Shi woZhi metariYin Jiu woKong emenisurutoitutakotomoBi Yao nanodesu. mata,Xin Chen Dai Xie gaLiang kunatutaFen ,Qing iYun Dong woXing unomoXiao Guo De desiyou.

sencha's picture

I'm not that much of a internet reader to be honest but your blogs really nice, keep it up!
I'll go ahead and bookmark your site to come back later on. Many thanks

Sebastian Hirsch's picture

You need to be a part of a contest for one of the greatest websites on the
web. I'm going to highly recommend this web site!

Instagram profile for Luke Weil's picture

We are a group of volunteers and starting a new scheme in our community.
Your website provided us with useful info to work on.
You have done an impressive process and our whole neighborhood will probably be grateful to
you.

Jermaine's picture

Reside Clairvoyant Mediums all set to have your telephone calls
and also utilize their uncanny capabilities to help you uncover your personal future.

my homepage Jermaine

Ian Andrews Tax's picture

Hello there, I found your blog by means of Google
at the same time as looking for a similar matter, your website came up,it seems
great. I have bookmarked it in my google bookmarks.

Hello there, just changed into aware of your weblog through
Google, and found that it is truly informative.
I am gonna be careful for brussels. I'll be grateful for those who continue
this in future. Numerous folks shall be benefited from your writing.

Cheers!

Jody Rookstool's picture

You are so awesome! I do not suppose I've truly read through a single
thing like this before. So great to find somebody with a
few genuine thoughts on this topic. Really.. thanks for starting this up.
This website is one thing that is needed on the internet,
someone with a little originality!

suicide prevention's picture

Excellent goods from you, man. I've understand
your stuff previous to and you're just extremely magnificent.
I really like what you've acquired here, really like what you are saying and the way in which you say it.
You make it enjoyable and you still take care of to keep it smart.
I can't wait to read much more from you. This is actually a terrific web site.

Jody Rookstool's picture

Wow, this post is fastidious, my sister is analyzing these
kinds of things, thus I am going to let know her.

Luke Weil|LinkedIn's picture

Thank you for the good writeup. It in fact was once a entertainment account it.
Glance complex to far introduced agrreeable from
you! By the way, hoow can we keep up a correspondence?

Ian Leaf's picture

I know this if off topic but I'm looking into starting my own weblog and was curious what
all is required to get setup? I'm assuming having a blog like yours would
cost a pretty penny? I'm not very internet smart so
I'm not 100% certain. Any recommendations or advice would
be greatly appreciated. Thank you

Country Friends Cheats's picture

An intriguing discussion is worth comment. I believe that you ought to write more about this issue, it might not
be a taboo subject but typically folks don't speak about these subjects.

To the next! Cheers!!

xxx kiss's picture

Very nice write-up. I absolutely appreciate this website.

Keep it up!

Brandon Colker's picture

Hello, i think that i saw you visitged my website thus i got
here to go back the favor?.I am trying to in finding issues to enhance my site!I suppose its ok to make use
of a few of your ideas!!

Ian Andrews Fraudster's picture

Very quickly this site will be famous amid all blogging and site-building visitors, due to it's good
content

Brandon Colker's picture

bookmarked!!, I like your website!

Brandon Colker's picture

Outstanding story there. What occurred after? Thanks!

Brandon Colker's picture

Hola! I've been reading your site for a long time now and finally got the bravery to go ahead and give you a shout out from Humble Texas!
Just wanted to mention keep up the fantastic work!

Luke Weil + Pinterest's picture

I really like your blog.. very nice colors & theme.

Did you design this website yourself or did you hire someone
to do it for you? Plz answer back as I'm looking to design my own blog and
would like to know where u got this from. thanks

Luke Weil on Pinterest's picture

My partner and I stumbled over here by a different
web address and thought I might check things out. I like what I see so now i'm following you.
Look forward to exploring your web page for
a second time.

Jody Rookstool's picture

It's going to be end of mine day, except before finish I am
reading this enormous article to increase my knowledge.

Plus.Google.com's picture

What's Happening i am nnew tto this, I stumbled upon this I have
found It absolutely helpful and it has aided me out loads.

I hope to give a contribution & assist other customers like its aided me.
Great job.

this domain's picture

An impressive share! I have just forwarded this onto a colleague who
has been conducting a little research on this. And he actually ordered me dinner simply because I
discovered it for him... lol. So let me reword this....

Thank YOU for the meal!! But yeah, thanks for spending the time
to discuss this issue here on your blog.

how to burn belly fat quickly at home's picture

For instance, some research have proven that higher intensity exercise does seem to target the central(deep belly) physique fat stores.

poker tips's picture

you are truly a good webmaster. The site loading pace is amazing.
It sort of feels that you're doing any distinctive trick.
In addition, The contents are masterpiece. you've performed a great activity on this subject!

Vito's picture

Hoodoo card audiences if ever not be actually confused with
so-called Free Psychic Fortune-teller, who may or
could certainly not be actually real.

Here is my site Vito

Ian Leaf's picture

Hello friends, how is everything, and what you wish for to say on the topic of this piece of
writing, in my view its genuinely awesome for
me.

Ian Andrews Tax's picture

Hmm is anyone else encountering problems with the pictures on this blog loading?
I'm trying to figure out if its a problem on my end or if it's the blog.
Any feed-back would be greatly appreciated.

Ian Andrews Leaf's picture

My relatives every time say that I am wasting my time here at net, except I
know I am getting experience daily by reading such nice posts.

globalhomeaccents.com's picture

I'm impressed, I have to admit. Rarely do I come across a blog that's
both equally educative and engaging, and without a doubt, you've hit the nail on the head.
The problem is something too few folks are speaking intelligently about.
I'm very happy that I found this during my search
for something concerning this.

Luke Weil is the managing partner's picture

Wonderful work! That is the kind of info that are meant to
be shared across the web. Shame on the seek engines for now not positioning this
post higher! Come on over and consult with my site .
Thanks =)

Optimum Nutrition Creatine's picture

Nice post. I was checking constantly this blog and I'm inspired!
Extremely useful information specifically the final phase :) I handle such information much.

I used to be looking for this certain info for a very
long time. Thanks and best of luck.

Jody Rookstool's picture

I have been exploring for a little bit for any high quality articles or blog posts on this sort
of space . Exploring in Yahoo I at last stumbled upon this web site.

Studying this info So i'm glad to show that I have a very
excellent uncanny feeling I discovered just what I needed.

I most certainly will make certain to don?t disregard this site and provides it a glance on a continuing basis.

www.instagram.com's picture

Article writing is also a excitement, if you be acquainted with
afterward you can write otherwise it is difficult to write.

Pinterest + Luke Weil's picture

I must thank you for the efforts you've put in writing this
website. I really hope to view the same high-grade
content by you later on ass well. In fact, your creativce writing abilities has inspired
me to get my own blog now ;)

Shanice's picture

It is possible to save a good bit of dollars this way.

Lorna's picture

Since the admin of this web site is working, no question very quickly iit will be famous,
due to its feature contents.

Also visit my website -Lorna

generateur clash royale's picture

Wow, this post is fastidious, my younger sister is analyzing such things, so I am going to convey her.

Michele Frazier's picture

Hey there! I'm at work browsing your blog from my new iphone 4!
Just wanted to say I love reading through your blog and look forward to all your posts!
Keep up the fantastic work!

Sebastian Hirsch's picture

Thank you for sharing your thoughts. I truly appreciate your efforts and I am waiting
for your next post thanks once again.

Pages

Add new comment