Commit 59fc549e 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 d06d7363
......@@ -13,6 +13,7 @@ s3bucket=tokutek-mysql-build
sleeptime=60
builtins="mysqlbuild shutdown install startup s3bucket sleeptime"
mysqld_args="--user=mysql --core-file --core-file-size=unlimited"
sudo=/usr/bin/sudo
defaultsfile=""
if [ -f /etc/$(whoami).my.cnf ] ; then
defaultsfile=/etc/$(whoami).my.cnf
......@@ -92,13 +93,13 @@ fi
# set ldpath
ldpath=""
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
# shutdown mysql
if [ $shutdown -ne 0 ] ; then
if [ -x /etc/init.d/mysql ] ; then
sudo setsid /etc/init.d/mysql stop
$sudo setsid /etc/init.d/mysql stop
else
/usr/local/mysql/bin/mysqladmin shutdown
fi
......@@ -123,7 +124,7 @@ fi
if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
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
if [ $? -ne 0 ] ; then exit 1; fi
......@@ -137,8 +138,8 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
installdb=$mysqlbuild/scripts/mysql_install_db
fi
sudo chown -R mysql $mysqlbuild/data
sudo chgrp -R mysql $mysqlbuild/data
$sudo chown -R mysql $mysqlbuild/data
$sudo chgrp -R mysql $mysqlbuild/data
# 5.6 debug build needs this
if [ ! -f $mysqlbuild/bin/mysqld ] && [ -f $mysqlbuild/bin/mysqld-debug ] ; then
......@@ -150,12 +151,14 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
else
default_arg="--defaults-file=$defaultsfile"
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
else
# create link
rm /usr/local/mysql
ln -s $mysqldir /usr/local/mysql
if [ $? -ne 0 ] ; then exit 1; fi
rm /usr/local/$mysqlbuild
ln -s $mysqldir /usr/local/$mysqlbuild
if [ $? -ne 0 ] ; then exit 1; fi
fi
......@@ -170,14 +173,14 @@ if [ $startup -ne 0 ] ; then
echo ulimit -n 10240 exitcode $exitcode
if [ -x /etc/init.d/mysql ] ; then
sudo setsid /etc/init.d/mysql start
$sudo setsid /etc/init.d/mysql start
else
if [ -z "$defaultsfile" ] ; then
default_arg=""
else
default_arg="--defaults-file=$defaultsfile"
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
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