Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672518 - dev-db/mysql-5.7.24 - pkg_config() fails to write lockfile due to permissions on /var/run/mysqld
Summary: dev-db/mysql-5.7.24 - pkg_config() fails to write lockfile due to permissions...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-04 18:43 UTC by matoro
Modified: 2019-08-17 13:53 UTC (History)
0 users

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


Attachments
emerge --info (info.txt,9.86 KB, text/plain)
2018-12-04 18:43 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2018-12-04 18:43:35 UTC
Created attachment 557088 [details]
emerge --info

On a fresh install of =dev-db/mysql-5.7.24, running emerge --config fails due to root:root 755 perms on /var/run/mysqld.  Changing ownership to mysql:mysql fixes the issue as described here:  https://stackoverflow.com/questions/34954455.

I see the following in mysql-5.7.24.ebuild:

# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT%/}/var/run/mysqld"
if [[ ! -d "${PID_DIR}" ]] ; then
    install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
fi

which may suggest that the directory is somehow created before the check for its existence, and the install command is never run.  A check for correct perms in addition to existence may be the solution, though I have not tested that yet.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-17 13:53:18 UTC
>=dev-db/mysql-8 will check for that and _report_ the problem (https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mysql/mysql-8.0.17.ebuild?id=62c4958c9adbc445838f5bb533ead2f75b22413e#n680). However, we will never adjust permission because we can't know if administrator has set this permission on purpose...

No plans to backport this to <mysql-8.