[MDEV-5977] MariaDB 10.0 is not installable on Trusty when "trusty-updates universe" is in sources.list Created: 2014-03-28  Updated: 2015-07-18  Resolved: 2015-06-17

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform Debian
Affects Version/s: 10.0.9
Fix Version/s: 10.0.20

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 1
Labels: packaging

Issue Links:
Blocks
is blocked by MDEV-6284 Merge downstream Debian/Ubuntu packag... Closed
Relates
relates to MDEV-8497 Buildbot upgrade tests fail on Vivid,... Closed

 Description   

Ubuntu recently released MariaDB 5.5.36 in their trusty-updates universe repo.

Now, if some MariaDB 5.5 is installed on the machine (either MariaDB's or Ubuntu's package), and if trusty-updates universe repo is present in sources.list (which it is by default), MariaDB 10.0 cannot be installed in a normal way:

dpkg -l | grep -i maria
ii  libmariadbclient18:amd64                              5.5.36-1                               amd64        MariaDB database client library
ii  mariadb-client-5.5                                    5.5.36-1                               amd64        MariaDB database client binaries
ii  mariadb-client-core-5.5                               5.5.36-1                               amd64        MariaDB database core client binaries
ii  mariadb-common                                        5.5.36-1                               all          MariaDB common metapackage
ii  mariadb-server                                        5.5.36-1                               all          MariaDB database server (metapackage depending on the latest version)
ii  mariadb-server-5.5                                    5.5.36-1                               amd64        MariaDB database server binaries
ii  mariadb-server-core-5.5                               5.5.36-1                               amd64        MariaDB database core server files

sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
 
The following packages have unmet dependencies:
 mariadb-server : Depends: mariadb-server-10.0 (= 10.0.9+maria-1~trusty) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt-get install mariadb-server-10.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
 
The following packages have unmet dependencies:
 mariadb-server-10.0 : Depends: mariadb-client-10.0 (>= 10.0.9+maria-1~trusty) but it is not going to be installed
                       Depends: mariadb-server-core-10.0 (>= 10.0.9+maria-1~trusty) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt-get install mariadb-client-10.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
 
The following packages have unmet dependencies:
 mariadb-client-10.0 : Depends: mariadb-client-core-10.0 (>= 10.0.9+maria-1~trusty) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

However, installing core packages separately works, and they pull the rest along with them:

sudo apt-get install mariadb-server-core-10.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libjemalloc1 mariadb-client-5.5 mariadb-client-core-5.5
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libmariadbclient18 libmysqlclient18 mariadb-client-5.5 mariadb-client-core-5.5 mysql-common
The following packages will be REMOVED:
  mariadb-server mariadb-server-5.5 mariadb-server-core-5.5
The following NEW packages will be installed:
  mariadb-server-core-10.0
The following packages will be upgraded:
  libmariadbclient18 libmysqlclient18 mariadb-client-5.5 mariadb-client-core-5.5 mysql-common
5 upgraded, 1 newly installed, 3 to remove and 896 not upgraded.
Need to get 11,9 MB of archives.

sudo apt-get install mariadb-client-core-10.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libjemalloc1 mariadb-client-10.0 mariadb-server-core-5.5
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libmariadbclient18 libmysqlclient18 mysql-common
The following packages will be REMOVED:
  mariadb-client-5.5 mariadb-client-core-5.5 mariadb-server mariadb-server-5.5
The following NEW packages will be installed:
  mariadb-client-core-10.0
The following packages will be upgraded:
  libmariadbclient18 libmysqlclient18 mysql-common
3 upgraded, 1 newly installed, 4 to remove and 897 not upgraded.
Need to get 1 344 kB of archives.

...

ii  libmariadbclient18                                    10.0.9+maria-1~trusty                  amd64        MariaDB database client library
ii  mariadb-client-10.0                                   10.0.9+maria-1~trusty                  amd64        MariaDB database client binaries
rc  mariadb-client-5.5                                    5.5.36-1                               amd64        MariaDB database client binaries
ii  mariadb-client-core-10.0                              10.0.9+maria-1~trusty                  amd64        MariaDB database core client binaries
ii  mariadb-common                                        5.5.36-1                               all          MariaDB common metapackage
ii  mariadb-server                                        10.0.9+maria-1~trusty                  all          MariaDB database server (metapackage depending on the latest version)
ii  mariadb-server-10.0                                   10.0.9+maria-1~trusty                  amd64        MariaDB database server binaries
rc  mariadb-server-5.5                                    5.5.36-1                               amd64        MariaDB database server binaries
ii  mariadb-server-core-10.0                              10.0.9+maria-1~trusty                  amd64        MariaDB database core server files
ii  mysql-common                                          10.0.9+maria-1~trusty                  all          MariaDB database common files (e.g. /etc/mysql/my.cnf)

