[debian-mysql] Opinions on path/file renaming in MariaDB packaging?

Norvald H. Ryeng norvald.ryeng at oracle.com
Wed Apr 17 07:03:05 UTC 2013


On Thu, 11 Apr 2013 08:21:05 +0200, Otto Kekäläinen <otto at fsfe.org> wrote:

> Hello,
>
> We've discussed with Clint/SpamapS whether or not we should package
> MariaDB with different paths from current MySQL and Clint suggested we
> should discuss the matter on this list too. The two options are
> described below - what are you opinions?
>
>
> Option 1: same /etc/mysql and /var/lib/mysql for both MySQL and MariaDB
> - the packages have Breaks-dependencies, so they will never be
> installed at the same time and not use the same files at the same time
> - at least for versions 5.5., MySQL and MariaDB are binary compatible
> and you can switch the configs and database files back and forth
> (MariaDB has some extra configs but MySQL ignores them, so it does not
> matter)
> - this is how MariaDB upstream does it
> - if in the future the compability situation changes, we can package
> 5.6/10, 11, 12 etc in a different way and in fact will automatically
> anyway package it differently if upstream changes any path or filename
> from mysql to mariadb.
>
> Option 2: use make options to get MariaDB install into /etc/mariadb
> and /var/lib/mariadb

IMHO, this sounds like the best option.

> - the packages would still have Breaks-dependencies and not be
> installable at the same time (as they occupy the same 3306 port when
> running)
> - if MySQL is installed and the end-user runs "apt-get install
> mariadb-server", an automatic migration script would copy the MySQL
> databases into the MariaDB directories and when installing
> mysql-server there wouldn't be any automatic migration in the other
> way

Why not migration both ways?

A migration tool would be useful, but I'm not sure it should be run
automatically. At least, it would have to leave existing data alone if you
already have both /var/lib/mysql and /var/lib/mariadb. We don't want to
overwrite old databases the user may have.

> - even though 5.5. versions are still binary compatible, this kind of
> packaging for any MariaDB version would perhaps be better future-proof
> as the variable config and database files are not exposed to the
> possibility of going back to MySQL use at any later point
> - this is *not* how upstream MariaDB currently does it, so packaging
> would need to maintain a patch that touches the 252 occurences of
> "var/lib/mysql" and the 97 occurences of "etc/mysql" when converting
> the upstream tar.gz into a Debian source package.

I don't know the details of the MariaDB build system, but setting
MYSQL_DATADIR and SYSCONFDIR in cmake may reduce the size of the patch.

Regards,

Norvald H. Ryeng



More information about the pkg-mysql-maint mailing list