[MDEV-23538] Rename mariadb.pc to mariadbd.pc to avoid confusion Created: 2020-08-22 Updated: 2023-05-02 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Embedded Server, Server |
| Affects Version/s: | 10.5, 10.6 |
| Fix Version/s: | 11.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Otto Kekäläinen | Assignee: | Otto Kekäläinen |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Currently we ship libmariadb.pc (for building against the client library) and mariadb.pc (to build against the server). The latter one is confusing to it's name. I've noticed many people assume mariadb.pc is the client library config. To avoid ambiguity, I suggest that in MariaDB 10.6 we rename it to mariadbd.pc (instead of mariadb.pc). Or even libmariadbd.pc (to be symmetric with libmariadb.pc). The -d is used in libmariadbd package names already and is kind of a convention. As a bonus, this would help avoid some Lintian complaints that stem from this naming scheme confusion:
|
| Comments |
| Comment by Otto Kekäläinen [ 2020-10-27 ] | ||||||||||||
|
Does georg or cvicentiu or danblack have any comments on this one? | ||||||||||||
| Comment by Otto Kekäläinen [ 2020-12-20 ] | ||||||||||||
|
Any comments from julien.fritsch? | ||||||||||||
| Comment by Otto Kekäläinen [ 2020-12-20 ] | ||||||||||||
|
I am planning to commit https://salsa.debian.org/mariadb-team/mariadb-10.5/-/commit/2f183af990fbe1cfa8c343998c7640f45f45368b on upstream and to remove mariadb.pc from debian/libmariadbd-dev.install | ||||||||||||
| Comment by Daniel Black [ 2021-02-10 ] | ||||||||||||
|
mariadbd.pc for 10.6 sounds good to me | ||||||||||||
| Comment by Otto Kekäläinen [ 2021-04-04 ] | ||||||||||||
|
Filed PR to fix this for 10.6 in https://github.com/MariaDB/server/pull/1800 | ||||||||||||
| Comment by Daniel Black [ 2021-04-06 ] | ||||||||||||
|
Thanks otto. Example of recent user confusion on zulip. On implementation we'd do a git mv on the file and adjust CMakeList.txt so it would be common to everyone. Might even be able to symlink in CMake too for everyone's convenience. Another contributing factor is the description for the server side is so horrible (https://github.com/MariaDB/server/blob/10.6/support-files/mariadb.pc.in). We should be able to fix that in 10.2 as its only human readable stuff. Current its - ""MariaDB: a very fast and robust SQL database server", compared with the libmariadb client side "Description: MariaDB Connector/C dynamic library". So suggested server description (compare to pkg-config --list-all - many of which are still poor, but you don't get two pc files for them):
serg, ralf.gebhardt@mariadb.com what do you think of the name change/description change? | ||||||||||||
| Comment by Sergei Golubchik [ 2021-04-06 ] | ||||||||||||
|
looking at other .pc files (on my gentoo), I'd suggest to rename to, say, mariadb-plugins.pc with
But it also means the content of this file might need some updating to match. For example, this could be wrong:
| ||||||||||||
| Comment by Sergei Golubchik [ 2021-04-06 ] | ||||||||||||
|
But please make sure Amarok can link with embedded just as it was before. It seems to be relying on mariadb.pc sometimes | ||||||||||||
| Comment by Otto Kekäläinen [ 2021-04-06 ] | ||||||||||||
|
Yes, Amarok is to my knowledge the only consumer of mariadbd-dev (https://salsa.debian.org/qt-kde-team/extras/amarok/-/blob/master/debian/control#L55), but it is no longer in Debian (https://tracker.debian.org/pkg/amarok) as Amarok never migrated from Qt4 to Qt5. I can't find that any other package would depend on libmariadbd (note the *d*).
I did not understand the rationale of why call it mariadb-plugins.pc? The main point is to teach devs that they should what is currently names libmariadb.pc instead of mariadb.pc. Adding mariadb-plugins.pc to the naming scheme does maybe not clarify it enough? Maybe if we have mariadb-client.pc and mariadb-plugin.pc it would be clear? Still, personally I'd think mariadb.pc and mariadbd.pc is more clear, but I don't have a strong opinion. | ||||||||||||
| Comment by Otto Kekäläinen [ 2021-06-17 ] | ||||||||||||
|
Any comments from georg or julien.fritsch? Is it OK if I proceed with my suggestions that
Having mariadb.pc and mariadbd.pc as the final result is in my opinion aligned with what users expect, as these follow the binary and library names. | ||||||||||||
| Comment by Sergei Golubchik [ 2021-06-17 ] | ||||||||||||
|
Won't it be strange to have libmariadb.pc and mariadbd.pc? I'd expect consistent names, like both starting with lib* or neither. So, just
why mariadb.pc? | ||||||||||||
| Comment by Otto Kekäläinen [ 2021-06-19 ] | ||||||||||||
|
I suggested libmariadb.pc only for backwards compatibility. Sure, let's drop that. It is a config file so we don't need to consider backwards compatibility if you that sticks out. Updated suggestion:
The most common pattern is to use the library name without lib*, and I also personally think it looks cleaner.
| ||||||||||||
| Comment by Sergei Golubchik [ 2021-06-21 ] | ||||||||||||
|
the naming pattern with lib* is more common, but not overwhelmingly. About 1/3rd of all *.pc files have lib* prefix. On my laptop it's 136 lib*.pc files and 299 without lib*. So I'd rather stick to the lib* old names for backward compatibility reason. I just don't see a good reason to break existing applications that check for libmariadb.pc. | ||||||||||||
| Comment by Otto Kekäläinen [ 2021-06-28 ] | ||||||||||||
|
I tried to research how much there might be downstream applications building with libmariadb.pc/mariadb.pc. https://codesearch.debian.net/search?q=-llibmariadb&literal=1
https://codesearch.debian.net/search?q=-lmariadb&literal=1&perpkg=1
https://github.com/search?q=%22-lmysqlclient%22&type=code
https://github.com/search?q=%22-lmariadbclient%22&type=code
https://github.com/search?q=%22-lmysql%22&type=code
https://github.com/search?q=%22-lmariadb%22&type=code
https://github.com/search?q=%22-llibmysql%22&type=code
https://github.com/search?q=%22-llibmariadb%22&type=code
https://github.com/search?q=%22-llibmysqlclient%22&type=code
I tried to use data to make a good decision here, but I am not sure if I learned of the above anything. Sharing results of this check anyway. | ||||||||||||
| Comment by Tuukka Pasanen [ 2022-03-03 ] | ||||||||||||
|
This would clean up things as currently (including myself) it took a while to understand what is the diffrence between these two pc-files. Symlink can be provided to support older packages as this not for Windows. | ||||||||||||
| Comment by Otto Kekäläinen [ 2023-04-02 ] | ||||||||||||
|
serg Can you approve/merge https://github.com/MariaDB/server/pull/1800? It was been updated (long ago) to address your requests. It would be good timing to merge this now into 11.0. |