Just in case it helps, here is some information about packages on which installation breaks:

sudo apt-cache show mariadb-server-10.0
Package: mariadb-server-10.0
Source: mariadb-10.0
Version: 10.0.9+maria-1~trusty
Architecture: amd64
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Installed-Size: 73372
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
Depends: mariadb-client-10.0 (>= 10.0.9+maria-1~trusty), libdbi-perl, perl (>= 5.6), libaio1 (>= 0.3.93), libc6 (>= 2.17), libpam0g (>= 0.99.7.1), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.6), zlib1g (>= 1:1.2.0), debconf (>= 0.5) | debconf-2.0, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.0 (>= 10.0.9+maria-1~trusty)
Recommends: libhtml-template-perl
Suggests: tinyca, mailx, mariadb-test
Conflicts: mariadb-server (<< 10.0.9+maria-1~trusty), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-tokudb-engine-10.0, mariadb-tokudb-engine-5.5, mysql-server (<< 10.0.9+maria-1~trusty), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5
Replaces: libmariadbclient-dev (<< 5.5.0), libmariadbclient16 (<< 5.3.4), mariadb-server (<< 10.0.9+maria-1~trusty), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-tokudb-engine-10.0, mariadb-tokudb-engine-5.5, mysql-server (<< 10.0.9+maria-1~trusty), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5
Provides: mariadb-server, mysql-server, virtual-mysql-server

Our mariadb-server-5.5:

sudo apt-cache show mariadb-server-5.5
Package: mariadb-server-5.5
Source: mariadb-5.5
Version: 5.5.36+maria-1~saucy
Architecture: amd64
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Installed-Size: 66523
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
Depends: mariadb-client-5.5 (>= 5.5.36+maria-1~saucy), libdbi-perl, perl (>= 5.6), libaio1 (>= 0.3.93), libc6 (>= 2.17), libpam0g (>= 0.99.7.1), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.6), zlib1g (>= 1:1.2.0), debconf (>= 0.5) | debconf-2.0, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= 5.5.36+maria-1~saucy)
Recommends: libhtml-template-perl
Suggests: tinyca, mailx, mariadb-test
Conflicts: mariadb-server (<< 5.5.36+maria-1~saucy), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-tokudb-engine-5.5, mysql-server (<< 5.5.36+maria-1~saucy), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5
Replaces: libmariadbclient-dev (<< 5.5.0), libmariadbclient16 (<< 5.3.4), mariadb-server (<< 5.5.36+maria-1~saucy), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-tokudb-engine-5.5, mysql-server (<< 5.5.36+maria-1~saucy), mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5
Provides: mariadb-server, mysql-server, virtual-mysql-server
Homepage: http://mariadb.org/
Priority: optional
Section: misc
Filename: pool/main/m/mariadb-5.5/mariadb-server-5.5_5.5.36+maria-1~saucy_amd64.deb

Ubuntu's mariadb-server-5.5:

Package: mariadb-server-5.5
Priority: optional
Section: universe/database
Installed-Size: 64356
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Architecture: amd64
Source: mariadb-5.5
Version: 5.5.36-1
Replaces: mariadb-galera-server, mariadb-galera-server-5.5, mariadb-tokudb-engine-10.0, mariadb-tokudb-engine-5.5, mysql-server, mysql-server-5.5, mysql-server-5.6, virtual-mysql-server
Provides: virtual-mysql-server
Depends: libdbi-perl, lsb-base (>= 3.0-10), mariadb-client-5.5 (>= 5.5.36-1), mariadb-server-core-5.5 (>= 5.5.36-1), passwd, perl (>= 5.6), psmisc, debconf (>= 0.5) | debconf-2.0, libaio1 (>= 0.3.93), libc6 (>= 2.17), libpam0g (>= 0.99.7.1), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.6), zlib1g (>= 1:1.2.0)
Pre-Depends: adduser (>= 3.40), debconf, mariadb-common
Recommends: libhtml-template-perl
Suggests: mailx, mariadb-test, tinyca
Conflicts: mariadb-tokudb-engine-10.0, mariadb-tokudb-engine-5.5, mysql-server-core-5.5, mysql-server-core-5.6
Breaks: mariadb-galera-server, mariadb-galera-server-5.5, mariadb-tokudb-engine-10.0, mariadb-tokudb-engine-5.5, mysql-server, mysql-server-5.5, mysql-server-5.6, virtual-mysql-server
Filename: pool/universe/m/mariadb-5.5/mariadb-server-5.5_5.5.36-1_amd64.deb

