[MDEV-14921] Fix mariadb/mysql client library packaging for MariaDB 10.3 Created: 2018-01-11  Updated: 2020-08-22  Resolved: 2020-04-23

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

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

Attachments: File mariadb-10.3-libslist-dea08fe5b7.log     File mariadb-10.3-mariadb.org-libs-1a62c8a3964.log     File mariadb-connector-c-libslist-08de8a7.log    
Issue Links:
Blocks
is blocked by CONC-304 Rename the static library to libmaria... Closed
Relates
relates to MDEV-23538 Rename mariadb.pc to mariadbd.pc to a... Open

 Description   

Currently the setup of libmariadb, libmariadbclient and libmysqlclient is a mess. serg tried to fix it in commits b5ead3a658fe705ec64faa2450f6f5c3e2bf3482, 862fbc277c3e6396bdee44a54fc9769957b14ea9 and f7294f5b368116cc83f1d63cb0bcd4ad1cf30657. Then cvicentiu did 325718c996bceb1a3fa54453b54f8d1c2ccdee7d and then serg again f3b6c49f8f6326dfa6859f154d0069d5e735e7df.

I've attached the package listings for relevant lib* debs as of upstream 10.3 commit 1a62c8a3964 and what we have for the server 10.1 package and connector 2.3.x package in Debian officially now. The idea is that upstream 10.3 package listings should at least include everything we already provide in Debian's MariaDB 10.1 and Connector C packages. In addition we can have extra compatibility glue to replace MySQL in aggressive ways we are not allowed to do in official Debian repositories, but what we can do in our own MariaDB.org repo.

It is important to consider what is in Debian now, because those packages are tested extensively in real situations where lots of Debian packages are building against them. Debian users running Debian Stretch might want to use MariaDB 10.3 and upgrade from official Debian repos to MariaDB.org repos, and the upgrade path must work..

We also want to be as much as possible backwards compatible, both for people building new binaries against our libmariadb* libraries, and people running existing binaries and wanting to dynamically load .so files we ship.

I will try to fix this now.



 Comments   
Comment by Otto Kekäläinen [ 2018-01-11 ]

