[MDEV-27685] mysql-common package installed with MariaDB Servier >= 5 conflicts with WineHQ dependency in Ubuntu 20.04/Linux MInt 20.2/3 Created: 2022-01-30  Updated: 2022-02-15  Resolved: 2022-02-14

Status: Closed
Project: MariaDB Server
Component/s: Repositories
Affects Version/s: 10.6.5
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Phil Manger Assignee: Faustin Lammler
Resolution: Not a Bug Votes: 0
Labels: packaging
Environment:

Linux Mint 20.3/Ubuntu 20.04


Issue Links:
Relates
relates to MDEV-5230 Ubuntu's Software Updater wants to un... Closed

 Description   

WineHQ 7.0 fails to install on Linux Mint 20.3/Ubuntu 20.04 because of conflict with a dependency distributed in the installation package from MariaDB mirrors. The winehq-stable dependency chain runs as follows: winehq-stable->wine-stable->wine-stable-i386->libsane:i386->libsnmp35:i386->libmysqlclient21:i386->mysql-common. mariadb-common also depends on mysql-common, but a different version. I attempted to file a bug report with WineHQ, but they said it was not a bug, but the result of building their install package against packages in the official Ubuntu repository, which are several versions behind those distributed through the MariaDB mirrors. They suggested asking the MariaDB package maintainer to provide a 32-bit mysql-common package to match the 64-bit package. In the meantime I have found a workaround by installing mysql-common 5.8+1.0.5ubuntu2 from the Ubuntu repository. MariaDB seems to still work fine after this downgrade, at least for the tasks I use it for, but I had to put a hold on mysql-common to keep the system from nagging me to upgrade.



 Comments   
Comment by Faustin Lammler [ 2022-02-11 ]

Hi Phil!
After installing WineHQ 7.0, those are the maryadb/mysql related packages (tested on Ubuntu 20.04):

root@b63f673b7909:/# dpkg -l | grep -E '(mariadb|mysql)'
ii  libmysqlclient21:amd64               8.0.28-0ubuntu0.20.04.3           amd64        MySQL database client library
ii  libmysqlclient21:i386                8.0.28-0ubuntu0.20.04.3           i386         MySQL database client library
ii  mysql-common                         5.8+1.0.5ubuntu2                  all          MySQL database common files, e.g. /etc/mysql/my.cnf

And here is what packages are installed after installing mariadb-server 10.6:

root@b63f673b7909:/# dpkg -l | grep -E '(mariadb|mysql)'
ii  libdbd-mariadb-perl                  1.11-3ubuntu2                     amd64        Perl5 database interface to the MariaDB/MySQL databases
ii  libmariadb3:amd64                    1:10.6.5+maria~focal              amd64        MariaDB database client library
ii  libmysqlclient21:amd64               8.0.28-0ubuntu0.20.04.3           amd64        MySQL database client library
ii  libmysqlclient21:i386                8.0.28-0ubuntu0.20.04.3           i386         MySQL database client library
ii  mariadb-client-10.6                  1:10.6.5+maria~focal              amd64        MariaDB database client binaries
ii  mariadb-client-core-10.6             1:10.6.5+maria~focal              amd64        MariaDB database core client binaries
ii  mariadb-common                       1:10.6.5+maria~focal              all          MariaDB common configuration files
ii  mariadb-server                       1:10.6.5+maria~focal              all          MariaDB database server (metapackage depending on the latest version)
ii  mariadb-server-10.6                  1:10.6.5+maria~focal              amd64        MariaDB database server binaries
ii  mariadb-server-core-10.6             1:10.6.5+maria~focal              amd64        MariaDB database core server files
ii  mysql-common                         5.8+1.0.5ubuntu2                  all          MySQL database common files, e.g. /etc/mysql/my.cnf

So, the mysql-common packages is not removed even if, you are right, an upgrade is proposed:

root@b63f673b7909:/# apt list --upgradable
Listing... Done
mysql-common/unknown 1:10.6.5+maria~focal all [upgradable from: 5.8+1.0.5ubuntu2]

Asking apt to not upgrade it seems to be a good workaround as you seems not to need it.

It's quite expected that installing packages from 2 non official Ubuntu repository can lead to this kind of situation so I am not sure what we can do (if it is that we should do something). Also this is a special situation where you install packages from another architecture (i386) and we do not provide packages for the i386 architecture on Ubuntu 20.04.

On Debian 11, I can't see this problem as wine does not seems to need mysql-common (at least it is not installed);

root@6354444a3724:/# dpkg -l | grep -E '(wine|mysql|mariadb)'
ii  wine-stable                          7.0.0.0~bullseye-1             amd64        WINE Is Not An Emulator - runs MS Windows programs
ii  wine-stable-amd64                    7.0.0.0~bullseye-1             amd64        WINE Is Not An Emulator - runs MS Windows programs
ii  wine-stable-i386:i386                7.0.0.0~bullseye-1             i386         WINE Is Not An Emulator - runs MS Windows programs
ii  winehq-stable                        7.0.0.0~bullseye-1             amd64        WINE Is Not An Emulator - runs MS Windows programs

