[debian-mysql] Bug#853008: Bug#853008: Bug#853008: mysql-server-5.7: purge could delete mariadb-server files with inadequate warning

Robie Basak robie.basak at ubuntu.com
Mon Jan 30 09:28:52 UTC 2017


Hi Julian,

Thank you for reporting this.

On Mon, Jan 30, 2017 at 09:24:46AM +0100, Lars Tangvald wrote:
> Anyone else have any good ideas on how to handle this?

I think the root cause here is that both MySQL and MariaDB packaging
"own" /var/lib/mysql. This causes confusion because even though the
packages Conflict, one can still be purged while the other is installed.

I think that sharing /var/lib/mysql in this way leads to a slew of bugs,
and we should fix it in the long term so that the packaging doesn't do
this.

This is https://launchpad.net/bugs/1490071 and
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841345

Unfortunately fixing this properly is quite involved. I've had time to
think up a solution, but not had time to code it up yet, and I don't
expect to have the necessary time in the next few months.

Am I right in thinking that this could be triggered by installing MySQL
in jessie, upgrading to stretch, installing MariaDB if it isn't already,
and then purging MySQL? If so I agree with "serious" and so we should
find some stop-gap solution in the short term until the full fix above
can be implemented.

Could we work on unifying MySQL and MariaDB's handling of this? Use the
same debconf key and present the question for /var/lib/mysql in general,
making it clear that it applies to both MySQL and MariaDB. Then on
purge, if the answer was "yes, purge", then ask again to confirm that
the user does actually want it deleted both for MySQL and MariaDB (not
sure we can ask debconf questions in postrm though?). A goal should be
that all the code handling creation and deletion of /var/lib/mysql
should be common between MySQL and MariaDB. Either leave comments in the
maintainer scripts, or put the code in mysql-common from
src:mysql-defaults and Pre-Depend on it.

Would this be acceptable, both from technical implementation and UX
perspectives? Does Debian and/or stretch have string translation
deadlines or freezes?

Additionally we could have some hacks to try to determine if the
counterpart variant is installed and not do anything if it is. I think
hacks are fine in the short term because we have an open bug for a
proper solution, and the seriousness of this issue (if as above)
warrants it.

Opinions appreciated.

Robie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20170130/a36715c1/attachment-0001.sig>


More information about the pkg-mysql-maint mailing list