Skip to content

Commit fc3b1a7

Browse files
committed
Merge 10.2 into bb-10.2-ext
2 parents 4cfef2a + 96f06f9 commit fc3b1a7

File tree

230 files changed

+3605
-2161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+3605
-2161
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,12 @@ ENDIF()
465465

466466
INCLUDE(CPack)
467467

468+
IF(WIN32 AND SIGNCODE)
469+
# Configure post-install script for authenticode signing
470+
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/sign.cmake.in sign.cmake @ONLY)
471+
INSTALL(SCRIPT ${PROJECT_BINARY_DIR}/sign.cmake)
472+
ENDIF()
473+
468474
IF(NON_DISTRIBUTABLE_WARNING)
469475
MESSAGE(WARNING "
470476
You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation.")

cmake/CMakeLis.txt

Whitespace-only changes.

cmake/bison.cmake

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,31 @@ MACRO (RUN_BISON input_yy output_cc output_h name_prefix)
4747
ENDIF()
4848
ENDIF()
4949
IF(BISON_USABLE)
50+
# Workaround for VS regenerating output even
51+
# when outputs are up-to-date. At least, fix output timestamp
52+
# after build so that files that depend on generated header are
53+
# not rebuilt.
54+
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
55+
FIND_PROGRAM(TOUCH_EXECUTABLE touch DOC "Path to touch executable"
56+
PATHS "C:/Program Files/Git/usr/bin"
57+
"C:/Program Files (x86)/Git/usr/bin")
58+
IF(TOUCH_EXECUTABLE)
59+
SET(VS_FIX_OUTPUT_TIMESTAMPS
60+
COMMAND ${TOUCH_EXECUTABLE} -r ${input_yy} ${output_cc}
61+
COMMAND ${TOUCH_EXECUTABLE} -r ${input_yy} ${output_h})
62+
ENDIF()
63+
ENDIF()
64+
5065
ADD_CUSTOM_COMMAND(
5166
OUTPUT ${output_cc}
5267
${output_h}
5368
COMMAND ${BISON_EXECUTABLE} -y -p ${name_prefix}
5469
--output=${output_cc}
5570
--defines=${output_h}
5671
${input_yy}
57-
DEPENDS ${input_yy}
58-
)
72+
${VS_FIX_OUTPUT_TIMESTAMPS}
73+
DEPENDS ${input_yy}
74+
)
5975
ELSE()
6076
# Bison is missing or not usable, e.g too old
6177
IF(EXISTS ${output_cc} AND EXISTS ${output_h})

cmake/install_macros.cmake

Lines changed: 19 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,8 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
3232
ENDIF()
3333
SET(targets ${ARG_UNPARSED_ARGUMENTS})
3434
FOREACH(target ${targets})
35-
GET_TARGET_PROPERTY(type ${target} TYPE)
36-
GET_TARGET_PROPERTY(location ${target} LOCATION)
37-
STRING(REPLACE ".exe" ".pdb" pdb_location ${location})
38-
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
39-
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
40-
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
41-
STRING(REPLACE
42-
"${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
43-
pdb_location ${pdb_location})
44-
ENDIF()
45-
35+
GET_TARGET_PROPERTY(target_type ${target} TYPE)
36+
4637
set(comp "")
4738

4839
IF(target MATCHES "mysqld" OR type MATCHES "MODULE")
@@ -61,11 +52,9 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
6152
IF(NOT comp)
6253
SET(comp Debuginfo_archive_only) # not in MSI
6354
ENDIF()
64-
IF(type MATCHES "STATIC")
65-
# PDB for static libraries might be unsupported http://public.kitware.com/Bug/view.php?id=14600
66-
SET(opt OPTIONAL)
67-
ENDIF()
68-
INSTALL(FILES ${pdb_location} DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp} ${opt})
55+
IF(NOT target_type MATCHES "STATIC")
56+
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
57+
ENDIF()
6958
ENDFOREACH()
7059
ENDIF()
7160
ENDFUNCTION()
@@ -212,37 +201,22 @@ IF(WIN32)
212201
ENDIF()
213202
ENDIF()
214203

