On fresh-new gentoo installation, ebuild dev-db/mysql-8.0.32-r2 has issue with configuration step. Looks like some "chown" issue inside pkg-config step: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab0818d2ba2fd2ab8efa5e1ba9bcb2503975a8b1 Reproducible: Always Steps to Reproduce: 1. emerge dev-db/mysql 2. emerge --config 'dev-db/mysql' Actual Results: emerge --config 'dev-db/mysql' Configuring pkg... * Detected settings: * ================== * MySQL User: mysql * MySQL Group: mysql * MySQL DATA directory: /var/lib/mysql * MySQL TMP directory: /tmp * PID DIR: /run/mysqld * Install db log: /tmp/install_db.332122134.log * Install server log: /tmp/install_mysqld.525222211.log * Please select default authentication plugin (enter number or plugin name): * 1) caching_sha2_password [MySQL 8.0 default] * 2) mysql_native_password [MySQL 5.7 default] * * For details see: * https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password >2 /var/tmp/portage/dev-db/mysql-8.0.32-r2/temp/environment: line 3186: /tmp/install_db.332122134.log: Permission denied * Ensuring that default-auth is set to 'mysql_native_password' in '/etc/mysql/mysql.d/50-distro-client.cnf' ... * Ensuring that default-authentication-plugin is set to 'mysql_native_password' in '/etc/mysql/mysql.d/50-distro-server.cnf' ... * Trying to get password for mysql 'root' user from 'mysql' section ... * Trying to get password for mysql 'root' user from 'client' section ... * Found password in 'client' section! * Initializing mysql data directory: /usr/sbin/mysqld --loose-skip-host-cache --loose-skip-name-resolve --loose-skip-networking --loose-skip-slave-start --loose-skip-federated --loose-skip-ssl --loose-skip-log-bin --loose-skip-relay-log --loose-skip-slow-query-log --loose-skip-external-locking --loose-skip-log-slave-updates --initialize-insecure --init-file='/tmp/tz.272931119.sql' --basedir='/usr' --datadir='/var/lib/mysql' --tmpdir='/tmp' --log-error='/tmp/install_db.332122134.log' --user=mysql /var/tmp/portage/dev-db/mysql-8.0.32-r2/temp/environment: line 3275: /tmp/install_db.332122134.log: Permission denied * ERROR: dev-db/mysql-8.0.32-r2::gentoo failed (config phase): * Failed to initialize mysql data directory. Please review '/tmp/install_db.332122134.log'! * * Call stack: * ebuild.sh, line 136: Called pkg_config * environment, line 3278: Called die * The specific snippet of code: * die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"; * * If you need support, post the output of `emerge --info '=dev-db/mysql-8.0.32-r2::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-db/mysql-8.0.32-r2::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-db/mysql-8.0.32-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-8.0.32-r2/temp/environment'. * Working directory: '/var/tmp/portage/dev-db/mysql-8.0.32-r2/empty' * S: '/var/tmp/portage/dev-db/mysql-8.0.32-r2/work/mysql-8.0.32' emerge --info Portage 3.0.49 (python 3.11.4-final-0, default/linux/amd64/17.1, gcc-12, glibc-2.37-r3, 6.1.41-gentoo-x86_64 x86_64) ================================================================= System uname: Linux-6.1.41-gentoo-x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E5-2670_0_@_2.60GHz-with-glibc2.37 KiB Mem: 131926792 total, 125493840 free KiB Swap: 50329596 total, 50329596 free Timestamp of repository gentoo: Sun, 30 Jul 2023 13:45:01 +0000 Head commit of repository gentoo: 477f52c4394e89e894be8665d1fcfd263a3c9f06 Head commit of repository 200volts-com: a9d68b65606b21354672ecb4bcb567a39a64b926 Timestamp of repository feniksa: Wed, 26 Jul 2023 06:17:13 +0000 Head commit of repository feniksa: ee089f75388a54178db05b08d4df0b85da5bb8f2 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-lang/perl: 5.36.1-r3::gentoo dev-lang/python: 3.11.4::gentoo dev-lang/rust: 1.69.0-r1::gentoo dev-util/cmake: 3.26.4-r1::gentoo dev-util/meson: 1.1.1::gentoo sys-apps/baselayout: 2.13-r1::gentoo sys-apps/openrc: 0.47.1::gentoo sys-apps/sandbox: 2.37::gentoo sys-devel/autoconf: 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 16.0.6::gentoo sys-devel/gcc: 12.3.1_p20230526::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/llvm: 16.0.6::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r3::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage/ priority: -1000 volatile: False sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 200volts-com location: /var/db/repos/200volts.com sync-type: git sync-uri: ssh://feniks@200volts.com:29418/gentoo-ebuild masters: gentoo volatile: False feniksa location: /var/db/repos/feniksa sync-type: git sync-uri: https://github.com/gentoo-mirror/feniksa.git masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--jobs 10" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe -march=native" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native" GENTOO_MIRRORS="http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j33" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/zsh" USE="acl amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nls nptl numa openmp pam pcre readline seccomp split-usr ssl test-rust threads unicode vhosts vim-syntax xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias proxy proxy_http authn_core authz_core unixd socache_shmcb cache_disk http2" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" NGINX_MODULES_HTTP="stub_status access auth_basic autoindex browser charset empty_gif fastcgi geo grpc gzip limit_conn limit_req map memcached mirror proxy referer rewrite scgi split_clients ssi upstream_hash upstream_ip_hash upstream_keepalive upstream_least_conn upstream_zone userid uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Solution for issue: remove /etc/mysql directory and re-run emerge --config