This script runs a series of tool-specific builds/configuration, each of which should result in a self-contained installation directory at $iso_root/projects/<project>, with a script or executable called "install.linux". The script/executable must be runnable on standard distros, so a basic shell script to kick off the install logic for the guest is preferred.
When run in the guest, the install harness will iterate through these projects, cd'ing into $iso_root/projects/<project> and executing the "install.linux" script. Windows support will be added later in a similar manner. Signed-off-by: Michael Roth <[email protected]> --- scripts/build-guest-iso.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) create mode 100755 scripts/build-guest-iso.sh diff --git a/scripts/build-guest-iso.sh b/scripts/build-guest-iso.sh new file mode 100755 index 0000000..c8fbee8 --- /dev/null +++ b/scripts/build-guest-iso.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +tmp=${tmp:-"/tmp"} +qemu_dir=${qemu_dir:-$PWD} +concurrency=${concurrency:-4} +output_dir=${output_dir:-$PWD} + +if [ -e $qemu_dir/VERSION ]; then + version=`cat $qemu_dir/VERSION` +else + echo qemu source directory not found + exit 1 +fi + +package=qemu-guest-tools-${version}${version_extra} +iso_root=$tmp/$package +build_dir=$tmp/qemu_iso_build +projects_dir=$iso_root/projects +mkdir -p $projects_dir +mkdir -p $build_dir +rm -rf $iso_root/* $build_dir/* + +cp -r $qemu_dir/guest-tools-iso/* $iso_root +cd $build_dir + +# BUILD PROJECTS + +# qemu-ga + +# --enable-io-thread is just a workaround on RHEL5 for lack of signalfd() +# support (which configure complains about). we don't use either +$qemu_dir/configure --enable-guest-agent --extra-cflags="-m32" --enable-io-thread +make -j$concurrency qemu-ga +cp qemu-ga $projects_dir/qemu-ga/qemu-ga.linux.x86 +make distclean + +$qemu_dir/configure --enable-guest-agent +make -j$concurrency qemu-ga +cp qemu-ga $projects_dir/qemu-ga/qemu-ga.linux.x86_64 +make distclean + +# GENERATE GUEST TOOLS ISO/TARBALL + +cd $tmp +tar zpvcf $output_dir/$package.tar.gz $package +mkisofs -o $output_dir/$package.iso $package -- 1.7.0.4
