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

1464 comments

Jody Rookstool's picture

This is really interesting, You're a very skilled blogger.
I have joined your feed and look forward to seeking more of your magnificent post.

Also, I've shared your website in my social networks!

happy diwali sms's picture

What's up to all, the contents existing at this web site are genuinely amazing for people experience, well,
keep up the good work fellows.

Karl Jobst DDS's picture

Hello, yeah this piece of writing is actually nice
and I have learned lot of things from it on the topic of blogging.
thanks.

fire and the flood's picture

Great article.

Brandon Colker's picture

My brother suggested I might like this webb site. He was entirely right.
This post truly made my day. You can not imagine simply how much time I had spent for this information! Thanks!

online computers's picture

Good answer baqck in return of this question with real arguments and telling all on the topic of that.

Here iis myy web blog: online computers

dien dan rao vat viet nam's picture

you're truly a excellent webmaster. The site loading velocity
is amazing. It seems that you're doing any unique trick.

Moreover, The contents are masterpiece. you have done a excellent process in this
subject!

www.Kosmotayho.top's picture

Wow, amazing blog layout! How long have you been blogging for?
you make blogging look easy. The overall look of your web site is
great, as well as the content!
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

pobierz's picture

Hello, yes this article is in fact pleasant and I have learned lot of things from it concerning blogging.
thanks.

ราคาต่อรองบอล's picture

wonderful points altogether, you just gained a new reader.
What may you recommend about your post that you made some days in the past?

Any sure?

yepme t shirts's picture

Hiya! I know this is kinda off topic however I'd figured I'd ask.

Would you be interested in exchanging links or maybe guest authoring a blog
post or vice-versa? My site discusses a lot of the same topics
as yours and I think we could greatly benefit from each other.
If you're interested feel free to shoot me an e-mail.
I look forward to hearing from you! Fantastic blog by the way!

Dana Sibilsky's picture

I know this site provides quality based content and extra material, is there any other website which gives these data in quality?

Dermaliere Anti-aging's picture

Howdy just wanted to give you a brief heads up
and let you know a few of the pictures aren't
loading correctly. I'm not sure why but I think its a linking issue.
I've tried it in two different web browsers and both show the same results.

moringa slim review's picture

Every weekend i used to go to see this web site, for the reason that
i want enjoyment, for the reason that this this web site conations in fact pleasant funny information too.

โหลดกูเกิ้ลเพลย์'s picture

Article writing is also a excitement, if you know
after that you can write if not it is complicated to write.

Michele Frazier's picture

It's appropriate time to make some plans for the long run and it's time to be
happy. I've learn this publish and if I could I wish to counsel you some attention-grabbing issues or suggestions.Perhaps you can write subsequent articles regarding this article.
I want to read even more things about it!

http://www.darfurwarforwater.com's picture

The area has experienced a large number of wildfires throughout the recent months of the
summer, due in large part, to the dangers posed by the lethal combination of
wind, dry grass, and brush. You should strategy your tattoo along with
your artist first, get an approximate of cost, & then disappear & save your
cash. Get Your Vitamin D: I read somewhere that most
of us are deficient in Vitamin D due to wearing cosmetics that contain sunscreen.

Michele Frazier's picture

I pay a visit daily a few sites andd websites to read content,
except this web site provides quality based posts.

gamberbounty.org rewrite's picture

Connect your device or use the blusestacks app player with signed in android account and app retailer
account.

Sebastian Hirsch's picture

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

Ageless Body System pdf's picture

The creators of this program reveals some secrets to change
your entire fitness level in just 30 days.

body mass index's picture

Heya i'm for the first time here. I came across
this board and I find It really useful & it helped
me out a lot. I'm hoping to give something again and aid others like you helped me.

tinder gratuit's picture

Each woman experiences a unique experience
while breastfeeding. Smash the back wall and get ready to outrun a
white tiger. I found this site to be a solid mix of fleeting
sex and committed relationship.

Here is my web page - tinder gratuit

Dry Skin Facts's picture

This text is priceless. When can I find out more?

dien dan rao vat may tinh's picture

I every time used to read post in news papers but
now as I am a user of web thus from now I am using net for content, thanks to
web.

Sebastian Hirsch's picture

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

Sebastian Hirsch's picture

