[Libguestfs] "make distcheck" failure
Richard W.M. Jones
rjones at redhat.com
Tue Aug 28 19:56:53 UTC 2012
On Tue, Aug 28, 2012 at 12:52:36PM -0700, Alex Nelson wrote:
> I'm curious, do your buildservers use gitbuilder, or something else
> to determine the commits to build? I like the look of whenjobs;
> what's the appropriate mailing list for that utility?
There's no mailing list at the moment.
Attached is the current whenjobs script for libguestfs git/rawhide.
There's actually a lot more to the build system since it builds other
branches of libguestfs and other programs entirely, but this is a good
start.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
-------------- next part --------------
let from = "rjones at redhat.com"
let to_addr = from
let mailto = Whentools.mailto ~from ~only_on_failure:true to_addr
let mailto_always = Whentools.mailto ~from to_addr
(* Every few minutes, check git for new commits and a new tag. *)
job "libguestfs: poll" pre (Whentools.one ())
every 30 minutes :
<<
cd $HOME/d/builder/libguestfs
git pull
commit=`git rev-parse HEAD`
tag=`git describe --tags --abbrev=0`
whenjobs --set "libguestfs_commit=$commit" "libguestfs_version=$tag"
>>
(* When there is a new commit. *)
job "libguestfs: make" pre (Whentools.one ()) post (mailto)
when changes libguestfs_commit (* && ! (changes libguestfs_version) *) :
<<
# Kill old yum user cache.
rm -rf /var/tmp/yum-$(id -un)-*
# Build it in the tmpdir.
cp -a $HOME/d/builder/libguestfs build-test
cd build-test
git reset --hard $libguestfs_commit
./localconfigure
make distclean
./localconfigure
make
make check
>>
(* When there is a new version, make a tarball. *)
job "libguestfs: dist" pre (Whentools.one ()) post (mailto)
when changes libguestfs_version :
<<
v=$libguestfs_version
# Give up if the tarball already exists.
dest="$HOME/d/builder/libguestfs-$v.tar.gz"
if [ -f "$dest" ]; then
echo "tarball already exists at $dest"
exit 0
fi
# Build it in the tmpdir.
cp -a $HOME/d/builder/libguestfs dist-test
cd dist-test
git reset --hard $v
./localconfigure --disable-appliance --disable-daemon
make distclean
./localconfigure --disable-appliance --disable-daemon
make
make dist
cp libguestfs-$v.tar.gz $dest
whenjobs --set "libguestfs_dist=$v"
>>
(* When there is a new tarball. *)
job "libguestfs: test: local" pre (Whentools.one ()) post (mailto)
when changes libguestfs_dist :
<<
v=$libguestfs_dist
zcat $HOME/d/builder/libguestfs-$v.tar.gz | tar xf -
cd libguestfs-$v
cp ~/d/builder/libguestfs/localconfigure .
cp ~/d/builder/libguestfs/local.repo .
./localconfigure
make
make check
whenjobs --set "libguestfs_build_local=$v"
>>
job "libguestfs: test: builder-debian6" pre (Whentools.one ()) post (mailto)
when changes libguestfs_dist :
<<
v=$libguestfs_dist
scp $HOME/d/builder/libguestfs-$v.tar.gz builder-debian6:/tmp
ssh builder-debian6 "
set -e
export LIBGUESTFS_PATH=$HOME/tmp/appliance
cd /tmp
zcat libguestfs-$v.tar.gz | tar xf -
cd libguestfs-$v
# Compile the daemon, but that's only to check it compiles.
# It's not used because we're using the fixed appliance.
./configure --disable-appliance
make
make check
"
whenjobs --set "libguestfs_build_debian6=$v"
>>
(* When make check has passed on all systems. *)
job "libguestfs: release" pre (Whentools.one ()) post (mailto_always)
when changes libguestfs_build_local
(* && libguestfs_build_local == libguestfs_build_debian6 *) :
<<
v=$libguestfs_build_local
tarball=libguestfs-$v.tar.gz
# XXX
subdir=1.19-development
# Give up if the tarball already exists on the website.
dest="$HOME/d/redhat/websites/libguestfs/download/$subdir/$tarball"
if [ -f "$dest" ]; then
echo "tarball already exists at $dest"
exit 0
fi
# Update the website.
cp $HOME/d/builder/$tarball .
zcat $tarball | tar xf -
(
cd libguestfs-$v
cp $HOME/d/builder/libguestfs/localconfigure .
cp $HOME/d/builder/libguestfs/local.repo .
./localconfigure
make
make website
)
# Copy tarball to website.
cp $tarball "$dest"
# Commit and push to public website.
cd $HOME/d/redhat/websites/libguestfs/
cvs add -kb download/$subdir/$tarball
cvs ci -m "$tarball"
# (This fails because the rsync command can't set times)
. .rsync ||:
whenjobs --set "libguestfs_release=$v"
>>
(* When the new upstream release has been done. *)
job "libguestfs: rawhide" pre (Whentools.one ()) post (mailto)
when changes libguestfs_release :
<<
v=$libguestfs_release
tarball=libguestfs-$v.tar.gz
cp $HOME/d/builder/$tarball $HOME/d/fedora/libguestfs/master/
cd $HOME/d/fedora/libguestfs/master
fedpkg new-sources $tarball
# Hairy specfile editing ...
email="Richard W.M. Jones <rjones at redhat.com>"
date=`date +"%a %b %d %Y"`
cp libguestfs.spec libguestfs.spec.old
sed < libguestfs.spec.old \
-e "s/^Version:.*/Version: $v/" \
-e "s/^Release:.*/Release: 1%{?dist}/" \
-e "/^%changelog/a \
* $date $email - 1:$v-1\\n\
- New upstream version $v.\\n\
" > libguestfs.spec
rm libguestfs.spec.old
fedpkg commit -m "New upstream version $v."
# Build.
fedpkg push
fedpkg build --nowait
>>
More information about the Libguestfs
mailing list