935 Commits

Author SHA1 Message Date
891108ed66 Got rid of the INFO_BIN and INFO_SRC files
as specified by the comments of this pull request:
https://github.com/MariaDB/server/pull/4078
Also got rid of the file_contents.test and file_contents.result files as
they only test the existence and contents of the INFO_BIN and INFO_SRC,
therefore they are not needed anymore.
2025-07-10 18:18:24 +10:00
a65f7dc71d Merge branch '11.4' into 11.8 2025-06-18 07:43:24 +02:00
89c7e2b9c7 Merge branch '10.11' into 11.4 2025-06-17 09:50:22 +02:00
9bf0492b7d MDEV-36904 Improve runtime dependency packaging on Windows
Background:
In MDEV-33474, we introduced runtime dependency packaging primarily to
support libcurl and other potential third-party dependencies from vcpkg.

Problem:
The INSTALL(RUNTIME_DEPENDENCY_SET) command was failing at packaging step
unless shared libraries from the same build were explicitly excluded via
PRE_EXCLUDE_REGEXES. While initially only server.dll was excluded this way,
this turned out insufficient for users compiling their own plugins

Solution:
Exclude all linked shared libraries from the same build via
PRE_EXCLUDE_REGEXES. Move dependency detection and install to the end of
CMake processing, after all add_library/add_executable calls, when all
targets are known.

Also made the INSTALL_RUNTIME_DEPENDENCIES variable independent of vcpkg
detection, for simplicity.
2025-06-10 13:23:54 +02:00
6409e43177 Replace deprecated CMAKE_COMPILER_IS_GNU(CC|CXX) with CMAKE_(C|CXX)_COMPILER_ID
As of CMake 3.24 CMAKE_COMPILER_IS_GNU(CC|CXX) are deprecated and should
be replaced with CMAKE_(C|CXX)_COMPILER_ID which were introduced with
CMake 2.6.
2025-06-03 18:16:35 +10:00
8d36cafe4f Merge branch '11.4' into 11.8 2025-05-21 15:57:16 +02:00
da5a4d05b9 MDEV-35850 make HOSTNAME a cmake configure variable
As seen with openwrt and some other distros, the
determination of hostname can sometime need alternate
commmands.

This provides a cmake option HOSTNAME for non-windows machines
for the mariadb-install-db and mariadbd-safe scripts
and the support-files init scripts..
2025-05-01 18:09:45 +10:00
237e24497b Merge remote-tracking branch 'github/bb-11.4-release' into bb-11.8-serg 2025-04-27 19:40:00 +02:00
a8d4642375 Merge branch '10.11' into 11.4 2025-04-26 10:53:02 +02:00
1a013cea95 Merge branch '10.6' into '10.11' 2025-04-16 03:34:40 +02:00
11324875b4 MDEV-33474 Windows packaging - install runtime dependencies
Use CMake 3.21 (semi)automatic dependency resolution to install server
and plugin dependencies (DLLs).

This is especially useful with 3rd party dependencies, such as Curl, zlib
etc
2025-04-16 13:22:28 +02:00
88dfa6bcee Merge branch '10.5' into '10.6' 2025-04-15 01:49:48 +02:00
2a5a12b227 MDEV-36506 Build fails with cmake 4.0
Update cmake_minimum_required to 2.8...3.12 in root cmake and mroonga.

This will update "Policy Version" to 3.12, which will not prevent the
build by even higher cmake versions. There is also a reason to stay on
the compatible with windows "policy version", so 3.12 is conservatively
chosen.

On the other hand, it will require at least version 2.8.
2025-04-10 13:05:19 +02:00
b005b6097f Cleanup CMake code (Windows-specific)
Prepare for a more modern CMake version than the current minimum.

- Use CMAKE_MSVC_RUNTIME_LIBRARY instead of the custom MSVC_CRT_TYPE.
- Replace CMAKE_{C,CXX}_FLAGS modifications with
  add_compile_definitions/options and add_link_options.
  The older method already broke with new pcre2.
