Using "mysql-common" as a package name for a MariaDB package is showstopper for adding us into any Debian repository

Bug #587850 reported by Henrik Ingo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Kristian Nielsen

Bug Description

Background:
Packages built by MariaDB buildbot system can be seen here: http://ftp.rediris.es/mirror/MariaDB/mariadb-5.1.44b/kvm-deb-debian5-amd64/debs/binary/
Packages from OurDelta are here: http://nerdvana.us.mirror.ourdelta.org/deb/dists/lenny/mariadb-ourdelta/

MariaDB deb packages contain packages "mysql-common" and "libmysqlclient16". OurDelta additionally ships a "libmysqlclient15off" package.

This issue was in fact reported once, but we decided to ignore it then: https://bugs.launchpad.net/maria/+bug/481298

Problem:
Since this is the exact name of a package that already exists in Debian (the original mysql-common from MySQL) then this prevents MariaDB from being in a Debian repository.

The current package naming seems to have been chosen as a work around to solve some behavior where APT would prefer to install a MySQL package instead of an Ourdelta package (and this is inherited in current MariaDB packaging). (I will post in a comment an IRC discussion of the details with more info.)

Solution:
MariaDB must have unique package names and use Provides: and Conflicts: to properly replace existing MySQL packages. It is not a correct solution to produce packages that have the identical same name as the MySQL package.

There could be many different solutions. At the moment it is unclear why apt-get proposes to install a package that shouldn't even be considered since it "Conflict:"s with a package being installed instead. If this is true, it may be considered a bug in apt-get. (This needs to be re-verified as a first step of fixing this bug.)

Alternatively: for "mysql-common" we could decide that on Debian platforms we in fact "Depend:" on the original MySQL package and then provide additions in a "mariadb-common" package that installs additional configurations in /etc/mysql/conf.d/ and similarly we could omit to provide a libmysqlclient16 package at all.

Revision history for this message
Henrik Ingo (hingo) wrote :
tags: added: 5.2 debian packaging
Revision history for this message
Henrik Ingo (hingo) wrote :

I added 5.2 into tags: If we need to change details of the packaging, such as package names, this should be done before 5.2 RC.

Revision history for this message
Henrik Ingo (hingo) wrote :

[13:05:22] <serg> so, mysql-client-5.1 depends on libmysqlclient16 (>= 5.1.43-1) and libdbd-mysql-perl (>= 1.2202)
[13:05:50] <serg> libdbd-mysql-perl (>= 1.2202) in turn depends on libmysqlclient16 (>= 5.1.21-1)
[13:06:39] <serg> that is, we need to provide libmysqlclient16 to satisfy libdbd-mysql-perl dependencies

Changed in maria:
status: New → Confirmed
Changed in maria:
assignee: nobody → Sergei (sergii)
Revision history for this message
Kristian Nielsen (knielsen) wrote :

Apart from libdbd-mysql-perl, another important thing to check is that libmyodbc works correctly. We had a bug where it did not work with MariaDB client library, as it uses internal stuff (the actual culprit was fastmutexes calls).

A full list of packages that depend on libmysqlclient can be obtained from

    apt-cache rdepends libmysqlclient15off

The mysql-common package contains /etc/mysql/my.cnf. It seems to me that mariadb and mysql has to use the same my.cnf, since they use the same data directory /var/lib/mysql. Otherwise a user switching from mysql to mariadb or vice versa could experience all kinds of problems when the my.cnf suddenly changes server configuration.

Revision history for this message
Sergei Golubchik (sergii) wrote :
Changed in maria:
importance: Undecided → High
Changed in maria:
milestone: none → 5.2
Revision history for this message
Kristian Nielsen (knielsen) wrote :

In MariaDB 5.5, there is no longer a conflict on package mysql-common. We do
provide a mysql-common package in the MariaDB repo for completeness, but it is
perfectly possible to use MariaDB with the standard mysql-common package from
the main repos. MariaDB-specific config is done through a separate package
mariadb-common.

As for package libmysqlclient16 - this is an empty package that depends on
libmariadbclient16. This is necessary as long as MariaDB is maintained in a
3rd-party repository. There are other packages with versioned dependencies on
libmysqlclient16. To replace libmysqlclient.so with the MariaDB version, we
need to provide a real libmysqlclient package to satisfy these dependencies.

But when/if MariaDB is integrated into the main repositories, this can be
handled with the alternatives system. Eg. main libmysqlclient16 package can be
a virtual package that depends: on libmariadbclient16 |
libmysqlclient16-oracle.

So this should be fixed now.

Changed in maria:
assignee: Sergei (sergii) → Kristian Nielsen (knielsen)
milestone: 5.2 → 5.5
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.