r3087 - in trunk/scripts: . test_kernel_build test_kernel_build/etc test_kernel_build/lib

Simon Horman horms@costa.debian.org
Fri, 13 May 2005 07:21:07 +0000


Author: horms
Date: 2005-05-13 07:21:06 +0000 (Fri, 13 May 2005)
New Revision: 3087

Added:
   trunk/scripts/test_kernel_build/
   trunk/scripts/test_kernel_build/.0
   trunk/scripts/test_kernel_build/etc/
   trunk/scripts/test_kernel_build/etc/test_kernel_build.conf
   trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.i386
   trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.powerpc
   trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.source
   trunk/scripts/test_kernel_build/lib/
   trunk/scripts/test_kernel_build/lib/libtkb.bin.generic
   trunk/scripts/test_kernel_build/lib/libtkb.framework
   trunk/scripts/test_kernel_build/lib/libtkb.generic
   trunk/scripts/test_kernel_build/lib/libtkb.i386
   trunk/scripts/test_kernel_build/lib/libtkb.powerpc
   trunk/scripts/test_kernel_build/lib/libtkb.source
   trunk/scripts/test_kernel_build/test_kernel_build.i386
   trunk/scripts/test_kernel_build/test_kernel_build.old
   trunk/scripts/test_kernel_build/test_kernel_build.powerpc
   trunk/scripts/test_kernel_build/test_kernel_build.source
   trunk/scripts/test_kernel_build/test_kernel_build_all
Log:
update my build scripts

Added: trunk/scripts/test_kernel_build/.0
===================================================================
--- trunk/scripts/test_kernel_build/.0	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/.0	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,5 @@
+パッケージリストを読みこんでいます...
+依存関係ツリーを作成しています...
+39.1MB のソースアーカイブを取得する必要があります。
+取得:1 http://debian.local.valinux.co.jp unstable/main kernel-source-2.4.27 2.4.27-9 (dsc) [886B]
+取得:2 http://debian.local.valinux.co.jp unstable/main kernel-source-2.4.27 2.4.27-9 (tar) [38.5MB]

Added: trunk/scripts/test_kernel_build/etc/test_kernel_build.conf
===================================================================
--- trunk/scripts/test_kernel_build/etc/test_kernel_build.conf	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/etc/test_kernel_build.conf	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,43 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$TKB_CONF" != "YES" ]; then
+TKB_CONF="YES"
+
+set -e
+umask 022
+
+#Time this
+START=$(date --rfc)
+
+## Make options
+unset MAKE
+unset CONCURRENCY_LEVEL
+export CCACHE_HARDLINK
+
+## Locale options
+export LC_ALL=C
+unset LANG
+unset LANGUAGE
+
+## Tag non-release versions
+TAG_RELEASE="hls"
+TAG_DATE="$(date +%Y%m%d)"
+
+## Mail reports
+TO="simon@valinux.co.jp"
+SUBJECT="Kernel Build"
+
+## Various directories
+#SVN_BASE="${HOME}/work/debian-kernel/svn/kernel/trunk"
+SVN_BASE="${HOME}/work/debian-kernel/svn/kernel/sarge-security"
+BUILD_BASE="${HOME}/tmp/debian-kernel-test"
+UPLOAD_BASE="${HOME}/public_html/debian/testing"
+UPLOAD_URL_BASE="http://debian.vergenet.net/testing"
+S_DOWNDLOAD_URL="http://tabatha.lab.ultramonkey.org/~horms/debian/testing/kernel-source-$VERSION/"
+
+STAMP="${VERSION}"
+
+fi # TKB_CONF

Added: trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.i386
===================================================================
--- trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.i386	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.i386	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,34 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$TKB_CONF_I386" != "YES" ]; then
+TKB_CONF_I386="YES"
+
+. "$TKB_ETC_DIR/test_kernel_build.conf"
+
+BUILD_TYPE="i386"
+KERNEL_ARCH="i386"
+KERNEL_PKG_NAME="kernel-image"
+
+B_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/$KERNEL_ARCH"
+B_DST_BASE="$BUILD_BASE"
+
+B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH-$VERSION"
+B_DST_DIR="$B_DST_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
+B_PKG_DIR="$B_DST_DIR/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH-$VERSION"
+B_UPLOAD_DIR="$UPLOAD_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
+B_UPLOAD_URL="$UPLOAD_URL_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
+B_TMP_DIR="$B_DST_DIR/tmp"
+B_OLD_DIR="$B_DST_DIR/old"
+B_LOG_DIR="$B_DST_DIR/log"
+B_LOG="$B_LOG_DIR/$KERNEL_PKG_NAME-$STAMP.log"
+
+## Override Make options
+#export DISTCC_HOSTS='172.16.2.44 172.17.91.14 172.17.60.194 172.17.90.1
+#172.17.91.3 172.17.91.4'
+#export MAKE="make CC=\"ccache distcc gcc\""
+#export CONCURRENCY_LEVEL=16
+
+fi # TKB_CONF_I386

Added: trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.powerpc
===================================================================
--- trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.powerpc	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.powerpc	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,32 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$TKB_CONF_PPC" != "YES" ]; then
+TKB_CONF_PPC="YES"
+
+. "$TKB_ETC_DIR/test_kernel_build.conf"
+
+BUILD_TYPE="powerpc"
+KERNEL_ARCH="powerpc"
+KERNEL_PKG_NAME="kernel-patch"
+
+B_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/$KERNEL_ARCH"
+B_DST_BASE="$BUILD_BASE"
+
+if [ -d "$B_SRC_BASE/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION" ]; then
+        B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION"
+else
+	B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION-$VERSION"
+fi
+B_DST_DIR="$B_DST_BASE/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION"
+B_TMP_DIR="$B_DST_DIR/tmp"
+B_PKG_DIR="$B_DST_DIR/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION-$VERSION"
+B_UPLOAD_DIR="$UPLOAD_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
+B_UPLOAD_URL="$UPLOAD_URL_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
+B_OLD_DIR="$B_DST_DIR/old"
+B_LOG_DIR="$B_DST_DIR/log"
+B_LOG="$B_LOG_DIR/$KERNEL_PKG_NAME-$STAMP.log"
+
+fi # TKB_CONF_PPC

Added: trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.source
===================================================================
--- trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.source	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/etc/test_kernel_build.conf.source	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,25 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$TKB_CONF_SOURCE" != "YES" ]; then
+TKB_CONF_SOURCE="YES"
+
+. "$TKB_ETC_DIR/test_kernel_build.conf"
+
+BUILD_TYPE="source"
+
+S_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/source"
+S_DST_BASE="$BUILD_BASE"
+
+S_SRC_DIR="$S_SRC_BASE/kernel-source-$VERSION-$VERSION"
+S_DST_DIR="$S_DST_BASE/kernel-source-$VERSION"
+S_PKG_DIR="$S_DST_DIR/kernel-source-$VERSION-$VERSION"
+S_UPLOAD_DIR="$UPLOAD_BASE/kernel-source-$VERSION"
+S_UPLOAD_URL="$UPLOAD_URL_BASE/kernel-source-$VERSION"
+S_TMP_DIR="$S_DST_DIR/tmp"
+S_LOG_DIR="$S_DST_DIR/log"
+S_LOG="$S_LOG_DIR/kernel-source-$STAMP.log"
+
+fi # TKB_CONF_SOURCE

