[MDEV-20298] libdbd-mariadb-perl is not installed upon installation of mariadb-server 10.5 on old Ubuntu/Debian distros that don't have it Created: 2019-08-08  Updated: 2020-04-05  Resolved: 2020-04-05

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

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Otto Kekäläinen
Resolution: Fixed Votes: 0
Labels: None
Environment:

Xenial and more



 Description   

Up to and including 10.4, MariaDB installation on deb systems goes like this:

sudo sh -c 'DEBIAN_FRONTEND=noninteractive MYSQLD_STARTUP_TIMEOUT=180 apt-get install --allow-unauthenticated -y mariadb-server mariadb-client libmariadbclient18'
...
The following additional packages will be installed:
  galera-4 libdbd-mysql-perl libdbi-perl libmariadb3 libmysqlclient20
  libterm-readkey-perl mariadb-client-10.4 mariadb-client-core-10.4
  mariadb-common mariadb-server-10.4 mariadb-server-core-10.4 socat
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl mailx
  mariadb-test tinyca

On 10.5, for example on Xenial, it goes like this:

sudo sh -c 'DEBIAN_FRONTEND=noninteractive MYSQLD_STARTUP_TIMEOUT=180 apt-get install --allow-unauthenticated -y mariadb-server mariadb-client libmariadbclient18'
...
The following additional packages will be installed:
  galera-4 libdbi-perl libmariadb3 libterm-readkey-perl mariadb-client-10.5
  mariadb-client-core-10.5 mariadb-common mariadb-server-10.5
  mariadb-server-core-10.5 socat
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl mailx
  mariadb-test tinyca
Recommended packages:
  libdbd-mariadb-perl

libdbd-mysql-perl is not installed as a dependency, while libdbd-mariadb-perl is only available on some systems, not all that MariaDB currently supports.

The change libdbd-mysql-perl => libdbd-mariadb-perl was intentional, but there should be a fallback in case the latter is not available.



 Comments   
Comment by Sergei Golubchik [ 2019-08-08 ]

I think the Recommended line shoud be libdbd-mariadb-perl | libdbd-mysql-perl (>= 1.2202)

Comment by Robert Bindar [ 2019-08-16 ]

Hi elenst, is this currently fixed? I recall I saw briefly a push of yours some days ago about this bug.

Comment by Elena Stepanova [ 2019-08-16 ]

My change was to work around the problem in buildbot. I didn't do anything for actual bug fixing.

Comment by Robert Bindar [ 2019-08-16 ]

Got it, many thanks!

Comment by Sergei Golubchik [ 2019-08-21 ]

1. I presume you've tested it manually on xenial
2. please, test it in buildbot too: push it in a bb-10.5-* branch, have the buildbot fix undone. If your patch fixes failures — go ahead and push

Comment by Otto Kekäläinen [ 2020-03-16 ]

Status for mariadb-client-10.5 as of today:

Package: mariadb-client-10.5
..
Recommends: libdbd-mariadb-perl,
            libdbi-perl,
            libterm-readkey-perl

Comment by Otto Kekäläinen [ 2020-03-16 ]

Depending on the apt settings, the "Recommends" fields is sometimes installed, and sometimes not. On most systems all "Recommends" are usually installed by default. It is not a strict dependency however.

It is unclear what to problem is here. To me it looks like everything is behaving as it should.

Note that on Ubuntu Focal:

Package: libdbd-mysql-perl
Depends: perl (>= 5.30.0-8), perl-dbdabi-94, perlapi-5.30.0, libc6 (>= 2.4), libmysqlclient21 (>= 8.0.11), libdbi-perl
 
Package: libdbd-mariadb-perl
Depends: perl (>= 5.30.0-7), perl-dbdabi-94, perlapi-5.30.0, libc6 (>= 2.14), libmysqlclient21 (>= 8.0.11), libdbi-perl (>= 1.642)

While on Debian Sid (as of today):

Package: libdbd-mysql-perl
Depends: perl (>= 5.30.0-6), perl-dbdabi-94, perlapi-5.30.0, libc6 (>= 2.4), libmariadb3 (>= 3.0.0), libdbi-perl
 
Package: libdbd-mariadb-perl
Depends: perl (>= 5.30.0-9), perl-dbdabi-94, perlapi-5.30.0, libc6 (>= 2.15), libmariadb3 (>= 3.0.0), libdbi-perl (>= 1.642)

So when reporting and defining what the bug/problem is, please be specific on both what the Debian/Ubuntu version is and what MariaDB version is concerned, and what was the concrete result that was unwanted so that the exact same situation can be re-produced and addressed.

Comment by Elena Stepanova [ 2020-03-16 ]

otto,

I think I was as specific as it gets. Both the description and the environment field mention at least one specific version of Ubuntu, Xenial. I cannot afford checking the whole universe of Debians and especially Ubuntus, I'm not testing them; and even less can I predict what would happen on Ubuntu Focal which wasn't even released by the time the report was filed, or what would happen 7 months in future on Debian Sid which is unstable by nature.

