Commit graph

1503 commits

Author SHA1 Message Date
Lawrin Novitsky
1ff476b415 MDEV-29490 Renaming internally used client API to avoid name conflicts
with C/C.
The patch introduces mariadb_capi_rename.h which is included into
mysql.h. The hew header contains macro definitions for the names being
renamed. In versions 10.6+(i.e. where sql service exists) the renaming
condition in the mariadb_capi_rename.h should be added with
&& !defined(MYSQL_DYNAMIC_PLUGIN)
and look like
The patch also contains removal of mysql.h from the api check.

Disabling false_duper-6543 test for embedded.

ha_federated.so uses C API. C API functions are being renamed in the server,
but not renamed in embedded, since embedded server library should have proper
C API, as expected by programs using it.
Thus the same ha_federated.so cannot work both for server and embedded
server library.

As all federated tests are already disabled for embedded,
federated isn't supposed to work for embedded anyway, and thus the test
is being disabled.
2022-10-25 14:00:21 +02:00
Sergei Golubchik
5af7149ff5 mysql_release: treat alma|rocky as centos|rhel 2022-09-13 16:29:25 +02:00
Sergei Golubchik
83175219c3 MDEV-29522 RocksDB RPM doesn't get built on Rocky Linux and Alma
use correct python on rocky8 and alma8
2022-09-13 08:56:18 +02:00
Daniel Black
129616c70a MDEV-28592 disks plugin - getmntinfo (BSD) & getmntent (AIX)
Thanks to references from Brad Smith, BSDs use getmntinfo as
a system call for mounted filesystems.

Most BSDs return statfs structures, (and we use OSX's statfs64),
but NetBSD uses a statvfs structure.

Simplify Linux getmntent_r to just use getmntent.

AIX uses getmntent.

An attempt at writing Solaris compatibility with
a small bit of HPUX compatibility was made based on man page
entries only. Fixes welcome.

statvfs structures now use f_bsize for consistency with statfs

Test case adjusted as PATH_MAX is OS defined (e.g. 1023 on AIX)

Fixes: 0ee5cf837e

also fixes:

MDEV-27818: Disk plugin does not show zpool mounted devices

This is because zpool mounted point don't begin with /.

Due to the proliferation of multiple filesystem types since this
was written, we restrict the entries listed in the disks plugin
to excude:
* read only mount points (no point monitoring, and
  includes squash, snaps, sysfs, procfs, cgroups...)
* mount points that aren't directories (excludes /etc/hostname and
  similar mounts in containers). (getmntent (Linux/AIX) only)
* exclude systems where there is no capacity listed (excludes various
  virtual filesystem types).

Reviewer: Sergei Golubchik
2022-08-31 10:32:04 +10:00
Brad Smith
d7ba72ea9b Remove Darwin CMake file
The file is now empty and thus serves no purpose.
2022-08-10 12:41:46 +03:00
fluesvamp
f2830af16c Fix typos in the codebase. 2022-08-09 18:41:09 +03:00
Vladislav Vaintroub
990ddaba1e Windows - reduce irrelevant CMake system checks 2022-07-18 14:59:07 +02:00
Vladislav Vaintroub
b3f0acf510 MDEV-27686 Moving libexecinfo out of FreeBSD / OpenBSD specific CMake code
On all Unix platforms, link libexecinfo as system library,
if it contains backtrace_symbols_fd function, and libc does not contain
this function

Also remove cmake/os/OpenBSD.cmake, as after the fix it serves no purpose.
2022-07-17 15:14:52 +02:00
Sutou Kouhei
cf86580f2b MDEV-28032 "git submodule update --depth 1" may fail with old Git
submodules.cmake: don't use "--depth 1" with old Git

Old Git may not work with "--depth 1" when the referenced commit hash
is far from HEAD.

Newer Git improves the situation. For example:
fb43e31f2b

It's safe to not use "--depth 1" with old Git.

