Index of /
      Name                    Last modified       Size  Description

[DIR] Parent Directory 26-Feb-2008 16:35 - [DIR] gnulib/ 06-Jul-2008 06:46 - [DIR] gnutls/ 06-Jul-2008 06:46 - [DIR] gsasl/ 06-Jul-2008 06:46 - [DIR] inetutils/ 06-Jul-2008 06:46 - [DIR] libidn/ 06-Jul-2008 06:46 - [DIR] libntlm/ 06-Jul-2008 06:46 - [DIR] libssh2/ 06-Jul-2008 06:46 - [TXT] robots.txt 26-Sep-2007 16:54 1k [DIR] shishi/ 06-Jul-2008 06:46 -

Free autobuild service

This server contains build logs for projects that send their build logs via e-mail to [PROJECTNAME]@autobuild.josefsson.org.

What are the requirements?

The system works best with projects that use Autoconf, and in particular those that run the AB_INIT macro in autobuild.m4 from autobuild. The macro makes your configure script output strings such as:

configure: autobuild project... libtasn1
configure: autobuild revision... 0.3.8
configure: autobuild hostname... dopio
configure: autobuild timestamp... 20061202-123851

This helps the autobuild tool to categorize the build log.

If you don't use autobuild.m4 and AB_INIT, you must make sure the e-mail sent to the server contains the magic cookie 'autobuild project...FOO' where FOO is ideally your project name.

Be concrete! What do I have to do?

Assuming your project is called FOO, write a script that invokes the following commands:

cd /path/to/your/source/tree/FOO/
echo 'autobuild project... FOO' && \
./configure && \
make check | mail FOO@autobuild.josefsson.org

Then check back at this page, and a directory for your project FOO should show up within 10 minutes.

That's it! Really.

It says my build resulted in "Failure" but it didn't fail

To determine the result, these scripts use a very simple metric: that the automake self-tests succeeded. If you don't have any automake self-tests, or they weren't run in the log, the result of the build will be 'Failure'. In in the future, it might be possible to have the log files themselves print tokens to indicate to autobuild what regexps should indicate success, failure, or some other status. Meanwhile, it is simplest to add a simple automake self-test and run 'make check' when building the log. You really should be using self-tests for your code.

Tell me something more

One large part of this effort is that you can have many users donate build cycles to your project, by running a similar script and e-mailing their results to this server. No co-ordination is needed between build cycle donors, project teams, or me. Just submit build logs here, and they will end up in the summary page.

This solution grow out of a willingness to support weird operating systems, e.g. HP-UX or whatever, but a lack of time to test each project manually on those systems. Now people who care about a particular system can provide the work require -- not much really -- and the project teams can easily notice when there is something wrong with the project on a particular system.

Aren't you worried about spam?

Not much. First, each build log which is submitted must contain the keyword 'autobuild project... FOO'. Other e-mails are silently dropped automatically. Secondary, I intend to discard logs older than 1 month or similar. We'll see how the system works out. If there are problems, I might end up having a system where each project registers and uses a password or similar in each e-mail.

Ok, show me more scripts

Here is what I personally use for several projects. It uses its own (anonymous) CVS checkout tree, updates the CVS tree using 'cvs udpate', builds the project, run the self tests, and then create a distribution using 'make check', and check in that build into a CVS repository. The script takes two parameters, first the project name, and the second optional parameter where to mail the output of all commands.

I typically invoke the script in cron such as:

0 0 * * * /home/jas/tools/daily gnutls gnutls@autobuild.josefsson.org
1 0 * * * /home/jas/tools/daily libtasn1 gnutls@autobuild.josefsson.org
The generic script is:
#!/bin/sh
CVS_RSH=ssh; export CVS_RSH
PATH=/usr/local/bin:$PATH
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig; export PKG_CONFIG_PATH

PROJ="$1"
BUILDREPORT="$2"
BASE=/home/jas/.daily
OUT=/home/jas/josefsson.org/daily/$PROJ
DATE=`date +%Y%m%d`

if test -z "$PROJ"; then
   echo "Usage: $0 PROJECT [BUILDREPORTEMAIL]"
   exit 1
fi

(
    set -e
    cd $BASE/$PROJ
    cvsco
    cvs update -dP
    if test -f GNUmakefile; then
	make
    else
	if test -f autogen.sh; then
	    ./autogen.sh
	else
	    ./buildconf
	fi
	./configure --enable-developer-mode --enable-gtk-doc
    fi
    make all check dist
    cp $PROJ*.tar.gz $OUT/$PROJ-$DATE.tar.gz
    cd $OUT
    cvs add -kb $PROJ-$DATE.tar.gz || true
    cvs commit -m Add. $PROJ-$DATE.tar.gz) 2>&1 \
	| (
    if test -n "$BUILDREPORT"; then
	mail ${BUILDREPORT}
    else
	cat > $BASE/.daily.$PROJ.log
    fi)
Gnulib needs a special script:
#!/bin/sh

GNULIB="$1"
if ! test -d "$GNULIB"; then
    echo "Usage: $0 <GNULIBDIR>"
    exit 1
fi
GNULIBTOOL=$GNULIB/gnulib-tool

DATEFORMAT="%Y%m%d-%H%M%S"

# Update gnulib cvs.
cd $GNULIB
CVSDATE=`date "+$DATEFORMAT"`
cvs update -dP

# Get module list.
MODULES=`$GNULIBTOOL --list`

# Iterate over modules.
for module in $MODULES; do
    echo Working on module $module...
    (set -x
	: autobuild project... $module
	: autobuild revision... cvs-$CVSDATE
	: autobuild timestamp... `date "+$DATEFORMAT"`
	: autobuild hostname... `hostname`
	safemodule=`echo $module | sed -e 's|/|-|g'`
	BUILDDIR=$GNULIB/../build/$safemodule
	chmod -R +w $BUILDDIR
	rm -rf $BUILDDIR
	$GNULIBTOOL --dir $BUILDDIR --with-tests --create-testdir $module
	cd $BUILDDIR
	./configure && make distcheck
	rc=$?
	cd $GNULIB
	echo rc=$?) 2>&1 | mail gnulib@autobuild.josefsson.org
done