[Libreoffice] Build logs from the tinderbox

Christian Lohmaier lohmaier+libreoffice at googlemail.com
Wed Feb 16 15:25:31 PST 2011


Hi Kendy, *,

sorry for not replying earlier

On Thu, Feb 10, 2011 at 4:35 PM, Jan Holesovsky <kendy at suse.cz> wrote:
> On 2011-02-10 at 15:34 +0100, Christian Lohmaier wrote:
>>>
>> http://tinderbox.go-oo.org/MASTER/status.html
>>
>> use "master" as treename, apart from that, see
>> http://wiki.services.openoffice.org/wiki/Tinderbox_Setup#The_very_basics
>
> Yes, sorry, I completely forgot about this one :-(
>
> As you already have experience with what the tinder mails should
> contain, do you think you could enhance bin/tinbuild in the bootstrap
> repo to actually send the mails to the tinderbox too, when an additional
> option is provided?

depends on what you can add to send mail.. And of course for tinderbox
log information to be useful, the build-environment itself (and the
set of configure options) should not change between each build.

>  That way it would be completely trivial to setup a
> tinderbox anywhere with few steps:

So use whatever that allows you to add a custom header (the X-Tinder
one) and you're set. I use
http://www.caspian.dotconf.net/menu/Software/SendEmail/ - that one is
a perl-only (no
external deps) tool that supports tls and is easy to use.

(I'm using a perl-based queue-control/build setup)

my mail-sending routine for reference:

sub send_mail {
 my $logfile ="";
 my $message = shift;
 my $tinder_status = shift;
 $logfile = shift;
 my $tinder_timenow = qx(date +%s);
 chomp $tinder_timenow;

 my $body;     # bodytext of the message
 $body =
"tinderbox: administrator: $tinder_admin
tinderbox: starttime:     $tinder_start
tinderbox: buildname:     $buildname
tinderbox: errorparser:   unix
tinderbox: status:        $tinder_status
tinderbox: timenow:       $tinder_timenow
tinderbox: tree:          $tinder_tag
tinderbox: END
$message";

my $sender = '/home/cloph/tinderbox/sendEmail-v1.55/sendEmail -f
"'.$tinder_admin.'" -s '.$smtp.' -xu '.$smtp_user.' -xp '.$smtp_pass.'
-t '.$to.' -bcc "'.$bcc.'" -u "'.$subject.' - '.$tinder_tag.'"';

 unless (defined $logfile ) {
   # send mail without attachment
   $cmd =$sender.' -o message-header="'.$cookie.'" -m "'.$body.'"';
 } else {
   my $tmplog = $logfile.'_tmp';
   my $ziplog = $tmplog.'.gz';
   `echo "$body" > $tmplog`;
   `cat $logfile >> $tmplog`;
   system("gzip -9 -f $tmplog");
   $cmd =$sender.' -o message-header="'.$gzcookie.'" -m "'.$body.'"
-a "'.$ziplog.'"';
 }
 $MailQueue->enqueue($cmd);
}

I send 3 mails: when the build starts, after configure is done, and
after the build is finished. first one is witout attachment (X-Tinder:
cookie), second and third use attachment (X-Tinder: gzookie)

For mails with attachment, the mail processing expects the attachment
to be the second part of a multipart/mime message, thus even when
sending it with attachment, it has a body-message (that is ignored
when parsing the log)

> git clone git://anongit.freedesktop.org/libreoffice/bootstrap tinderbox
> cd tinderbox
> ./autogen.sh [params]
> make
> # when make succeeds
> bin/tinbuild [params]
>
> ;-)

Oh, when make succeeds then it is too late, isn't it, I mean tinderbox
is interested in both success as well as failure.

I see you're successfull at getting the starting mails to tinderbox.

A few mails claimed to contain an attachment (i.e. were using the
gzookie header, and were multipart messages), but the actual
attachment was missing (can inspect the rejected mails in
gimli:Mail/filter_failed).

The recent message contain the attachment, and have the correct
header, but it contains useless annotation variable "builddate:
deprecated" - you're not supposed to use it, the deprecated means it
is deprecated, not that it should be used with the value "deprecated"
:-)
starttime and timenow are the ones to use.

The real problem (why the mail is not parsed) is that the annotation
block is expected to be contained within the gzipped log, not in the
first part of the message. The first part is ignored completely.

So include the annotations within the gzipped log, and everything is fine.

ciao
Christian


More information about the LibreOffice mailing list