From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvanR-0008Si-6k for qemu-devel@nongnu.org; Mon, 22 Aug 2011 16:08:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvanP-0007QT-Ty for qemu-devel@nongnu.org; Mon, 22 Aug 2011 16:08:33 -0400 Received: from mout.perfora.net ([74.208.4.195]:62833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvanP-0007QM-Gq for qemu-devel@nongnu.org; Mon, 22 Aug 2011 16:08:31 -0400 From: Michael Roth Date: Mon, 22 Aug 2011 12:09:16 -0500 Message-Id: <1314032960-23474-2-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1314032960-23474-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1314032960-23474-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/5] guest tools: add iso/tarball generator for guest tools List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com 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/, 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/ and executing the "install.linux" script. Windows support will be added later in a similar manner. Signed-off-by: Michael Roth --- 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