Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671620 - dev-db/mysql-5.7 loads /etc/mysql/mysql.d/._cfg0000*
Summary: dev-db/mysql-5.7 loads /etc/mysql/mysql.d/._cfg0000*
Status: UNCONFIRMED
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-11-21 10:01 UTC by Alex Efros
Modified: 2018-11-23 14:24 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2018-11-21 10:01:19 UTC
Not sure is we can do anything with this, probably best way is to report issue upstream and patch mysql to ignore hidden files in directories included with `!includedir` directive.

It may be a good idea to add at least ewarn into ebuild, to notify users how important is to merge configs before restarting mysql after upgrade.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2018-11-23 14:09:37 UTC
One way to avoid this, and the intended method of configuration, is to *not* change the package installed files.

Instead, change the settings in a later file that portage does not know about.

Items in a later file alphabetically will overwrite previous entries of the same type.
Comment 2 Alex Efros 2018-11-23 14:24:42 UTC
(In reply to Brian Evans from comment #1)
> One way to avoid this, and the intended method of configuration, is to *not*
> change the package installed files.
> 
> Instead, change the settings in a later file that portage does not know
> about.

Well, this is a good advice, sad it's impossible to apply in case of mysql - just because it's developers choose to be clever.

My specific use case is related to "log-error" option in /etc/mysql/mysql.d/50-distro-server.cnf - only way to redirect mysql logs to stdout (needed because I use runit and wanna collect logs from service's stdout, just like in all other services, and then handle logs using svlogs, with same filtering/rotation as with all other services) is to… DO NOT HAVE "log-error" option. No way to work around this when it set to any, including empty or /dev/stdout or similar values. Since 5.7 - in 5.6 there was a way around this.

So, I had to comment out "log-error" line in package installed config file. But created ._cfg0000* has added this option back.