Sticking your nose in the tinderbox


Once you tell tinderbox to build a list of ports it happily goes off and does it's work. But how do you know what it is doing? Well let's nosey around and see what we can find. Let's open a terminal and tell it to compile devel/p5-Log-Dispatch and see what happens.

[tinderbox/scripts] # compileport -B 9.0 -A amd64 -C clang -P devel/p5-Log-Dispatch ********** ********** Starting tinderbox compiles with - ***** Base versions - 9.0 ***** ARCH list - amd64 ***** Compilers - clang ***** Ports to build - devel/p5-Log-Dispatch ********** ********** Adding port/s to datastore... ********** Compiling devel/p5-Log-Dispatch in 9.0-amd64-clang ********** tinderbuild: creating makefile... tinderbuild: Creating build directory for 9.0-amd64-clang 9.0-amd64-clang: cleaning out /usr/local/tinderbox/9.0-amd64-clang makeBuild: extracting jail tarball tinderbuild: Finalizing chroot environment ================================================ building packages (phase 0) ================================================ started at Tue Oct 16 19:51:03 CST 2012 ended at Tue Oct 16 20:14:51 CST 2012 phase 0 took 00:23:48 26 packages built 15M of packages ================================================ building packages (phase 1) ================================================ started at Tue Oct 16 20:14:51 CST 2012 ended at Tue Oct 16 20:14:51 CST 2012 phase 1 took 00:00:00 26 packages built 15M of packages tinderbuild: Cleaning up after tinderbuild. Please be patient.

Well that doesn't tell me much of anything. In fact during the wait between line 26 and 27 it gives no clue as to what it is doing. It turns out if you look inside the right build dir you will get some more info. With BUILDNAME=9.0-amd64-clang

[local/tinderbox] # ls -l /usr/local/tinderbox/builds/$BUILDNAME total 142 -rw-r--r-- 1 root wheel 14862 16 Oct 19:50 Makefile -rw-r--r-- 1 root wheel 0 16 Oct 19:50 duds -rw-r--r-- 1 root wheel 0 16 Oct 19:50 lock -rw-r--r-- 1 root wheel 37211 16 Oct 20:08 make.0

That lock file tells tinderbox that this build is busy working. In case of severe breakage you will need to delete this to get started again. The duds file contains a list of ports that it won't be compiling (back to that in a sec). The Makefile has a list of dependancies for the port that is being compiled and the make.0 (and make.1 if it is there) is a log file giving a general overview of what is happening, you will see the environment settings and the current port being made (at least the distname of the source package which often matches the portname). tail -f make.0 will let you watch as things progress. make.0 logs stage0 progress while make.1 logs stage1.

If wou want to see more detail then you will find the working system installed inside /usr/local/tinderbox/$BUILDNAME Of most interest will be the tmp dir where you will find pieces of log files that will be joined into the final log that you can access later. Each step of the build is in a separate piece so you get one for extract, one for patch, one for configure...

[local/tinderbox] # ls -l /usr/local/tinderbox/$BUILDNAME/tmp total 2149 drwxr-xr-x 2 root wheel 2 16 Oct 19:51 depends drwxr-xr-x 3 root wheel 3 16 Oct 19:51 distfiles lrwxr-xr-x 1 root wheel 18 16 Oct 19:51 make.log -> perl-5.14.2_2.log2 -rw------- 1 root wheel 577 16 Oct 19:51 make.log1 -rw------- 1 root wheel 190 16 Oct 19:51 make.log2 -rw------- 1 root wheel 1433 16 Oct 19:51 make.log3 -rw------- 1 root wheel 291603 16 Oct 19:53 make.log4 -rw------- 1 root wheel 208061 16 Oct 20:04 make.log5 -rw-r--r-- 1 root wheel 217 16 Oct 19:51 mtree.buildexclude -rw-r--r-- 1 root wheel 412258 16 Oct 19:51 mtree.prebuild -rw-r--r-- 1 root wheel 258 16 Oct 19:51 mtree.preexclude -rw-r--r-- 1 root wheel 409514 16 Oct 19:51 mtree.pristine drwxr-xr-x 2 root wheel 2 16 Oct 19:51 packages -rw-r--r-- 1 root wheel 3117 16 Oct 19:51 perl-5.14.2_2.log -rw-r--r-- 1 root wheel 293831 16 Oct 19:53 perl-5.14.2_2.log2 -rw-r--r-- 1 root wheel 0 16 Oct 19:53 pkgs_post_test -rw-r--r-- 1 root wheel 0 16 Oct 19:53 pkgs_pre_test -rw-r--r-- 1 root wheel 2 16 Oct 19:51 status