So maybe the cleaner would be for wine to remove the dependency to libmysqlclient (or libsane/libsnmp)...

Anyway, can you share the pointer to the discussion that you had with WineHQ upstream devs. This way an even better/cleaner suggestion could maybe come up.

Comment by Phil Manger [ 2022-02-12 ]

If I understand you correctly, installing mariadb-server 10.6 AFTER installing
winehq-stable-7.0 leaves mysql-common 5.8+1.0.5ubuntu2 in place (that is, it
won't try to upgrade it to the version designed for the amd64 architecture).  I
haven't tried that.  Instead I installed mysql-common 5.8+1.0.5ubuntu2 AFTER
installing mariadb-server 10.6 but BEFORE installing winehq 7.0.

Here is the link to my discussion with winehq developers:
https://bugs.winehq.org/show_bug.cgi?id=52459.

Comment by Faustin Lammler [ 2022-02-14 ]

Hi Phil!
Thanks for sharing the link to winehq bug platform.

I did not test all the scenario but yes installing mariadb 10.6 after winehq 7.0 seems to work. Digging a bit more, and based on https://bugs.winehq.org/show_bug.cgi?id=52459 it seems that libsane had a lot of dependencies and they have been removed on recent versions (1.0.32), see bellow:

$ podman run -it ubuntu:20.04 bash -c "apt update && apt show libsane | grep Depends"
Depends: acl, adduser, libsane-common (= 1.0.29-0ubuntu5.2), udev, libavahi-client3 (>= 0.6.16), libavahi-common3 (>= 0.6.16), libc6 (>= 2.29), libcurl3-gnutls (>= 7.16.2), libgcc-s1 (>= 3.0), libgphoto2-6 (>= 2.5.10), libgphoto2-port12 (>= 2.5.10), libieee1284-3, libjpeg8 (>= 8c), libpng16-16 (>= 1.6.2-1), libsnmp35 (>= 5.8+dfsg), libstdc++6 (>= 5.2), libtiff5 (>= 4.0.3), libusb-1.0-0 (>= 2:1.0.22), libxml2 (>= 2.7.4)
 
$ podman run -it ubuntu:21.04 bash -c "apt update && apt show libsane | grep Depends"
Depends: libsane1 (>= 1.0.32-0ubuntu2)

I did not search which of the libsane dependency installs MariaDB/MySQL related stuff, but on ubuntu20.04, you end up with those packages if you install libsane:

$ podman run -it ubuntu:20.04 bash -c "apt update && apt install -y libsane && dpkg -l | grep -E '(mariadb|mysql)'"
...
ii  libmysqlclient21:amd64     8.0.28-0ubuntu0.20.04.3           amd64        MySQL database client library
ii  mysql-common               5.8+1.0.5ubuntu2                  all          MySQL database common files, e.g. /etc/mysql/my.cnf

As you commented, and I agree, there seems to be no reason why WineHQ would require anything from MariaDB (or MySQL). I don't think that there is much more that we can do here (maybe ask libsane maintainers why those huge dependency was needed on old versions).

Anyway, thanks again for reporting, this and your bug report on WineHQ will probably help users if they encounter the same dependency problem.

Comment by Phil Manger [ 2022-02-15 ]

Thanks for all the time you've put into this.

I've done some playing around with this.  I got the package list for mariadb
10.6 off the mirror and mariadb-common is the only file that depends directly on
mysql-common, and then it only requires a version of 5.6 or higher; the version
installed by wine 7.0 is 5.8.  I think that's why it's safe to install mariadb
10.6 after installing wine 7.0:  apt sees a compatible dependency and doesn't
try to overwrite it.  That's just a guess.  If you use upgrade for dist- or
full-upgrade instead of install, or if you use the Linux Mint update manager, it
will try to overwrite mysql-common with a later version and a warning that the
entire chain of reverse-dependencies, including wine itself will be
uninstalled.  It is safest to put a hold on mysql-common so an upgrade won't try
to overwrite it.

I dug a little deeper to find what's in the mysql-common package (dpkg-query -L

They all look like configuration files which most likely are the same for any
version and any architecture, so I don't think any harm is done using any
particular version.

The problem is libsane:i386.  The chain of dependencies is
libsane:i386->libsnmp35:i386->libmysqlclient21:i386->mysql-common:i386.
According to the package list, libmysqlclient21 isn't used by mariadb 10.6, so
that's not a problem.  Looking at the output of dpkg-query -L libsane, it
appears to be nothing but scanner drivers (but for some reason my own scanner
isn't included).  In any case, I cannot understand why it depends on mysql in
any way, much less on a bunch of database configuration files.

Anyway, thanks for all your work.

Phil Manger

On 2/14/22 07:12, Faustin Lammler (Jira) wrote:

Generated at Thu Feb 08 09:54:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.