- Fix clang-cl compilation and ASAN build.
- Avoid modifying CMAKE_C_STANDARD_LIBRARIES/CMAKE_CXX_STANDARD_LIBRARIES,
  as this is discouraged by CMake.
- Reduce system checks.
2025-04-04 08:58:40 +02:00
bb1d88b6dc Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
3ae8f114e2 Merge 10.11 into 11.4 2025-04-02 10:15:08 +03:00
a632a69386 MDEV-36127 Add MTR test for mariadb-upgrade-service on Windows
Added a test to verify mariadb-upgrade-service functionality on Windows.

The test runs mariadb-install-db.exe to create a Windows service, then
executes mariadb-upgrade-service.exe while the service is online
or offline.

There is no real cross-version upgrade in this test(not possible with
MTR), the actual goal is just to run smoke-test.

Last  times mariadb-upgrade-service was broken (CONC-760, MDEV-30639)
there were problems with named pipe connections, which could be detected
and prevented by smoke-test alone.
2025-03-31 18:37:06 +02:00
f5bd250f5b Merge 10.11 into 11.4 2025-03-28 13:55:21 +02:00
ab0f2a00b6 Merge 10.6 into 10.11 2025-03-27 08:01:47 +02:00
e95a8f84de MDEV-36156: MSAN Compile and Link flags needed for compile/run checks
When MSAN adds the -fsantize=memory this significantly affects compile
and link tests. Whether this is a compile/run/or looking for a symbol
in a library these cmake tests require the same flags be set.

Ideally the minimum invocation of cmake to create a MSAN build as
investigated in MDBF-793 should be:

  -DWITH_MSAN=ON \
  -DCMAKE_{EXE,MODULE}_LINKER_FLAGS="-L${MSAN_LIBDIR} -Wl,-rpath=${MSAN_LIBDIR}"

On the assumption that the compiler supports msan and the instrumented
libraries are in MSAN_LIBDIR (maybe later can be made a cmake option).

Without cmake policy below, the checking of everything from libc++ to
libfmt will not have the supplied linker flags or the compile options
that WITH_MSAN=ON invokes. Many try_compile and CMake functions that
wrapped this and headers failed to be recognised due to missing msan symbols
when linking. Also without the -L path, they where applying a link test
to the default path libraries rather than the MSAN instrumented ones.

The CMake policy enabled is CMP0056, added CMake 3.2, applies
CMAKE_EXE_LINKER_FLAGS to try_compile.

With this change the MY_CHECK_AND_SET_COMPILER_FLAG
remove explict build types resulting in just CMAKE_{C,CXX}_FLAGS being
set rather than CMAKE_{C,CXX}_FLAGS_{DEBUG,RELWITHDEBINFO}. These
are needed for the default CMP0066 policy to be correctly applied and
the msan flags of -fsanitizer=memory are applied to all compile checks.

Likewise with MY_CHECK_AND_SET_LINKER_FLAG for CMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS
for those check that involve full linking and CHECK_CXX_SOURCE_RUNS for
example.
2025-02-28 10:55:42 +01:00
9ee09a33bb Merge branch '11.7' into 11.8 2025-02-11 20:29:43 +01:00
7d657fda64 Merge branch '10.11 into 11.4 2025-01-30 12:01:11 +01:00
e69f8cae1a Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
98dbe3bfaf Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
cacaaebf01 MDEV-35837 Move to c++17
Move from c++11 to c++17.
2025-01-16 15:08:29 -05:00
2563839853 MDEV-34979 generate SBOM from server builds
This commit adds the capability to generate a Software Bill of Materials
(SBOM) from server builds.

It introduces a new WITH_SBOM variable, which defaults to ON for package
builds (i.e if BUILD_CONFIG is used) and to OFF otherwise.

When enabled, the build process will produce an sbom.json document in
CycloneDX format, capturing information about various dependencies,
which is gathered from various sources.

