Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948447 - dev-db/mysql-5.7.41 fails at emerge --config
Summary: dev-db/mysql-5.7.41 fails at emerge --config
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
: 948457 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-01-20 15:02 UTC by Georgi
Modified: 2025-01-24 12:27 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,2.61 KB, text/x-log)
2025-01-20 15:03 UTC, Georgi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgi 2025-01-20 15:02:13 UTC
"emerge --config =dev-db/mysql-5.7.41" fails with permission denied:

```
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.311212312.sql' --basedir='/usr' --datadir='/var/lib/mysql' --tmpdir='/tmp' --log-error='/tmp/install_db.723311291.log' --user=mysql
/var/tmp/portage/dev-db/mysql-5.7.41/temp/environment: line 3632: /tmp/install_db.723311291.log: Permission denied
```

Reproducible: Always

Steps to Reproduce:
1. Emerge mysql 5.7.41
2. run "emerge --config =dev-db/mysql-5.7.41" as suggested at the end of emerge process
Actual Results:  
Fails with permission denied for a log file in /tmp

Expected Results:  
The instance is initialized

Related thread: https://forums.gentoo.org/viewtopic-t-1172493.html

At first glance, there's a difference in the line where permissions are checked in the ebuild for 8.0.37 which works fine and 5.7.41:

mysql-8.0.37:

```
1178     einfo "Initializing ${PN} data directory: ${cmd[@]}"
1179     eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
1180 
1181     if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
1182         grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
1183         die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
1184     fi
```

mysql-5.7.41:

```
1181     einfo "Initializing ${PN} data directory: ${cmd[@]}"
1182     eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
1183 
1184     if [[ $? -ne 0 ]] ; then
1185         grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
1186         die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
1187     fi
```
Comment 1 Georgi 2025-01-20 15:03:44 UTC
Created attachment 917132 [details]
build.log

Full build log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-20 17:46:42 UTC
*** Bug 948457 has been marked as a duplicate of this bug. ***
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-20 17:47:36 UTC
Igor (not asking Georgi as I saw his forum comment), is there a reason you need MySQL 5.7.x? Just asking before sinking time into it given it's pretty much a dead branch..
Comment 4 Igor Korot 2025-01-20 17:58:32 UTC
@Sam James,
(In reply to Sam James from comment #3)
> Igor (not asking Georgi as I saw his forum comment), is there a reason you
> need MySQL 5.7.x? Just asking before sinking time into it given it's pretty
> much a dead branch..

This is the earliest version available.
And I want to stay compatible so yes - I do need that.

Thank you for looking into this.
Comment 5 Igor Korot 2025-01-23 18:29:53 UTC
@Sam James,

Are you looking in this?

Thank you.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-24 12:27:42 UTC
We discussed it and the plan is to mask it. It's been EOL for a long time. It doesn't make sense to invest time in it. It is essentially a mistake it is still in tree.