Commit 02715174 authored by Daniel Black's avatar Daniel Black

MDEV-33492: mysql_install_db fails when baseurl is set

auth_map.so isn't guaranteed to be available. Fedora packages it
separately.

The --base-dir path of mysql_install_db.sh seems to contain
historicial heuristics that have been replaced on other branches
of the script.

We attempt to do the same here placing the basedir original paths
so that all components are absolute.
parent f243c737
...@@ -344,33 +344,13 @@ then ...@@ -344,33 +344,13 @@ then
pamtooldir="$builddir/plugin/auth_pam" pamtooldir="$builddir/plugin/auth_pam"
elif test -n "$basedir" elif test -n "$basedir"
then then
bindir="$basedir/bin" # only used in the help text bindir="$basedir/@INSTALL_BINDIR@"
resolveip=`find_in_dirs resolveip @resolveip_locations@` resolveip="$bindir/resolveip"
if test -z "$resolveip" mysqld="$basedir/@INSTALL_SBINDIR@/mariadbd"
then langdir="$basedir/share/english"
cannot_find_file resolveip @resolveip_locations@ srcpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
exit 1 buildpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
fi plugindir="$basedir/@INSTALL_PLUGINDIR@"
mysqld=`find_in_dirs mariadbd @mysqld_locations@`
if test -z "$mysqld"
then
cannot_find_file mariadbd @mysqld_locations@
exit 1
fi
langdir=`find_in_dirs --dir errmsg.sys @errmsg_locations@`
if test -z "$langdir"
then
cannot_find_file errmsg.sys @errmsg_locations@
exit 1
fi
srcpkgdatadir=`find_in_dirs --dir fill_help_tables.sql @pkgdata_locations@`
buildpkgdatadir=$srcpkgdatadir
if test -z "$srcpkgdatadir"
then
cannot_find_file fill_help_tables.sql @pkgdata_locations@
exit 1
fi
plugindir=`find_in_dirs --dir auth_pam.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin $basedir/lib/*/mariadb19/plugin`
pamtooldir=$plugindir pamtooldir=$plugindir
# relative from where the script was run for a relocatable install # relative from where the script was run for a relocatable install
elif test -n "$dirname0" -a -x "$rel_mysqld" -a ! "$rel_mysqld" -ef "@sbindir@/mariadbd" elif test -n "$dirname0" -a -x "$rel_mysqld" -a ! "$rel_mysqld" -ef "@sbindir@/mariadbd"
......
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