An impressive share! I have just forwarded this onto a colleague who had
been doing a little homework on this. And he in fact ordered me
lunch because I stumbled upon it for him... lol. So
allow me to reword this.... Thanks for the meal!! But yeah, thanx for spending some time to talk about this subject here on your
web site.

Watch The Peanuts Movie's picture

Watch & Download The Peanuts Film (2015) Film On-line download for desktop and mobile in MP4, 3GP and
FLV video format.

Ian Leaf Fraudster's picture

Amazing issues here. I am very happy to see your post.
Thanks a lot and I'm taking a look ahead to touch you.

Will you please drop me a mail?

Maria Johnsen's picture

C'est le meilleur Boom Beach Triche que compter fonctionne et est
totalement gratuite.

Sebastian Hirsch's picture

I'm impressed, I have to admit. Rarely do I encounter a blog
that's both educative and engaging, and without a
doubt, you have hit the nail on the head. The problem is something not enough people are
speaking intelligently about. I am very happy I came
across this during my unt for something regarding this.

Gary Huffman's picture

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

Michele Frazier's picture

Greetings from Los angeles! I'm bored to tears at work
so I decided to browse your website on my iphone during lunch break.
I love the knowledge you provide here and can't wait to take a look when I get home.
I'm surprised at how fast your blog loaded on my cell
phone .. I'm not even using WIFI, just 3G ..
Anyhow, superb blog!

Sebastian Hirsch's picture

Thiss site was... how do you say it? Relevant!! Finally I have found something which helped me.

Thanks a lot!

Karl Jobst DDS's picture

It's awesome for me to have a web site, which is useful for
my knowledge. thanks admin

Sebastian Hirsch's picture

Thank you for some other informative site. Where else may I am getting that type of info written in such a perfect approach?
I've a challenge that I am just now operating on, and I have been on the
look out for such information.

online payroll los angeles's picture

Hi this is kinda of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML.
I'm starting a blog soon but have no coding know-how so I
wanted to get advice from someone with experience. Any
help would be greatly appreciated!

Joe Olujic's picture

Hi there! Someone in my Facebook group shared this site with us so I
came to check it out. I'm definitely loving the information. I'm bookmarking
and will be tweeting this to my followers! Wonderful
blog and outstanding design and style.

Brandon Colker's picture

Excellent, what a webpage it is! This weblog provides useful
information to us, keep it up.

Salvatore's picture

Hi i am kavin, its my first time to commenting anywhere, when i read this
post i thought i could also create comment due to this good piece of writing.

tickle's picture

Good answers in return of this difficulty with genuine arguments and telling all concerning that.

Au Nue Youth Restore's picture

What's up, this weekend is fastidious for me, since this time i am reading this enormous educational
paragraph here at my residence.

michele frazier's picture

You're so interesting! I don't suppose I have read through something like that before.
So nice to find someone with a few unique thoughts on this subject.
Really.. thank you for starting this up. This site
is something that is required on the internet, someone with a little originality!

Lee Trotman's picture

Heya i'm for the first time here. I came acroses 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.

Karl Jobst DDS's picture

It is not my first time too go to see this web site, i am browsing this web page dailly and take pleasant
facts from here all the time.

Sebastian Hirsch's picture

This is very attention-grabbing, You're an overly professional blogger.

I've joined your rss feed and look ahead to in search of more of your excellent post.
Additionally, I've shared your website in my social networks

Ian Andrews HFC's picture

Have you ever considered publishing an ebook or guest authoring
on otherr sites? I have a blog centered on the
same topics you discuss and would really like to have you share some stories/information. I
know my visitors would appreciate your work. If you're even remotely interested, feel free to shoot me an email.

sebastian hirsch's picture

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

environmentalist Luke Weil's picture

I've been exploring for a little bit for any high quality articles or weblog posts in this kind of area .
Exploring in Yahoo I eventually stumbled upon this site.
Studying this info So i am glad to convey that I've
an incredibly good uncanny feeling I came upon exactly what I needed.
I such a lot unquestionably will make sure to do not put out of your mind this site and provides it a look on a constant basis.

Live Cell Research's picture

Hi there, always i used to check webpage posts here in the early hours in the break of day, for the reason that
i like to gain knowledge of more and more.

Pages

Add new comment