server
server copied to clipboard
MDEV-23538: Rename mariadb.pc to mariadb-embedded-server.pc to avoid confusion
https://jira.mariadb.org/browse/MDEV-23538
Change so that the client library config can be accessed using the name libmariadb.pc or mariadb.pc. Rename old mariadb.pc to mariadbd.pc to better indicate that the config is for the daemon build, not client.
In downstream Debian we already ship the libmariadb.pc as mariadb.pc: https://salsa.debian.org/mariadb-team/mariadb-10.5/-/commit/2f183af990fbe1cfa8c343998c7640f45f45368b
Hi @ottok !
Is this still WIP, or ready for review?
Thanks for taking a look! Serg suggested removing the libmariadb symlink in https://jira.mariadb.org/browse/MDEV-23538. The PR is technically done, we just need to get a technical decision on the naming, see Jira.
My suggestion is this PR.
And yeah, the debian/rules would be better done in CMake. I can close this PR if you want to take a shot at putting the files with correct names in correct places directly in CMake code.
And yeah, the
debian/ruleswould be better done in CMake. I can close this PR if you want to take a shot at putting the files with correct names in correct places directly in CMake code.
This should be done in CMakeFiles so it would be benefiting RPM also.
@illuusio If you make a CMake level implementation and post the PR url here, I will close this PR in favor of yours.
@illuusio If you make a CMake level implementation and post the PR url here, I will close this PR in favor of yours.
Ideally this would be fixed on the CMake level. Never the less, I also now rebased this on latest 10.9.
Also, due to @vuvova comment in https://jira.mariadb.org/browse/MDEV-23538 I changed the new name from mariadbd.pc to libmariadbd.pc.
Rebased on 11.0 now. It was already fine to merge in 10.9, hopefully it will get merged now.
There is problem that most of the code does not compile on Debian withouth patching and compiles on other distros fine or am I missing something?
There is problem that most of the code does not compile on Debian withouth patching and compiles on other distros fine or am I missing something?
CI currently failing on test innodb_zip.cmp_drop_table and build error on columnstore.dir/ha_mcs_dml.cpp.o] Error 1. I do not see how they can be caused by the changes in this PR - seems more likely that the CI on branch 11.0 is unstable.
@vuvova There is https://github.com/mariadb-corporation/mariadb-connector-c/blob/3.3/mariadb_config/libmariadb.pc.in for the client, and this file is being built and shipped as libmariadb.pc. There is also this server file you referenced that comes from https://github.com/MariaDB/server/blob/11.1/support-files/mariadb.pc.in. MariaDB should not have two *mariadb.pc. The other one should be '*mariadbd.pc`, or if you think nobody ever used it for building the embedded server then the solution would be just to delete the file as a duplicate?
For additional context, the contents of the files:
$ find /usr/lib/*/pkgconfig/m*.pc -ls
/usr/lib/x86_64-linux-gnu/pkgconfig/mariadb.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/mysqlclient.pc -> mariadb.pc
$ cat /usr/lib/x86_64-linux-gnu/pkgconfig/mariadb.pc
# these four variables are present in almost every .pc file
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include/mariadb
# its common to want to know where to install it.
plugindir=${prefix}/lib/x86_64-linux-gnu/mariadb19/plugin
# Below are rarely present or not at all, but we export them regardless
bindir=${prefix}/bin
sbindir=${prefix}/sbin
scriptdir=${prefix}/bin
docdir=${prefix}/share/doc
mandir=${prefix}/share/man
sharedir=${prefix}/share
mysqlsharedir=${prefix}/share/mysql
mysqltestdir=${prefix}/share/mysql/mysql-test
socket=/var/run/mysqld/mysqld.sock
Name: MariaDB
Description: MariaDB: a very fast and robust SQL database server
URL: http://mariadb.org
Version: 10.3.38
Libs: -L${libdir} -lmariadb -pthread -ldl -lm -lpthread -lgnutls -lz
Cflags: -I${includedir}
$ find /usr/lib/*/pkgconfig/libm*.pc -ls
/usr/lib/x86_64-linux-gnu/pkgconfig/libmariadb.pc
$ cat /usr/lib/x86_64-linux-gnu/pkgconfig/libmariadb.pc
#
# pkg_config.pc.in
#
# pkg_config configuration file
# For a detailed description of options, please visit
# Dan Nicholson’s Guide to pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config/)
#
prefix=/usr
includedir=${prefix}/include/mariadb/
libdir=${prefix}/lib/x86_64-linux-gnu/
Name: libmariadb
Version: 3.1.18
Description: MariaDB Connector/C dynamic library
Cflags: -I${includedir}
Libs: -L${libdir} -lmariadb
Libs.private: -ldl -lm -lpthread -lgnutls
Rebased on latest 11.2 and also changed to use name mariadb-embedded-server.pc.
I think this looks OK now, but I defer to @vuvova's opinion here.
Rebased on latest 11.3 but CI seems to fail on tests main.analyze_stmt_slow_query_log and perfschema.events_waits_current_MDEV-29091. I have not checked if these tests were already broken before the changes. Most of the commits on https://github.com/MariaDB/server/commits/11.3 are currently not passing CI (I see a lot of red crosses attached to them).
Rebased on latest 11.3.