[MDEV-14225] After apt upgrade from 10.2.8 to 10.2.9 some lib symlinks are lost Created: 2017-10-30  Updated: 2020-08-25  Resolved: 2018-10-31

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform Debian
Affects Version/s: 10.2.9
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Hartmut Holzgraefe Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

debian jessie, probably all .deb distributions


Attachments: HTML File Vagrantfile    
Issue Links:
Relates
relates to MDEV-13589 libmariadbclient18 is broken when usi... Closed

 Description   

When upgrading from MariaDB 10.2.8 to 10.2.9 on Debian the symlinks from libmysqlclient.so.18 and libmariadbclient.so.18 to libmariadb.so.3 are lost.

How to reproduce:

  • install MariaDB 10.2.8 client library packages (libmariadb, libmariadbclient18, libmysqlclient18), directly from .deb files with "dpkg -i"
  • verify that symlinks are there:

$ ls -l /usr/lib/x86_64-linux-gnu/ | grep libmariadb.so
 
lrwxrwxrwx 1 root root       15 Aug 17 12:37 libmariadbclient.so.18 -> libmariadb.so.3
-rw-r--r-- 1 root root   348576  Aug 17 12:37 libmariadb.so.3
lrwxrwxrwx 1 root root       15 Aug 17 12:37 libmysqlclient.so.18 -> libmariadb.so.3
lrwxrwxrwx 1 root root       15 Aug 17 12:37 libmysqlclient.so.19 -> libmariadb.so.3
lrwxrwxrwx 1 root root       15 Aug 17 12:37 libmysqlclient.so.20 -> libmariadb.so.3

Now set up the debian repository and "apt upgrade" to upgrade to 10.2.9.

$ apt upgrade
[...]
The following packages will be upgraded:
  libmariadb3 libmariadbclient18 libmysqlclient18 mariadb-common mysql-common 
[...]

Symlinks for version 18 are gone now:

$ ls -l /usr/lib/x86_64-linux-gnu/ | grep libmariadb.so
 
-rw-r--r-- 1 root root   348576 Sep 25 08:20 libmariadb.so.3
lrwxrwxrwx 1 root root       15 Sep 25 08:20 libmysqlclient.so.19 -> libmariadb.so.3
lrwxrwxrwx 1 root root       15 Sep 25 08:20 libmysqlclient.so.20 -> libmariadb.so.3

Uninstall libmysqlclient18 and libmariadbclient18 packages and then install them again to get the symlinks back again:

$ ls -l /usr/lib/x86_64-linux-gnu/ | grep libmariadb.so
 
lrwxrwxrwx 1 root root       15 Sep 25 08:20 libmariadbclient.so.18 -> libmariadb.so.3
-rw-r--r-- 1 root root   348576 Sep 25 08:20 libmariadb.so.3
lrwxrwxrwx 1 root root       15 Sep 25 08:20 libmysqlclient.so.18 -> libmariadb.so.3
lrwxrwxrwx 1 root root       15 Sep 25 08:20 libmysqlclient.so.19 -> libmariadb.so.3
lrwxrwxrwx 1 root root       15 Sep 25 08:20 libmysqlclient.so.20 -> libmariadb.so.3

This is probably related to the changes introduced my MDEV-13589



 Comments   
Comment by Elena Stepanova [ 2017-10-30 ]

serg,

You've been dealing with those symlinks a lot recently, I'll leave it to you to describe how exactly it's supposed to be at the moment.

Comment by Sergei Golubchik [ 2018-06-19 ]

Doesn't happen anymore.

$ sudo dpkg -i mysql-common_10.2.14+maria~jessie_all.deb 
$ sudo dpkg -i mariadb-common_10.2.14+maria~jessie_all.deb 
$ sudo dpkg -i libmariadb3_10.2.14+maria~jessie_amd64.deb 
$ sudo dpkg -i libmariadbclient18_10.2.14+maria~jessie_amd64.deb 
$ sudo dpkg -i libmysqlclient18_10.2.14+maria~jessie_amd64.deb 
$ ls -l /usr/lib/x86_64-linux-gnu/ | grep libmariadb.so # symlinks are there
$ apt upgrade # to upgrade not mariadb-related packages
$ sudo vim /etc/apt/sources.list # add the repo
$ sudo apt-get update
$ sudo apt upgrade # upgrade to 10.2.15
$ ls -l /usr/lib/x86_64-linux-gnu/ | grep libmariadb.so
lrwxrwxrwx 1 root root       15 May 16 19:00 libmariadbclient.so.18 -> libmariadb.so.3
-rw-r--r-- 1 root root   356704 May 16 19:00 libmariadb.so.3
lrwxrwxrwx 1 root root       15 May 16 19:00 libmysqlclient.so.18 -> libmariadb.so.3
lrwxrwxrwx 1 root root       15 May 16 19:00 libmysqlclient.so.19 -> libmariadb.so.3
lrwxrwxrwx 1 root root       15 May 16 19:00 libmysqlclient.so.20 -> libmariadb.so.3

Comment by Hartmut Holzgraefe [ 2018-07-05 ]

Still happens when upgrading from 10.2.8 to 10.2.15.

The problem is not the upgrade in general, but the change between 10.2.8 and later versions.

So someone who had not upgraded packages for almost a year or more (10.2.8 was released in late August 2017) would still run into this.

Tested with the attached Vagrantfile:

[...]
    default: [info] Succeessfully added trusted package signing keys.
    default: Version: 10.2.8+maria~jessie
    default: lrwxrwxrwx 1 root root       15 Aug 17  2017 libmariadbclient.so.18 -> libmariadb.so.3
    default: -rw-r--r-- 1 root root   344480 Aug 17  2017 libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 Aug 17  2017 libmysqlclient.so.18 -> libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 Aug 17  2017 libmysqlclient.so.19 -> libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 Aug 17  2017 libmysqlclient.so.20 -> libmariadb.so.3
    default: Reading changelogs...
    default: Version: 10.2.15+maria~jessie
    default: -rw-r--r-- 1 root root   356704 May 16 23:00 libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 May 16 23:00 libmysqlclient.so.19 -> libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 May 16 23:00 libmysqlclient.so.20 -> libmariadb.so.3
[...]

Comment by Hartmut Holzgraefe [ 2018-07-05 ]

When trying a 10.2.9->10.2.15 upgrade instead of starting with 10.2.8 everything works as expected indeed

    default: [info] Succeessfully added trusted package signing keys.
    default: Version: 10.2.9+maria~jessie
    default: lrwxrwxrwx 1 root root       15 Sep 25  2017 libmariadbclient.so.18 -> libmariadb.so.3
    default: -rw-r--r-- 1 root root   348576 Sep 25  2017 libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 Sep 25  2017 libmysqlclient.so.19 -> libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 Sep 25  2017 libmysqlclient.so.20 -> libmariadb.so.3
    default: Reading changelogs...
    default: Version: 10.2.15+maria~jessie
    default: lrwxrwxrwx 1 root root       15 May 16 23:00 libmariadbclient.so.18 -> libmariadb.so.3
    default: -rw-r--r-- 1 root root   356704 May 16 23:00 libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 May 16 23:00 libmysqlclient.so.19 -> libmariadb.so.3
    default: lrwxrwxrwx 1 root root       15 May 16 23:00 libmysqlclient.so.20 -> libmariadb.so.3

Comment by Sergei Golubchik [ 2018-10-31 ]

This was a bug in 10.2.8 (and earlier) that was fixed in 10.2.9. Because of that 10.2.8- bugs symlinks disappear when upgrading to 10.2.9+.

A workaround is to reinstall libmariadbclient18 package

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