Put in some changes along sg1.4 dev history.

This commit is contained in:
Siana Gearz
2010-11-21 04:28:31 +01:00
parent 6866a36a5c
commit d68736da39
182 changed files with 2418 additions and 1151 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# This is the build script used by Linden Lab's autmated build system.
# This is the build script used by Linden Lab's automated build system.
#
set -x
@@ -9,7 +9,9 @@ export INSTALL_USE_HTTP_FOR_SCP=true
export PATH=/bin:/usr/bin:$PATH
arch=`uname | cut -b-6`
here=`echo $0 | sed 's:[^/]*$:.:'`
year=`date +%Y`
# Hack : in the case of Snowglobe 1.x trunk and releases, we continue to use 2009 as the year so to separate them from Snowglobe 2.x trunk and releases
#year=`date +%Y`
year="2009"
branch=`svn info | grep '^URL:' | sed 's:.*/::'`
revision=`svn info | grep '^Revision:' | sed 's/.*: //'`
top=`cd "$here/../../.." && pwd`
@@ -20,32 +22,28 @@ top=`cd "$here/../../.." && pwd`
[ x"$S3SYMBOL_URL" = x ] && export S3SYMBOL_URL=https://s3.amazonaws.com/automated-builds-secondlife-com/binaries
[ x"$PUBLIC_URL" = x ] && export PUBLIC_URL=http://secondlife.com/developers/opensource/downloads/$year
[ x"$PUBLIC_EMAIL" = x ] && export PUBLIC_EMAIL=sldev-commits@lists.secondlife.com
# Make sure command worked and bail out if not, reporting failure to parabuild
fail()
{
release_lock
echo "BUILD FAILED" $@
exit 1
}
pass()
{
release_lock
echo "BUILD SUCCESSFUL"
exit 0
}
# Locking to avoid contention with u-s-c
LOCK_CREATE=/usr/bin/lockfile-create
LOCK_TOUCH=/usr/bin/lockfile-touch
LOCK_REMOVE=/usr/bin/lockfile-remove
LOCK_PROCESS=
locking_available()
{
test -x "$LOCK_CREATE"\
-a -x "$LOCK_TOUCH"\
-a -x "$LOCK_REMOVE"
test -n "$LOCK_CREATE" -a -x "$LOCK_CREATE"\
-a -n "$LOCK_TOUCH" -a -x "$LOCK_TOUCH"\
-a -n "$LOCK_REMOVE" -a -x "$LOCK_REMOVE"
}
acquire_lock()
@@ -94,12 +92,12 @@ get_asset()
s3_available()
{
test -x "$helpers/s3get.sh" -a -x "$helpers/s3put.sh" -a -r "$helpers/s3curl.pl"
test -x "$helpers/hg/bin/s3get.sh" -a -x "$helpers/hg/bin/s3put.sh" -a -r "$helpers/hg/bin/s3curl.py"
}
build_dir_Darwin()
{
echo build-darwin-universal
echo build-darwin-i386
}
build_dir_Linux()
@@ -114,18 +112,18 @@ build_dir_CYGWIN()
installer_Darwin()
{
ls -1td "`build_dir_Darwin Release`/newview/"*.dmg 2>/dev/null | sed 1q
ls -1td "$(build_dir_Darwin Release)/newview/"*.dmg 2>/dev/null | sed 1q
}
installer_Linux()
{
ls -1td "`build_dir_Linux Release`/newview/"*.tar.bz2 2>/dev/null | sed 1q
ls -1td "$(build_dir_Linux Release)/newview/"*.tar.bz2 2>/dev/null | sed 1q
}
installer_CYGWIN()
{
d=`build_dir_CYGWIN Release`
p=`sed 's:.*=::' "$d/newview/Release/touched.bat"`
d=$(build_dir_CYGWIN Release)
p=$(sed 's:.*=::' "$d/newview/Release/touched.bat")
echo "$d/newview/Release/$p"
}
@@ -174,6 +172,7 @@ Darwin)
all_done="$helpers"/all_done.py
test -r "$helpers/update_version_files.py" && update_version_files="$helpers/update_version_files.py"
libs_asset="$SLASSET_LIBS_DARWIN"
s3put="$helpers"/hg/bin/s3put.sh
;;
CYGWIN)
@@ -198,6 +197,7 @@ CYGWIN)
all_done="C:\\buildscripts\\shared\\latest\\all_done.py"
test -r "$helpers/update_version_files.py" && update_version_files="C:\\buildscripts\\shared\\latest\\update_version_files.py"
libs_asset="$SLASSET_LIBS_WIN32"
s3put="$helpers"/hg/bin/s3put.sh
;;
Linux)
@@ -214,7 +214,6 @@ Linux)
fi
fi
fi
acquire_lock
variants="Debug RelWithDebInfo Release ReleaseSSE2"
#variants="Release"
cmake_generator="Unix Makefiles"
@@ -259,12 +258,16 @@ Linux)
fi
libs_asset="$SLASSET_LIBS_LINUXI386"
s3put="$helpers"/hg/bin/s3put.sh
;;
*) fail undefined $arch ;;
esac
get_asset "http://www.fmod.org/index.php/release/version/$fmod_tar"
acquire_lock
trap release_lock EXIT
get_asset "http://www.fmod.org/files/fmod3/$fmod_tar"
case "$arch" in
@@ -328,7 +331,16 @@ for variant in $variants
do
build_dir=`build_dir_$arch $variant`
rm -rf "$build_dir"
get_asset "$libs_asset" # Thus plunks stuff into the build dir, so have to restore it now.
get_asset "$libs_asset" # This plunks stuff into the build dir, so have to restore it now.
# SNOW-713 : hack around a Darwin lib 1.23.4.0 tarball issue introduced by the move from universal to i386
# Should be removed when libs are rebuilt cleanly
if test -r build-darwin-universal-Release
then
mv build-darwin-universal-Release/ "$build_dir/"
fi
# End SNOW-713 hack
# This is the way it will work in future
#for target_dir in $target_dirs
#do
@@ -375,7 +387,7 @@ do
fi
done
# check statuis and upload results to S3
# Check status and upload results to S3
subject=
if $succeeded
then
@@ -384,18 +396,20 @@ then
package_file=`echo $package | sed 's:.*/::'`
if s3_available
then
echo "$PUBLIC_URL/$branch/$revision/$package_file" > "$arch"
# Create an empty token file and populate it with the usable URLs: this will be emailed when all_done...
cp /dev/null "$arch"
echo "$PUBLIC_URL/$branch/$revision/$package_file" >> "$arch"
echo "$PUBLIC_URL/$branch/$revision/good-build.$arch" >> "$arch"
"$helpers/s3put.sh" "$package" "$S3PUT_URL/$branch/$revision/$package_file" binary/octet-stream\
"$s3put" "$package" "$S3PUT_URL/$branch/$revision/$package_file" binary/octet-stream public-read\
|| fail Uploading "$package"
"$helpers/s3put.sh" build.log "$S3PUT_URL/$branch/$revision/good-build.$arch" text/plain\
"$s3put" build.log "$S3PUT_URL/$branch/$revision/good-build.$arch" text/plain public-read\
|| fail Uploading build.log
"$helpers/s3put.sh" "$arch" "$S3PUT_URL/$branch/$revision/$arch" text/plain\
"$s3put" "$arch" "$S3PUT_URL/$branch/$revision/$arch" text/plain public-read\
|| fail Uploading token file
for symbolfile in $symbolfiles
do
targetfile="`echo $symbolfile | sed 's:.*/::'`"
"$helpers/s3put.sh" "$build_dir/$symbolfile" "$S3SYMBOL_URL/$revision/$targetfile" binary/octet-stream\
"$s3put" "$build_dir/$symbolfile" "$S3SYMBOL_URL/$revision/$targetfile" binary/octet-stream public-read\
|| fail Uploading "$symbolfile"
done
if python "$all_done"\
@@ -403,7 +417,7 @@ then
"$S3GET_URL/$branch/$revision/$arch"\
$other_archs > message
then
subject="Successful Build for $branch ($revision)"
subject="Successful Build for $year/$branch ($revision)"
fi
else
true s3 is not available
@@ -411,9 +425,9 @@ then
else
if s3_available
then
"$helpers/s3put.sh" build.log "$S3PUT_URL/$branch/$revision/failed-build.$arch" text/plain\
"$s3put" build.log "$S3PUT_URL/$branch/$revision/failed-build.$arch" text/plain public-read\
|| fail Uploading build.log
subject="Failed Build for $branch ($revision) on $arch"
subject="Failed Build for $year/$branch ($revision) on $arch"
cat >message <<EOF
Build for $branch ($revision) failed for $arch.
Please see the build log for details:
@@ -435,7 +449,7 @@ then
echo "No change information available" >> message
elif [ x"$PARABUILD_PREVIOUS_CHANGE_LIST_NUMBER" = x ]
then
( cd .. && svn log --verbose --stop-on-copy --limit 50 ) >>message
( cd .. && svn log --verbose --stop-on-copy --limit 50 ) >> message
else
if [ "$PARABUILD_PREVIOUS_CHANGE_LIST_NUMBER" -lt "$PARABUILD_CHANGE_LIST_NUMBER" ]
then
@@ -443,10 +457,10 @@ then
else
range="$PARABUILD_CHANGE_LIST_NUMBER"
fi
( cd .. && svn log --verbose -r"$range" ) >>message
( cd .. && svn log --verbose -r"$range" ) >> message
fi
# $PUBLIC_EMAIL can be a list, so no quotes
python "$mail" "$subject" $PUBLIC_EMAIL <message
python "$mail" "$subject" $PUBLIC_EMAIL < message
fi
if $succeeded