215-
MACRO(SIGN_TARGET)
216-
CMAKE_PARSE_ARGUMENTS(ARG "" "COMPONENT" "" ${ARGN})
217-
SET(target ${ARG_UNPARSED_ARGUMENTS})
218-
IF(ARG_COMPONENT)
219-
SET(comp COMPONENT ${ARG_COMPONENT})
220-
ELSE()
221-
SET(comp)
222-
ENDIF()
223-
GET_TARGET_PROPERTY(target_type ${target} TYPE)
224-
IF(target_type AND NOT target_type MATCHES "STATIC")
225-
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
226-
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
227-
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
228-
target_location ${target_location})
229-
ENDIF()
230-
INSTALL(CODE
231-
"EXECUTE_PROCESS(COMMAND
232-
\"${SIGNTOOL_EXECUTABLE}\" verify /pa /q \"${target_location}\"
233-
RESULT_VARIABLE ERR)
234-
IF(NOT \${ERR} EQUAL 0)
235-
EXECUTE_PROCESS(COMMAND
236-
\"${SIGNTOOL_EXECUTABLE}\" sign ${SIGNTOOL_PARAMETERS} \"${target_location}\"
237-
RESULT_VARIABLE ERR)
204+
205+
FUNCTION(SIGN_TARGET target)
206+
IF(NOT SIGNCODE)
207+
RETURN()
238208
ENDIF()
239-
IF(NOT \${ERR} EQUAL 0)
240-
MESSAGE(FATAL_ERROR \"Error signing '${target_location}'\")
209+
GET_TARGET_PROPERTY(target_type ${target} TYPE)
210+
IF((NOT target_type) OR (target_type MATCHES "STATIC"))
211+
RETURN()
241212
ENDIF()
242-
" ${comp})
243-
ENDIF()
244-
ENDMACRO()
245-
213+
# Mark executable for signing by creating empty *.signme file
214+
# The actual signing happens in preinstall step
215+
# (which traverses
216+
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
217+
COMMAND ${CMAKE_COMMAND} -E touch "$<TARGET_FILE:${target}>.signme"
218+
)
219+
ENDFUNCTION()
246220

247221
# Installs targets, also installs pdbs on Windows.
248222
#

cmake/plugin.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ MACRO(MYSQL_ADD_PLUGIN)
219219
# Install dynamic library
220220
IF(ARG_COMPONENT)
221221
IF(CPACK_COMPONENTS_ALL AND
222-
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT})
222+
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT}
223+
AND INSTALL_SYSCONF2DIR)
223224
IF (ARG_STORAGE_ENGINE)
224225
SET(ver " = %{version}-%{release}")
225226
ELSE()
@@ -235,9 +236,11 @@ MACRO(MYSQL_ADD_PLUGIN)
235236
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_PROVIDES "cmake_bug_13248" PARENT_SCOPE)
236237
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_OBSOLETES "cmake_bug_13248" PARENT_SCOPE)
237238
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} PARENT_SCOPE)
238-
IF(NOT ARG_CLIENT AND NOT ARG_CONFIG AND UNIX)
239-
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
240-
FILE(WRITE ${ARG_CONFIG} "[mariadb]\nplugin-load-add=${ARG_MODULE_OUTPUT_NAME}.so\n")
239+
IF(NOT ARG_CLIENT AND UNIX)
240+
IF (NOT ARG_CONFIG)
241+
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
242+
FILE(WRITE ${ARG_CONFIG} "[mariadb]\nplugin-load-add=${ARG_MODULE_OUTPUT_NAME}.so\n")
243+
ENDIF()
241244
INSTALL(FILES ${ARG_CONFIG} COMPONENT ${ARG_COMPONENT} DESTINATION ${INSTALL_SYSCONF2DIR})
242245
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} "%config(noreplace) ${INSTALL_SYSCONF2DIR}/*" PARENT_SCOPE)
243246
ENDIF()

cmake/sign.cmake.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FILE(GLOB_RECURSE files "@CMAKE_BINARY_DIR@/*.signme")
2+
MESSAGE(STATUS "signing files")
3+
FOREACH(f ${files})
4+
STRING(REPLACE ".signme" "" exe_location "${f}")
5+
6+
string (REPLACE ";" " " params "@SIGNTOOL_PARAMETERS@")
7+
#MESSAGE("@SIGNTOOL_EXECUTABLE@" sign ${params} "${exe_location}")
8+
9+
EXECUTE_PROCESS(COMMAND
10+
"@SIGNTOOL_EXECUTABLE@" sign @SIGNTOOL_PARAMETERS@ "${exe_location}"
11+
RESULT_VARIABLE ERR)
12+
IF(NOT ${ERR} EQUAL 0)
13+
MESSAGE( "Error ${ERR} signing ${exe_location}")
14+
ELSE()
15+
FILE(REMOVE ${f})
16+
ENDIF()
17+
18+
ENDFOREACH()

