1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug #32679: mysqld_safe looks for errmsg.sys in wrong path

The fix for bug 28544 moved our package data from ./share/mysql
to ./share.  mysqld_safe had the old directory hard-coded.  The
fix is to use the @pkgdatadir@ and @prefix@ values, to adapt to
different ways of building the package.


scripts/make_binary_distribution.sh:
  Document that our build system explicitly overrides the @pkgfoo@ (e.g.,
  pkgdatadir, pkglibdir, etc.) variables when 'make' is called.
scripts/mysqld_safe.sh:
  Replace hard-coded "./share/mysql" with something like
  echo @pkgdatadir@ | sed -e s/^@prefix@//.
  
  Since the fix for bug 28544, this has been broken for mysql 5.1+,
  where the package data dir is "./share" instead of "./share/mysql".
This commit is contained in:
unknown
2007-12-03 18:19:35 -07:00
parent 9b6dc66ede
commit 1d772c91e0
4 changed files with 87 additions and 4 deletions

View File

@ -200,16 +200,24 @@ parse_arguments() {
#
# First, try to find BASEDIR and ledir (where mysqld is)
#
#
if echo '@pkgdatadir@' | grep '^@prefix@' > /dev/null
then
relpkgdata=`echo '@pkgdatadir@' | sed -e 's,^@prefix@,,' -e 's,^/,,' -e 's,^,./,'`
else
# pkgdatadir is not relative to prefix
relpkgdata='@pkgdatadir@'
fi
MY_PWD=`pwd`
# Check for the directories we would expect from a binary release install
if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld
if test -f "$relpkgdata"/english/errmsg.sys -a -x ./bin/mysqld
then
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
# Check for the directories we would expect from a source install
elif test -f ./share/mysql/english/errmsg.sys -a -x ./libexec/mysqld
elif test -f "$relpkgdata"/english/errmsg.sys -a -x ./libexec/mysqld
then
MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
@ -219,6 +227,7 @@ else
ledir=@libexecdir@
fi
#
# Second, try to find the data directory
#