Enable running on Debian Bullseye

Some adaption in database handling is all that is missing. Also add a
platform job that tests this.

Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Change-Id: I6dd3e48444dd415d84df5e7f5c74540847cdd6db
This commit is contained in:
Jens Harbott
2021-05-02 09:29:15 +02:00
committed by Jens Harbott
parent 982b03c605
commit 959a7c262a
3 changed files with 58 additions and 2 deletions
+3 -1
View File
@@ -25,6 +25,8 @@ if [[ -z "$MYSQL_SERVICE_NAME" ]]; then
# provide a mysql.service symlink for backwards-compatibility, but
# let's not rely on that.
MYSQL_SERVICE_NAME=mariadb
elif [[ "$DISTRO" == "bullseye" ]]; then
MYSQL_SERVICE_NAME=mariadb
fi
fi
@@ -105,7 +107,7 @@ function configure_database_mysql {
# In mariadb e.g. on Ubuntu socket plugin is used for authentication
# as root so it works only as sudo. To restore old "mysql like" behaviour,
# we need to change auth plugin for root user
if is_ubuntu && [ "$MYSQL_SERVICE_NAME" == "mariadb" ]; then
if is_ubuntu && [[ "$DISTRO" != "bullseye" ]] && [ "$MYSQL_SERVICE_NAME" == "mariadb" ]; then
sudo mysql $cmd_args -e "UPDATE mysql.user SET plugin='' WHERE user='$DATABASE_USER' AND host='localhost';"
sudo mysql $cmd_args -e "FLUSH PRIVILEGES;"
fi