Added: trunk/scripts/test_kernel_build/lib/libtkb.bin.generic
===================================================================
--- trunk/scripts/test_kernel_build/lib/libtkb.bin.generic	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/lib/libtkb.bin.generic	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,52 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$LIBTKB_BIN_GENERIC" != "YES" ]; then
+LIBTKB_BIN_GENERIC="YES"
+
+. "$TKB_LIB_DIR/libtkb.generic"
+
+declare TAG_VERSION S_DEB_VERSION S_TAG_VERSION
+post_conf_setup_bin_generic ()
+{
+	post_conf_setup_generic
+
+	# Using apt-get here does not work because it only
+	# prints out URLs of files that need to be downloaded,
+	# so if they are in the apt cache somewhere they
+	# won't show up
+	#N.B: this may not be in debian package order
+	S_TAG_VERSION="$(wget -O - -qnv $S_DOWNDLOAD_URL | sed -ne 's/.*kernel-tree-'${VERSION}'_\([^_]*\).*/\1/ p' | sort -n | tail -1)"
+
+	B_DEB_VERSION=$(deb_version "$B_SRC_DIR")
+	if [ -z "$TAG_VERSION" ]; then
+		if [ -s "$TAG_RELEASE" ]; then
+			TAG_VERSION="${TAG_DATE}00"
+		else
+			TAG_VERSION="${TAG_RELEASE}.${TAG_DATE}00"
+		fi
+		B_TAG_VERSION=$(tag_version "$B_SRC_DIR")
+	elif [ "$TAG_VERSION" = "SOURCE" ]; then
+		B_TAG_VERSION="$S_TAG_VERSION"
+	else
+		B_TAG_VERSION=$(tag_version "$B_SRC_DIR")
+	fi
+
+	log "Building as $(whoami)@$(hostname) (this will be included in dmsg)";
+	if [ -n "$RELEASE" ]; then
+		log "Building: release packages, kernel-tree will need to be installed"
+	else
+		log "Building: test packages, dependancies will be mangled"
+		log "          Define RELEASE=yes in the environment to build for a release"
+		log "Building: TAG_VERSION=\"$TAG_VERSION\", override in environment"
+		log "Building: set to SOURCE to use same version as kernel-source"
+	fi
+	log "Using: kernel-source $S_TAG_VERSION"
+	log "Building: $KERNEL_PKG_NAME-$KERNEL_ARCH $B_DEB_VERSION -> $B_TAG_VERSION"
+
+}
+
+
+fi # LIBTKB_BIN_GENERIC