We use git submodule information and CMake external projects properties
to gather version information for 3rd party code, but also handle
dependencies if external code is part of our repository
(zlib, or Connect storage engine's minizip)

The SBOM document is stored in the root build directory in sbom.json file,
but is not currently installed.
2025-01-15 14:37:43 +01:00
b337e14440 WITHOUT_ABI_CHECK
ABI check takes several seconds on compilation. It is not needed in
repetitive build during the development process.
2025-01-14 18:54:43 +03:00
17f01186f5 Merge 10.11 into 11.4 2025-01-09 07:58:08 +02:00
420d9eb27f Merge 10.6 into 10.11 2025-01-08 12:51:26 +02:00
b251cb6a4f Merge 10.5 into 10.6 2025-01-08 08:48:21 +02:00
1d6f857534 MDEV-35607 Compile error with gcc-15 (signal returns)
set policy CMP0067 to NEW, this will make try_compile to use
project-wide CMAKE_C_STANDARD and CMAKE_CXX_STANDARD settings
2025-01-07 16:31:39 +01:00
f10d12008c MDEV-35301: Bump minimum cmake version to 3.12.0
Libmariadb introduced a cmake change that required 3.12 or newer.

Since none of the platforms we currently support have anything lower
than 3.12 available, we should make this a proper requirement for the
Server as well.
2024-11-04 17:23:12 +02:00
12a91b57e2 Merge 10.11 into 11.2 2024-10-03 13:24:43 +03:00
63913ce5af Merge 10.6 into 10.11 2024-10-03 10:55:08 +03:00
7e0afb1c73 Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
42eb64e64d MDEV-34996 Buildbot MSAN options should be in server
All the options that where in buildbot, should
be in the server making it accessible to all
without any special invocation.

If WITH_MSAN=ON, we want to make sure that the
compiler options are supported and it will result
in an error if not supported.

We make the -WITH_MSAN=ON append -stdlib=libc++
to the CXX_FLAGS if supported.

With SECURITY_HARDENING options the bootstrap
currently crashes, so for now, we disable SECRUITY_HARDENING
if there is MSAN enable.

Option WITH_DBUG_TRACE has no effect in MSAN builds.
2024-09-25 22:29:50 +10:00
2b11450d09 Merge branch '11.1' into 11.2 2024-08-20 11:29:44 +02:00
62bfcfd8b2 Merge 10.6 into 10.11 2024-08-14 11:36:52 +03:00
00862b688c MDEV-14959: Control over memory allocated for SP/PS
The final touch to fixing memory leaks for PS/SP. This patch turns on
by default the option WITH_PROTECT_STATEMENT_MEMROOT in order to
build server with memory leaks detection mechanism switched on.
2024-08-02 14:34:31 +07:00
2447dda2c0 Merge branch '10.11' into 11.1 2024-07-08 22:40:16 +02:00
034a175982 Merge branch '10.6' into 10.11 2024-07-04 11:52:07 +02:00
8ed3c37592 Make PROTECT_STATEMENT_MEMROOT default for version less then 11.2 2024-07-04 09:27:30 +02:00
f9807aadef Merge branch '10.11' into 11.0 2024-05-12 12:18:28 +02:00
a6b2f820e0 Merge branch '10.6' into 10.11 2024-05-10 20:02:18 +02:00
7b53672c63 Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
6f003b5d07 MDEV-29955 post-fix - add CMake policy CMP0074, so ZLIB_ROOT is not ignored 2024-05-08 11:20:23 +02:00
22d4fbeb62 Define CMake policy list, like it is done in 10.6+
Makes easier to add new policy to the list, and merge to newer versions-
2024-05-08 11:20:23 +02:00
0aae11ac28 Merge branch '10.6' into 10.11 2024-04-30 16:56:49 +02:00
f9575495ce Fix typo
There is no component `SuportFiles` in MariaDB server, yet a `SupportFiles` component exists.
2024-04-30 20:30:43 +10:00
c1f3eff53f Merge branch '10.5' into 10.6 2024-04-29 10:08:58 +02:00