correct options for mysql_install_db
* Using the correct options for mysql_install_db so that it continues to work with MySQL 5.7.x. * Build-Depends on default-mysql-client and default-mysql-server instead of mysql-client & mysql-server (the later is kept as an alternative). Change-Id: I5532ad5d7afef7062a9cbb96ec3c03612b89485f
This commit is contained in:
parent
88c7bb96af
commit
adbeca7d48
|
@ -1,3 +1,12 @@
|
|||
migrate (0.10.0-6) unstable; urgency=medium
|
||||
|
||||
* Using the correct options for mysql_install_db so that it continues to work
|
||||
with MySQL 5.7.x.
|
||||
* Build-Depends on default-mysql-client and default-mysql-server instead of
|
||||
mysql-client & mysql-server (the later is kept as an alternative).
|
||||
|
||||
-- Thomas Goirand <zigo@debian.org> Fri, 21 Oct 2016 09:33:40 +0200
|
||||
|
||||
migrate (0.10.0-5) unstable; urgency=medium
|
||||
|
||||
[ Thomas Goirand ]
|
||||
|
|
|
@ -14,8 +14,8 @@ Build-Depends: debhelper (>= 9),
|
|||
python3-all,
|
||||
python3-pbr (>= 1.8),
|
||||
python3-setuptools,
|
||||
Build-Depends-Indep: mysql-client,
|
||||
mysql-server,
|
||||
Build-Depends-Indep: default-mysql-client | mysql-client,
|
||||
default-mysql-server | mysql-server,
|
||||
python-coverage,
|
||||
python-decorator,
|
||||
python-feedparser,
|
||||
|
|
|
@ -5,9 +5,22 @@ set -e
|
|||
MYTEMP_DIR=`mktemp -d`
|
||||
ME=`whoami`
|
||||
|
||||
MYSQL_VERSION=/usr/sbin/mysqld --version 2>/dev/null | grep Ver | awk '{print $3}' | cut -d- -f1
|
||||
MYSQL_VERSION_MAJ=$(echo $MYSQL_VERSION) | cut -d. -f1
|
||||
MYSQL_VERSION=/usr/sbin/mysqld --version 2>/dev/null | grep Ver | awk '{print $3}' | cut -d- -f1
|
||||
MYSQL_VERSION_MID=$(echo $MYSQL_VERSION) | cut -d. -f2
|
||||
MYSQL_VERSION=/usr/sbin/mysqld --version 2>/dev/null | grep Ver | awk '{print $3}' | cut -d- -f1
|
||||
MYSQL_VERSION_MIN=$(echo $MYSQL_VERSION) | cut -d. -f3
|
||||
|
||||
if [ "${MYSQL_VERSION_MAJ}" -le 5 ] && [ "${MYSQL_VERSION_MID}" -lt 7 ] ; then
|
||||
MYSQL_INSTALL_DB_OPT="--force --skip-name-resolve"
|
||||
else
|
||||
MYSQL_INSTALL_DB_OPT="--basedir=/usr"
|
||||
fi
|
||||
|
||||
# --force is needed because buildd's can't resolve their own hostnames to ips
|
||||
echo "===> Preparing MySQL temp folder"
|
||||
mysql_install_db --no-defaults --datadir=${MYTEMP_DIR} --force --skip-name-resolve --user=${ME}
|
||||
mysql_install_db --no-defaults --datadir=${MYTEMP_DIR} ${MYSQL_INSTALL_DB_OPT} --user=${ME}
|
||||
chown -R ${ME} ${MYTEMP_DIR}
|
||||
echo "===> Starting MySQL"
|
||||
/usr/sbin/mysqld --no-defaults --skip-grant-tables --user=${ME} --socket=${MYTEMP_DIR}/mysql.sock --datadir=${MYTEMP_DIR} --skip-networking &
|
||||
|
|
Loading…
Reference in New Issue