mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
4775a40627
When this file exists, Debian builds will automatically compare the built ABI and symbols to the ones defined in the list. If there is a mismatch, developers need to update the libmariadb3.symbols file, otherwise the build fails. This ensures there are no accidental symbol changes. This also helps track what symbols changed and in what versions. Also add a README embedded in the sources to facilitate correct use of this new file. This change is made for branch 10.2, as it was the first server version to introduce an embedded libmariadb3 client library, and from this version the file with the same libmariadb3 specific content will be merged to 10.3, 10.4 and 10.5. Related: MDEV-21732
42 lines
1.8 KiB
Text
42 lines
1.8 KiB
Text
The libmariadb3.symbols files is used to track the libmariadb3 ABI.
|
|
|
|
If a symbol is removed or changed, the Debian build will fail unless the same change has also explicitly been made in the libmariadb3.symbols file.
|
|
|
|
If a symbol is added, the Debian build will issue a warning like:
|
|
|
|
dh_makeshlibs -O--parallel
|
|
rm -f debian/libmariadb3/DEBIAN/shlibs
|
|
echo "libmariadb 3 libmariadb3" >> debian/libmariadb3/DEBIAN/shlibs
|
|
chmod 0644 -- debian/libmariadb3/DEBIAN/shlibs
|
|
chown 0:0 -- debian/libmariadb3/DEBIAN/shlibs
|
|
dpkg-gensymbols -plibmariadb3 -Idebian/libmariadb3.symbols -Pdebian/libmariadb3 -edebian/libmariadb3/usr/lib/x86_64-linux-gnu/libmariadb.so.3
|
|
dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below
|
|
dpkg-gensymbols: warning: debian/libmariadb3/DEBIAN/symbols doesn't match completely debian/libmariadb3.symbols
|
|
--- debian/libmariadb3.symbols (libmariadb3_10.2.32+maria~sid_amd64)
|
|
+++ dpkg-gensymbolsUfTky5 2020-02-20 11:27:03.815551573 +0000
|
|
@@ -12,6 +12,7 @@
|
|
mariadb_get_charset_by_name@libmariadb_3 3.0.0
|
|
mariadb_get_charset_by_nr@libmariadb_3 3.0.0
|
|
mariadb_get_info@libmariadb_3 3.0.0
|
|
+ mariadb_get_infov@libmariadb_3 10.2.32+maria~sid
|
|
mariadb_reconnect@libmariadb_3 3.0.0
|
|
mariadb_rpl_close@libmariadb_3 3.1.0
|
|
mariadb_rpl_fetch@libmariadb_3 3.1.0
|
|
|
|
|
|
When this happens, please add the symbol to the libmariadb3.symbols file.
|
|
Unlike the automatic diff above, don't use the server version for the symbols.
|
|
|
|
Instead use the client library version, which can be viewed with:
|
|
|
|
$ grep 'SET(CPACK_PACKAGE_VERSION_' libmariadb/CMakeLists.txt
|
|
SET(CPACK_PACKAGE_VERSION_MAJOR 3)
|
|
SET(CPACK_PACKAGE_VERSION_MINOR 1)
|
|
SET(CPACK_PACKAGE_VERSION_PATCH 7)
|
|
|
|
In this example, the line to add would be:
|
|
|
|
mariadb_get_infov@libmariadb_3 3.1.7
|
|
|
|
|
|
Remember to not break the ABI in a stable release!
|