packages/utils/mariadb/patches/180-relax-mysql_install-db-wrt-pam-tool.patch
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

39 lines
1.1 KiB
Diff

--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -358,6 +358,14 @@ then
exit 1
fi
plugindir=`find_in_dirs --dir auth_pam.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin $basedir/lib/*/mariadb19/plugin`
+ # Upstream assumes all plugins will be always installed, but in OpenWrt we can
+ # install a server without plugins if we want to.
+ if test -z "$plugindir"
+ then
+ echo "Could not find plugin directory." >&2
+ echo "Will continue with \"/usr/lib/mariadb/plugin\"." >&2
+ plugindir=/usr/lib/mariadb/plugin
+ fi
pamtooldir=$plugindir
# relative from where the script was run for a relocatable install
elif test -n "$dirname0" -a -x "$rel_mysqld" -a ! "$rel_mysqld" -ef "@sbindir@/mysqld"
@@ -477,7 +485,9 @@ do
fi
done
-if test -n "$user"
+# There should be no need for this on OpenWrt. If this turns out to be a wrong guess then
+# we can revisit.
+if test -n ""
then
if test -z "$srcdir" -a "$in_rpm" -eq 0
then
@@ -498,6 +508,10 @@ then
echo
fi
fi
+fi
+
+if test -n "$user"
+then
args="$args --user=$user"
fi