For the (un)wanted result, again I don't believe I was in any way unclear. The description says "libdbd-mysql-perl or libdbd-mariadb-perl is not installed upon installation of mariadb-server", this is the unwanted result. The description goes further and demonstrates how it can happen, as well as specifies what the expected behavior would be ("there should be a fallback in case the latter is not available").

Now, I'm not claiming that it still doesn't work – if a bug report stays unattended for over half a year, some information in it is bound to get outdated. The developer's choice is either to handle the reports in due time, or deal with possible discrepancies.

Comment by Otto Kekäläinen [ 2020-03-16 ]

Trying to verify, using always Xenial as environment:

docker run -it ubuntu:xenial bash
...
apt install mariadb-client    
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ifupdown iproute2 isc-dhcp-client isc-dhcp-common libaio1 libatm1 libdbd-mysql-perl libdbi-perl
  libdns-export162 libgdbm3 libisc-export160 libmnl0 libmysqlclient20 libperl5.22 libreadline5
  libssl1.0.0 libterm-readkey-perl libxtables11 mariadb-client-10.0 mariadb-client-core-10.0
  mariadb-common mysql-common netbase perl perl-modules-5.22 rename
 
--> libdbd-mysql-perl included
 
 
# cat /etc/apt/sources.list.d/mariadb.list 
deb [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.3/ubuntu xenial main
# apt-get install mariadb-client-10.3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ifupdown iproute2 isc-dhcp-client isc-dhcp-common libatm1 libdbd-mysql-perl libdbi-perl
  libdns-export162 libgdbm3 libisc-export160 libmariadb3 libmnl0 libmysqlclient20 libperl5.22
  libreadline5 libterm-readkey-perl libxtables11 mariadb-client-core-10.3 mariadb-common mysql-common
  netbase perl perl-modules-5.22 rename
 
--> libdbd-mysql-perl included
 
 
# cat /etc/apt/sources.list.d/mariadb.list 
deb [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.4/ubuntu xenial main
 apt-get install mariadb-client-10.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ifupdown iproute2 isc-dhcp-client isc-dhcp-common libatm1 libdbd-mysql-perl libdbi-perl
  libdns-export162 libgdbm3 libisc-export160 libmariadb3 libmnl0 libmysqlclient20 libperl5.22
  libreadline5 libterm-readkey-perl libxtables11 mariadb-client-core-10.4 mariadb-common mysql-common
  netbase perl perl-modules-5.22 rename
 
--> libdbd-mysql-perl included
 
 
# cat /etc/apt/sources.list.d/mariadb.list 
deb [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.5/ubuntu xenial main
# apt-get install mariadb-client-10.5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ifupdown iproute2 isc-dhcp-client isc-dhcp-common libatm1 libdbi-perl libdns-export162 libgdbm3
  libisc-export160 libmariadb3 libmnl0 libperl5.22 libreadline5 libterm-readkey-perl libxtables11
  mariadb-client-core-10.5 mariadb-common mysql-common netbase perl perl-modules-5.22 rename
Suggested packages:
  ppp rdnssd iproute2-doc resolvconf avahi-autoipd isc-dhcp-client-ddns apparmor libclone-perl
  libmldbm-perl libnet-daemon-perl libsql-statement-perl perl-doc libterm-readline-gnu-perl
  | libterm-readline-perl-perl make
Recommended packages:
  libdbd-mariadb-perl
The following NEW packages will be installed:
  ifupdown iproute2 isc-dhcp-client isc-dhcp-common libatm1 libdbi-perl libdns-export162 libgdbm3
  libisc-export160 libmariadb3 libmnl0 libperl5.22 libreadline5 libterm-readkey-perl libxtables11
  mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mysql-common netbase perl
  perl-modules-5.22 rename
0 upgraded, 23 newly installed, 0 to remove and 36 not upgraded.
Need to get 11.1 MB of archives.
After this operation, 84.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
 
# apt-get install libdbd-mariadb-perl
E: Package 'libdbd-mariadb-perl' has no installation candidate

Ok, so the problem here is that libdbd-mariadb-perl is not installed upon installation of mariadb-server 10.5 on old Ubuntu/Debian distros that don't have it. I updated the bug title to reflect this. This is due to debian/control file change in: https://github.com/MariaDB/server/commit/5cc2096f93b7f130b36f8bc0fc43440db9a848e4

Naturally libdbd-mariadb-perl can't install on old distro versions released in 2016, since it didn't exist back then. The change 5cc2096f93b7f130b36f8bc0fc43440db9a848e4 is OK 10.5 and new distro releases, but for backwards compatibility the old value should be kept as an alternative.

Solution is to set `Recommends: libdbd-mariadb-perl | libdbd-mysql-perl` for mariadb-client-10.5. This is done in https://github.com/MariaDB/server/pull/1377 (with an added requirement 1.2202 without any explanation why) but with poor documentation. With the new summary line of this bug report the issue is now clear.

Comment by Otto Kekäläinen [ 2020-04-05 ]

Closed via https://github.com/MariaDB/server/pull/1468/commits/6959c0922a6d62e469947eb3e0fec582e754f648

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