ourdelta-developers team mailing list archive
-
ourdelta-developers team
-
Mailing list archive
-
Message #00455
Re: MariaDB in Debian proper?
On Tue, Nov 09, 2010 at 02:01:18PM +0100, Kristian Nielsen wrote:
> Lionel Elie Mamane <lionel@xxxxxxxxx> writes:
>>> The main issue that needs solving is to let MySQL and MariaDB packages
>>> co-exist in the same repository.
>>> MariaDB is essentially a different version of MySQL; the binaries
>>> are named the same, the libraries are named the same, it runs on
>>> the same default port, etc. So only one can be installed at a
>>> time.
>> I'm not entirely convinced; as far as *desirable* is it truly
>> impossible that one would wish to install both side by side,
>> e.g. because they have diverged in features, or for testing before
>> switching?
> You are right. Packaging MariaDB so that it does not conflict with
> MySQL is an alternative approach.
> It is possible to change the port, rename files, etc. The problem is that
> there are many other programs that connect to MySQL, run the client binaries,
> link the libraries. It seems to me it will become more difficult to make all
> these programs able to use MariaDB as an alternative, and easy to end up so
> that MariaDB users will need to have also some mysql packages installed to
> satisfy dependencies. Or maybe that can all be handled with empty
> (dependency-only) packages, /etc/alternatives, and similar mechanisms?
> Another issue is that the data directories would need to be different (by
> default...), so upgrading from MySQL -> MariaDB (or the other way round) would
> require manual action to migrate the data. Currently, we make a lot of effort
> to ensure that `apt-get install mariadb-server` will automatically migrate,
> including migrating the data directory (and we run automated upgrade tests of
> this scenario on all Debian and Ubuntu versions for every push to our code
> trees).
What about this (some names are suboptimal but I cannot find something
better right now):
Package mariadb-server-5.1:
- installable alongside MySQL (renamed binaries, etc)
- on first installation asks "shall I configure myself to take over
from MySQL or run alongside"?
If choice is "run alongside", create /etc/mysql/conf.d/mariadb,
containing only "mariadb" section, making mariadb default to
different port, data directory, etc.
- /usr/share/doc/mariadb-server-5.1/README.Debian explains how to
switch to "takeover from MySQL", basically delete
/etc/mysql/conf.d/mariadb
Package mariadb-server-mysql:
- conflicts: mysql-server-5.1, mysql-server-5.0, ...
- depends: mariadb-server-5.1
- symlinks /usr/sbin/mysqld->mariadbd, etc.
We can have the same setup for the client packages, or not; the client
packages seem less important to be coinstallable IMHO. In any case,
the libmysql16-FOO packages will *not* be coinstallable.
> On the other hand, as you say, installing side-by-side would make other use
> cases simpler.
>> Only one of the *client* libraries can be installed and active and the
>> same time, that much seems correct.
> I suppose, unless something like /etc/alternatives symlinks can be
> used (don't know if this is possible).
Well, we could, but there is no point, since only one will be used by
programs anyway (that is, be found by the dynamic linker
/lib/ld-linux*.so.2 to resolve the SONAME libmysql.so.16).
--
Lionel
References