From d7d3e7edaecfc1d7c4b9c2b866f54f1f11ead33a Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 22 Mar 2009 16:06:44 +0200 Subject: [PATCH] kvm: scripts: add userspace-only package and kernel-only package Signed-off-by: Avi Kivity --- scripts/make-release | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/make-release b/scripts/make-release index 7384df08..6ddb9e19 100755 --- a/scripts/make-release +++ b/scripts/make-release @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e # usage: make-release commit (e.g. kvm-44) # make-release snapshot @@ -32,7 +32,10 @@ fi [[ -z "$ucommit" ]] && ucommit="$name" tarball="$name.tar.gz" - +uname="$(echo "$name" | sed s/kvm/qemu-kvm-devel/)" +kname="$(echo "$name" | sed s/kvm/kvm-kmod-devel/)" +utarball="$uname.tar.gz" +ktarball="$kname.tar.gz" cd "${release_dir}" (cd "$udir"; git archive --format=tar --prefix="$name"/ "$ucommit") | tar x @@ -66,8 +69,22 @@ make -C kernel sync LINUX=../linux version="$name" rm -rf kernel/config.mak linux kernel/config.kbuild sed -i "s/kvm-devel/$name/" qemu/configure +just_userspace() { + find "$name" | awk ' + { x=0 } + /^[^\/]*\/kernel\// { x=1 } + /^[^\/]*\/kernel\/include/ { x=0 } + /^[^\/]*\/kernel\/include-compat/ { x=1 } + x { print } ' +} + cd .. + tar czf "$tarball" "$name" +tar czf "$utarball" --exclude-from=<(just_userspace) \ + --transform="s,$name/,$uname/," "$name" +tar czf "$ktarball" \ + --transform="s,$name/kernel/,$kname/," "$name/kernel" if [[ "$name" = kvm-snapshot-* ]]; then mv "$tarball" "${snapshot_dir}" -- 2.11.4.GIT