Closes #2049
2022-03-19 09:38:57 +01:00
Oleksandr Byelkin
41a163ac5c Merge branch '10.2' into 10.3 2022-01-29 15:41:05 +01:00
Monty
37886a29e5 Updated comment in systemd.cmake
Suggested by serg@mariadb.org
2022-01-27 16:07:02 +02:00
Sergei Golubchik
c9beef4315 don't build with OpenSSL 3.0, it doesn't work before MDEV-25785 2022-01-21 16:02:34 +01:00
Alexey Bychko
746050d02d MDEV-27109 mysql_config mariadb_config lists non existant -lmariadb
added dependency devel->shared and conflict with previous versions
update C/C 3.1 with the corresponding C/C part of the fix
2022-01-14 22:16:39 +01:00
Sergei Golubchik
b5a14f061b /usr/lib64/pkgconfig is not owned by MariaDB-devel 2022-01-14 22:16:39 +01:00
Sergei Golubchik
d821feddac MDEV-14938 make buildbot to include galera into bintars
allow injecting extra files into the bintar
2022-01-07 15:37:00 +01:00
Tuukka Pasanen
25f598f54f MDEV-26317: Add SYSTEMD_READWRITEPATH variable to mariadb.service.in-file
Add SYSTEMD_READWRITEPATH-variable to mariadb{@,}.service.in to make sure that
if one is not building RPM or DEB packages then make sure there is ReadWritePaths
directive is defined in systemd service file.

This ensures that tar-ball installation has permissions to write database default
installation path (default: /usr/local/mysql/data) even if it's located
under /usr. Writing to that location is prevented by 'ProtectSystem=full'
systemd directive by default.

Prefixing the path with "-" in systemd causes there to not be an error if the
path doesn't exist. This may occur if the user has configured a datadir
elsewhere.

Reviewer: Daniel Black
2022-01-07 17:51:20 +11:00
Sergei Golubchik
4daf9d7c3e MDEV-27364 Build from 10.2-10.4 srpm fails on RHEL8 family due to discrepancy in jemalloc requirements
pass jemalloc requirement down to srpm build
2021-12-27 14:48:44 +01:00
Sergei Golubchik
153b75b576 Merge branch '10.2' into 10.3 2021-12-06 22:23:07 +01:00
Sergei Golubchik
71027eceac fix srpm builds after fe065f8d90 2021-12-06 18:50:19 +01:00
Marko Mäkelä
289721de9a Merge 10.2 into 10.3 2021-11-29 10:33:06 +02:00
Alexey Bychko
fe065f8d90 MDEV-22522 RPM packages have meaningless summary/description
this patch moves cpack summury and description for optional packages
to the appropriate CMakeLists.txt files
2021-11-23 11:29:24 +07:00
Marko Mäkelä
9962cda527 Merge 10.2 into 10.3 2021-11-17 13:55:54 +02:00
Vladislav Vaintroub
9e9e91b3c2 Windows build - fix signtool search path to take modern SDKs into account 2021-11-16 01:51:22 +01:00
Marko Mäkelä
524b4a89da Merge 10.2 into 10.3 2021-11-09 08:26:59 +02:00
Alexey Bychko
2a3dae115b MDEV-22522 RPM packages have meaningless summary/description
added summary/description per package.
2021-11-08 16:45:23 +07:00
Alexey Bychko
25d6bbcd51 MDEV-23506 mariadb-connector-c-devel package from standard RHEL 8 repo conflicts with MariaDB's packages
added alternative name for MariaDB-devel package to replace
mariadb-connector-c-devel from RHEL 8 distribution.
this patch is for 10.3+ on RHEL/Centos 8
2021-09-21 14:44:39 +07:00
Vladislav Vaintroub
7e6b033507 Fix MYSQL_MAINTAINER_MODE=ERR, on Windows, with Ninja , in 10.2
A conversion warning 4267 that we want to disable(prior to 10.3),
was suppressed with  cmake VS generator for C++ and C, despite being set
only for CXX flags.

The fix is to disable the warning in C flags, too. In 10.2, this warning
is noisy, in 10.3 it is fixed.
2021-09-11 15:19:42 +02:00
Sergei Golubchik
a6383a1954 Merge branch '10.2' into 10.3 2021-09-07 23:24:06 +02:00
Sergei Golubchik
0d3de06eda disable bzip2/lz4/lzo in rpm builds, distro dependent 2021-09-07 21:13:04 +02:00
Sergei Golubchik
ca2f89deac disable bzip2/lz4/lzo in bintar builds, as they always have been 2021-09-07 21:13:04 +02:00
Vicențiu Ciorbaru
b85b8348e7 Merge branch '10.2' into 10.3 2021-09-07 16:32:35 +03:00
Sergei Golubchik
1597b3d76b disable bzip2, lzma, and lzo explicitly in debian release builds
we don't build debian release builds with them anyway,
but let's make it explicit, independently on what happens to be
installed on the builder.
2021-08-31 09:50:57 +02:00
Marko Mäkelä
9f8871db2f Merge 10.2 into 10.3 2021-08-25 07:28:04 +03:00
Daniel Black
ece30d47ca MDEV-26109: s390x detected as 32bit in mtr tests
Currently @@version_compile_machine is used by mtr
to determine if the compiled executable is 32 or 64
bits.

