From 44b93c82b3c8904f664d466e716a3f34f7c0e487 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 16 May 2007 23:26:46 +0000 Subject: [PATCH] Add a new script that can build RPMs in a chroot. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/all/build-all | 2 ++ wxPython/distrib/all/build-chrpm | 61 ++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100755 wxPython/distrib/all/build-chrpm diff --git a/wxPython/distrib/all/build-all b/wxPython/distrib/all/build-all index d6c902a460..2b117872b9 100755 --- a/wxPython/distrib/all/build-all +++ b/wxPython/distrib/all/build-all @@ -94,6 +94,8 @@ def getTasks(config_env): cyclopsTask1 = Task([ Job("cyclops.d", "distrib/all/build-deb", ["cyclops", "/work/chroot/dapper", "dapper"], env=config_env), Job("cyclops.d64", "distrib/all/build-deb", ["cyclops", "/work/chroot/dapper64", "dapper64"], env=config_env), + Job("cyclops.fc6", "distrib/all/build-chrpm", + ["cyclops", "/work/chroot/fc6", "fc6", "fc6", "2.4"], env=config_env), ]) cyclopsTask2 = Task([ diff --git a/wxPython/distrib/all/build-chrpm b/wxPython/distrib/all/build-chrpm new file mode 100755 index 0000000000..f8e2928186 --- /dev/null +++ b/wxPython/distrib/all/build-chrpm @@ -0,0 +1,61 @@ +#!/bin/bash +#---------------------------------------------------------------------- + +set -o errexit +#set -o xtrace + +host=$1 +chRootRoot=$2 +chRootName=$3 +reltag=$4 +pyver=$5 + + +if [ $buildansi = yes ]; then + CHARTYPE=both +else + CHARTYPE=unicode +fi + + +function TestOnline { + local host=$1 + local message=$2 + + if ping -q -c1 -w1 $host > /dev/null; then + return 0 + else + return 1 + fi +} + + + +if [ $skipdeb != yes ]; then + # We use a chroot environment on the build machine for the debian + # builds, so this build is pretty simple. Just copy the tarball + # and a build script to the build machine, and then run + # do-build-deb in the chroot. + + if TestOnline $host; then + + echo "The $host machine is online, build continuing..." + + echo "Copying source files and build script..." + ssh root@$host "mkdir -p $chRootRoot/$LINUX_BUILD && rm -rf $chRootRoot/$LINUX_BUILD/*" + scp $STAGING_DIR/wxPython-src* distrib/all/do-build-rpm $STAGING_DIR/wxPython.spec \ + root@$host:$chRootRoot/$LINUX_BUILD + + ssh root@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"./do-build-rpm $reltag $skipclean $VERSION $pyver $CHARTYPE\"" + + echo "Fetching the results..." + ssh root@$host "rm $chRootRoot/$LINUX_BUILD/do-build-rpm" + scp "root@$host:$chRootRoot/$LINUX_BUILD/wxPython*.i[0-9]86.rpm" $STAGING_DIR + ssh root@$host "rm $chRootRoot/$LINUX_BUILD/wxPython*.i[0-9]86.rpm" + echo "Done!" + else + echo "The $host machine is **OFFLINE**, skipping the binary RPM build." + exit 0 + fi +fi +