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

1445 comments

Ian Leaf's picture

Informative article, totally what I was looking for.

Gary Huffman's picture

Thanks for sharing your thoughts on concord
nh landscaping companies. Regards

customized tee shirts's picture

Hey there would you mind letting me know which web host you're
using? I've loaded your blog in 3 completely different internet browsers and I must
say this blog loads a lot faster then most. Can you suggest
a good internet hosting provider at a fair price? Thank
you, I appreciate it!

Sebastian Hirsch's picture

I don't know whether it's just me or if perhaps everyone else experiencing issues with your
blog. It appears as though some of the text on your content are running off the screen. Can someone else please comment
and let me know if this is happening to them too?
This might be a problem with my browser because I've had this
happen before. Many thanks

farm3.static.blo9g.dc243.rackhosting.com's picture

Internet mystic reading gets rid of the stress and anxiety lots of folks may operate along with getting to know
a reader face to face.

My blog post :: farm3.static.blo9g.dc243.rackhosting.com

Sebastian Hirsch's picture

I will immediately clutch your rss as I can't find your email subscription hyperlink or e-newsletter service.
Do you've any? Please permit me know so that I may subscribe.
Thanks.

Amir Mojiri London's picture

Hi there, I discovered your blog by way of Google whilst searching for a related matter,
your web site came up, it appears great. I've bookmarked
it in my google bookmarks.
Hi there, simply was aware of your weblog via Google, and found that it is truly
informative. I'm gonna be careful for brussels.
I will appreciate if you happen to proceed this
in future. Numerous other people can be benefited from your
writing. Cheers!

Brandon Colker's picture

Hello this is kinda of off topic but I was wondering
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 guidance from someone with
experience. Any help would be enormously appreciated!

www.adin.isaev.info's picture

The spacefaring people in One of The Chosen deals with psychic abilities
as if they were merely another area of scientific
research.

Feel free to visit my weblog www.adin.isaev.info

Tim Decapua's picture

This design is wicked! You obviously know how to keep a
reader entertained. Between your wit and your videos, I was almost
moved to start my own blog (well, almost...HaHa!) Fantastic job.
I really enjoyed what you had to say, and more than that,
how you presented it. Too cool!

Ian Andrews Tax's picture

Hello! I'm at work surfing around your blog from my new apple iphone!
Just wanted to say I love reading through your blog and look
forward to all your posts! Keep up the superb work!

Ian Andrews Tax's picture

Hi there, I read your blog like every week. Your humoristic style is witty, keep doing what you're
doing!

Ian Andrews Tax's picture

I used to be recommended this web site by
means of my cousin. I am no longer sure whether or
not this post is written by him as nobody else recognize such precise
approximately my trouble. You're wonderful! Thanks!

custom print t shirts's picture

Very shortly this web page will be famous amid all blog people, due to it's pleasant content

John Ross Jesensky's picture

Hello, after reading this awesome article i am too delighted to share my know-howhere with mates.

www.flashgamesforfun.org's picture

When I originally left a comment I appear to have clicked the -Notify me
when new comments are added- checkbox and now every time a comment is added I receive 4 emails with the
same comment. There has to be a means you are able to remove me from that service?
Cheers!

How to lose belly fat's picture

The love Waller had for classical piano caused him to make time to learn from Leopold Godowsky.

Brandon Colker's picture

I'm really enjoying the design and layout of your blog.
It's a very easy on the eyes which makes it much more pleasant for me to come here and visit more
often. Did you hire out a designer to create
your theme? Exceptional work!

Amir Mojiri London's picture

Just want to say your article is as surprising. The clarity in your post is simply excellent and
i can assume you're an expert on this subject.
Fine with your permission let me to graab your feed to keep up to date
with forthcoming post. Thanks a million and please carry on the gratifying work.

tshirt design websites's picture

Hi would you mind letting me know which hosting
company you're utilizing? I've loaded your blog in 3 different internet browsers and I must say this blog
loads a lot faster then most. Can you recommend a good internet
hosting provider at a honest price? Many thanks, I appreciate it!

Stewart's picture

Visit my homepage - Stewart

Ian Andrews Fraudster's picture

Admiring the time and energy you put into your site and in depth information you provide.
It's nice to come across a blog every once in a while that isn't
the same old rehashed information. Great read! I've saved your site and I'm including your RSS feeds to
my Google account.

Ian Leaf Fraudster's picture

I have been browsing on-line greater than three hours as
of late, but I by no means discovered any interesting article
like yours. It's pretty value enough for me. In my opinion, if all
website owners and bloggers made excellent content material as you probably did,
the internet will be much more helpful than ever before.

Karl Jobst DDS's picture