Added: trunk/scripts/test_kernel_build/lib/libtkb.framework
===================================================================
--- trunk/scripts/test_kernel_build/lib/libtkb.framework	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/lib/libtkb.framework	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,210 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$LIBTKB_FRAMEWORK" != "YES" ]; then
+LIBTKB_FRAMEWORK="YES"
+
+usage () 
+{
+	echo "Usage: $0 VERSION [START_STAGE] [END_STAGE]" 1>&2
+	exit 1
+}
+
+deb_version ()
+{
+	( cd $1; dpkg-parsechangelog | awk '/^Version: / { print $2 }'; )
+}
+
+deb_distribution ()
+{
+	( cd $1; dpkg-parsechangelog | awk '/^Distribution: / { print $2 }'; )
+}
+
+tag_version ()
+{
+	local PRISTINE_RELEASE=$(deb_version $1)
+	if [ -n "$RELEASE" -o -z "$TAG_VERSION" ]; then
+		echo "$PRISTINE_RELEASE"
+		return
+	fi
+	local DISTRIBUTION=$(deb_distribution $1)
+	local UPSTREAM=${PRISTINE_RELEASE%%-*}
+	local PRISTINE_DEBVERSION=${PRISTINE_RELEASE#$UPSTREAM-}
+
+	if [ "$DISTRIBUTION" != "UNRELEASED" ] ||
+			echo $PRISTINE_DEBVERSION | grep "[^0-9]" > /dev/null
+	then
+		echo "$UPSTREAM-$PRISTINE_DEBVERSION.$TAG_VERSION"
+	else
+		echo "$UPSTREAM-$(($PRISTINE_DEBVERSION - 1)).$TAG_VERSION"
+	fi
+}
+
+declare KSC_TMP
+kernel_symbol_check_clean ()
+{
+	rm -rf "$KSC_TMP";
+}
+
+kernel_symbol_check ()
+{
+	KSC_TMP="$(mktemp -d)"
+	trap kernel_symbol_check_clean EXIT
+
+
+	PKG1="$1"
+	PKG2="$2"
+
+	echo "Checking $PKG1 vs $PKG2"
+
+	PKG1_FILE="${PKG1##*/}"
+	PKG1_BASE="${PKG1_FILE%%_*}"
+
+	PKG2_FILE="${PKG2##*/}"
+	PKG2_BASE="${PKG2_FILE%%_*}"
+
+	rm -rf "$KSC_TMP/1/" "$KSC_TMP/2/"
+	mkdir "$KSC_TMP/1/" "$KSC_TMP/2/"
+	dpkg -x "$PKG1" "$KSC_TMP/1/"
+	dpkg -x "$PKG2" "$KSC_TMP/2/"
+
+	if [ "$MAJOR_MINOR" = "2.4" ]; then
+		find "$KSC_TMP/1/usr/src/$PKG1_BASE/include" \
+			-name "*.ver" -type f | \
+			xargs cat | sort > "$KSC_TMP/1.sym"
+		find "$KSC_TMP/2/usr/src/$PKG2_BASE/include" \
+			-name "*.ver" -type f | \
+			xargs cat | sort > "$KSC_TMP/2.sym"
+	else
+		cat "$KSC_TMP/1/usr/src/$PKG1_BASE/Module.symvers" | \
+			 sort > "$KSC_TMP/1.sym"
+		cat "$KSC_TMP/1/usr/src/$PKG1_BASE/Module.symvers" | \
+			 sort > "$KSC_TMP/2.sym"
+	fi
+
+	diff -u "$KSC_TMP/1.sym" "$KSC_TMP/2.sym" > "$KSC_TMP/sym.udiff" || true
+	diff "$KSC_TMP/1.sym" "$KSC_TMP/2.sym" > "$KSC_TMP/sym.diff" || true
+	cat "$KSC_TMP/sym.udiff"
+	if grep "^-" "$KSC_TMP/sym.diff" > /dev/null; then
+		echo 'Error: Symbol Changes, as above. Incompatible ABI!!!'
+		STATUS=1
+	elif [ -s "$KSC_TMP/sym.udiff" ]; then
+		echo "Warning: Additions made to ABI"
+		STATUS=2
+	else
+		echo "No Changes"
+		STATUS=0
+	fi
+
+	kernel_symbol_check_clean
+	trap EXIT
+	return $STATUS
+}
+
+print_readme_html ()
+{
+	echo "Automated Builds for testing."
+	echo "Use at your own risk."
+	echo "apt-getable using:"
+	echo "<pre>"
+	echo "deb $1 ./"
+	echo "deb-src $1 ./"
+	echo "</pre>"
+}
+
+declare LOG LOG_BUF
+log ()
+{
+	echo $@
+	if [ -f "$LOG" ]; then
+		echo "$LOG_BUF"$@ >> "$LOG"
+		LOG_BUF=""
+	else
+		LOG_BUF="${LOG_BUF}$(echo $@)"
+	fi
+}
+
+openlog ()
+{
+	echo "$LOG_BUF" > "$LOG"
+	LOG_BUF=""
+}
+
+purgelog ()
+{
+	rm -f "$LOG"
+}
+
+pm_quit ()
+{
+	log ""
+	
+	echo "Status: $STAGE_STATUS"
+	echo "Version: $VERSION ($BUILD_TYPE)"
+	echo -n "Host: "
+	hostname -s
+	echo "Start: $START"
+	echo -n "Finish: "
+	date --rfc
+	times
+
+	if [ "$STAGE_STATUS" = failed ]; then
+		echo "Stage: $STAGE: $STAGE_NAME..."
+		[ -f "$LOG.$STAGE" ] && tail -100 "$LOG.$STAGE"
+	fi
+	
+	{
+	echo "Status: $STAGE_STATUS"
+	echo "Version: $VERSION ($BUILD_TYPE)"
+	echo -n "Host: "
+	hostname -s
+	echo "Start: $START"
+	echo -n "Finish: "
+	date --rfc
+	times
+
+	if [ "$STAGE_STATUS" = failed ]; then
+		echo "Stage: $STAGE: $STAGE_NAME..."
+		[ -f "$LOG.$STAGE" ] && cat "$LOG.$STAGE"
+	else
+		[ -f "$B_LOG" ] && tac "$B_LOG"
+		[ -f "$S_LOG" ] && tac "$S_LOG"
+	fi
+	} | mail -s "Build: ($STAGE_STATUS: $VERSION: $(hostname -s))" $TO
+
+}
+
+declare STAGE_STATUS="failed"
+stage_begin ()
+{
+	if [ $END_STAGE -eq $STAGE ]; then
+		log "exiting on request"
+		STAGE_STATUS="ok"
+		exit 0
+	fi
+
+	STAGE=$(( $STAGE + 1 ))
+	log -n "Stage $STAGE: $@... "
+
+	if [ $STAGE -lt $START_STAGE -a -f "$DST_DIR/$STAGE.marker" ]; then
+		log skipped
+		return 0
+	fi
+	return 1
+}
+
+stage_end ()
+{
+	STATUS="$1"
+	if [ $STATUS -ne 0 ]; then
+		log "failed"
+		cat "$LOG.$STAGE"
+		exit 1
+	fi
+	touch "$DST_DIR/$STAGE.marker"
+	log "ok!"
+}
+
+fi # LIBTKB_FRAMEWORK

Added: trunk/scripts/test_kernel_build/lib/libtkb.generic
===================================================================
--- trunk/scripts/test_kernel_build/lib/libtkb.generic	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/lib/libtkb.generic	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,57 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$LIBTKB_GENERIC" != "YES" ]; then
+LIBTKB_GENERIC="YES"
+
+declare VERSION START_STAGE END_STAGE STAGE MAJOR_MINOR SVN_SUBDIR
+pre_conf_setup_generic ()
+{
+	if ! which fakeroot >& /dev/null; then
+		echo "Error: fakeroot is not installed" 1>&2
+		exit 1
+	fi
+
+	if [ $# -lt 1 -o $# -gt 3 ]; then
+		usage
+	fi
+	VERSION="$1"
+	if [ $# -gt 1 ]; then
+		START_STAGE=$2
+	else
+		START_STAGE=0
+	fi
+	if [ $# -gt 2 ]; then
+		END_STAGE=$3
+	else
+		END_STAGE=1000
+	fi
+	STAGE=0
+
+	case $VERSION in
+		2.6.[0-9]*)
+			MAJOR_MINOR="2.6"
+			SVN_SUBDIR="kernel"
+		;;
+		2.4.[0-9]*)
+			MAJOR_MINOR="2.4"
+			SVN_SUBDIR="kernel-2.4"
+		;;
+		*)
+			echo "Unknown Version" 1>&2
+			usage
+		;;
+	esac
+}
+
+post_conf_setup_generic ()
+{
+	trap pm_quit EXIT
+	trap pm_quit SIGHUP
+	trap pm_quit SIGTERM
+	trap pm_quit SIGQUIT
+}
+
+fi # LIBTKB_GENERIC

Added: trunk/scripts/test_kernel_build/lib/libtkb.i386
===================================================================
--- trunk/scripts/test_kernel_build/lib/libtkb.i386	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/lib/libtkb.i386	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,12 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$LIBTKB_BIN_I386" != "YES" ]; then
+LIBTKB_BIN_I386="YES"
+
+. "$TKB_LIB_DIR/libtkb.generic"
+. "$TKB_LIB_DIR/libtkb.bin.generic"
+
+fi # LIBTKB_BIN_I386

Added: trunk/scripts/test_kernel_build/lib/libtkb.powerpc
===================================================================
--- trunk/scripts/test_kernel_build/lib/libtkb.powerpc	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/lib/libtkb.powerpc	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,12 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$LIBTKB_BIN_POWERPC" != "YES" ]; then
+LIBTKB_BIN_POWERPC="YES"
+
+. "$TKB_LIB_DIR/libtkb.generic"
+. "$TKB_LIB_DIR/libtkb.bin.generic"
+
+fi # LIBTKB_BIN_POWERPC

Added: trunk/scripts/test_kernel_build/lib/libtkb.source
===================================================================
--- trunk/scripts/test_kernel_build/lib/libtkb.source	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/lib/libtkb.source	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,38 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+if [ "$LIBTKB_SOURCE" != "YES" ]; then
+LIBTKB_SOURCE="YES"
+
+. "$TKB_LIB_DIR/libtkb.generic"
+
+declare TAG_VERSION S_DEB_VERSION S_TAG_VERSION
+post_conf_setup_source ()
+{
+	post_conf_setup_generic
+
+	if [ -z "$TAG_VERSION" ]; then
+		if [ -s "$TAG_RELEASE" ]; then
+			TAG_VERSION="${TAG_DATE}00"
+		else
+			TAG_VERSION="${TAG_RELEASE}.${TAG_DATE}00"
+		fi
+	fi
+
+	S_DEB_VERSION=$(deb_version "$S_SRC_DIR")
+	S_TAG_VERSION=$(tag_version "$S_SRC_DIR")
+
+	log "Building as $(whoami)@$(hostname) (this will be included in dmsg)";
+	if [ -n "$RELEASE" ]; then
+		log "Building: release packages, kernel-tree will need to be installed"
+	else
+		log "Building: test packages, dependancies will be mangled"
+		log "          Define RELEASE=yes in the environment to build for a release"
+		log "Building: TAG_VERSION=\"$TAG_VERSION\", override in environment"
+	fi
+	log "Building: kernel-source $S_DEB_VERSION -> $S_TAG_VERSION"
+}
+
+fi # LIBTKB_SOURCE

Added: trunk/scripts/test_kernel_build/test_kernel_build.i386
===================================================================
--- trunk/scripts/test_kernel_build/test_kernel_build.i386	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/test_kernel_build.i386	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,175 @@
+#!/bin/bash
+#######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+set -e                  
+                
+TKB_BASE_DIR="$HOME/work/debian-kernel/test_kernel_build"
+TKB_LIB_DIR="$TKB_BASE_DIR/lib"
+TKB_ETC_DIR="$TKB_BASE_DIR/etc"
+        
+. "$TKB_LIB_DIR/libtkb.framework"
+. "$TKB_LIB_DIR/libtkb.i386"
+                
+pre_conf_setup_generic $@
+
+. "$TKB_ETC_DIR/test_kernel_build.conf.i386"
+
+post_conf_setup_bin_generic
+
+LOG="$B_LOG"
+purgelog
+DST_DIR="$B_DST_DIR"
+STAGE_NAME="Creating $KERNEL_PKG_NAME directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		rm -rf "$B_DST_DIR" "$B_PKG_DIR" "$B_OLD_DIR" "$B_LOG_DIR" \
+			"$B_TMP_DIR"
+		mkdir -p "$B_DST_DIR" "$B_OLD_DIR" "$B_LOG_DIR" "$B_TMP_DIR"
+	}
+	stage_end $?
+}
+openlog
+log "Logs in $LOG.blah"
+
+STAGE_NAME="Extracting kernel-source package"
+stage_begin "$STAGE_NAME" || {
+	(
+	if [ -n "$RELEASE" ]; then
+		echo skip
+	else
+		set -x 
+		cd "$B_DST_DIR"
+		# Using apt-get here does not work because it only
+		# prints out URLs of files that need to be downloaded,
+		# so if they are in the apt cache somewhere they
+		# won't show up
+		wget -N -q "$S_DOWNDLOAD_URL/kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb"
+		dpkg-deb -x \
+		  "kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb" \
+		  "$B_TMP_DIR"
+		wget -N -q "$S_DOWNDLOAD_URL/kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb"
+		dpkg-deb -x \
+		  "kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb" \
+		  "$B_TMP_DIR"
+	fi
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Copying $KERNEL_PKG_NAME debian directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		( cd "$B_SRC_DIR/" && svn status; ) > "$LOG.$STAGE.svn" && \
+		rsync -av --exclude .svn "$B_SRC_DIR/" "$B_PKG_DIR/"  && \
+		chmod u+x "$B_PKG_DIR/debian/rules"
+	} >& "$LOG.$STAGE"
+	stage_end $?
+	if [ -s "$LOG.$STAGE.svn" ]; then
+		echo "=== SVN file stauts ==="
+		cat "$LOG.$STAGE.svn"
+	fi | tee -a "$LOG.$STAGE"
+}
+
+STAGE_NAME="Mangling $KERNEL_PKG_NAME debian/{rules,control,changelog}"
+stage_begin "$STAGE_NAME" || {
+	{
+	if [ -n "$RELEASE" ]; then
+		echo skip
+	else
+		TMP_CMD="override_version=$S_TAG_VERSION home=$B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/debian sh -x $B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/apply/debian $S_TAG_VERSION" && \
+		sed -e "s#/usr/src/kernel-source#$B_TMP_DIR&#" \
+			-e "s#/usr/src/.*/apply/debian.*#$TMP_CMD#" \
+			< "$B_PKG_DIR/debian/rules" \
+			> "$B_PKG_DIR/debian/rules.2" && \
+		mv "$B_PKG_DIR/debian/rules.2" "$B_PKG_DIR/debian/rules" && \
+		chmod u+x "$B_PKG_DIR/debian/rules" && \
+		sed -re "/^Build-Depends: / s/kernel-tree-$VERSION-[0-9]+(, )?//" \
+			< "$B_PKG_DIR/debian/control" \
+			> "$B_PKG_DIR/debian/control.2" && \
+		mv "$B_PKG_DIR/debian/control.2" \
+			"$B_PKG_DIR/debian/control" && \
+		sed -e "s/^\($KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH\) ($B_DEB_VERSION) /\1 ($B_TAG_VERSION) /" \
+			< "$B_PKG_DIR/debian/changelog" \
+			> "$B_PKG_DIR/debian/changelog.2" && \
+		mv "$B_PKG_DIR/debian/changelog.2" \
+			"$B_PKG_DIR/debian/changelog" || \
+		exit $?
+	fi
+	} >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Building $KERNEL_PKG_NAME packages"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd $B_PKG_DIR && \
+		time dpkg-buildpackage -rfakeroot -us -uc
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+BUILD_STAGE=$STAGE
+
+STAGE_NAME="Uploading Kernel Image"
+stage_begin "$STAGE_NAME" || {
+	(
+		mkdir -p "$B_UPLOAD_DIR"
+		cp -vp "$B_DST_DIR"/kernel-*_"${B_TAG_VERSION}"*.{deb,dsc,changes,tar.gz} \
+			"$B_UPLOAD_DIR"
+		UP_LOG_DIR="$B_UPLOAD_DIR/$KERNEL_PKG_NAME-$VERSION-${KERNEL_ARCH}_${B_TAG_VERSION}_$KERNEL_ARCH.log"
+		mkdir -p "$UP_LOG_DIR"
+		rm -f "$UP_LOG_DIR/"*.bz2
+		cp -p "$B_DST_DIR/log/"* "$UP_LOG_DIR"
+		bzip2 --best "$UP_LOG_DIR/"*
+		(cd "$B_UPLOAD_DIR" && dpkg-scansources . /dev/null | \
+			gzip --best > Sources.gz ; )
+		(cd "$B_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
+			gzip --best > Packages.gz; )
+		print_readme_html "$B_UPLOAD_URL" > "$B_UPLOAD_DIR/README.html"
+		chmod -R a+rX "$B_UPLOAD_DIR"
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Examining $KERNEL_PKG_NAME symbols"
+stage_begin "$STAGE_NAME" || {
+	(
+		LOOP_STATUS=0
+		echo "=== Modprobe Symbol Report ==="
+		fgrep "needs unknown symbol" $LOG.$BUILD_STAGE && \
+			LOOP_STATUS=1
+		echo "=== System.map Symbol Report ==="
+		cd "$B_OLD_DIR"
+		apt-get -q source "$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
+		# Using apt-get here does not work because it only
+		# prints out URLs of files that need to be downloaded,
+		# so if they are in the apt cache somewhere they
+		# won't show up
+		#awk '/^Package: kernel-headers/ {print $2}' < \
+		#	$KERNEL_PKG_NAME-2.4.27-i386-2.4.27/debian/control | \
+		#	xargs apt-get --reinstall -qq --print-uris install | \
+		#	awk -F\' '{print $2}' | \
+		#	xargs wget -nv
+		export URL="http://debian.local.valinux.co.jp/debian/"
+		awk '/^Package: kernel-headers/ {print $2}' < \
+			$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH-$VERSION/debian/control | \
+			xargs apt-cache show |\
+			awk '/^Filename: / {print ENVIRON["URL"]$2}' | \
+			xargs wget -nv
+		cd $B_PKG_DIR
+		SONAME=$(sed -ne "s/Package: kernel-headers-$VERSION-\([0-9]\) *$/\1/ p" debian/control)
+		for f in $(find config -maxdepth 1 -type f ! -name default -printf '%f\n'); do
+			echo "\"$f\""
+			kernel_symbol_check \
+				"$B_OLD_DIR/kernel-headers-$VERSION-"[0-9]"-${f}_$VERSION-"*"_$KERNEL_ARCH.deb" \
+				"$B_DST_DIR/kernel-headers-$VERSION-$SONAME-${f}_${B_DEB_VERSION}_$KERNEL_ARCH.deb" \
+				|| LOOP_STATUS=1
+		done
+		[ "$LOOP_STATUS" = "0" ]
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_STATUS="ok"
+exit


Property changes on: trunk/scripts/test_kernel_build/test_kernel_build.i386
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/scripts/test_kernel_build/test_kernel_build.old
===================================================================
--- trunk/scripts/test_kernel_build/test_kernel_build.old	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/test_kernel_build.old	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,579 @@
+#!/bin/bash
+#######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+## Tag non-release versions
+TAG_RELEASE="hls"
+
+## Mail reports
+#TO="horms+keitai@verge.net.au"
+TO="simon@valinux.co.jp"
+SUBJECT="Kernel Build"
+
+KERNEL_ARCH="i386"
+SVN_BASE="$HOME/work/debian-kernel/svn/kernel/trunk"
+BUILD_BASE="${HOME}/tmp/debian-kernel-test"
+UPLOAD_BASE="${HOME}/public_html/debian/testing"
+UPLOAD_URL_BASE="http://debian.vergenet.net/testing"
+
+## Make options
+unset MAKE
+unset CONCURRENCY_LEVEL
+#export CONCURRENCY_LEVEL=2
+export DISTCC_HOSTS='172.16.2.44 172.17.91.14 172.17.60.194 172.17.90.1 172.17.91.3 172.17.91.4'
+export MAKE="make CC=\"ccache distcc gcc\""
+export CONCURRENCY_LEVEL=16
+#export MAKE="make CC=\"ccache gcc-3.2\""
+#export CONCURRENCY_LEVEL=8
+#export MAKE="make CC=\"gcc-3.2\""
+export CCACHE_HARDLINK
+
+## NO USER SERVICABLE PARTS BELOW HERE ##
+
+START=$(date --rfc)
+TAG_DATE="$(date +%Y%m%d)"
+
+set -e
+
+usage () 
+{
+	echo "Usage: $0 VERSION [START_STAGE] [END_STAGE]" 1>&2
+	exit 1
+}
+
+export LC_ALL=C
+unset LANG
+unset LANGUAGE
+
+if ! which fakeroot >& /dev/null; then
+	echo "Error: fakeroot is not installed" 1>&2
+	exit 1
+fi
+
+umask 022
+
+if [ $# -lt 1 -o $# -gt 3 ]; then
+	usage
+fi
+VERSION="$1"
+if [ $# -gt 1 ]; then
+	START_STAGE=$2
+else
+	START_STAGE=0
+fi
+if [ $# -gt 2 ]; then
+	END_STAGE=$3
+else
+	END_STAGE=1000
+fi
+STAGE=0
+
+shopt -s extglob
+case $VERSION in
+	2.6.+([0-9]))
+		MAJOR_MINOR="2.6"
+		SVN_SUBDIR="kernel"
+	;;
+	2.4.+([0-9]))
+		MAJOR_MINOR="2.4"
+		SVN_SUBDIR="kernel-2.4"
+	;;
+	*)
+		echo "Unknown Version" 1>&2
+		usage
+	;;
+esac
+shopt -u extglob
+
+LOG=""
+#STAMP="${VERSION}_$(date +%Y-%m-%d_%H:%M:%S).$$"
+STAMP="${VERSION}"
+STAGE_STATUS="failed"
+S_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/source"
+B_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/$KERNEL_ARCH"
+S_DST_BASE="$BUILD_BASE"
+B_DST_BASE="$BUILD_BASE"
+
+S_SRC_DIR="$S_SRC_BASE/kernel-source-$VERSION-$VERSION"
+S_DST_DIR="$S_DST_BASE/kernel-source-$VERSION"
+S_PKG_DIR="$S_DST_DIR/kernel-source-$VERSION-$VERSION"
+S_UPLOAD_DIR="$UPLOAD_BASE/kernel-source-$VERSION"
+S_UPLOAD_URL="$UPLOAD_URL_BASE/kernel-source-$VERSION"
+S_TMP_DIR="$S_DST_DIR/tmp"
+S_LOG_DIR="$S_DST_DIR/log"
+S_LOG="$S_LOG_DIR/kernel-source-$STAMP.log"
+B_SRC_DIR="$B_SRC_BASE/kernel-image-$VERSION-$KERNEL_ARCH-$VERSION"
+B_DST_DIR="$B_DST_BASE/kernel-image-$VERSION-$KERNEL_ARCH"
+B_PKG_DIR="$B_DST_DIR//kernel-image-$VERSION-$KERNEL_ARCH-$VERSION"
+B_UPLOAD_DIR="$UPLOAD_BASE/kernel-image-$VERSION-$KERNEL_ARCH"
+B_UPLOAD_URL="$UPLOAD_URL_BASE/kernel-image-$VERSION-$KERNEL_ARCH"
+B_OLD_DIR="$B_DST_DIR/old"
+B_LOG_DIR="$B_DST_DIR/log"
+B_LOG="$B_LOG_DIR/kernel-image-$STAMP.log"
+
+if [ -z "$TAG_VERSION" ]; then
+	if [ -s "$TAG_RELEASE" ]; then
+		TAG_VERSION="${TAG_DATE}00"
+	else
+		TAG_VERSION="${TAG_RELEASE}.${TAG_DATE}00"
+	fi
+fi
+
+trap pm_quit EXIT
+trap pm_quit SIGHUP
+trap pm_quit SIGTERM
+trap pm_quit SIGQUIT
+
+set -e
+
+deb_version ()
+{
+	( cd $1; dpkg-parsechangelog | awk '/^Version: / { print $2 }'; )
+}
+
+deb_distribution ()
+{
+	( cd $1; dpkg-parsechangelog | awk '/^Distribution: / { print $2 }'; )
+}
+
+tag_version ()
+{
+	local PRISTINE_RELEASE=$(deb_version $1)
+	if [ -n "$RELEASE" -o -z "$TAG_VERSION" ]; then
+		echo "$PRISTINE_RELEASE"
+		return
+	fi
+	local DISTRIBUTION=$(deb_distribution $1)
+	local UPSTREAM=${PRISTINE_RELEASE%%-*}
+	local PRISTINE_DEBVERSION=${PRISTINE_RELEASE#$UPSTREAM-}
+
+	if [ "$DISTRIBUTION" != "UNRELEASED" ] ||
+			echo $PRISTINE_DEBVERSION | grep "[^0-9]" > /dev/null
+	then
+		echo "$UPSTREAM-$PRISTINE_DEBVERSION.$TAG_VERSION"
+	else
+		echo "$UPSTREAM-$(($PRISTINE_DEBVERSION - 1)).$TAG_VERSION"
+	fi
+}
+
+kernel_symbol_check_clean ()
+{
+	rm -rf "$TMP";
+}
+
+kernel_symbol_check ()
+{
+	TMP="$(mktemp -d)"
+	trap kernel_symbol_check_clean EXIT
+
+
+	PKG1="$1"
+	PKG2="$2"
+
+	echo "Checking $PKG1 vs $PKG2"
+
+	PKG1_FILE="${PKG1##*/}"
+	PKG1_BASE="${PKG1_FILE%%_*}"
+
+	PKG2_FILE="${PKG2##*/}"
+	PKG2_BASE="${PKG2_FILE%%_*}"
+
+	rm -rf "$TMP/1/" "$TMP/2/"
+	mkdir "$TMP/1/" "$TMP/2/"
+	dpkg -x "$PKG1" "$TMP/1/"
+	dpkg -x "$PKG2" "$TMP/2/"
+
+	find "$TMP/1/usr/src/$PKG1_BASE/include" -name "*.ver" -type f | \
+		xargs cat | sort > "$TMP/1.sym"
+	find "$TMP/2/usr/src/$PKG2_BASE/include" -name "*.ver" -type f | \
+		xargs cat | sort > "$TMP/2.sym"
+
+	diff -u "$TMP/1.sym" "$TMP/2.sym" > "$TMP/sym.udiff" || true
+	diff "$TMP/1.sym" "$TMP/2.sym" > "$TMP/sym.diff" || true
+	cat "$TMP/sym.udiff"
+	if grep "^<" "$TMP/sym.diff" > /dev/null; then
+		echo 'Error: Symbol Changes, as above. Incompatible ABI!!!'
+		STATUS=1
+	elif [ -s "$TMP/sym.udiff" ]; then
+		echo "Warning: Additions made to ABI"
+		STATUS=2
+	else
+		echo "No Changes"
+		STATUS=0
+	fi
+
+	kernel_symbol_check_clean
+	trap EXIT
+	return $STATUS
+}
+
+print_readme_html ()
+{
+	echo "Automated Builds for testing."
+	echo "Use at your own risk."
+	echo "apt-getable using:"
+	echo "<pre>"
+	echo "deb $1 ./"
+	echo "deb-src $1 ./"
+	echo "</pre>"
+}
+
+LOG_BUF=""
+log ()
+{
+	echo $@
+	if [ -f "$LOG" ]; then
+		echo "$LOG_BUF"$@ >> "$LOG"
+		LOG_BUF=""
+	else
+		LOG_BUF="${LOG_BUF}$(echo $@)"
+	fi
+}
+
+openlog ()
+{
+	echo "$LOG_BUF" > "$LOG"
+	LOG_BUF=""
+}
+
+purgelog ()
+{
+	rm -f "$LOG"
+}
+
+pm_quit ()
+{
+	log ""
+	
+	echo "Status: $STAGE_STATUS"
+	echo "Version: $VERSION"
+	echo -n "Host: "
+	hostname -s
+	echo "Start: $START"
+	echo -n "Finish: "
+	date --rfc
+	times
+
+	if [ "$STAGE_STATUS" = failed ]; then
+		echo "Stage: $STAGE: $STAGE_NAME..."
+		[ -f "$LOG.$STAGE" ] && tail -100 "$LOG.$STAGE"
+	fi
+	
+	{
+	echo "Status: $STAGE_STATUS"
+	echo "Version: $VERSION"
+	echo -n "Host: "
+	hostname -s
+	echo "Start: $START"
+	echo -n "Finish: "
+	date --rfc
+	times
+
+	if [ "$STAGE_STATUS" = failed ]; then
+		echo "Stage: $STAGE: $STAGE_NAME..."
+		[ -f "$LOG.$STAGE" ] && tail -100 "$LOG.$STAGE" | tac
+	else
+		[ -f "$B_LOG" ] && tac "$B_LOG"
+		[ -f "$S_LOG" ] && tac "$S_LOG"
+	fi
+	} | mail -s "Build: ($STAGE_STATUS: $VERSION: $(hostname -s))" $TO
+
+}
+
+stage_begin ()
+{
+	if [ $END_STAGE -eq $STAGE ]; then
+		log "exiting on request"
+		STAGE_STATUS="ok"
+		exit 0
+	fi
+
+	STAGE=$(( $STAGE + 1 ))
+	log -n "Stage $STAGE: $@... "
+
+	if [ $STAGE -lt $START_STAGE -a -f "$DST_DIR/$STAGE.marker" ]; then
+		log skipped
+		return 0
+	fi
+	return 1
+}
+
+stage_end ()
+{
+	STATUS="$1"
+	if [ $STATUS -ne 0 ]; then
+		log "failed"
+		cat "$LOG.$STAGE"
+		exit 1
+	fi
+	touch "$DST_DIR/$STAGE.marker"
+	log "ok!"
+}
+
+S_DEB_VERSION=$(deb_version "$S_SRC_DIR")
+S_TAG_VERSION=$(tag_version "$S_SRC_DIR")
+B_DEB_VERSION=$(deb_version "$B_SRC_DIR")
+B_TAG_VERSION=$(tag_version "$B_SRC_DIR")
+
+log "Building as $(whoami)@$(hostname) (this will be included in dmsg)";
+if [ -n "$RELEASE" ]; then
+	log "Building: release packages, kernel-tree will need to be installed"
+else
+	log "Building: test packages, dependancies will be mangled"
+	log "          Define RELEASE=yes in the environment to build for a release"
+	log "Building: TAG_VERSION=\"$TAG_VERSION\", override in environment"
+fi
+log "Building: kernel-source $S_DEB_VERSION -> $S_TAG_VERSION"
+log "Building: kernel-image-$KERNEL_ARCH $B_DEB_VERSION -> $B_TAG_VERSION"
+
+LOG="$S_LOG"
+purgelog
+DST_DIR="$S_DST_DIR"
+STAGE_NAME="Creating kernel-source directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		rm -rf "$S_DST_DIR" "$S_PKG_DIR" "$S_TMP_DIR" "$S_LOG_DIR"
+		mkdir -p "$S_DST_DIR" "$S_TMP_DIR" "$S_LOG_DIR"
+	}
+	stage_end $?
+}
+openlog
+log "Logs in $LOG.blah"
+
+STAGE_NAME="Fetching kernel-source tarball from debian archive"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd "$S_DST_DIR" && \
+		apt-get source -d -q=1 "kernel-source-$VERSION" && \
+		tar -zxf "kernel-source-${VERSION}_$VERSION.orig.tar.gz" && \
+		test ! -d "kernel-source-${VERSION}-$VERSION.orig" || \
+		mv "kernel-source-${VERSION}-$VERSION.orig" \
+			"kernel-source-${VERSION}-$VERSION"
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Copying kernel-source debian directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		( cd "$S_SRC_DIR/" && svn status; ) > "$LOG.$STAGE.svn" && \
+		rsync -av --exclude .svn --exclude ".*.sw[a-z]" \
+			"$S_SRC_DIR/" "$S_PKG_DIR/"  && \
+		chmod u+x "$S_PKG_DIR/debian/rules" && \
+		echo "Do not remove this line. " > "$S_PKG_DIR/debian/official"
+	} >& "$LOG.$STAGE"
+	stage_end $?
+	if [ -s "$LOG.$STAGE.svn" ]; then
+		echo "=== SVN file stauts ==="
+		cat "$LOG.$STAGE.svn"
+	fi | tee -a "$LOG.$STAGE"
+}
+
+STAGE_NAME="Mangling kernel-source debian/{control,patches/series/}"
+stage_begin "$STAGE_NAME" || {
+	{
+	if [ -n "$RELEASE" ]; then
+		echo skip
+	else
+		sed -e "s/^\(kernel-source-$VERSION\) ($S_DEB_VERSION) /\1 ($S_TAG_VERSION) /" \
+			< "$S_PKG_DIR/debian/changelog" \
+			> "$S_PKG_DIR/debian/changelog.2" && \
+		mv "$S_PKG_DIR/debian/changelog.2" \
+			"$S_PKG_DIR/debian/changelog" && \
+		mv "$S_PKG_DIR/debian/patches/series/$S_DEB_VERSION" \
+			"$S_PKG_DIR/debian/patches/series/$S_TAG_VERSION"
+	fi
+	} >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+
+STAGE_NAME="Patching kernel-source tree"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd "$S_PKG_DIR" && \
+		./debian/rules patch
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Build kernel-source package"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd "$S_PKG_DIR" && \
+		dpkg-buildpackage -us -uc -rfakeroot
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Extracting kernel-source package"
+stage_begin "$STAGE_NAME" || {
+	{
+	if [ -n "$RELEASE" ]; then
+		echo skip
+	else
+		dpkg-deb -x "$S_DST_DIR/kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb" "$S_DST_DIR/tmp" && \
+		mv "$S_DST_DIR/tmp/usr/src/kernel-source-$VERSION.tar.bz2" \
+			"$S_DST_DIR" || \
+			exit $?
+	fi
+	} >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Uploading Kernel Source"
+stage_begin "$STAGE_NAME" || {
+	(
+		mkdir -p "$S_UPLOAD_DIR"
+		cp -vp "$S_DST_DIR"/kernel-*_"${S_TAG_VERSION}"*.{deb,dsc,changes} \
+			"$S_DST_DIR/kernel-source-${VERSION}_${VERSION}.orig.tar.gz" \
+			"$S_UPLOAD_DIR"
+		UP_LOG_DIR="$S_UPLOAD_DIR/kernel-image-${VERSION}_${VERSION}-${S_TAG_VERSION}_$KERNEL_ARCH.log"
+		mkdir -p "$UP_LOG_DIR"
+		rm -f "$UP_LOG_DIR/"*.bz2
+		cp -p "$S_DST_DIR/log/"* "$UP_LOG_DIR"
+		bzip2 --best "$UP_LOG_DIR/"*
+		(cd "$S_UPLOAD_DIR" && dpkg-scansources . /dev/null | \
+			gzip --best > Sources.gz ; )
+		(cd "$S_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
+			gzip --best > Packages.gz; )
+		print_readme_html "$S_UPLOAD_URL" > "$S_UPLOAD_DIR/README.html"
+		chmod -R a+rX "$S_UPLOAD_DIR"
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+LOG="$B_LOG"
+
+purgelog
+DST_DIR="$B_DST_DIR"
+STAGE_NAME="Creating kernel-image directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		rm -rf "$B_DST_DIR" "$B_PKG_DIR" "$B_OLD_DIR" "$B_LOG_DIR"
+		mkdir -p "$B_DST_DIR" "$B_OLD_DIR" "$B_LOG_DIR"
+	}
+	stage_end $?
+}
+openlog
+log "Logs in $LOG.blah"
+
+STAGE_NAME="Copying kernel-image debian directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		( cd "$B_SRC_DIR/" && svn status; ) > "$LOG.$STAGE.svn" && \
+		rsync -av --exclude .svn "$B_SRC_DIR/" "$B_PKG_DIR/"  && \
+		chmod u+x "$B_PKG_DIR/debian/rules"
+	} >& "$LOG.$STAGE"
+	stage_end $?
+	if [ -s "$LOG.$STAGE.svn" ]; then
+		echo "=== SVN file stauts ==="
+		cat "$LOG.$STAGE.svn"
+	fi | tee -a "$LOG.$STAGE"
+}
+
+STAGE_NAME="Mangling kernel-image debian/{rules,control,changelog}"
+stage_begin "$STAGE_NAME" || {
+	{
+	if [ -n "$RELEASE" ]; then
+		echo skip
+	else
+		TMP_DIR="$(echo $S_DST_DIR | sed -e 's/\//\\\//g')" && \
+		#TMP_CMD="override_version=$B_TAG_VERSION home=$S_PKG_DIR/debian/patches sh -x $S_PKG_DIR/debian/apply" && \
+		TMP_CMD="override_version=$S_TAG_VERSION home=$S_PKG_DIR/debian/patches sh -x $S_PKG_DIR/debian/apply $S_TAG_VERSION" && \
+		#TMP_CMD="$(echo $TMP_CMD | sed -e 's/\//\\\//g')" && \
+		sed -e "s#/usr/src\(/kernel-source\)#$TMP_DIR\1#" \
+			-e "s#/usr/src/.*/apply/debian.*#$TMP_CMD#" \
+			< "$B_PKG_DIR/debian/rules" \
+			> "$B_PKG_DIR/debian/rules.2" && \
+		mv "$B_PKG_DIR/debian/rules.2" "$B_PKG_DIR/debian/rules" && \
+		chmod u+x "$B_PKG_DIR/debian/rules" && \
+		sed -re "/^Build-Depends: / s/kernel-tree-$VERSION-[0-9]+(, )?//" \
+			< "$B_PKG_DIR/debian/control" \
+			> "$B_PKG_DIR/debian/control.2" && \
+		mv "$B_PKG_DIR/debian/control.2" \
+			"$B_PKG_DIR/debian/control" && \
+		sed -e "s/^\(kernel-image-$VERSION-$KERNEL_ARCH\) ($B_DEB_VERSION) /\1 ($B_TAG_VERSION) /" \
+			< "$B_PKG_DIR/debian/changelog" \
+			> "$B_PKG_DIR/debian/changelog.2" && \
+		mv "$B_PKG_DIR/debian/changelog.2" \
+			"$B_PKG_DIR/debian/changelog" || \
+		exit $?
+	fi
+	} >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Building kernel-image packages"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd $B_PKG_DIR && \
+		time dpkg-buildpackage -rfakeroot -us -uc
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+BUILD_STAGE=$STAGE
+
+STAGE_NAME="Uploading Kernel Image"
+stage_begin "$STAGE_NAME" || {
+	(
+		mkdir -p "$B_UPLOAD_DIR"
+		cp -vp "$B_DST_DIR"/kernel-*_"${B_TAG_VERSION}"*.{deb,dsc,changes,tar.gz} \
+			"$B_UPLOAD_DIR"
+		UP_LOG_DIR="$B_UPLOAD_DIR/kernel-image-$VERSION-${KERNEL_ARCH}_${B_TAG_VERSION}_$KERNEL_ARCH.log"
+		mkdir -p "$UP_LOG_DIR"
+		rm -f "$UP_LOG_DIR/"*.bz2
+		cp -p "$B_DST_DIR/log/"* "$UP_LOG_DIR"
+		bzip2 --best "$UP_LOG_DIR/"*
+		(cd "$B_UPLOAD_DIR" && dpkg-scansources . /dev/null | \
+			gzip --best > Sources.gz ; )
+		(cd "$B_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
+			gzip --best > Packages.gz; )
+		print_readme_html "$B_UPLOAD_URL" > "$B_UPLOAD_DIR/README.html"
+		chmod -R a+rX "$B_UPLOAD_DIR"
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Examining kernel-image symbols"
+stage_begin "$STAGE_NAME" || {
+	(
+		LOOP_STATUS=0
+		echo "=== Modprobe Symbol Report ==="
+		fgrep "needs unknown symbol" $LOG.$BUILD_STAGE && \
+			LOOP_STATUS=1
+		echo "=== System.map Symbol Report ==="
+		cd "$B_OLD_DIR"
+		apt-get -q source "kernel-image-$VERSION-$KERNEL_ARCH"
+		# Using apt-get here does not work because it only
+		# prints out URLs of files that need to be downloaded,
+		# so if they are in the apt cache somewhere they
+		# won't show up
+		#awk '/^Package: kernel-headers/ {print $2}' < \
+		#	kernel-image-2.4.27-i386-2.4.27/debian/control | \
+		#	xargs apt-get --reinstall -qq --print-uris install | \
+		#	awk -F\' '{print $2}' | \
+		#	xargs wget -nv
+		export URL="http://debian.local.valinux.co.jp/debian/"
+		awk '/^Package: kernel-headers/ {print $2}' < \
+			kernel-image-$VERSION-$KERNEL_ARCH-$VERSION/debian/control | \
+			xargs apt-cache show |\
+			awk '/^Filename: / {print ENVIRON["URL"]$2}' | \
+			xargs wget -nv
+		cd $B_PKG_DIR
+		SONAME=$(sed -ne "s/Package: kernel-headers-$VERSION-\([0-9]\) *$/\1/ p" debian/control)
+		for f in $(find config -maxdepth 1 -type f ! -name default -printf '%f\n'); do
+			echo "\"$f\""
+			kernel_symbol_check \
+				"$B_OLD_DIR/kernel-headers-$VERSION-"[0-9]"-${f}_$VERSION-"*"_$KERNEL_ARCH.deb" \
+				"$B_DST_DIR/kernel-headers-$VERSION-$SONAME-${f}_${B_DEB_VERSION}_$KERNEL_ARCH.deb" \
+				|| LOOP_STATUS=1
+		done
+		[ "$LOOP_STATUS" = "0" ]
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_STATUS="ok"
+exit

Added: trunk/scripts/test_kernel_build/test_kernel_build.powerpc
===================================================================
--- trunk/scripts/test_kernel_build/test_kernel_build.powerpc	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/test_kernel_build.powerpc	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,175 @@
+#!/bin/bash
+#######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+set -e                  
+                
+TKB_BASE_DIR="$HOME/work/debian-kernel/test_kernel_build"
+TKB_LIB_DIR="$TKB_BASE_DIR/lib"
+TKB_ETC_DIR="$TKB_BASE_DIR/etc"
+		                  
+. "$TKB_LIB_DIR/libtkb.framework"
+. "$TKB_LIB_DIR/libtkb.powerpc"
+				                  
+pre_conf_setup_generic $@
+
+.  "$TKB_ETC_DIR/test_kernel_build.conf.powerpc"
+								            
+post_conf_setup_bin_generic
+
+LOG="$B_LOG"
+purgelog
+DST_DIR="$B_DST_DIR"
+STAGE_NAME="Creating $KERNEL_PKG_NAME directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		rm -rf "$B_DST_DIR" "$B_PKG_DIR" "$B_OLD_DIR" "$B_LOG_DIR" \
+			"$B_TMP_DIR"
+		mkdir -p "$B_DST_DIR" "$B_OLD_DIR" "$B_LOG_DIR" "$B_TMP_DIR"
+	}
+	stage_end $?
+}
+openlog
+log "Logs in $LOG.blah"
+
+STAGE_NAME="Extracting kernel-source package"
+stage_begin "$STAGE_NAME" || {
+	(
+	if [ -n "$RELEASE" ]; then
+		echo skip
+	else
+		set -x 
+		cd "$B_DST_DIR"
+		# Using apt-get here does not work because it only
+		# prints out URLs of files that need to be downloaded,
+		# so if they are in the apt cache somewhere they
+		# won't show up
+		wget -N -q "$S_DOWNDLOAD_URL/kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb"
+		dpkg-deb -x \
+		  "kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb" \
+		  "$B_TMP_DIR"
+		wget -N -q "$S_DOWNDLOAD_URL/kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb"
+		dpkg-deb -x \
+		  "kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb" \
+		  "$B_TMP_DIR"
+	fi
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Copying $KERNEL_PKG_NAME debian directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		( cd "$B_SRC_DIR/" && svn status; ) > "$LOG.$STAGE.svn" && \
+		rsync -av --exclude .svn "$B_SRC_DIR/" "$B_PKG_DIR/"  && \
+		chmod u+x "$B_PKG_DIR/debian/rules"
+	} >& "$LOG.$STAGE"
+	stage_end $?
+	if [ -s "$LOG.$STAGE.svn" ]; then
+		echo "=== SVN file stauts ==="
+		cat "$LOG.$STAGE.svn"
+	fi | tee -a "$LOG.$STAGE"
+}
+
+STAGE_NAME="Mangling $KERNEL_PKG_NAME debian/{rules,control,changelog}"
+stage_begin "$STAGE_NAME" || {
+	{
+	if [ -n "$RELEASE" ]; then
+		echo skip
+	else
+		TMP_CMD="override_version=$S_TAG_VERSION home=$B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/debian sh -x $B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/apply/debian $S_TAG_VERSION" && \
+		sed -e "s#/usr/src/kernel-source#$B_TMP_DIR&#" \
+			-e "s#/usr/src/.*/apply/debian.*#$TMP_CMD#" \
+			-e "s# /usr/share/doc# $B_TMP_DIR/usr/share/doc#" \
+			< "$B_PKG_DIR/debian/rules" \
+			> "$B_PKG_DIR/debian/rules.2" && \
+		mv "$B_PKG_DIR/debian/rules.2" "$B_PKG_DIR/debian/rules" && \
+		chmod u+x "$B_PKG_DIR/debian/rules" && \
+		sed -re "/^Build-Depends: / s/kernel-tree-$VERSION-[0-9]+(, )?//" \
+			< "$B_PKG_DIR/debian/control" \
+			> "$B_PKG_DIR/debian/control.2" && \
+		mv "$B_PKG_DIR/debian/control.2" \
+			"$B_PKG_DIR/debian/control" && \
+		sed -e "s/^\($KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION\) ($B_DEB_VERSION) /\1 ($B_TAG_VERSION) /" \
+			< "$B_PKG_DIR/debian/changelog" \
+			> "$B_PKG_DIR/debian/changelog.2" && \
+		mv "$B_PKG_DIR/debian/changelog.2" \
+			"$B_PKG_DIR/debian/changelog" || \
+		exit $?
+	fi
+	} >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Building $KERNEL_PKG_NAME packages"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd $B_PKG_DIR && \
+		time dpkg-buildpackage -rfakeroot -us -uc
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+BUILD_STAGE=$STAGE
+
+STAGE_NAME="Uploading Kernel Image"
+stage_begin "$STAGE_NAME" || {
+	(
+		mkdir -p "$B_UPLOAD_DIR"
+		cp -vp "$B_DST_DIR"/kernel-*_"${B_TAG_VERSION}"*.{deb,dsc,changes,tar.gz} \
+			"$B_UPLOAD_DIR"
+		UP_LOG_DIR="$B_UPLOAD_DIR/$KERNEL_PKG_NAME-$VERSION-${KERNEL_ARCH}_${B_TAG_VERSION}_$KERNEL_ARCH.log"
+		mkdir -p "$UP_LOG_DIR"
+		rm -f "$UP_LOG_DIR/"*.bz2
+		cp -p "$B_DST_DIR/log/"* "$UP_LOG_DIR"
+		bzip2 --best "$UP_LOG_DIR/"*
+		(cd "$B_UPLOAD_DIR" && dpkg-scansources . /dev/null | \
+			gzip --best > Sources.gz ; )
+		(cd "$B_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
+			gzip --best > Packages.gz; )
+		print_readme_html "$B_UPLOAD_URL" > "$B_UPLOAD_DIR/README.html"
+		chmod -R a+rX "$B_UPLOAD_DIR"
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Examining $KERNEL_PKG_NAME symbols"
+stage_begin "$STAGE_NAME" || {
+	(
+		LOOP_STATUS=0
+		echo "=== Modprobe Symbol Report ==="
+		fgrep "needs unknown symbol" $LOG.$BUILD_STAGE && \
+			LOOP_STATUS=1
+		echo "=== System.map Symbol Report ==="
+		echo "Not implemeted for powerpc"
+		#cd "$B_OLD_DIR"
+		#apt-get -q source "$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION"
+		## Using apt-get here does not work because it only
+		## prints out URLs of files that need to be downloaded,
+		## so if they are in the apt cache somewhere they
+		## won't show up
+		##awk '/^Package: kernel-headers/ {print $2}' < \
+		##	$KERNEL_PKG_NAME-2.4.27-i386-2.4.27/debian/control | \
+		##	xargs apt-get --reinstall -qq --print-uris install | \
+		##	awk -F\' '{print $2}' | \
+		##	xargs wget -nv
+		#export URL="http://ftp2.jp.debian.org/debian/"
+		#awk '/^Package: kernel-headers/ {print $2}' < \
+		#	$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION-$VERSION/debian/control | \
+		#	xargs apt-cache show |\
+		#	awk '/^Filename: / {print ENVIRON["URL"]$2}' | \
+		#	xargs wget -nv -N
+		#cd $B_PKG_DIR
+		# for f in powerpc powerpc-smppower3 power3-smp power4 power4-smp; do
+		# 	 echo "\"$f\""
+		#	kernel_symbol_check \
+		#		"$B_OLD_DIR/kernel-headers-${VERSION}_$VERSION-${f}_$KERNEL_ARCH.deb" \
+		#		"$B_DST_DIR/kernel-headers-${VERSION}_${B_TAG_VERSION}-${f}_$KERNEL_ARCH.deb" || \
+		#	LOOP_STATUS=1
+		[ $LOOP_STATUS = "0" ]
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_STATUS="ok"
+exit


Property changes on: trunk/scripts/test_kernel_build/test_kernel_build.powerpc
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/scripts/test_kernel_build/test_kernel_build.source
===================================================================
--- trunk/scripts/test_kernel_build/test_kernel_build.source	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/test_kernel_build.source	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,124 @@
+#!/bin/bash
+######################################################################
+# Horms                                                   October 2004
+######################################################################
+
+set -e
+
+TKB_BASE_DIR="$HOME/work/debian-kernel/test_kernel_build"
+TKB_LIB_DIR="$TKB_BASE_DIR/lib"
+TKB_ETC_DIR="$TKB_BASE_DIR/etc"
+
+. "$TKB_LIB_DIR/libtkb.framework"
+. "$TKB_LIB_DIR/libtkb.source"
+
+pre_conf_setup_generic $@
+
+. "$TKB_ETC_DIR/test_kernel_build.conf.source"
+
+post_conf_setup_source
+
+LOG="$S_LOG"
+purgelog
+DST_DIR="$S_DST_DIR"
+STAGE_NAME="Creating kernel-source directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		rm -rf "$S_DST_DIR" "$S_PKG_DIR" "$S_TMP_DIR" "$S_LOG_DIR"
+		mkdir -p "$S_DST_DIR" "$S_TMP_DIR" "$S_LOG_DIR"
+	}
+	stage_end $?
+}
+openlog
+log "Logs in $LOG.blah"
+
+STAGE_NAME="Fetching kernel-source tarball from debian archive"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd "$S_DST_DIR" && \
+		apt-get source -d -q=1 "kernel-source-$VERSION" && \
+		tar -zxf "kernel-source-${VERSION}_$VERSION.orig.tar.gz" && \
+		test ! -d "kernel-source-${VERSION}-$VERSION.orig" || \
+		mv "kernel-source-${VERSION}-$VERSION.orig" \
+			"kernel-source-${VERSION}-$VERSION"
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Copying kernel-source debian directory"
+stage_begin "$STAGE_NAME" || {
+	{
+		( cd "$S_SRC_DIR/" && svn status; ) > "$LOG.$STAGE.svn" && \
+		rsync -av --exclude .svn --exclude ".*.sw[a-z]" \
+			"$S_SRC_DIR/" "$S_PKG_DIR/"  && \
+		chmod u+x "$S_PKG_DIR/debian/rules" && \
+		echo "Do not remove this line. " > "$S_PKG_DIR/debian/official"
+	} >& "$LOG.$STAGE"
+	stage_end $?
+	if [ -s "$LOG.$STAGE.svn" ]; then
+		echo "=== SVN file stauts ==="
+		cat "$LOG.$STAGE.svn"
+	fi | tee -a "$LOG.$STAGE"
+}
+
+STAGE_NAME="Mangling kernel-source debian/{control,patches/series/}"
+stage_begin "$STAGE_NAME" || {
+	{
+	if [ -n "$RELEASE" ]; then
+		echo skip
+	else
+		sed -e "s/^\(kernel-source-$VERSION\) ($S_DEB_VERSION) /\1 ($S_TAG_VERSION) /" \
+			< "$S_PKG_DIR/debian/changelog" \
+			> "$S_PKG_DIR/debian/changelog.2" && \
+		mv "$S_PKG_DIR/debian/changelog.2" \
+			"$S_PKG_DIR/debian/changelog" && \
+		mv "$S_PKG_DIR/debian/patches/series/$S_DEB_VERSION" \
+			"$S_PKG_DIR/debian/patches/series/$S_TAG_VERSION"
+	fi
+	} >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+
+STAGE_NAME="Patching kernel-source tree"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd "$S_PKG_DIR" && \
+		./debian/rules patch
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Build kernel-source package"
+stage_begin "$STAGE_NAME" || {
+	(
+		cd "$S_PKG_DIR" && \
+		dpkg-buildpackage -us -uc -rfakeroot
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_NAME="Uploading Kernel Source"
+stage_begin "$STAGE_NAME" || {
+	(
+		mkdir -p "$S_UPLOAD_DIR"
+		cp -vp "$S_DST_DIR"/kernel-*_"${S_TAG_VERSION}"*.{deb,dsc,changes} \
+			"$S_DST_DIR/kernel-source-${VERSION}_${VERSION}.orig.tar.gz" \
+			"$S_UPLOAD_DIR"
+		UP_LOG_DIR="$S_UPLOAD_DIR/kernel-image-${VERSION}_${VERSION}-${S_TAG_VERSION}_$KERNEL_ARCH.log"
+		mkdir -p "$UP_LOG_DIR"
+		rm -f "$UP_LOG_DIR/"*.bz2
+		cp -p "$S_DST_DIR/log/"* "$UP_LOG_DIR"
+		bzip2 --best "$UP_LOG_DIR/"*
+		(cd "$S_UPLOAD_DIR" && dpkg-scansources . /dev/null | \
+			gzip --best > Sources.gz ; )
+		(cd "$S_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
+			gzip --best > Packages.gz; )
+		print_readme_html "$S_UPLOAD_URL" > "$S_UPLOAD_DIR/README.html"
+		chmod -R a+rX "$S_UPLOAD_DIR"
+	) >& "$LOG.$STAGE"
+	stage_end $?
+}
+
+STAGE_STATUS="ok"
+exit


Property changes on: trunk/scripts/test_kernel_build/test_kernel_build.source
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/scripts/test_kernel_build/test_kernel_build_all
===================================================================
--- trunk/scripts/test_kernel_build/test_kernel_build_all	2005-05-13 07:19:44 UTC (rev 3086)
+++ trunk/scripts/test_kernel_build/test_kernel_build_all	2005-05-13 07:21:06 UTC (rev 3087)
@@ -0,0 +1,8 @@
+#!/bin/bash
+BASE="/home/horms/work/debian-kernel/test_kernel_build"
+
+TAG_VERSION="SOURCE"
+
+for i in 2.6.8 2.4.27 2.6.11; do
+	cd $BASE && TAG_VERSION=SOURCE ./test_kernel_build.powerpc $i
+done


Property changes on: trunk/scripts/test_kernel_build/test_kernel_build_all
___________________________________________________________________
Name: svn:executable
   + *