2001-03-06 03:08:24 +01:00
|
|
|
#!/bin/sh
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
WD=`pwd`
|
2000-08-30 23:52:33 +02:00
|
|
|
# Don't write a wrong path for BD !!!!!
|
2001-03-06 03:08:24 +01:00
|
|
|
if [ -w /my/tmp ]
|
|
|
|
then
|
|
|
|
BD=/my/tmp/BUILD
|
|
|
|
elif [ -n "$TMPDIR" ]
|
|
|
|
then
|
|
|
|
BD=$TMPDIR/BUILD
|
|
|
|
else
|
|
|
|
BD=/tmp/BUILD
|
|
|
|
fi
|
2000-07-31 21:29:14 +02:00
|
|
|
TMP_SCRIPT=$WD/Logs/00-temp-for-do-all-build-steps.$$
|
|
|
|
|
|
|
|
# We build on work
|
|
|
|
to_host=`hostname`
|
|
|
|
cc=gcc
|
|
|
|
ccc=gcc
|
|
|
|
EXTRA_CONFIG="--without-perl"
|
2001-11-02 06:42:28 +01:00
|
|
|
#AM_MAKEFLAGS="-j 2"
|
2000-07-31 21:29:14 +02:00
|
|
|
echo "Building on $to_host"
|
|
|
|
|
2000-08-30 23:52:33 +02:00
|
|
|
rm -rf $BD/*
|
2000-09-01 00:53:34 +02:00
|
|
|
rm -f $WD/binary/*
|
2001-01-01 23:27:08 +01:00
|
|
|
mkdir -p $WD/binary
|
2000-08-25 17:49:39 +02:00
|
|
|
mkdir -p $WD/Logs
|
2000-08-30 17:49:25 +02:00
|
|
|
mkdir -p $BD/Logs
|
2000-08-25 17:49:39 +02:00
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
cat > $TMP_SCRIPT <<END
|
|
|
|
# Show executed commands
|
|
|
|
set -x
|
|
|
|
# Move to the right place
|
|
|
|
cd "$WD"
|
2000-08-30 17:49:25 +02:00
|
|
|
# Create a build directory tree
|
2000-09-07 14:43:46 +02:00
|
|
|
bk export $BD
|
2000-08-30 17:49:25 +02:00
|
|
|
cd "$BD"
|
2000-09-08 09:49:25 +02:00
|
|
|
chmod -R u+rw,g+rw .
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2001-03-07 22:45:16 +01:00
|
|
|
# Make it easy to remove an old build
|
2000-08-30 23:52:33 +02:00
|
|
|
umask 002
|
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
CC=$cc CXX=$ccc
|
|
|
|
export CC CXX
|
|
|
|
|
2000-12-14 02:23:55 +01:00
|
|
|
gmake -j 2 -k distclean
|
2000-07-31 21:29:14 +02:00
|
|
|
rm -f NEW-RPMS/*
|
|
|
|
|
|
|
|
# Stop on error
|
|
|
|
set -e
|
|
|
|
|
|
|
|
/bin/rm -f */.deps/*.P
|
|
|
|
/bin/rm -f config.cache
|
|
|
|
|
|
|
|
aclocal; autoheader; aclocal; automake; autoconf
|
2001-03-07 22:34:42 +01:00
|
|
|
(cd bdb/dist && sh s_all)
|
2001-03-07 22:45:16 +01:00
|
|
|
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2001-04-13 15:21:38 +02:00
|
|
|
# A normal user starts here. We must use mit-threads, bdb and innodb.
|
2001-03-07 22:47:51 +01:00
|
|
|
# Otherwise they do not end up in the distribution.
|
2000-07-31 21:29:14 +02:00
|
|
|
./configure \
|
|
|
|
--with-unix-socket-path=/var/tmp/mysql.sock \
|
|
|
|
--with-low-memory \
|
2000-08-30 23:52:33 +02:00
|
|
|
--with-mit-threads=yes $EXTRA_CONFIG \
|
2000-12-07 18:22:11 +01:00
|
|
|
--enable-thread-safe-client \
|
2002-02-14 18:24:49 +01:00
|
|
|
--enable-local-infile \
|
2001-03-07 22:34:42 +01:00
|
|
|
--with-berkeley-db \
|
2001-09-17 22:38:31 +02:00
|
|
|
--with-innodb \
|
2001-09-22 16:32:43 +02:00
|
|
|
--with-vio \
|
2001-09-18 11:48:27 +02:00
|
|
|
--without-pstack \
|
2001-09-17 22:38:31 +02:00
|
|
|
--with-extra-tools \
|
|
|
|
--with-embedded-server
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2000-12-14 02:29:38 +01:00
|
|
|
gmake -j 2
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2000-12-14 02:23:55 +01:00
|
|
|
time gmake -j 2 distcheck \
|
2000-07-31 21:29:14 +02:00
|
|
|
EXTRA_CONF_ARGS="--with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory $EXTRA_CONFIG"
|
|
|
|
|
2002-02-16 19:32:06 +01:00
|
|
|
sh $BD/Build-tools/Do-rpm $*
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
rm -f $TMP_SCRIPT
|
|
|
|
END
|
|
|
|
|
2001-03-06 03:08:24 +01:00
|
|
|
set -e
|
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
log=$WD/Logs/Log-distcheck-`date +%y%m%d-%H%M`
|
|
|
|
|
2001-03-06 03:08:24 +01:00
|
|
|
echo "Logging script $TMP_SCRIPT into $log"
|
2001-03-07 22:34:42 +01:00
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
if test $to_host = "mysql-work"
|
|
|
|
then
|
|
|
|
# Try to get the right user for MySQL builds on work so that all
|
|
|
|
# files is owned by the same user (mysql)
|
2001-03-06 03:08:24 +01:00
|
|
|
ssh -n $to_host -l my "time sh $TMP_SCRIPT" > $log 2>&1
|
2000-07-31 21:29:14 +02:00
|
|
|
else
|
2001-03-06 03:08:24 +01:00
|
|
|
time sh $TMP_SCRIPT > $log 2>&1
|
2000-07-31 21:29:14 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Create a commercial MySQL distribution (mysqlcom-VER.tar.gz) from
|
|
|
|
# the newly made source distribution
|
|
|
|
|
2000-08-30 23:52:33 +02:00
|
|
|
cd "$BD"
|
2000-07-31 21:29:14 +02:00
|
|
|
DIST=`ls -t mysql-*.tar.gz | head -1`
|
2000-08-30 23:52:33 +02:00
|
|
|
$BD/Build-tools/mysql-copyright --target=. $DIST
|
2000-09-01 00:53:34 +02:00
|
|
|
|
|
|
|
# move the binaries to the 'binary' directory
|
|
|
|
mv $BD/mysql*tar.gz $WD/binary
|
|
|
|
mv $BD/NEW-RPMS/* $WD/binary
|