I'll right away seize your rss feed as I can't in finding your e-mail subscription link or e-newsletter service.
Do you've any? Kindly allow me recognize in order that I could subscribe.

Thanks.

Brandon Colker's picture

Hey there! This is kind of off topic but I need some guidance from an established blog.
Is it very difficult to set up your own blog?
I'm not very techincal but I caan figure things out pretty quick.
I'm thinking about makjng my own but I'm not sure where to begin. Do you
have any points or suggestions? Appreciate it

Kimra Bettasso's picture

When some onne searches for his necessary thing, thus he/she
wants to be available that in detail, thus that thing is maintained over here.

Brandon Colker's picture

Hey there! This is kind of off topic but I need some guidance from an established blog.
Is it very difficult to set up your own blog?
I'm not very techincal but I caan figure things out pretty quick.
I'm thinking about makjng my own but I'm not sure where to begin. Do you
have any points or suggestions? Appreciate it

Sebastian Hirsch's picture

Hello, i think that i noticed you visited my web
site so i came to go back the prefer?.I am attempting to find issues to improve my
web site!I assume its good enough to make use of some of your ideas!!

Egg Surprise's picture

I'm impressed, I must say. Rarely do I come across a blog that's both educative and engaging, and
let me tell you, you have hit the nail on the head.

The issue is an issue that too few men and women are speaking intelligently about.
I'm very happy I stumbled across this during my search for something regarding this.

Wilma's picture

Heya fantastic blog! Does running a blog such as this require a lot
of work? I've very little expertise in coding but
I was hoping to start my own blog in the near future.
Anyhow, if you have any ideas or tips for new blog owners please
share. I know this is off topic but I simply had to ask.
Many thanks!

000 high net worth individuals's picture

Very good site you have here but I was curious if you knew of any discussion boards that cover the
same topics discussed in this article? I'd really like to be a part of group where I can get
suggestions from other experienced individuals that share the same interest.
If you have any recommendations, please let me know.
Many thanks!

Scientific Games Luke Weil's picture

I just like the helpful info you provide for your
articles. I'll bookmark your blog and take a look at again here frequently.
I'm moderately sure I will learn plenty of
new stuff proper here! Best of luck for the next!

Michele Frazier's picture

This piece of writing is really a pleasant one it assists new the web viewers, who
are wishing in favor of blogging.

Visit Website's picture

Asking questions are genuinely nice thing if you are not understanding anything completely, however this article presents nice understanding even.

chomikuj's picture

I don't know if it's just me or if perhaps everybody else experiencing problems with your website.
It appears as though some of the text on your content
are running off the screen. Can someone else please provide feedback and let me know if this is
happening to them as well? This may be a issue with my
internet browser because I've had this happen before.
Thank you

Michele Frazier's picture

If you want to take a great deal from this piece of writing then you have to apply such techniques to your won weblog.

sebastian hirsch's picture

I all the time used to study articoe in news papers but now as I am a user of net so from now I am using net for articles or reviews, thanks to
web.

Sebastian Hirsch's picture

Thank you for another informative website. The place else may I am
getting that kind of info written in such an ideal manner?
I have a challenge that I'm simply now running on, and I've been on the look out for such info.

Brandon Colker's picture

Very descriptive blog, I liked that bit. Will there be a part 2?

Sebastian Hirsch's picture

This article is genuinely a good one it assists new internet people, who are wishing in favor of blogging.

company website's picture

Excellent write-up. I absolutely appreciate this site. Keep it up!

Sebastian Hirsch's picture

Do you have a spam problem on this site; I also am a blogger, and I was curious about your situation; many of us have created some nice procedures and we
are looking to swap techniques with others, please shoot
me an email if interested.

John Ross Jesensky's picture

I blog frequently and I really thank you for your information. Your
article has really peaked my interest. I will book mark your blog and keep checking for new details about once per week.
I subscribed to your Feed too.

Personalized T-Shirts's picture

I just could not go away your website prior to suggesting that I really enjoyed the usual info an individual provide in your guests?
Is gonna be back continuously to inspect new posts

Ian Leaf Corporation's picture

If you would like to obtain a great deal from this paragraph then you have to apply these techniques to your won webpage.

Brandon Colker's picture

Hello just wanted to give you a quick 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 outcome.

Kimra Bettasso's picture

There's definately a great deal to know about
this issue. I love all the points you made.

Luke Weil on Pinterest's picture

Hi! I know this is kind of 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!

Sebastian Hirsch's picture

Greetings! Very helpful advice in this particular article!
It is the little changes that produce the largest changes.
Many thanks for sharing!

Sebastian Hirsch's picture

Hi there, all is going sound here and ofcourse
every one is sharing data, that's truly good, keep up writing.

Pages

Add new comment