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.
This commit is contained in:
Daniel Black 2024-02-20 17:40:43 +11:00
parent f243c73788
commit 0271517495

View file

@ -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"