My best guess is that it has something to do with what MariaDB 5.5 provides and what MariaDB 10.0 replaces/conflicts with.



 Comments   
Comment by Otto Kekäläinen [ 2014-03-28 ]

This turned out to be a rather complex chaing of conflicting 'Conflicts' and 'Provides' in the control file and between two generations of Debian packaging (old in mariadb.org and new in Debian/Ubuntu). Instead of doing a risky fix quickly, I suggest just to release as is, and put this in release notes:

Due to differences in MariaDB.org packages and Debian/Ubuntu packages, upgrading from native Ubuntu MariaDB 5.5 to 10.0 from MariaDB.org repositories will not work by simply issuing 'sudo apt-get install mariadb-server'. Admins are required to first install the mariadb-*-core-10.0 packages and then try mariadb-server again. Alternatively admins can try 'aptitude install mariadb-server'. The different packaging styles will be merged in MariaDB 10.0.11.

Comment by Elena Stepanova [ 2014-03-28 ]

upgrading from native Ubuntu MariaDB 5.5 to 10.0 from MariaDB.org repositories will not work by simply issuing

It is not the whole problem. As the description says, upgrade from MariaDB's MariaDB 5.5 to MariaDB's 10.0 is also affected.
More precisely, upgrade from MariaDB's 5.5.X to 10.0 is affected, if X < 36 and Ubuntu's repo with 5.5.36 is on the list.
For example, if 5.5.35 is installed on the machine, and sources.list contains usual Ubuntu repos, then upgrade to 10.0 fails in the same way.

Comment by Otto Kekäläinen [ 2014-03-30 ]

I've yesterday created a solution for this, but need help to test more to ensure there are no regressions somewhere. To domain is rather complex and I've done this under as an emergency solution under pressure and while attending a conference/coding event..

1) Take a virtual Ubuntu 14.04 installation which has the Ubuntu native mariadb-server (5.5) installed
2) Add to /etc/apt/sources.list the test repository

deb http://labs.seravo.fi/~otto/mariadb-repo/ MDEV-5977/


3) Run apt-get install mariadb-server and confirm that 10.0 is installed without issues.

For me this works, but I haven't had time to do variations or redo everything on a perfectly clean install of Ubuntu 14.04. If this works for you too, then take the file created at http://labs.seravo.fi/~otto/mariadb-repo/MDEV-5977/control and replace the current control files in lp:maria/trunk/debian/dist/*/

Comment by Elena Stepanova [ 2014-04-03 ]

I gave the suggested fix a try on buildbot (10.0-elenst tree).
The tree isn't configured for Trusty, but it doesn't matter for now – it fails even on older versions, e.g. precise, see for example this log:
http://buildbot.askmonty.org/buildbot/builders/kvm-deb-precise-amd64/builds/2674/steps/compile/logs/stdio

The issue is the dependencies, in this case libboost-dev and libjemalloc-dev. We do have boost on the machine, but it was installed from source; and we don't have jemalloc, but it builds just fine with the bundled one. I don't think we can re-configure all build machines just for the sake of the new control files.
Otto, do you have other suggestions? Will it work if we add the flag to override unsatisfied dependencies, or will it fail on the same reason anyway, just later?

Comment by Otto Kekäläinen [ 2014-04-03 ]

As Buildbot does not handle installing build dependencies automatically, you should run manually the commands to install them. In this case simply running 'sudo apt-get install libboost-dev libjemalloc-dev' should be enough. These are both available in Debian, no source installs required.

Comment by Elena Stepanova [ 2014-04-03 ]

But why should we do it?
Installing something from source is a legitimate choice (especially with boost, where, as i understand, the greatest does not necessarily mean the best), even if it's not needed at this moment it might be needed later, and it has worked so far.
Not having jemalloc is also a legitimate choice, since we have a bundled version which can be used for a build.
Why would we want to make every build machine in the future depend on things that are not really needed?

I'll leave this to serg to decide, to me it does not sound like a reasonable requirement.

Comment by Otto Kekäläinen [ 2014-04-04 ]

Thanks for your feedback!

If you want to build in customized ways that differ from how a Debian or Ubuntu build machine would do it, then you can remove from the files the build dependencies you want. But would it not be best if as much as possible of the Debian packaging and building was standardized across Debian, Ubuntu, X, Y, Z and MariaDB.org deb package releases? The out-of-box-experience should be as good as possible and packages building correctly by default in as many places as possible? If somebody wants to do something custom, aren't they most likely to build and install from sources all of MariaDB, or maybe in special case download sources, modify the debian/* contents and then build for their own deployment scenario?

