Commit graph

24 commits

Author SHA1 Message Date
Sergei Golubchik
1ef1bab99e MDEV-31855 validate ssl certificates using client password
if the client enabled --ssl-verify-server-cert, then
the server certificate is verified as follows:

* if --ssl-ca or --ssl-capath were specified, the cert must have
  a proper signature by the specified CA (or CA in the path)
  and the cert's hostname must match the server's hostname.
  If the cert isn't signed or a hostname is wrong - the
  connection is aborted.

* if MARIADB_OPT_TLS_PEER_FP was used and the fingerprint matches,
  the connection is allowed, if it doesn't match - aborted.

* If the connection uses unix socket or named pipes - it's allowed.
  (consistent with server's --require-secure-transport behavior)

otherwise the cert is still in doubt, we don't know if we can trust
it or there's an active MitM in progress.

* If the user has provided no password or the server requested an
  authentication plugin that sends the password in cleartext -
  the connection is aborted.

* Perform the authentication. If the server accepts the password,
  it'll send SHA2(scramble || password hash || cert fingerprint)
  with the OK packet.

* Verify the SHA2 digest, if it matches - the connection is allowed,
  otherwise it's aborted.
2024-02-04 22:18:55 +01:00
Marko Mäkelä
44281b88f3 Merge 10.8 into 10.9 2023-04-14 11:32:36 +03:00
Otto Kekäläinen
2a5763224e Deb: Sync Salsa-CI from Debian MariaDB 10.6
Compare to Debian packaging of MariaDB 1:10.6.11-2 release at commit
2934e8a795
and sync upstream everything that is relevant for upstream and safe
to import on a stable 10.6 release.

* Use OpenSSL 1.1 from Debian Snapshots
  0040c272bf
  Related: https://jira.mariadb.org/browse/MDEV-30322

* Prefer using bullseye-backports in mosts tests over buster-bpo
  daa827ecde

* Add new upgrade test for MySQL Community Cluster 8.0
  3c71bec9b7

* Enable automatic datadir move also on upgrades from MySQL.com packages
  4cbbcb7e56

* Update Breaks/Replaces
  2cab13d059

* Normalize apt-get and curl commands
  8754ea2578

* Standardize on using capitalized 'ON' in CMake build options
  938757a85a

* Apply wrap-and-sort -av and other minor tweaks and inline documentation

NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to
all later branches (10.7, 10.8, ..., 11.0).
2023-04-01 23:18:51 -07:00
Marko Mäkelä
fffa4b28a1 Merge 10.8 into 10.9 2023-03-17 06:58:33 +02:00
Julius Goryavsky
1e58b8afc0 move alloca() definition from all *.h files to one new header file 2023-03-07 11:13:20 +01:00
Daniel Black
e6df7a4c9f Deb: dh_missing --fail-missing/ man3 pages
Put man3 pages in libmariadb-dev.install

Ignore /usr/share/mysql/*.jar because CI
environment inconsistent in the availablity of
java to compile parts.
2022-05-06 15:02:31 +10:00
Otto Kekäläinen
d426d0782d Deb: Use --fail-missing and ensure the not-installed list is up-to-date
Make the Debian build fail if it detects that the build (CMake) created
files that are not used in any package nor accounted in the special
not-installed file.

Stop creating symbolic links in Debian packaging for files that the CMake
build already created.

Document known cases of files that are intentionally not installed.
Leave the rest in the not-installed list for visibility. The list can
later be trimmed down and having the --fail-missing will prevent any new
unaccounted files from being introduced.

Note that despite extensive refactoring in the Debian packaging files,
there was no changes in the packages produced as verified by package
files lists before and after.
2022-05-05 12:06:56 +10:00
Otto Kekäläinen
bc11f392f8 MDEV-6284: Correctly place files in libmariadb-dev, libmariadbd-dev etc packages
- Make full contents, also header files, explicit in -dev packages
  fb77df0c75
- Don't ship private header files at all.
- Ship both libmariadb.pc and maridb.pc.
- Ship mysql_config only as a symlink.
- Keep 'mariadbcheck' as symlink as somebody could have used it already
  d0466f74d5
- The mariadb.pc is the server pkg-config, ship in libmariadbd-dev.
- The client pkg-config is called libmariadb.pc. Ship only it in the client
  library packages.

Use versioned breaks/replaces for mysql* packages we also provide and fix:

  [ERROR] libmariadb-dev conflicts with libmysqlclient-dev files:
    {'/usr/share/man/man1/mysql_config.1.gz', '/usr/share/aclocal/mysql.m4'}
  [ERROR] libmariadb-dev conflicts with libmysqld-dev files:
    {'/usr/lib/x86_64-linux-gnu/libmysqlservices.a'}
2020-04-19 17:15:40 +03:00
Otto Kekäläinen
4bc31a904f MDEV-22053: Pass INSTALL_LAYOUT "DEB" correctly to CONC (libmariadb)
As this was missing, the libmariadb/install.cmake section for Debian
builds was not triggered at all, and existing fixes to make the
Debian paths correct did not apply.

Update libmariadb3 paths in Debian packaging after MariaDB Connector C
3.1.8 upgrade

Also now include caching_sha2_password.so which was previously omitted.

Keep old libmariadbclient.a as symbolic link for backwards compatibility.

Closes: CONC-304
Related: CONC-456, MDEV-22150
2020-04-13 14:33:50 +03:00
Otto Kekäläinen
2cedf3eca4 MDEV-21303: Fix man page packaging for new mariadb-* named binaries
This fixes Lintian errors and warnings:

E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mariadb-analyze.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mariadb-optimize.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mariadb-repair.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mysqlanalyze.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mysqloptimize.1
E: mariadb-client-10.5: manpage-not-compressed usr/share/man/man1/mysqlrepair.1
W: mariadb-client-10.5: binary-without-manpage usr/bin/mariadb-conv
W: libmariadb-dev: binary-without-manpage usr/bin/mariadb_config

If the binary name is mariadb_config, the manpage needs to be mariadb_config.1.

Also run 'wrap-and-sort -a -v' to get lists in correct order.

In addition, sort .gitignore and remove duplicate lines.
2020-04-05 00:24:24 +03:00
Sergei Golubchik
73edb6ffd4 Revert "MDEV-21303 Make executables MariaDB named"
This reverts commit 5d1b8f4152.

because since 306e439c6d manpages use troff aliases
instead of symlinks, so they should not be symlinked.
2020-03-24 02:39:32 +01:00
Sergei Golubchik
5d1b8f4152 MDEV-21303 Make executables MariaDB named
fix manpages in Debian
2020-03-21 20:20:29 +01:00
Rasmus Johansson
9e1b3af4a4 MDEV-21303 Make executables MariaDB named
To change all executables to have a mariadb name I had to:
- Do name changes in every CMakeLists.txt that produces executables
- CREATE_MARIADB_SYMLINK was removed and GET_SYMLINK added by Wlad to reuse the function in other places also
- The scripts/CMakeLists.txt could make use of GET_SYMLINK instead of introducing redundant code, but I thought I'll leave that for next release
- A lot of changes to debian/.install and debian/.links files due to swapping of real executable and symlink. I did not however change the name of the manpages, so the real name is still mysql there and mariadb are symlinks.
- The Windows part needed a change now when we made the executables mariadb -named. MSI (and ZIP) do not support symlinks and to not break backward compatibility we had to include mysql named binaries also. Done by Wlad
2020-03-21 20:20:29 +01:00
Oleksandr Byelkin
440452628d Merge branch '10.2' into 10.3 2020-03-06 23:28:26 +01:00
Vicențiu Ciorbaru
c5c1027c6e MDEV-19208 mariadb.pc: install into libdir
The .pc file installed by mariadb mentions archful directories and
therefore must be archful itself.

This fixes MDEV-14340.
2020-03-05 10:53:16 +02:00
Otto Kekäläinen
3862d8bc89 Deb: wrap-and-sort -a 2018-01-16 13:48:00 +02:00
Otto Kekäläinen
dbc9cfa52b Deb: .manpages files should only contain man pages unique to deb packages
All man pages that stem from the actual sources should be installed along
everything else in .install files.
2018-01-16 13:48:00 +02:00
Otto Kekäläinen
ed00fd2bce Deb: switch from usr/include/mysql to usr/include/mariadb
Matching libmariadb-dev package contents in official Debian repositories,
the MariaDB Connector/C files should go into a folder using the 'mariadb'
name. For compatibility with sources that expect to find 'mysql' stuff,
create a symlink from include/mysql to include/mariadb.
2018-01-16 13:48:00 +02:00
Otto Kekäläinen
be59851ad9 Deb: Match official Debian package libmariadb-dev-compat
Using this package any source that expects MySQL Client libraries should
build without changes. Sources that expect MariaDB Connector C should
build using only libmariadb-dev.

Current MariaDB Connector/C does not build quite identically in
this source tree compared to how it build in Debian official.
The remaining differences are tracked in MDEV-14921.
2018-01-16 13:48:00 +02:00
Otto Kekäläinen
846517d9b7 Deb: Recover include/mariadb wrongly removed in commit 9b10b4181f
The libmariadb-dev package must include this directory so that downstream
developers can intentionally include MariaDB libraries as they want.

This matches the contents of the official Debian libmariadb-dev package.
2018-01-16 13:48:00 +02:00
Sergei Golubchik
862fbc277c bugfix: debian, fix *.so symlinks in libmariadb-dev
The symlink

/usr/lib/libmysqlclient.so -> /usr/lib/libmysqlclient.so.18

was invalid, because the library was not in /usr/lib.
The correct symlink is

/usr/lib/x86_64-linux-gnu/libmysqlclient.so -> /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
2017-09-18 10:12:23 +02:00
Sergei Golubchik
3ec96c1824 MDEV-13370 Ambiguous behaviour regarding installation of header files
install all server includes under /usr/include/mysql/server/
and C/C includes under /usr/include/mysql/
2017-08-14 19:45:58 +02:00
Vladislav Vaintroub
9b10b4181f update libmariadb, and fix debian packaging for client libs 2016-12-22 10:17:26 +01:00
Otto Kekäläinen
2bcc16c17b Deb: rename client library packages to reflect its contents
The new library name libmariadb3 matches the libmariadb.so.3 filename.
Packages that want to build against MariaDB Connector C have as
build-dependency libmariadb-dev and as run-time dependency libmariadb3.

Make the package provide libmariadbclient18 for backwards compatibility,
though compatibility is not always assured. There library did change
to a whole new generation after all, even though ABI compatibility has
been a design goal.

Also do the equivalent change for the -dev package. Packages that
explicitly want to use the MariaDB Connector C should mark it as
their build-depends.

Also provide an empty libmariadbclient18 metapackage to facilitate
upgrades from old MariaDB installs, just like there is an empty
libmysqlclient18 package. Create more of these in the future as needed.
2016-11-20 10:49:12 +02:00
Renamed from debian/libmariadbclient-dev.install (Browse further)