cmake/submodules.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
77
IF(git_config_get_result EQUAL 128 OR cmake_update_submodules MATCHES no)
88
SET(update_result 0)
99
ELSEIF (cmake_update_submodules MATCHES force)
10-
MESSAGE("-- Updating submodules (forced)")
10+
MESSAGE(STATUS "Updating submodules (forced)")
1111
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force
1212
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
1313
RESULT_VARIABLE update_result)
@@ -16,7 +16,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
1616
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
1717
RESULT_VARIABLE update_result)
1818
ELSE()
19-
MESSAGE("-- Updating submodules")
19+
MESSAGE(STATUS "Updating submodules")
2020
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init
2121
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
2222
RESULT_VARIABLE update_result)

debian/control

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,9 @@ Conflicts: mariadb-galera-server-10.0 (<< 10.0.5),
4848
mariadb-server-5.2,
4949
mariadb-server-5.3,
5050
mariadb-server-5.5 (<< 5.5.33)
51-
Replaces: libmariadbclient18,
52-
libmysqlclient18,
53-
libmysqlclient19,
51+
Replaces: libmysqlclient19,
5452
libmysqlclient20
55-
Provides: libmariadbclient18,
56-
libmysqlclient18,
57-
libmysqlclient19,
53+
Provides: libmysqlclient19,
5854
libmysqlclient20
5955
Description: MariaDB database client library
6056
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
@@ -68,27 +64,29 @@ Package: libmariadbclient18
6864
Section: libs
6965
Architecture: any
7066
Depends: libmariadb3 (= ${binary:Version}), ${misc:Depends}
67+
Replaces: libmariadbclient18
68+
Provides: libmariadbclient18
7169
Description: Virtual package to satisfy external depends
7270
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
7371
server. SQL (Structured Query Language) is the most popular database query
7472
language in the world. The main goals of MariaDB are speed, robustness and
7573
ease of use.
7674
.
77-
This is an empty package that depends on the libmariadb3
78-
package.
75+
This package provides compatibility symlinks for libmariadb3
7976

8077
Package: libmysqlclient18
8178
Section: libs
8279
Architecture: any
8380
Depends: libmariadb3 (= ${binary:Version}), ${misc:Depends}
81+
Replaces: libmysqlclient18
82+
Provides: libmysqlclient18
8483
Description: Virtual package to satisfy external depends
8584
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
8685
server. SQL (Structured Query Language) is the most popular database query
8786
language in the world. The main goals of MariaDB are speed, robustness and
8887
ease of use.
8988
.
90-
This is an empty package that depends on the libmariadb3
91-
package.
89+
This package provides compatibility symlinks for libmariadb3
9290

9391
Package: libmariadb-dev
9492
Architecture: any
@@ -174,8 +172,7 @@ Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
174172

175173
Package: mariadb-client-core-10.2
176174
Architecture: any
177-
Depends: libmariadb3 (>= ${source:Version}),
178-
mariadb-common (>= ${source:Version}),
175+
Depends: mariadb-common (>= ${source:Version}),
179176
${misc:Depends},
180177
${shlibs:Depends}
181178
Conflicts: mariadb-client-10.0,
@@ -238,7 +235,6 @@ Description: MariaDB database core client binaries
238235
Package: mariadb-client-10.2
239236
Architecture: any
240237
Depends: debianutils (>=1.6),
241-
libmariadb3 (>= ${source:Version}),
242238
mariadb-client-core-10.2 (>= ${source:Version}),
243239
mariadb-common,
244240
${misc:Depends},
@@ -292,8 +288,7 @@ Description: MariaDB database client binaries
292288

293289
Package: mariadb-server-core-10.2
294290
Architecture: any
295-
Depends: libmariadb3 (>= ${binary:Version}),
296-
mariadb-common (>= ${source:Version}),
291+
Depends: mariadb-common (>= ${source:Version}),
297292
${misc:Depends},
298293
${shlibs:Depends}
299294
Conflicts: mariadb-server-core-10.0,

debian/libmariadb-dev.install

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
usr/bin/mysql_config
22
usr/include/mysql
33
usr/lib/*/libmariadb.so
4+
usr/lib/*/libmysqlclient.so
5+
usr/lib/*/libmariadbclient.so
46
usr/lib/*/libmariadbclient.a
57
usr/lib/*/libmysqlservices.a
68
usr/share/aclocal/mysql.m4

debian/libmariadb-dev.links

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)