Created attachment 576418 [details, diff] Suggested patch Since MariaDB 10.2 the default config includes /etc/mysql/mariadb.d/*.cnf. To get rid of overwriting the distributed default configs /etc/mysql/mariadb.d/50-distro-*.cnf, we've created a "local" config /etc/mysql/mariadb.d/80-local.cnf which gets distributed to our servers. Within 80-local.cnf we define "tmpdir = /var/lib/mysql_tmp". MariaDB/mysqld only respects the last defined tmpdir option but my_print_defaults prints both. Because of this MYSQL_TMPDIR stores "/tmp/\n/var/lib/mysql_tmp". Note the newline between /tmp/ and /var/lib/mysql_tmp. Later the cmd for mysql_install_db gets constructed with MYSQL_TMPDIR which causes $cmd to hold two commands. $cmd is then passed to 'su /bin/sh -c "${cmd[*]}" mysql' which will execute mysql_install_db [args...] and /var/lib/mysql_tmp. This will then fail with "sh: line 1: /var/lib/mysql_tmp: Is a directory".
Created attachment 576420 [details] emerge --config dev-db/mariadb Note the /var/lib/mysql_tmp below the actual command line for mysql_install_db
Created attachment 576422 [details] mysql_install_db.log generated by ebuild
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61d7e42e3601a71418cbcdd11e40e3441a0ae8a7 commit 61d7e42e3601a71418cbcdd11e40e3441a0ae8a7 Author: Brian Evans <grknight@gentoo.org> AuthorDate: 2019-05-13 19:00:27 +0000 Commit: Brian Evans <grknight@gentoo.org> CommitDate: 2019-05-13 19:04:23 +0000 dev-db/mariadb: Fix pkg_config issues when multiple values exist Closes: https://bugs.gentoo.org/685822 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Brian Evans <grknight@gentoo.org> dev-db/mariadb/mariadb-10.2.22-r1.ebuild | 6 +++--- dev-db/mariadb/mariadb-10.2.24.ebuild | 2 +- dev-db/mariadb/mariadb-10.3.13.ebuild | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=561ed0ab80220deff0205463ce2e10c7536309eb commit 561ed0ab80220deff0205463ce2e10c7536309eb Author: Brian Evans <grknight@gentoo.org> AuthorDate: 2019-05-13 18:27:37 +0000 Commit: Brian Evans <grknight@gentoo.org> CommitDate: 2019-05-13 19:04:22 +0000 dev-db/mariadb: Version bump for 10.2.24 Closes: https://bugs.gentoo.org/show_bug.cgi?id=682566 Bug: https://bugs.gentoo.org/685822 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Brian Evans <grknight@gentoo.org> dev-db/mariadb/Manifest | 1 + dev-db/mariadb/mariadb-10.2.24.ebuild | 972 ++++++++++++++++++++++++++++++++++ 2 files changed, 973 insertions(+)