Now why would tinderbox list ports in the duds file and how do you build a port that gets listed there? Well the duds file contains ports that are marked BROKEN or IGNORE. For the reason and a way to find a solution you probably need to look inside the Makefile for that port (within the ports tree). There are several reasons for a port to be marked as broken, sometimes it is broken for a specific ARCH, sometimes it is because it is incompatible with another installed port or that two options are incompatible with each other. This would be more likely if you are configuring options for your ports rather than just the defaults. A port may also be marked as ignore if an option is turned on but the supporting port is not installed. While normally that is handled by the ports dependencies I have found at least one port that breaks with that inside tinderbox. It appears that the Makefile is parsed before the dependencies are in place. Also if you set options and create a dependancy loop the make.0 in the builds dir will quickly grow to several gigabytes in size. Killing the make process will then start stage 1 repeating the same thing. The quick growing log size is the only way I found to spot this - well you probably notice the constant disk access slowing things down if you are using the machine at the time. If you use zfs setting a quota on the filesystem for tinderbox can be very helpful.

Inside /usr/local/tinderbox/logs/$BUILDNAME you will find log files of every build that has finished. If there was any errors you will also get a link inside /usr/local/tinderbox/errors/$BUILDNAME

find /usr/local/tinderbox/errors -name "*.log" will list all error logs.

With the default config of tinderbox the webui is turned on. If you turned it off because you don't want apache installed then choose one of the smaller web servers as the webui is helpful. The webui is accessed from http://localhost/tb - if setup on your current machine. If you setup and use tinderd then you can also get access to that through the webui. That includes adding ports to the queue.

The homepage gives a nice table listing each build name with a range of counts for number of ports, failed ports etc and a link to the packages directory. If your building to create your own packages site then you can use this link. While most descriptions for the counts are pretty obvious, unknown status is a count of ports you have added to the datastore but there is no data available for it - the data is only added to the database after the first compile runs. The remake count is how many ports are currently queued to be compiled. Using the example above - when starting to compile devel/p5-Log-Dispatch there is a total of 25 dependancies that need to be installed for that port. When you start the compile on a clean build remake will start at 25 and count down as each dependant port is completed. Ports that need to be updated will also be included in this number. While remake is only a displayed number, the others are links to a list of details.

Most of the other pages are lists that vary only in the search criteria and are pretty straight forward. The latest builds page is good to keep open while building - while a port is compiling it will refresh every minute so you can watch the progress - more helpful when you have a lot of dependancies. A green filled box for reason is no errors, red means failed build and orange means a dependancy failed. The link to show the log file with markup is also helpful - it is pretty good at locating errors in the log files and gives you a list of links at the top to each error line as well as highlighting them in red.


411 comments

Dry Skin Facts's picture

Your way of describing everything in this paragraph is actually fastidious,
every one be capable of simply know it, Thanks a lot.

time willing's picture

I'm not certain where you are getting your information, but great topic.
I needs to spend some time learning much more or understanding more.
Thank you for excellent info I used to be searching for this info for
my mission.

webdesign.harveysolutions.co.za's picture

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

reaksi dari obat penggugur kandungan's picture

Have you ever considered publishing an ebook or
guest authoring on other blogs? I have a blog based upon on the same subjects you discuss and would really
like to have you share some stories/information. I know my readers would appreciate
your work. If you are even remotely interested, feel free to send me an e-mail.

nâng mũi bọc sụn's picture

This is a good posting.Plenty of helpful information here.Plenty of helpful information here. I was wondering if I could use this write-up on my website, I will link it back to your website though.

Charlotte Professional Painting and Drywall's picture

It is true that this is the best approach to programming. Just wish it could be more precise in the language code from which it is written.

Gibz jones's picture

Tinderbox is well and good manageable software which gives the unique and reliable features to manage the notes and daily plans. I used this software and I like this software which gives different and useful features so that notes become manageable and the graphics so amazing. Just visit this http://www.bestessay.org/ website and get each type of assignment topic.

RichardByer's picture

Well, every software builds for the good purpose so that people works look good and in less time. In the same way, tinderbox is really worked well with scribendi review and I very comfortable while working on this software. In this article, you are sharing the good source of information that I need.

Alfredo K. Charles's picture

Tinder box is the excellent software because it gives the good tools that make yours work easily. The language of this http://www.topbritishessays.com/uk-superiorpapers-com-review website and software is simple and easy to utilize according to the situation. The good thing about this software is that it works smoothly.

Richard Kester's picture

The latest vision of the tinder box is so useful and the chance of the error is now very low. The security features of the tinderbox are very useful and I prefer this software because it is different from the other software. I often look for essayontime discount to complete my papers.

Pages

Add new comment