diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-01-17 17:00:05 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-01-17 17:00:05 +0100 |
commit | 0c006341f3789477c429cdfb547ad5ec59819bbf (patch) | |
tree | b11eda6dc752549be59cc5406887ae4b404e4aa8 /testing/scripts/build-guestkernel | |
parent | 1449e6dd55892c92e502a14dbfc3ede094aaa806 (diff) | |
parent | 737912239f625dcfa1c26924430d8ceb033184dd (diff) | |
download | strongswan-0c006341f3789477c429cdfb547ad5ec59819bbf.tar.bz2 strongswan-0c006341f3789477c429cdfb547ad5ec59819bbf.tar.xz |
Merge branch 'debian-testing'
These changes update the integration test system. It previously was based
on a pretty much unmaintainable Gentoo root image and the dated UML
virtualization technology. Among many other changes the test environment
is now based on KVM and uses reproducible Debian-based guest images.
Conflicts:
NEWS
Diffstat (limited to 'testing/scripts/build-guestkernel')
-rwxr-xr-x | testing/scripts/build-guestkernel | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/scripts/build-guestkernel b/testing/scripts/build-guestkernel new file mode 100755 index 000000000..66a9fe7a4 --- /dev/null +++ b/testing/scripts/build-guestkernel @@ -0,0 +1,49 @@ +#!/bin/bash + +DIR=$(dirname `readlink -f $0`) +. $DIR/../testing.conf +. $DIR/function.sh + +echo "Building guest kernel version $KERNELVERSION" + +[ -f "$KERNELCONFIG" ] || die "Kernel config $KERNELCONFIG not found" + +check_commands bunzip2 bzcat make wget + +cd $BUILDDIR + +if [ ! -f "$KERNELTARBALL" ] +then + url=ftp://ftp.kernel.org/pub/linux/kernel/v3.x/$KERNELTARBALL + log_action "Downloading $url" + execute "wget -q $url" +fi + +if [[ $KERNELPATCH && ! -f "$KERNELPATCH" ]] +then + url=http://download.strongswan.org/uml/$KERNELPATCH + log_action "Downloading $url" + execute "wget -q $url" +fi + +log_action "Unpacking kernel" +execute "tar xjf $KERNELTARBALL" + +KERNELDIR=$BUILDDIR/$KERNEL +cd $KERNELDIR + +if [ $KERNELPATCH ] +then + log_action "Applying kernel patch" + bzcat ../$KERNELPATCH | patch -p1 >>$LOGFILE 2>&1 + log_status $? + [ $? -eq 0 ] || exit 1 +fi + +execute "cp $KERNELCONFIG .config" 0 + +echo "Creating kernel configuration, you might get prompted for new parameters" +make oldconfig 2>&1 | tee -a $LOGFILE + +log_action "Compiling the kernel" +execute "make -j5" |