Notes:

  • In Debian official libmariadb2 package we ship usr/lib/*/libmariadb.a but this static library is not even built at all in our upstream 10.3 (there is only libmariadbclient.so/a). Building of libmariadb.a should be enabled and added to libmariadb-dev.install
  • In Debian official package libmariadb-dev has all the files installed in /usr/include/mariadb and /usr/include/mysql symlinks to it. In upstream 10.3 we now have it the other way around and it should be corrected. We should always be calling ourselves mariadb and have all mysql names just as links that to point to our real files.
  • The upstream 10.3 now generates both mysql_config and mariadb_config. Thus, the former is not a symlink to the latter, while in Debian official it is so.
  • No mariadb_config manpage exists. There should be one to replace the mysql_config.1 manpage, like is already done in Debian official repos.
  • The mariadb.pc file however does exists and we symlink from mysqlclient.pc to it.
  • In Debian official client library plugins for libmariadbclient18 go into /usr/lib//mariadb18/plugin/ instead of just /usr/lib//plugin/. This makes sense, the client library plugin files should be in a versioned directory. This should be done in upstream 10.3 as well.

Note about notes: references to now might not apply to the main 10.3 branch but refer to work already done in a feature/bugfix branch that is on its way to mainline.

Comment by Otto Kekäläinen [ 2018-01-11 ]

Here is the diff of the changes I've now done:

--- filelist-1a62c8a3964.log	2018-01-11 17:05:06.863495159 +0000
+++ filelist-bf8440aa898.log	2018-01-11 18:59:51.976618173 +0000
@@ -1,8 +1,27 @@
+libmariadb-dev-compat
+drwxr-xr-x root/root ./
+drwxr-xr-x root/root ./usr/
+drwxr-xr-x root/root ./usr/bin/
+drwxr-xr-x root/root ./usr/lib/
+drwxr-xr-x root/root ./usr/lib/x86_64-linux-gnu/
+drwxr-xr-x root/root ./usr/share/
+drwxr-xr-x root/root ./usr/share/doc/
+drwxr-xr-x root/root ./usr/share/doc/libmariadb-dev-compat/
+-rw-r--r-- root/root ./usr/share/doc/libmariadb-dev-compat/changelog.gz
+-rw-r--r-- root/root ./usr/share/doc/libmariadb-dev-compat/copyright
+drwxr-xr-x root/root ./usr/share/pkgconfig/
+lrwxrwxrwx root/root ./usr/bin/mysql_config
+lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient.a
+lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient.so
+lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient_r.a
+lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient_r.so
+lrwxrwxrwx root/root ./usr/share/pkgconfig/mysqlclient.pc
+------------------------------------------------
 libmariadb-dev
 drwxr-xr-x root/root ./
 drwxr-xr-x root/root ./usr/
 drwxr-xr-x root/root ./usr/bin/
--rwxr-xr-x root/root ./usr/bin/mysql_config
+-rwxr-xr-x root/root ./usr/bin/mariadb_config
 drwxr-xr-x root/root ./usr/include/
 drwxr-xr-x root/root ./usr/include/mysql/
 -rw-r--r-- root/root ./usr/include/mysql/errmsg.h
@@ -402,9 +421,23 @@
 -rw-r--r-- root/root ./usr/share/man/man1/mysql_config.1.gz
 drwxr-xr-x root/root ./usr/share/pkgconfig/
 -rw-r--r-- root/root ./usr/share/pkgconfig/mariadb.pc
+lrwxrwxrwx root/root ./usr/include/mariadb
 lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmariadb.so
 lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmariadbclient.so
-lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient.so
+lrwxrwxrwx root/root ./usr/share/man/man1/mariadb_config.1.gz
+------------------------------------------------
+libmariadb3-compat
+drwxr-xr-x root/root ./
+drwxr-xr-x root/root ./usr/
+drwxr-xr-x root/root ./usr/lib/
+drwxr-xr-x root/root ./usr/lib/x86_64-linux-gnu/
+drwxr-xr-x root/root ./usr/share/
+drwxr-xr-x root/root ./usr/share/doc/
+drwxr-xr-x root/root ./usr/share/doc/libmariadb3-compat/
+-rw-r--r-- root/root ./usr/share/doc/libmariadb3-compat/changelog.gz
+-rw-r--r-- root/root ./usr/share/doc/libmariadb3-compat/copyright
+lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient.so.19
+lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient.so.20
 ------------------------------------------------
 libmariadb3
 drwxr-xr-x root/root ./
@@ -421,8 +454,6 @@
 drwxr-xr-x root/root ./usr/share/doc/libmariadb3/
 -rw-r--r-- root/root ./usr/share/doc/libmariadb3/changelog.gz
 -rw-r--r-- root/root ./usr/share/doc/libmariadb3/copyright
-lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient.so.19
-lrwxrwxrwx root/root ./usr/lib/x86_64-linux-gnu/libmysqlclient.so.20
 ------------------------------------------------
 libmariadbclient18
 drwxr-xr-x root/root ./
@@ -439,8 +470,6 @@
 libmariadbd-dev
 drwxr-xr-x root/root ./
 drwxr-xr-x root/root ./usr/
-drwxr-xr-x root/root ./usr/bin/
--rwxr-xr-x root/root ./usr/bin/mariadb_config
 drwxr-xr-x root/root ./usr/lib/
 drwxr-xr-x root/root ./usr/lib/x86_64-linux-gnu/
 -rw-r--r-- root/root ./usr/lib/x86_64-linux-gnu/libmysqld.a
@@ -478,6 +507,9 @@
 mariadb-backup-10.3
 drwxr-xr-x root/root ./
 drwxr-xr-x root/root ./usr/
+drwxr-xr-x root/root ./usr/bin/
+-rwxr-xr-x root/root ./usr/bin/mariabackup
+-rwxr-xr-x root/root ./usr/bin/mbstream
 drwxr-xr-x root/root ./usr/share/
 drwxr-xr-x root/root ./usr/share/doc/
 drwxr-xr-x root/root ./usr/share/doc/mariadb-backup-10.3/
@@ -570,14 +602,22 @@
 -rw-r--r-- root/root ./usr/share/doc/mariadb-common/changelog.gz
 -rw-r--r-- root/root ./usr/share/doc/mariadb-common/copyright
 ------------------------------------------------
-mariadb-plugin-aws-key-management-10.3
+mariadb-plugin-aws-key-management
 drwxr-xr-x root/root ./
+drwxr-xr-x root/root ./etc/
+drwxr-xr-x root/root ./etc/mysql/
+drwxr-xr-x root/root ./etc/mysql/conf.d/
+-rw-r--r-- root/root ./etc/mysql/conf.d/enable_encryption.preset
 drwxr-xr-x root/root ./usr/
+drwxr-xr-x root/root ./usr/lib/
+drwxr-xr-x root/root ./usr/lib/mysql/
+drwxr-xr-x root/root ./usr/lib/mysql/plugin/
+-rw-r--r-- root/root ./usr/lib/mysql/plugin/aws_key_management.so
 drwxr-xr-x root/root ./usr/share/
 drwxr-xr-x root/root ./usr/share/doc/
-drwxr-xr-x root/root ./usr/share/doc/mariadb-plugin-aws-key-management-10.3/
--rw-r--r-- root/root ./usr/share/doc/mariadb-plugin-aws-key-management-10.3/changelog.gz
--rw-r--r-- root/root ./usr/share/doc/mariadb-plugin-aws-key-management-10.3/copyright
+drwxr-xr-x root/root ./usr/share/doc/mariadb-plugin-aws-key-management/
+-rw-r--r-- root/root ./usr/share/doc/mariadb-plugin-aws-key-management/changelog.gz
+-rw-r--r-- root/root ./usr/share/doc/mariadb-plugin-aws-key-management/copyright
 ------------------------------------------------
 mariadb-plugin-connect
 drwxr-xr-x root/root ./
@@ -720,6 +760,7 @@
 -rw-r--r-- root/root ./etc/mysql/mariadb.conf.d/tokudb.cnf
 drwxr-xr-x root/root ./usr/
 drwxr-xr-x root/root ./usr/bin/
+-rwxr-xr-x root/root ./usr/bin/tokuft_logprint
 -rwxr-xr-x root/root ./usr/bin/tokuftdump
 drwxr-xr-x root/root ./usr/lib/
 drwxr-xr-x root/root ./usr/lib/mysql/
@@ -732,6 +773,10 @@
 -rw-r--r-- root/root ./usr/share/doc/mariadb-plugin-tokudb/README.md/README.md.gz
 -rw-r--r-- root/root ./usr/share/doc/mariadb-plugin-tokudb/changelog.gz
 -rw-r--r-- root/root ./usr/share/doc/mariadb-plugin-tokudb/copyright
+drwxr-xr-x root/root ./usr/share/man/
+drwxr-xr-x root/root ./usr/share/man/man1/
+-rw-r--r-- root/root ./usr/share/man/man1/tokuft_logdump.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/tokuftdump.1.gz
 ------------------------------------------------
 mariadb-server-10.3
 drwxr-xr-x root/root ./
@@ -779,7 +824,6 @@
 -rwxr-xr-x root/root ./usr/bin/myisamlog
 -rwxr-xr-x root/root ./usr/bin/myisampack
 -rwxr-xr-x root/root ./usr/bin/mysql_convert_table_format
--rwxr-xr-x root/root ./usr/bin/mysql_install_db
 -rwxr-xr-x root/root ./usr/bin/mysql_plugin
 -rwxr-xr-x root/root ./usr/bin/mysql_secure_installation
 -rwxr-xr-x root/root ./usr/bin/mysql_setpermission
@@ -836,6 +880,9 @@
 -rw-r--r-- root/root ./usr/share/man/man1/aria_ftdump.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/aria_pack.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/aria_read_log.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/galera_new_cluster.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/galera_recovery.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/mariadb-service-convert.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/msql2mysql.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/my_print_defaults.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/myisam_ftdump.1.gz
@@ -843,7 +890,6 @@
 -rw-r--r-- root/root ./usr/share/man/man1/myisamlog.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/myisampack.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/mysql_convert_table_format.1.gz
--rw-r--r-- root/root ./usr/share/man/man1/mysql_install_db.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/mysql_plugin.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/mysql_secure_installation.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/mysql_setpermission.1.gz
@@ -851,11 +897,17 @@
 -rw-r--r-- root/root ./usr/share/man/man1/mysqlbinlog.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/mysqld_multi.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/mysqld_safe.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/mysqld_safe_helper.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/mysqlhotcopy.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/perror.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/replace.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/resolve_stack_dump.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/resolveip.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/wsrep_sst_common.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/wsrep_sst_mysqldump.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/wsrep_sst_rsync.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/wsrep_sst_xtrabackup-v2.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/wsrep_sst_xtrabackup.1.gz
 drwxr-xr-x root/root ./usr/share/mysql/
 -rwxr-xr-x root/root ./usr/share/mysql/debian-start.inc.sh
 -rwxr-xr-x root/root ./usr/share/mysql/echo_stderr
@@ -876,6 +928,7 @@
 drwxr-xr-x root/root ./usr/
 drwxr-xr-x root/root ./usr/bin/
 -rwxr-xr-x root/root ./usr/bin/innochecksum
+-rwxr-xr-x root/root ./usr/bin/mysql_install_db
 -rwxr-xr-x root/root ./usr/bin/mysql_upgrade
 drwxr-xr-x root/root ./usr/sbin/
 -rwxr-xr-x root/root ./usr/sbin/mysqld
@@ -887,6 +940,7 @@
 drwxr-xr-x root/root ./usr/share/man/
 drwxr-xr-x root/root ./usr/share/man/man1/
 -rw-r--r-- root/root ./usr/share/man/man1/innochecksum.1.gz
+-rw-r--r-- root/root ./usr/share/man/man1/mysql_install_db.1.gz
 -rw-r--r-- root/root ./usr/share/man/man1/mysql_upgrade.1.gz
 drwxr-xr-x root/root ./usr/share/man/man8/
 -rw-r--r-- root/root ./usr/share/man/man8/mysqld.8.gz

https://github.com/MariaDB/server/compare/10.3...ottok:ok-debpkg-10.3

Comment by Otto Kekäläinen [ 2018-01-12 ]

This is not fully solved yet but a major leap has been done as part of https://github.com/MariaDB/server/pull/545

Comment by Otto Kekäläinen [ 2020-02-27 ]

Based on discussion with serg today I filed: https://jira.mariadb.org/browse/CONC-456
That would help solve a lot.

Comment by Otto Kekäläinen [ 2020-02-27 ]

I've fixed most of this on packaging level in https://salsa.debian.org/mariadb-team/mariadb-10.4/-/compare/master...feature%2Flibmariadb-consistent-naming

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

Most of this was fixed via https://github.com/MariaDB/server/commit/87a7968c23d32880920d129c0e3f467495dce10d and https://github.com/MariaDB/server/commit/4bc31a904f22290801075deed949733ba2133974 but it still needs some finishing bits.

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

This was finalized via https://github.com/MariaDB/server/commit/bc11f392f8d18613e33c49f6c0e810516929a527

If there are any remaining bugs, new issues should be opened for them.

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