From 4548e141d60ad1ccc38774f76885e152a49ed4b0ce9918758ef643743ae23150 Mon Sep 17 00:00:00 2001 From: Kristyna Streitova Date: Wed, 26 Feb 2020 09:28:20 +0000 Subject: [PATCH] Accepting request 779317 from home:pgajdos:mariadb - test macros: clarify who is admin and user of the database, fix build with 10.4 - modified sources % macros.mariadb-test OBS-URL: https://build.opensuse.org/request/show/779317 OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=248 --- macros.mariadb-test | 26 ++++++++++++++------------ mariadb.changes | 8 ++++++++ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/macros.mariadb-test b/macros.mariadb-test index 63a2cfb..5e6c9de 100644 --- a/macros.mariadb-test +++ b/macros.mariadb-test @@ -1,17 +1,16 @@ %__mysql_test_run_dir /tmp/mysql -%__mysql_test_user abuild -%__mysql_test_pass abuildpw +%__mysql_test_user dbuser +%__mysql_test_pass dbuserpass %__mysql_test_cconf abuild-myclient.cnf %__mysql_test_port 63306 # # macro: mysql_testserver_start -- start a test mysqld instance # -# usage: %mysql_test_start -u -p -t +# usage: %mysql_test_start -u -p -t # %mysql_testserver_start(u:p:t:) \ -exit 0 \ TEST_RUN_DIR=%{__mysql_test_run_dir} \ TEST_USER="%{-u:%{-u*}}" \ if [ -z "$TEST_USER" ]; then \ @@ -34,7 +33,7 @@ cat << EOF > $TEST_RUN_DIR/my.cnf \ socket = $TEST_RUN_DIR/mysql.sock \ port = $TEST_PORT \ [mysqld] \ -user = $TEST_USER \ +user = abuild \ log-error = $TEST_RUN_DIR/mysqld.log \ secure_file_priv = $TEST_RUN_DIR/datadir-private \ datadir = $TEST_RUN_DIR/datadir \ @@ -51,12 +50,15 @@ echo '>>> Invoking mysqld' \ /usr/sbin/mysqld --defaults-file=$TEST_RUN_DIR/my.cnf& \ sleep 2 \ \ -echo '>>> Creating authentication database' \ -mysqladmin --defaults-file=$TEST_RUN_DIR/my.cnf --user root password 'roots_secret' \ -mysqladmin --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' create testhat \ -mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' -e "CREATE USER '$TEST_USER'@'localhost' IDENTIFIED BY '$TEST_PASS'" \ -mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' -e "GRANT ALL PRIVILEGES ON * . * TO '$TEST_USER'@'localhost'" \ -mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' -e "FLUSH PRIVILEGES" \ +echo '>>> Creating authentication database (credentials: $TEST_USER, $TEST_PASS)' \ +mysqladmin --defaults-file=$TEST_RUN_DIR/my.cnf --user=abuild password abuildpw \ +mysqladmin --defaults-file=$TEST_RUN_DIR/my.cnf --user=abuild --password=abuildpw create testhat \ +cat << EOF > $TEST_RUN_DIR/create_auth.sql \ +CREATE USER '$TEST_USER'@'localhost' IDENTIFIED BY '$TEST_PASS'; \ +GRANT ALL PRIVILEGES ON * . * TO '$TEST_USER'@'localhost'; \ +FLUSH PRIVILEGES; \ +EOF\ +mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user=abuild --password=abuildpw < $TEST_RUN_DIR/create_auth.sql \ %nil # @@ -95,6 +97,6 @@ echo '>>> Shutting the mysql server down' \ cat << EOF > $TEST_RUN_DIR/shutdown.sql \ SHUTDOWN; \ EOF\ -mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user root --password='roots_secret' < $TEST_RUN_DIR/shutdown.sql \ +mysql --defaults-file=$TEST_RUN_DIR/my.cnf --user=abuild --password=abuildpw < $TEST_RUN_DIR/shutdown.sql \ %nil diff --git a/mariadb.changes b/mariadb.changes index 4b65536..c380d51 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -3,6 +3,14 @@ Tue Feb 25 19:40:40 UTC 2020 - Andreas Schwab - Bump disk constraint to 18Gb +------------------------------------------------------------------- +Tue Feb 25 17:17:57 UTC 2020 - pgajdos@suse.com + +- test macros: clarify who is admin and user of the database, + fix build with 10.4 +- modified sources + % macros.mariadb-test + ------------------------------------------------------------------- Fri Feb 21 14:44:16 UTC 2020 - Kristyna Streitova