maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #05140
Re: Files under /etc/my.cnf.d/ read by default
Hi, Honza!
On Feb 05, Honza Horak wrote:
> Hi guys,
>
> while we were packaging MariaDB into Fedora (finally) we used the
> upstream's cnf files structure, which means /etc/my.cnf, that includes
> all files from directory /etc/my.cnf.d/* using statement !includedir.
>
> That works fine when user installs (not updates) the MariaDB packages
> without having them installed before. The problem is if user has changed
> /etc/my.cnf before updating -- then /etc/my.cnf doesn't get updated
> (!includedir won't be added) and we end with files under /etc/my.cnf.d/*
> but nothing what includes them. That is quite confusing for users that
> may change something in /etc/my.cnf.d/client.cnf but nothing happens.
Agree. Especially as we've started to use /etc/my.cnf.d/ now - e.g.
CassandraSE comes in a separate rpm, that (besides the plugin itself)
drops a file into /etc/my.cnf.d/ to enable the engine in the server.
I expect that more separately-packed plugins will start doing the same.
> Since files under /etc/my.cnf.d/* are empty by default it shouldn't do
> any harm if all files corresponding with /etc/my.cnf.d/*.cnf template
> get loaded even without !includedir in /etc/my.cnf. Actually I believe
> that is what users expect to happen when they see files under
> /etc/my.cnf.d..
>
> So, that's basically what I'm proposing -- read files under
> /etc/my.cnf.d/* by default, without a need to use !includedir. What do
> you think?
What if we add !includedir to the /etc/my.cnf from the post-inst script?
Something like
grep -q '!includedir /etc/my.cnf.d' /etc/my.cnf || \
(echo; echo '!includedir /etc/my.cnf.d') >> /etc/my.cnf
Would that be enough?
Regards,
Sergei
Follow ups