Update setup script to work with MariaDB 10.4
This commit is contained in:
parent
6061d9bbb4
commit
31466206db
@ -1,6 +1,6 @@
|
|||||||
Name: perl-DBD-MariaDB
|
Name: perl-DBD-MariaDB
|
||||||
Version: 1.21
|
Version: 1.21
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: MariaDB and MySQL driver for the Perl5 Database Interface (DBI)
|
Summary: MariaDB and MySQL driver for the Perl5 Database Interface (DBI)
|
||||||
License: GPL+ or Artistic
|
License: GPL+ or Artistic
|
||||||
URL: https://metacpan.org/release/DBD-MariaDB/
|
URL: https://metacpan.org/release/DBD-MariaDB/
|
||||||
@ -91,6 +91,9 @@ make test
|
|||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 04 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-6
|
||||||
|
- Update setup script to work with MariaDB 10.4
|
||||||
|
|
||||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-5
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ my $DBD_MARIADB_TESTPASSWORD = $ENV{'DBD_MARIADB_TESTPASSWORD'};
|
|||||||
my $MYSQLD = '';
|
my $MYSQLD = '';
|
||||||
my $mysql_version = readpipe("mysql --version");
|
my $mysql_version = readpipe("mysql --version");
|
||||||
if ($mysql_version =~ /MariaDB/) {
|
if ($mysql_version =~ /MariaDB/) {
|
||||||
system("mysql_install_db --no-defaults --datadir=$MYSQL_DIR --force --skip-name-resolve --explicit_defaults_for_timestamp --user=$MYSQL_USER >/dev/null 2>&1");
|
system("mysql_install_db --no-defaults --datadir=$MYSQL_DIR --force --skip-name-resolve --explicit_defaults_for_timestamp >/dev/null 2>&1");
|
||||||
ok($? >> 8 == 0);
|
ok($? >> 8 == 0);
|
||||||
$MYSQLD = '/usr/libexec/mysqld';
|
$MYSQLD = '/usr/libexec/mysqld';
|
||||||
} else {
|
} else {
|
||||||
@ -50,11 +50,11 @@ while (system("/usr/bin/mysqladmin --user=root --socket=$MYSQL_UNIX_PORT ping >/
|
|||||||
}
|
}
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
||||||
system("mysql --user=root --socket=$MYSQL_UNIX_PORT --execute \"CREATE USER '$DBD_MARIADB_TESTUSER\@localhost';\" 2>&1");
|
system("mysql --socket=$MYSQL_UNIX_PORT --execute \"CREATE USER '$DBD_MARIADB_TESTUSER\@localhost';\" 2>&1");
|
||||||
ok($? >> 8 == 0);
|
ok($? >> 8 == 0);
|
||||||
system("mysql --user=root --socket=$MYSQL_UNIX_PORT --execute \"CREATE DATABASE IF NOT EXISTS $DBD_MARIADB_TESTDB CHARACTER SET='utf8mb4';\" 2>&1");
|
system("mysql --socket=$MYSQL_UNIX_PORT --execute \"CREATE DATABASE IF NOT EXISTS $DBD_MARIADB_TESTDB CHARACTER SET='utf8mb4';\" 2>&1");
|
||||||
ok($? >> 8 == 0);
|
ok($? >> 8 == 0);
|
||||||
system("mysql --user=root --socket=$MYSQL_UNIX_PORT --execute \"GRANT ALL PRIVILEGES ON $DBD_MARIADB_TESTDB.* TO '$DBD_MARIADB_TESTUSER\@localhost' IDENTIFIED BY '$DBD_MARIADB_TESTPASSWORD';\" 2>&1");
|
system("mysql --socket=$MYSQL_UNIX_PORT --execute \"GRANT ALL PRIVILEGES ON $DBD_MARIADB_TESTDB.* TO '$DBD_MARIADB_TESTUSER\@localhost' IDENTIFIED BY '$DBD_MARIADB_TESTPASSWORD';\" 2>&1");
|
||||||
ok($? >> 8 == 0);
|
ok($? >> 8 == 0);
|
||||||
system("/usr/bin/mysqladmin --user=$DBD_MARIADB_TESTUSER --password=$DBD_MARIADB_TESTPASSWORD --socket=$DBD_MARIADB_TESTSOCKET ping >/dev/null 2>&1");
|
system("/usr/bin/mysqladmin --user=$DBD_MARIADB_TESTUSER --password=$DBD_MARIADB_TESTPASSWORD --socket=$DBD_MARIADB_TESTSOCKET ping >/dev/null 2>&1");
|
||||||
ok($? >> 8 == 0);
|
ok($? >> 8 == 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user