We extend that logic by ensuring that if the DEFAUT_MACHINE
name doesn't have "64" in its string, "-64bits" is appended
to ensure these test pass.
2021-08-25 08:18:10 +10:00
Marko Mäkelä
cd65845a0e Merge 10.2 into 10.3
MDEV-18734 FIXME: vcol.partition triggers ASAN heap-use-after-free
2021-08-18 12:26:58 +03:00
Vladislav Vaintroub
f725020ff7 Fix cmake warning caused by 751ebe44fd
CMake Warning (dev) at cmake/plugin.cmake:288 (GET_TARGET_PROPERTY):
  Policy CMP0045 is not set: Error on non-existent target...

Also, fix condition argument in ADD_FEATURE_INFO. It is not a string
but boolean
2021-08-09 18:00:22 +02:00
Sergei Golubchik
175c9fe1d5 cleanup: specifying plugin dependencies in CMakeLists.txt
1. rename option DEPENDENCIES in MYSQL_ADD_PLUGIN() to DEPENDS
   to be consistent with other cmake commands and macros

2. use this DEPENDS option in plugins

3. add dependencies to the plugin embedded target too

4. plugins don't need to add GenError dependency explicitly,
   all plugins depend on it automatically
2021-08-03 10:10:00 +02:00
Marko Mäkelä
b50ea90063 Merge 10.2 into 10.3 2021-07-22 18:57:54 +03:00
Sergei Golubchik
6190a02f35 Merge branch '10.2' into 10.3 2021-07-21 20:11:07 +02:00
Heinz Wiesinger
751ebe44fd Add feature summary at the end of cmake.
This gives a short overview over found/missing dependencies as well
as enabled/disabled features.

Initial author Heinz Wiesinger <heinz@m2mobi.com>
Additions by Vicențiu Ciorbaru <vicentiu@mariadb.org>
* Report all plugins enabled via MYSQL_ADD_PLUGIN
* Simplify code. Eliminate duplication by making use of WITH_xxx
  variable values to set feature "ON" / "OFF" state.

Reviewed by: wlad@mariadb.com (code details) serg@mariadb.com (the idea)
2021-07-21 10:22:56 +03:00
Robert Bindar
b082716892 MDEV-21206 Can't link zlib library during DBD::mysql installation
mysql_config should never return -lzlib as linking flag.
Clients trying to link against mariadb that use the output of
mysql_config experience linking error because we return -lzlib
when we don't ship any libzlib.a in our binary tarballs, bundled
zlib static library is already linked.
2021-07-12 12:42:30 +03:00
Marko Mäkelä
f9194d02da Merge 10.2 into 10.3 2021-07-02 14:41:41 +03:00
Eugene Kosov
ffe744e77d submodules.cmake: add missing --depth=1 2021-07-02 13:25:20 +03:00
Sergei Petrunia
586870f9ef Merge 10.2->10.3 2021-06-30 15:06:54 +03:00
Alexey Bychko
aaaed9baa0 MDEV-25960 yum update overwrites customized logrotation config (/etc/logrotate.d/mysql)
added %config directive to /etc/logrotate.d/mysql and put it to server
package. if file is edited by customer and defaults are changed - new
.rpmnew file with defaults will be created next to old one.
2021-06-22 18:57:01 +07:00
Marko Mäkelä
c9a85fb1b1 Merge 10.2 into 10.3 2021-06-21 09:07:40 +03:00
Daniel Black
be243ed9e3 cmake OpenBSD copyright notice correction
Brad Smith made this OpenBSD file based of the
FreeBSD cmake directives in commit ab58904367
by the Monty Program Ab.

As such the Oracle Copyright header isn't really applicable.
2021-06-15 12:42:10 +10:00
Brad Smith
4352c77c5a Link with libexecinfo on OpenBSD for stacktrace functionality. 2021-06-11 10:31:26 +10:00
Otto Kekäläinen
152c83d49c MDEV-20392: Skip ABI check if 'diff' is not found
Not all environments have 'diff' installed. Most notably CentOS 8
does not have diff out-of-the-box. Thus users running 'cmake .' and
'make' would fail to build MariaDB, and they would think the error
was in ABI incompatibilities due to the error message emitted by CMake
when in reality simply 'diff' was missing.

This fixes it and makes the developer experience better by simply
skipping the diffing if 'diff' is not found.

Closes #1846
2021-06-10 12:47:01 +02:00
Marko Mäkelä
6e9642beb2 Merge 10.2 into 10.3 2021-06-08 14:33:07 +03:00