Shouldn't the contents of debian/* in MariaDB repositories be the most optimized and most featureful version, the default that fully works which others can then diverge from? If we leave out important build dependencies from the control file then building deb packages will be "broken" out of the box. For example an undefined libboost-dev will fail the .deb build process in a later step when ha_oqgraph.so is not found.

About libjemalloc: if you think it would be better to use the built in version, please tell me what are the correct build arguments (in debian/rules file) and I'll switch to using that style in Debian and Ubuntu. Some version of libjemalloc should be there by default, otherwise the out-of-the-box default is broken on multiple architectures.

Comment by Elena Stepanova [ 2014-04-04 ]

As I said, I'll leave it to serg to decide.

I have a side note though. Current mariadb installation from Trusty universe (without any involvement of MariaDB repos) works strange. I install mariadb-server, which is currently 5.5.36-1, and through dependencies it pulls libmysqlclient18. Only I guess Trusty repo does not have libmysqlclient18, so it pulls one from MySQL, which is 5.5.35+dfsg. This is just weird, MariaDB 5.5 is not a drop-in replacement anymore, as apparently can't be installed without upstream MySQL.

Comment by Otto Kekäläinen [ 2014-05-11 ]

Serg: I can take care of this if you want, and maybe you can help by simply
reviewing and accepting my merge requests faster?

Comment by Sergei Golubchik [ 2014-05-22 ]

otto, right, but it needs to be assigned to me if I am to review it. Otherwise it won't show up in searches when I look for tasks to do, I simply won't know it's waiting for me.

Comment by Sergei Golubchik [ 2014-07-03 ]

otto, I don't quite understand some of the changes you've done, could you please explain?

  • libmariadbclient18 no longer depends on libmysqlclient18 — how comes?
  • mutiarch support (Multi-Arch: same and Pre-Depends: multiarch-support) — this doesn't seem to be related to the issue in hand. Just something you've fixed at the same time?
  • you've removed lots of Provides (packages used to provides, say, mysql-client, mysql-client-5.1, etc; now only virtual-mysql-client), why?
Comment by Otto Kekäläinen [ 2014-07-04 ]

As said in the comment https://mariadb.atlassian.net/browse/MDEV-5977?focusedCommentId=45512&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-45512 the linked new version of control file was made hasty to a urgent need I was notified about. For your two first questions I don't remember the reason now 3 months later. Thanks for spotting them, they might very well be sour changes. To your third question: these provides messed up the automatic install/upgrade of MariaDB and MySQL in Debian. Now the provides and breaks and replaces are supposed to be optimal. Virtual-mysql-client is a new virtual provides that was agreed upon in Debian.

The root cause of this bug (MDEV-5977) is that the old packaging still distributed in the mariadb.org repos is bad and the utlimate solution is to apply the new Debian packaging from downstream to upstream. So I suggest you forget this issue for a while and focus on https://mariadb.atlassian.net/browse/MDEV-6284 so that the delta between Debian official and MariaDB.org packing is closed for 5.5.

Once that is done I'll do a new merge request that does almost the same changes for 10.0 series, and after that for 10.1 series. While merging these I assume a lot of bugs will be fixed and can be closed in JIRA. However there are a lot of moving parts so I hope to do the 5.5 series first and perhaps iterate it until the same basis is used to do a merge request for 10.0 and 10.1 series.

Comment by Sergei Golubchik [ 2014-07-04 ]

For the record: I tried to remove unrelated changes from your control file and get a minimal patch. Conflicts/Breaks changes are obviously necessary. But it turns out that Provides changes are required too.

Comment by Elena Stepanova [ 2014-11-12 ]

It's been 5 releases and counting, our upgrade is still broken on Trusty.
I'm going to add some ugly workaround to buildbot to make it greener, but really we should solve the problem, it's basically impossible to switch from 5.5 to 10.0 in a civilized way.

Comment by Otto Kekäläinen [ 2014-11-12 ]

I am sorry but I can't make this any faster as higher priorities like getting 10.0 into Debian Jessie and Ubuntu security upgrades eat up my little time. Considering that Sergei made a big review on my git repo with the Debian packaging this summer and since then all (or at least most) of the things Sergei commented are fixed plus a million other fixes, could somebody else maybe step in and start moving the contents from my debian/* to upstream to close MDEV-6284?

https://github.com/ottok/mariadb-5.5
https://github.com/ottok/mariadb-10.0

Comment by Sergei Golubchik [ 2015-06-17 ]

affects utopic as well

Generated at Thu Feb 08 07:08:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.