Commit da8440a3 authored by Rich Prohaska's avatar Rich Prohaska

use devtoolset-1.1 for mysql/mariadb builds. avoids the dep on gcc 4.7 libstdc++.so

parent 2c301de0
...@@ -13,6 +13,7 @@ s3bucket=tokutek-mysql-build ...@@ -13,6 +13,7 @@ s3bucket=tokutek-mysql-build
sleeptime=60 sleeptime=60
builtins="mysqlbuild shutdown install startup s3bucket sleeptime" builtins="mysqlbuild shutdown install startup s3bucket sleeptime"
mysqld_args="--user=mysql --core-file --core-file-size=unlimited" mysqld_args="--user=mysql --core-file --core-file-size=unlimited"
sudo=/usr/bin/sudo
defaultsfile="" defaultsfile=""
if [ -f /etc/$(whoami).my.cnf ] ; then if [ -f /etc/$(whoami).my.cnf ] ; then
defaultsfile=/etc/$(whoami).my.cnf defaultsfile=/etc/$(whoami).my.cnf
...@@ -92,13 +93,13 @@ fi ...@@ -92,13 +93,13 @@ fi
# set ldpath # set ldpath
ldpath="" ldpath=""
if [ -d /usr/local/gcc-4.7/lib64 ] ; then if [ -d /usr/local/gcc-4.7/lib64 ] ; then
ldpath="export LD_LIBRARY_PATH=/usr/local/gcc-4.7/lib64:\$LD_LIBRARY_PATH;" echo skip ldpath="export LD_LIBRARY_PATH=/usr/local/gcc-4.7/lib64:\$LD_LIBRARY_PATH;"
fi fi
# shutdown mysql # shutdown mysql
if [ $shutdown -ne 0 ] ; then if [ $shutdown -ne 0 ] ; then
if [ -x /etc/init.d/mysql ] ; then if [ -x /etc/init.d/mysql ] ; then
sudo setsid /etc/init.d/mysql stop $sudo setsid /etc/init.d/mysql stop
else else
/usr/local/mysql/bin/mysqladmin shutdown /usr/local/mysql/bin/mysqladmin shutdown
fi fi
...@@ -123,7 +124,7 @@ fi ...@@ -123,7 +124,7 @@ fi
if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
rm mysql rm mysql
if [ -d $mysqlbuild ] ; then sudo rm -rf $mysqlbuild; fi if [ -d $mysqlbuild ] ; then $sudo rm -rf $mysqlbuild; fi
tar -x $compression -f $basedir/$mysqltarball tar -x $compression -f $basedir/$mysqltarball
if [ $? -ne 0 ] ; then exit 1; fi if [ $? -ne 0 ] ; then exit 1; fi
...@@ -137,8 +138,8 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then ...@@ -137,8 +138,8 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
installdb=$mysqlbuild/scripts/mysql_install_db installdb=$mysqlbuild/scripts/mysql_install_db
fi fi
sudo chown -R mysql $mysqlbuild/data $sudo chown -R mysql $mysqlbuild/data
sudo chgrp -R mysql $mysqlbuild/data $sudo chgrp -R mysql $mysqlbuild/data
# 5.6 debug build needs this # 5.6 debug build needs this
if [ ! -f $mysqlbuild/bin/mysqld ] && [ -f $mysqlbuild/bin/mysqld-debug ] ; then if [ ! -f $mysqlbuild/bin/mysqld ] && [ -f $mysqlbuild/bin/mysqld-debug ] ; then
...@@ -150,12 +151,14 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then ...@@ -150,12 +151,14 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
else else
default_arg="--defaults-file=$defaultsfile" default_arg="--defaults-file=$defaultsfile"
fi fi
sudo bash -c "$ldpath $installdb $default_arg --user=mysql --basedir=$PWD/$mysqlbuild --datadir=$PWD/$mysqlbuild/data" $sudo bash -c "$ldpath $installdb $default_arg --user=mysql --basedir=$PWD/$mysqlbuild --datadir=$PWD/$mysqlbuild/data"
if [ $? -ne 0 ] ; then exit 1; fi if [ $? -ne 0 ] ; then exit 1; fi
else else
# create link # create link
rm /usr/local/mysql
ln -s $mysqldir /usr/local/mysql ln -s $mysqldir /usr/local/mysql
if [ $? -ne 0 ] ; then exit 1; fi if [ $? -ne 0 ] ; then exit 1; fi
rm /usr/local/$mysqlbuild
ln -s $mysqldir /usr/local/$mysqlbuild ln -s $mysqldir /usr/local/$mysqlbuild
if [ $? -ne 0 ] ; then exit 1; fi if [ $? -ne 0 ] ; then exit 1; fi
fi fi
...@@ -170,14 +173,14 @@ if [ $startup -ne 0 ] ; then ...@@ -170,14 +173,14 @@ if [ $startup -ne 0 ] ; then
echo ulimit -n 10240 exitcode $exitcode echo ulimit -n 10240 exitcode $exitcode
if [ -x /etc/init.d/mysql ] ; then if [ -x /etc/init.d/mysql ] ; then
sudo setsid /etc/init.d/mysql start $sudo setsid /etc/init.d/mysql start
else else
if [ -z "$defaultsfile" ] ; then if [ -z "$defaultsfile" ] ; then
default_arg="" default_arg=""
else else
default_arg="--defaults-file=$defaultsfile" default_arg="--defaults-file=$defaultsfile"
fi fi
sudo -b bash -c "$ldpath /usr/local/mysql/bin/mysqld_safe $default_arg $mysqld_args" >/dev/null 2>&1 & $sudo -b bash -c "$ldpath /usr/local/mysql/bin/mysqld_safe $default_arg $mysqld_args" >/dev/null 2>&1 &
fi fi
sleep $sleeptime sleep $sleeptime
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment