Commit 9e1b3af4 authored by Rasmus Johansson's avatar Rasmus Johansson Committed by Sergei Golubchik

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
parent 6fb59d52
...@@ -36,51 +36,49 @@ COPY_OPENSSL_DLLS(copy_openssl_client) ...@@ -36,51 +36,49 @@ COPY_OPENSSL_DLLS(copy_openssl_client)
SET(CLIENT_LIB mariadbclient mysys) SET(CLIENT_LIB mariadbclient mysys)
ADD_DEFINITIONS(${SSL_DEFINES}) ADD_DEFINITIONS(${SSL_DEFINES})
MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc MYSQL_ADD_EXECUTABLE(mariadb completion_hash.cc mysql.cc readline.cc
${CMAKE_SOURCE_DIR}/sql/sql_string.cc) ${CMAKE_SOURCE_DIR}/sql/sql_string.cc)
TARGET_LINK_LIBRARIES(mysql ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb ${CLIENT_LIB})
IF(UNIX) IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${MY_READLINE_LIBRARY}) TARGET_LINK_LIBRARIES(mariadb ${MY_READLINE_LIBRARY})
SET_TARGET_PROPERTIES(mysql PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mariadb PROPERTIES ENABLE_EXPORTS TRUE)
ENDIF(UNIX) ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc MYSQL_ADD_EXECUTABLE(mariadb-test mysqltest.cc ${CMAKE_SOURCE_DIR}/sql/sql_string.cc COMPONENT Test)
${CMAKE_SOURCE_DIR}/sql/sql_string.cc
COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS ${PCRE2_DEBIAN_HACK}") SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS ${PCRE2_DEBIAN_HACK}")
TARGET_LINK_LIBRARIES(mysqltest ${CLIENT_LIB} pcre2-posix pcre2-8) TARGET_LINK_LIBRARIES(mariadb-test ${CLIENT_LIB} pcre2-posix pcre2-8)
SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mariadb-test PROPERTIES ENABLE_EXPORTS TRUE)
MYSQL_ADD_EXECUTABLE(mysqlcheck mysqlcheck.c) MYSQL_ADD_EXECUTABLE(mariadb-check mysqlcheck.c)
TARGET_LINK_LIBRARIES(mysqlcheck ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb-check ${CLIENT_LIB})
MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c) MYSQL_ADD_EXECUTABLE(mariadb-dump mysqldump.c ../sql-common/my_user.c)
TARGET_LINK_LIBRARIES(mysqldump ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb-dump ${CLIENT_LIB})
MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c) MYSQL_ADD_EXECUTABLE(mariadb-import mysqlimport.c)
SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS") SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqlimport ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb-import ${CLIENT_LIB})
MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c COMPONENT Server) MYSQL_ADD_EXECUTABLE(mariadb-upgrade mysql_upgrade.c COMPONENT Server)
TARGET_LINK_LIBRARIES(mysql_upgrade ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb-upgrade ${CLIENT_LIB})
ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs) ADD_DEPENDENCIES(mariadb-upgrade GenFixPrivs)
MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c) MYSQL_ADD_EXECUTABLE(mariadb-show mysqlshow.c)
TARGET_LINK_LIBRARIES(mysqlshow ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb-show ${CLIENT_LIB})
MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c) MYSQL_ADD_EXECUTABLE(mariadb-plugin mysql_plugin.c)
TARGET_LINK_LIBRARIES(mysql_plugin ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb-plugin ${CLIENT_LIB})
MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc) MYSQL_ADD_EXECUTABLE(mariadb-binlog mysqlbinlog.cc)
TARGET_LINK_LIBRARIES(mysqlbinlog ${CLIENT_LIB} mysys_ssl) TARGET_LINK_LIBRARIES(mariadb-binlog ${CLIENT_LIB} mysys_ssl)
MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc ../sql/password.c) MYSQL_ADD_EXECUTABLE(mariadb-admin mysqladmin.cc ../sql/password.c)
TARGET_LINK_LIBRARIES(mysqladmin ${CLIENT_LIB} mysys_ssl) TARGET_LINK_LIBRARIES(mariadb-admin ${CLIENT_LIB} mysys_ssl)
MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c) MYSQL_ADD_EXECUTABLE(mariadb-slap mysqlslap.c)
SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS") SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqlslap ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb-slap ${CLIENT_LIB})
MYSQL_ADD_EXECUTABLE(mariadb-conv mariadb-conv.cc MYSQL_ADD_EXECUTABLE(mariadb-conv mariadb-conv.cc
${CMAKE_SOURCE_DIR}/sql/sql_string.cc) ${CMAKE_SOURCE_DIR}/sql/sql_string.cc)
...@@ -95,11 +93,11 @@ ENDIF(WIN32) ...@@ -95,11 +93,11 @@ ENDIF(WIN32)
ADD_EXECUTABLE(async_example async_example.c) ADD_EXECUTABLE(async_example async_example.c)
TARGET_LINK_LIBRARIES(async_example ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(async_example ${CLIENT_LIB})
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin async_example SET_TARGET_PROPERTIES (mariadb-check mariadb-dump mariadb-import mariadb-upgrade mariadb-show mariadb-slap mariadb-plugin async_example
PROPERTIES HAS_CXX TRUE) PROPERTIES HAS_CXX TRUE)
FOREACH(t mysql mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysql_plugin mysqlbinlog FOREACH(t mariadb mariadb-test mariadb-check mariadb-dump mariadb-import mariadb-upgrade mariadb-show mariadb-plugin mariadb-binlog
mysqladmin mysqlslap async_example) mariadb-admin mariadb-slap async_example)
ADD_DEPENDENCIES(${t} GenError ${CLIENT_LIB}) ADD_DEPENDENCIES(${t} GenError ${CLIENT_LIB})
ENDFOREACH() ENDFOREACH()
......
...@@ -109,8 +109,6 @@ FUNCTION(INSTALL_SCRIPT) ...@@ -109,8 +109,6 @@ FUNCTION(INSTALL_SCRIPT)
INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP}) INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP})
get_filename_component(dest "${script}" NAME) get_filename_component(dest "${script}" NAME)
CREATE_MARIADB_SYMLINK(${dest} ${ARG_DESTINATION} ${COMP})
INSTALL_MANPAGE(${dest}) INSTALL_MANPAGE(${dest})
ENDFUNCTION() ENDFUNCTION()
...@@ -260,7 +258,6 @@ ENDFUNCTION() ...@@ -260,7 +258,6 @@ ENDFUNCTION()
GET_FILENAME_COMPONENT(BINARY_PARENTDIR ${CMAKE_BINARY_DIR} PATH) GET_FILENAME_COMPONENT(BINARY_PARENTDIR ${CMAKE_BINARY_DIR} PATH)
SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug build") SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug build")
FUNCTION(INSTALL_MYSQL_TEST from to) FUNCTION(INSTALL_MYSQL_TEST from to)
IF(INSTALL_MYSQLTESTDIR) IF(INSTALL_MYSQLTESTDIR)
INSTALL( INSTALL(
......
...@@ -62,6 +62,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE) ...@@ -62,6 +62,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
ELSE() ELSE()
UNSET(EXCLUDE_FROM_ALL) UNSET(EXCLUDE_FROM_ALL)
ENDIF() ENDIF()
ADD_EXECUTABLE(${target} ${WIN32} ${MACOSX_BUNDLE} ${EXCLUDE_FROM_ALL} ${sources}) ADD_EXECUTABLE(${target} ${WIN32} ${MACOSX_BUNDLE} ${EXCLUDE_FROM_ALL} ${sources})
# tell CPack where to install # tell CPack where to install
...@@ -79,16 +80,44 @@ FUNCTION (MYSQL_ADD_EXECUTABLE) ...@@ -79,16 +80,44 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
IF (COMP MATCHES ${SKIP_COMPONENTS}) IF (COMP MATCHES ${SKIP_COMPONENTS})
RETURN() RETURN()
ENDIF() ENDIF()
IF (WITH_STRIPPED_CLIENT AND NOT target STREQUAL mysqld)
IF (WITH_STRIPPED_CLIENT AND NOT target STREQUAL mariadbd)
INSTALL(CODE "SET(CMAKE_INSTALL_DO_STRIP 1)" COMPONENT ${COMP}) INSTALL(CODE "SET(CMAKE_INSTALL_DO_STRIP 1)" COMPONENT ${COMP})
SET(reset_strip ON) SET(reset_strip ON)
ENDIF() ENDIF()
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP}) MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP})
IF (reset_strip) IF (reset_strip)
INSTALL(CODE "SET(CMAKE_INSTALL_DO_STRIP 0)" COMPONENT ${COMP}) INSTALL(CODE "SET(CMAKE_INSTALL_DO_STRIP 0)" COMPONENT ${COMP})
ENDIF() ENDIF()
ENDIF() ENDIF()
# create mariadb named symlink # create MySQL named "legacy links"
CREATE_MARIADB_SYMLINK(${target} ${ARG_DESTINATION} ${COMP}) GET_SYMLINK(${target} link)
IF(link)
IF(UNIX)
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink
${target} ${link}
COMMENT "Creating ${link} link"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
INSTALL(PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${link}
DESTINATION
${ARG_DESTINATION}
COMPONENT ${COMP})
ELSE()
# Windows note:
# Here, hardlinks are used, because cmake can't install symlinks.
# In packages, there are won't be links, just copies.
SET(link ${link}.exe)
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND cmake -E remove -f ${link}
COMMAND mklink /H ${link} $<TARGET_FILE_NAME:${target}>
COMMENT "Creating ${link} link"
WORKING_DIRECTORY $<TARGET_FILE_DIR:${target}>)
INSTALL(PROGRAMS $<TARGET_FILE_DIR:${target}>/${link} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP})
ENDIF()
ENDIF()
ENDFUNCTION() ENDFUNCTION()
...@@ -9,68 +9,46 @@ macro(REGISTER_SYMLINK from to) ...@@ -9,68 +9,46 @@ macro(REGISTER_SYMLINK from to)
endmacro() endmacro()
# MariaDB names for executables # MariaDB names for executables
REGISTER_SYMLINK("mysql" "mariadb") REGISTER_SYMLINK("mariadb" "mysql")
REGISTER_SYMLINK("mysqlaccess" "mariadb-access") REGISTER_SYMLINK("mariadb-access" "mysqlaccess")
REGISTER_SYMLINK("mysqladmin" "mariadb-admin") REGISTER_SYMLINK("mariadb-admin" "mysqladmin")
REGISTER_SYMLINK("mariabackup" "mariadb-backup") REGISTER_SYMLINK("mariadb-backup" "mariabackup")
REGISTER_SYMLINK("mysqlbinlog" "mariadb-binlog") REGISTER_SYMLINK("mariadb-binlog" "mysqlbinlog")
REGISTER_SYMLINK("mysqlcheck" "mariadb-check") REGISTER_SYMLINK("mariadb-check" "mysqlcheck")
REGISTER_SYMLINK("mysql_client_test_embedded" "mariadb-client-test-embedded") REGISTER_SYMLINK("mariadb-client-test-embedded" "mysql_client_test_embedded")
REGISTER_SYMLINK("mysql_client_test" "mariadb-client-test") REGISTER_SYMLINK("mariadb-client-test" "mysql_client_test")
REGISTER_SYMLINK("mariadb_config" "mariadb-config") REGISTER_SYMLINK("mariadb-config" "mariadb_config")
REGISTER_SYMLINK("mysql_convert_table_format" "mariadb-convert-table-format") REGISTER_SYMLINK("mariadb-convert-table-format" "mysql_convert_table_format")
REGISTER_SYMLINK("mysqldump" "mariadb-dump") REGISTER_SYMLINK("mariadb-dump" "mysqldump")
REGISTER_SYMLINK("mysqldumpslow" "mariadb-dumpslow") REGISTER_SYMLINK("mariadb-dumpslow" "mysqldumpslow")
REGISTER_SYMLINK("mysql_embedded" "mariadb-embedded") REGISTER_SYMLINK("mariadb-embedded" "mysql_embedded")
REGISTER_SYMLINK("mysql_find_rows" "mariadb-find-rows") REGISTER_SYMLINK("mariadb-find-rows" "mysql_find_rows")
REGISTER_SYMLINK("mysql_fix_extensions" "mariadb-fix-extensions") REGISTER_SYMLINK("mariadb-fix-extensions" "mysql_fix_extensions")
REGISTER_SYMLINK("mysqlhotcopy" "mariadb-hotcopy") REGISTER_SYMLINK("mariadb-hotcopy" "mysqlhotcopy")
REGISTER_SYMLINK("mysqlimport" "mariadb-import") REGISTER_SYMLINK("mariadb-import" "mysqlimport")
REGISTER_SYMLINK("mysql_install_db" "mariadb-install-db") REGISTER_SYMLINK("mariadb-install-db" "mysql_install_db")
REGISTER_SYMLINK("mysql_ldb" "mariadb-ldb") REGISTER_SYMLINK("mariadb-ldb" "mysql_ldb")
REGISTER_SYMLINK("mysql_plugin" "mariadb-plugin") REGISTER_SYMLINK("mariadb-plugin" "mysql_plugin")
REGISTER_SYMLINK("mysql_secure_installation" "mariadb-secure-installation") REGISTER_SYMLINK("mariadb-secure-installation" "mysql_secure_installation")
REGISTER_SYMLINK("mysql_setpermission" "mariadb-setpermission") REGISTER_SYMLINK("mariadb-setpermission" "mysql_setpermission")
REGISTER_SYMLINK("mysqlshow" "mariadb-show") REGISTER_SYMLINK("mariadb-show" "mysqlshow")
REGISTER_SYMLINK("mysqlslap" "mariadb-slap") REGISTER_SYMLINK("mariadb-slap" "mysqlslap")
REGISTER_SYMLINK("mysqltest" "mariadb-test") REGISTER_SYMLINK("mariadb-test" "mysqltest")
REGISTER_SYMLINK("mysqltest_embedded" "mariadb-test-embedded") REGISTER_SYMLINK("mariadb-test-embedded" "mysqltest_embedded")
REGISTER_SYMLINK("mysql_tzinfo_to_sql" "mariadb-tzinfo-to-sql") REGISTER_SYMLINK("mariadb-tzinfo-to-sql" "mysql_tzinfo_to_sql")
REGISTER_SYMLINK("mysql_upgrade" "mariadb-upgrade") REGISTER_SYMLINK("mariadb-upgrade" "mysql_upgrade")
REGISTER_SYMLINK("mysql_upgrade_service" "mariadb-upgrade-service") REGISTER_SYMLINK("mariadb-upgrade-service" "mysql_upgrade_service")
REGISTER_SYMLINK("mysql_upgrade_wizard" "mariadb-upgrade-wizard") REGISTER_SYMLINK("mariadb-upgrade-wizard" "mysql_upgrade_wizard")
REGISTER_SYMLINK("mysql_waitpid" "mariadb-waitpid") REGISTER_SYMLINK("mariadb-waitpid" "mysql_waitpid")
REGISTER_SYMLINK("mysqld" "mariadbd") REGISTER_SYMLINK("mariadbd" "mysqld")
REGISTER_SYMLINK("mysqld_multi" "mariadbd-multi") REGISTER_SYMLINK("mariadbd-multi" "mysqld_multi")
REGISTER_SYMLINK("mysqld_safe" "mariadbd-safe") REGISTER_SYMLINK("mariadbd-safe" "mysqld_safe")
REGISTER_SYMLINK("mysqld_safe_helper" "mariadbd-safe-helper") REGISTER_SYMLINK("mariadbd-safe-helper" "mysqld_safe_helper")
# Add MariaDB symlinks MACRO(GET_SYMLINK name out)
macro(CREATE_MARIADB_SYMLINK src dir comp) set(${out})
# Find the MariaDB name for executable list(FIND MARIADB_SYMLINK_FROMS ${name} _index)
list(FIND MARIADB_SYMLINK_FROMS ${src} _index)
if (${_index} GREATER -1) if (${_index} GREATER -1)
list(GET MARIADB_SYMLINK_TOS ${_index} mariadbname) list(GET MARIADB_SYMLINK_TOS ${_index} ${out})
endif()
if (mariadbname)
CREATE_MARIADB_SYMLINK_IN_DIR(${src} ${mariadbname} ${dir} ${comp})
endif()
endmacro(CREATE_MARIADB_SYMLINK)
# Add MariaDB symlinks in directory
macro(CREATE_MARIADB_SYMLINK_IN_DIR src dest dir comp)
if(UNIX)
add_custom_target(
SYM_${dest} ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${dest}
)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${dest} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink ${src} ${dest}
COMMENT "mklink ${src} -> ${dest}")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${dest} DESTINATION ${dir} COMPONENT ${comp})
endif() endif()
endmacro(CREATE_MARIADB_SYMLINK_IN_DIR) ENDMACRO()
...@@ -244,6 +244,7 @@ Conflicts: mariadb-client-10.0, ...@@ -244,6 +244,7 @@ Conflicts: mariadb-client-10.0,
mariadb-client-10.2, mariadb-client-10.2,
mariadb-client-10.3, mariadb-client-10.3,
mariadb-client-10.4, mariadb-client-10.4,
mariadb-client-10.5 (<< ${source:Version}),
mariadb-client-5.1, mariadb-client-5.1,
mariadb-client-5.2, mariadb-client-5.2,
mariadb-client-5.3, mariadb-client-5.3,
...@@ -271,6 +272,7 @@ Replaces: mariadb-client-10.0, ...@@ -271,6 +272,7 @@ Replaces: mariadb-client-10.0,
mariadb-client-10.2, mariadb-client-10.2,
mariadb-client-10.3, mariadb-client-10.3,
mariadb-client-10.4, mariadb-client-10.4,
mariadb-client-10.5 (<< ${source:Version}),
mariadb-client-5.1, mariadb-client-5.1,
mariadb-client-5.2, mariadb-client-5.2,
mariadb-client-5.3, mariadb-client-5.3,
...@@ -322,6 +324,7 @@ Conflicts: mariadb-client (<< ${source:Version}), ...@@ -322,6 +324,7 @@ Conflicts: mariadb-client (<< ${source:Version}),
mariadb-client-10.2, mariadb-client-10.2,
mariadb-client-10.3, mariadb-client-10.3,
mariadb-client-10.4, mariadb-client-10.4,
mariadb-client-10.5 (<< ${source:Version}),
mariadb-client-5.1, mariadb-client-5.1,
mariadb-client-5.2, mariadb-client-5.2,
mariadb-client-5.3, mariadb-client-5.3,
...@@ -339,10 +342,12 @@ Replaces: mariadb-client (<< ${source:Version}), ...@@ -339,10 +342,12 @@ Replaces: mariadb-client (<< ${source:Version}),
mariadb-client-10.2, mariadb-client-10.2,
mariadb-client-10.3, mariadb-client-10.3,
mariadb-client-10.4, mariadb-client-10.4,
mariadb-client-10.5 (<< ${source:Version}),
mariadb-client-5.1, mariadb-client-5.1,
mariadb-client-5.2, mariadb-client-5.2,
mariadb-client-5.3, mariadb-client-5.3,
mariadb-client-5.5, mariadb-client-5.5,
mariadb-server-10.5 (<< ${source:Version}),
mysql-client (<< 5.0.51), mysql-client (<< 5.0.51),
mysql-client-5.0, mysql-client-5.0,
mysql-client-5.1, mysql-client-5.1,
...@@ -396,6 +401,7 @@ Breaks: mariadb-client-10.0, ...@@ -396,6 +401,7 @@ Breaks: mariadb-client-10.0,
mariadb-client-10.2, mariadb-client-10.2,
mariadb-client-10.3, mariadb-client-10.3,
mariadb-client-10.4, mariadb-client-10.4,
mariadb-client-10.5 (<< ${source:Version}),
mariadb-server-10.3, mariadb-server-10.3,
mariadb-server-10.4, mariadb-server-10.4,
mariadb-server-10.5 (<< ${source:Version}) mariadb-server-10.5 (<< ${source:Version})
...@@ -404,6 +410,7 @@ Replaces: mariadb-client-10.0, ...@@ -404,6 +410,7 @@ Replaces: mariadb-client-10.0,
mariadb-client-10.2, mariadb-client-10.2,
mariadb-client-10.3, mariadb-client-10.3,
mariadb-client-10.4, mariadb-client-10.4,
mariadb-client-10.5 (<< ${source:Version}),
mariadb-server-10.3, mariadb-server-10.3,
mariadb-server-10.4, mariadb-server-10.4,
mariadb-server-10.5 (<< ${source:Version}), mariadb-server-10.5 (<< ${source:Version}),
...@@ -487,6 +494,7 @@ Conflicts: mariadb-server (<< ${source:Version}), ...@@ -487,6 +494,7 @@ Conflicts: mariadb-server (<< ${source:Version}),
virtual-mysql-server virtual-mysql-server
Replaces: libmariadbclient-dev (<< 5.5.0), Replaces: libmariadbclient-dev (<< 5.5.0),
libmariadbclient16 (<< 5.3.4), libmariadbclient16 (<< 5.3.4),
mariadb-client-10.5 (<< ${source:Version}),
mariadb-server (<< ${source:Version}), mariadb-server (<< ${source:Version}),
mariadb-server-10.0, mariadb-server-10.0,
mariadb-server-10.1, mariadb-server-10.1,
......
usr/bin/mariadb_config usr/bin/mariadb-config
usr/include/mariadb usr/include/mariadb
usr/lib/*/libmariadb.so usr/lib/*/libmariadb.so
usr/lib/*/libmariadbclient.a usr/lib/*/libmariadbclient.a
...@@ -7,3 +7,4 @@ usr/lib/*/libmysqlservices.a ...@@ -7,3 +7,4 @@ usr/lib/*/libmysqlservices.a
usr/lib/*/pkgconfig/mariadb.pc usr/lib/*/pkgconfig/mariadb.pc
usr/share/aclocal/mysql.m4 usr/share/aclocal/mysql.m4
usr/share/man/man1/mysql_config.1 usr/share/man/man1/mysql_config.1
usr/share/man/man1/mariadb-config.1
\ No newline at end of file
usr/share/man/man1/mysql_config.1.gz usr/share/man/man1/mariadb_config.1.gz usr/bin/mariadb-config usr/bin/mysql_config
\ No newline at end of file
usr/bin/mariabackup usr/bin/mariadb-backup
usr/bin/mbstream usr/bin/mbstream
usr/share/man/man1/mariabackup.1 usr/share/man/man1/mariabackup.1
usr/share/man/man1/mariadb-backup.1 usr/share/man/man1/mariadb-backup.1
......
usr/bin/mariabackup usr/bin/mariadb-backup usr/bin/mariadb-backup usr/bin/mariabackup
debian/additions/innotop/innotop usr/bin/ debian/additions/innotop/innotop usr/bin/
debian/additions/mysqlreport usr/bin/ debian/additions/mysqlreport usr/bin/
usr/bin/mariadb-access
usr/bin/mariadb-admin
usr/bin/mariadb-conv usr/bin/mariadb-conv
usr/bin/mysql_find_rows usr/bin/mariadb-dump
usr/bin/mysql_fix_extensions usr/bin/mariadb-dumpslow
usr/bin/mysql_waitpid usr/bin/mariadb-find-rows
usr/bin/mysqlaccess usr/bin/mariadb-fix-extensions
usr/bin/mysqladmin usr/bin/mariadb-import
usr/bin/mysqldump usr/bin/mariadb-show
usr/bin/mysqldumpslow usr/bin/mariadb-slap
usr/bin/mysqlimport usr/bin/mariadb-waitpid
usr/bin/mysqlshow
usr/bin/mysqlslap
usr/bin/mytop usr/bin/mytop
usr/share/man/man1/mariadb-access.1 usr/share/man/man1/mariadb-access.1
usr/share/man/man1/mariadb-admin.1 usr/share/man/man1/mariadb-admin.1
usr/share/man/man1/mariadb-binlog.1
usr/share/man/man1/mariadb-conv.1
usr/share/man/man1/mariadb-dump.1 usr/share/man/man1/mariadb-dump.1
usr/share/man/man1/mariadb-dumpslow.1 usr/share/man/man1/mariadb-dumpslow.1
usr/share/man/man1/mariadb-find-rows.1 usr/share/man/man1/mariadb-find-rows.1
usr/share/man/man1/mariadb-fix-extensions.1 usr/share/man/man1/mariadb-fix-extensions.1
usr/share/man/man1/mariadb-import.1 usr/share/man/man1/mariadb-import.1
usr/share/man/man1/mariadb-plugin.1 usr/share/man/man1/mariadb-show.1
usr/share/man/man1/mariadb-slap.1 usr/share/man/man1/mariadb-slap.1
usr/share/man/man1/mariadb-waitpid.1 usr/share/man/man1/mariadb-waitpid.1
usr/share/man/man1/mysql_find_rows.1 usr/share/man/man1/mysql_find_rows.1
......
usr/bin/mysql_find_rows usr/bin/mariadb-find-rows usr/bin/mariadb-access usr/bin/mysqlaccess
usr/bin/mysql_fix_extensions usr/bin/mariadb-fix-extensions usr/bin/mariadb-admin usr/bin/mysqladmin
usr/bin/mysql_plugin usr/bin/mariadb-plugin usr/bin/mariadb-dump usr/bin/mysqldump
usr/bin/mysql_waitpid usr/bin/mariadb-waitpid usr/bin/mariadb-dumpslow usr/bin/mysqldumpslow
usr/bin/mysqlaccess usr/bin/mariadb-access usr/bin/mariadb-find-rows usr/bin/mysql_find_rows
usr/bin/mysqladmin usr/bin/mariadb-admin usr/bin/mariadb-fix-extensions usr/bin/mysql_fix_extensions
usr/bin/mysqlbinlog usr/bin/mariadb-binlog usr/bin/mariadb-import usr/bin/mysqlimport
usr/bin/mysqlcheck usr/bin/mariadb-analyze usr/bin/mariadb-report usr/bin/mysqlreport
usr/bin/mysqlcheck usr/bin/mariadb-optimize usr/bin/mariadb-show usr/bin/mysqlshow
usr/bin/mysqlcheck usr/bin/mariadb-repair usr/bin/mariadb-slap usr/bin/mysqlslap
usr/bin/mysqlcheck usr/bin/mysqlanalyze usr/bin/mariadb-waitpid usr/bin/mysql_waitpid
usr/bin/mysqlcheck usr/bin/mysqloptimize usr/bin/mariadb-check usr/bin/mariadb-analyze
usr/bin/mysqlcheck usr/bin/mysqlrepair usr/bin/mariadb-check usr/bin/mariadb-optimize
usr/bin/mysqldump usr/bin/mariadb-dump usr/bin/mariadb-check usr/bin/mariadb-repair
usr/bin/mysqldumpslow usr/bin/mariadb-dumpslow usr/bin/mariadb-check usr/bin/mysqlanalyze
usr/bin/mysqlimport usr/bin/mariadb-import usr/bin/mariadb-check usr/bin/mysqloptimize
usr/bin/mysqlreport usr/bin/mariadb-report usr/bin/mariadb-check usr/bin/mysqlrepair
usr/bin/mysqlslap usr/bin/mariadb-slap usr/share/man/man1/mariadb-check.1 usr/share/man/man1/mariadb-analyze.1
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-analyze.1.gz usr/share/man/man1/mariadb-check.1 usr/share/man/man1/mariadb-optimize.1
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-optimize.1.gz usr/share/man/man1/mariadb-check.1 usr/share/man/man1/mariadb-repair.1
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-repair.1.gz usr/share/man/man1/mariadb-check.1 usr/share/man/man1/mysqlanalyze.1
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlanalyze.1.gz usr/share/man/man1/mariadb-check.1 usr/share/man/man1/mysqloptimize.1
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqloptimize.1.gz usr/share/man/man1/mariadb-check.1 usr/share/man/man1/mysqlrepair.1
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlrepair.1.gz
usr/share/man/man1/mysqlreport.1.gz usr/share/man/man1/mariadb-report.1.gz
usr/bin/mysql usr/bin/mariadb
usr/bin/mysqlcheck usr/bin/mariadb-check
usr/share/man/man1/mariadb-check.1 usr/share/man/man1/mariadb-check.1
usr/share/man/man1/mariadb.1 usr/share/man/man1/mariadb.1
usr/share/man/man1/mysql.1 usr/share/man/man1/mysql.1
......
usr/bin/mysql usr/bin/mariadb usr/bin/mariadb usr/bin/mysql
usr/bin/mysqlcheck usr/bin/mariadb-check usr/bin/mariadb-check usr/bin/mysqlcheck
etc/mysql/conf.d/rocksdb.cnf etc/mysql/mariadb.conf.d etc/mysql/conf.d/rocksdb.cnf etc/mysql/mariadb.conf.d
usr/bin/mariadb-ldb
usr/bin/myrocks_hotbackup usr/bin/myrocks_hotbackup
usr/bin/mysql_ldb usr/bin/sst_dump
usr/lib/mysql/plugin/ha_rocksdb.so usr/lib/mysql/plugin/ha_rocksdb.so
usr/share/man/man1/mariadb-ldb.1 usr/share/man/man1/mariadb-ldb.1
usr/share/man/man1/myrocks_hotbackup.1 usr/share/man/man1/myrocks_hotbackup.1
......
usr/bin/mysql_ldb usr/bin/mariadb-ldb usr/bin/mariadb-ldb usr/bin/mysql_ldb
...@@ -14,22 +14,22 @@ usr/bin/aria_pack ...@@ -14,22 +14,22 @@ usr/bin/aria_pack
usr/bin/aria_read_log usr/bin/aria_read_log
usr/bin/galera_new_cluster usr/bin/galera_new_cluster
usr/bin/galera_recovery usr/bin/galera_recovery
usr/bin/mariadb-binlog
usr/bin/mariadb-convert-table-format
usr/bin/mariadb-hotcopy
usr/bin/mariadb-plugin
usr/bin/mariadb-secure-installation
usr/bin/mariadb-service-convert usr/bin/mariadb-service-convert
usr/bin/mariadb-setpermission
usr/bin/mariadb-tzinfo-to-sql
usr/bin/mariadbd-multi
usr/bin/mariadbd-safe
usr/bin/mariadbd-safe-helper
usr/bin/msql2mysql usr/bin/msql2mysql
usr/bin/myisam_ftdump usr/bin/myisam_ftdump
usr/bin/myisamchk usr/bin/myisamchk
usr/bin/myisamlog usr/bin/myisamlog
usr/bin/myisampack usr/bin/myisampack
usr/bin/mysql_convert_table_format
usr/bin/mysql_plugin
usr/bin/mysql_secure_installation
usr/bin/mysql_setpermission
usr/bin/mysql_tzinfo_to_sql
usr/bin/mysqlbinlog
usr/bin/mysqld_multi
usr/bin/mysqld_safe
usr/bin/mysqld_safe_helper
usr/bin/mysqlhotcopy
usr/bin/perror usr/bin/perror
usr/bin/replace usr/bin/replace
usr/bin/resolve_stack_dump usr/bin/resolve_stack_dump
...@@ -67,12 +67,13 @@ usr/share/man/man1/aria_pack.1 ...@@ -67,12 +67,13 @@ usr/share/man/man1/aria_pack.1
usr/share/man/man1/aria_read_log.1 usr/share/man/man1/aria_read_log.1
usr/share/man/man1/galera_new_cluster.1 usr/share/man/man1/galera_new_cluster.1
usr/share/man/man1/galera_recovery.1 usr/share/man/man1/galera_recovery.1
usr/share/man/man1/mariadb-binlog.1
usr/share/man/man1/mariadb-convert-table-format.1 usr/share/man/man1/mariadb-convert-table-format.1
usr/share/man/man1/mariadb-hotcopy.1 usr/share/man/man1/mariadb-hotcopy.1
usr/share/man/man1/mariadb-plugin.1
usr/share/man/man1/mariadb-secure-installation.1 usr/share/man/man1/mariadb-secure-installation.1
usr/share/man/man1/mariadb-service-convert.1 usr/share/man/man1/mariadb-service-convert.1
usr/share/man/man1/mariadb-setpermission.1 usr/share/man/man1/mariadb-setpermission.1
usr/share/man/man1/mariadb-show.1
usr/share/man/man1/mariadb-tzinfo-to-sql.1 usr/share/man/man1/mariadb-tzinfo-to-sql.1
usr/share/man/man1/mariadbd-multi.1 usr/share/man/man1/mariadbd-multi.1
usr/share/man/man1/mariadbd-safe-helper.1 usr/share/man/man1/mariadbd-safe-helper.1
......
usr/bin/mysql_convert_table_format usr/bin/mariadb-convert-table-format usr/bin/mariadb-binlog usr/bin/mysqlbinlog
usr/bin/mysql_secure_installation usr/bin/mariadb-secure-installation usr/bin/mariadb-convert-table-format usr/bin/mysql_convert_table_format
usr/bin/mysql_setpermission usr/bin/mariadb-setpermission usr/bin/mariadb-hotcopy usr/bin/mysqlhotcopy
usr/bin/mysql_tzinfo_to_sql usr/bin/mariadb-tzinfo-to-sql usr/bin/mariadb-plugin usr/bin/mysql_plugin
usr/bin/mysqld_multi usr/bin/mariadbd-multi usr/bin/mariadb-secure-installation usr/bin/mysql_secure_installation
usr/bin/mysqld_safe usr/bin/mariadbd-safe usr/bin/mariadb-setpermission usr/bin/mysql_setpermission
usr/bin/mysqld_safe_helper usr/bin/mariadbd-safe-helper usr/bin/mariadb-tzinfo-to-sql usr/bin/mysql_tzinfo_to_sql
usr/bin/mysqlhotcopy usr/bin/mariadb-hotcopy usr/bin/mariadbd-multi usr/bin/mysqld_multi
usr/bin/mysqlshow usr/bin/mariadb-show usr/bin/mariadbd-safe usr/bin/mysqld_safe
usr/bin/mariadbd-safe-helper usr/bin/mysqld_safe_helper
usr/bin/innochecksum usr/bin/innochecksum
usr/bin/mariadb-install-db
usr/bin/mariadb-upgrade
usr/bin/my_print_defaults usr/bin/my_print_defaults
usr/bin/mysql_install_db usr/sbin/mariadbd
usr/bin/mysql_upgrade
usr/sbin/mysqld
usr/share/man/man1/innochecksum.1 usr/share/man/man1/innochecksum.1
usr/share/man/man1/mariadb-install-db.1 usr/share/man/man1/mariadb-install-db.1
usr/share/man/man1/mariadb-upgrade.1 usr/share/man/man1/mariadb-upgrade.1
usr/share/man/man8/mariadbd.8
usr/share/man/man1/my_print_defaults.1 usr/share/man/man1/my_print_defaults.1
usr/share/man/man1/mysql_install_db.1 usr/share/man/man1/mysql_install_db.1
usr/share/man/man1/mysql_upgrade.1 usr/share/man/man1/mysql_upgrade.1
usr/share/man/man8/mariadbd.8
usr/share/man/man8/mysqld.8 usr/share/man/man8/mysqld.8
usr/share/mysql/charsets usr/share/mysql/charsets
usr/share/mysql/czech usr/share/mysql/czech
......
usr/bin/mysql_install_db usr/bin/mariadb-install-db usr/bin/mariadb-install-db usr/bin/mysql_install_db
usr/bin/mysql_upgrade usr/bin/mariadb-upgrade usr/bin/mariadb-upgrade usr/bin/mysql_upgrade
usr/sbin/mysqld usr/sbin/mariadbd usr/sbin/mariadbd usr/sbin/mysqld
usr/bin/mysql_client_test usr/bin/mariadb-client-test
usr/bin/mysql_client_test_embedded usr/bin/mariadb-client-test-embedded
usr/bin/mysqltest usr/bin/mariadb-test
usr/bin/mysqltest_embedded usr/bin/mariadb-test-embedded
usr/lib/mysql/plugin/adt_null.so usr/lib/mysql/plugin/adt_null.so
usr/lib/mysql/plugin/auth_0x0100.so usr/lib/mysql/plugin/auth_0x0100.so
usr/lib/mysql/plugin/auth_test_plugin.so usr/lib/mysql/plugin/auth_test_plugin.so
...@@ -17,10 +17,10 @@ usr/lib/mysql/plugin/qa_auth_client.so ...@@ -17,10 +17,10 @@ usr/lib/mysql/plugin/qa_auth_client.so
usr/lib/mysql/plugin/qa_auth_interface.so usr/lib/mysql/plugin/qa_auth_interface.so
usr/lib/mysql/plugin/qa_auth_server.so usr/lib/mysql/plugin/qa_auth_server.so
usr/lib/mysql/plugin/test_versioning.so usr/lib/mysql/plugin/test_versioning.so
usr/share/man/man1/mariadb-client-test-embedded.1
usr/share/man/man1/mariadb-client-test.1 usr/share/man/man1/mariadb-client-test.1
usr/share/man/man1/mariadb-test-embedded.1 usr/share/man/man1/mariadb-client-test-embedded.1
usr/share/man/man1/mariadb-test.1 usr/share/man/man1/mariadb-test.1
usr/share/man/man1/mariadb-test-embedded.1
usr/share/man/man1/mysql-stress-test.pl.1 usr/share/man/man1/mysql-stress-test.pl.1
usr/share/man/man1/mysql-test-run.pl.1 usr/share/man/man1/mysql-test-run.pl.1
usr/share/man/man1/mysql_client_test.1 usr/share/man/man1/mysql_client_test.1
......
usr/bin/mysql_client_test usr/bin/mariadb-client-test usr/bin/mariadb-client-test usr/bin/mysql_client_test
usr/bin/mysql_client_test_embedded usr/bin/mariadb-client-test-embedded usr/bin/mariadb-client-test-embedded usr/bin/mysql_client_test_embedded
usr/bin/mysqltest usr/bin/mariadb-test usr/bin/mariadb-test usr/bin/mysqltest
usr/bin/mysqltest_embedded usr/bin/mariadb-test-embedded usr/bin/mariadb-test-embedded usr/bin/mysqltest_embedded
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mtr usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mtr
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run
...@@ -106,9 +106,9 @@ IF(UNIX) ...@@ -106,9 +106,9 @@ IF(UNIX)
MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c) MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c)
TARGET_LINK_LIBRARIES(resolve_stack_dump mysys) TARGET_LINK_LIBRARIES(resolve_stack_dump mysys)
MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client) MYSQL_ADD_EXECUTABLE(mariadb-waitpid mysql_waitpid.c COMPONENT Client)
TARGET_LINK_LIBRARIES(mysql_waitpid mysys) TARGET_LINK_LIBRARIES(mariadb-waitpid mysys)
MYSQL_ADD_EXECUTABLE(mysqld_safe_helper mysqld_safe_helper.c COMPONENT Server) MYSQL_ADD_EXECUTABLE(mariadbd-safe-helper mysqld_safe_helper.c COMPONENT Server)
TARGET_LINK_LIBRARIES(mysqld_safe_helper mysys) TARGET_LINK_LIBRARIES(mariadbd-safe-helper mysys)
ENDIF() ENDIF()
...@@ -55,7 +55,7 @@ ENDIF() ...@@ -55,7 +55,7 @@ ENDIF()
ADD_DEFINITIONS(-DPCRE_STATIC=1) ADD_DEFINITIONS(-DPCRE_STATIC=1)
ADD_DEFINITIONS(${SSL_DEFINES}) ADD_DEFINITIONS(${SSL_DEFINES})
MYSQL_ADD_EXECUTABLE(mariabackup MYSQL_ADD_EXECUTABLE(mariadb-backup
xtrabackup.cc xtrabackup.cc
innobackupex.cc innobackupex.cc
changed_page_bitmap.cc changed_page_bitmap.cc
...@@ -82,17 +82,13 @@ MYSQL_ADD_EXECUTABLE(mariabackup ...@@ -82,17 +82,13 @@ MYSQL_ADD_EXECUTABLE(mariabackup
COMPONENT backup COMPONENT backup
) )
# Export all symbols on Unix, for better crash callstacks # Export all symbols on Unix, for better crash callstacks
SET_TARGET_PROPERTIES(mariabackup PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mariadb-backup PROPERTIES ENABLE_EXPORTS TRUE)
ADD_SUBDIRECTORY(crc) ADD_SUBDIRECTORY(crc)
TARGET_LINK_LIBRARIES(mariadb-backup sql sql_builtins crc)
TARGET_LINK_LIBRARIES(mariabackup sql sql_builtins crc)
IF(NOT HAVE_SYSTEM_REGEX) IF(NOT HAVE_SYSTEM_REGEX)
TARGET_LINK_LIBRARIES(mariabackup pcre2-posix) TARGET_LINK_LIBRARIES(mariadb-backup pcre2-posix)
ENDIF() ENDIF()
......
...@@ -24,17 +24,17 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ...@@ -24,17 +24,17 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
ADD_DEFINITIONS(-DEMBEDDED_LIBRARY -UMYSQL_CLIENT) ADD_DEFINITIONS(-DEMBEDDED_LIBRARY -UMYSQL_CLIENT)
MYSQL_ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc MYSQL_ADD_EXECUTABLE(mariadb-embedded ../../client/completion_hash.cc
../../client/mysql.cc ../../client/readline.cc ../../client/mysql.cc ../../client/readline.cc
COMPONENT Client) COMPONENT Client)
TARGET_LINK_LIBRARIES(mysql_embedded mysqlserver) TARGET_LINK_LIBRARIES(mariadb-embedded mysqlserver)
IF(UNIX) IF(UNIX)
TARGET_LINK_LIBRARIES(mysql_embedded ${MY_READLINE_LIBRARY}) TARGET_LINK_LIBRARIES(mariadb-embedded ${MY_READLINE_LIBRARY})
ENDIF(UNIX) ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc MYSQL_ADD_EXECUTABLE(mariadb-test-embedded ../../client/mysqltest.cc
COMPONENT Test) COMPONENT Test)
TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver pcre2-posix pcre2-8) TARGET_LINK_LIBRARIES(mariadb-test-embedded mysqlserver pcre2-posix pcre2-8)
SET_SOURCE_FILES_PROPERTIES(../../client/mysqltest.cc PROPERTIES COMPILE_FLAGS "${PCRE2_DEBIAN_HACK}") SET_SOURCE_FILES_PROPERTIES(../../client/mysqltest.cc PROPERTIES COMPILE_FLAGS "${PCRE2_DEBIAN_HACK}")
IF(CMAKE_GENERATOR MATCHES "Xcode") IF(CMAKE_GENERATOR MATCHES "Xcode")
...@@ -46,18 +46,18 @@ IF(CMAKE_GENERATOR MATCHES "Xcode") ...@@ -46,18 +46,18 @@ IF(CMAKE_GENERATOR MATCHES "Xcode")
COMMAND ${CMAKE_COMMAND} -E touch COMMAND ${CMAKE_COMMAND} -E touch
${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc ${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc
) )
MYSQL_ADD_EXECUTABLE(mysql_client_test_embedded MYSQL_ADD_EXECUTABLE(mariadb-client-test-embedded
${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc ${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc
../../tests/mysql_client_test.c) ../../tests/mysql_client_test.c)
ELSE() ELSE()
MYSQL_ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c MYSQL_ADD_EXECUTABLE(mariadb-client-test-embedded ../../tests/mysql_client_test.c
COMPONENT Test) COMPONENT Test)
SET_TARGET_PROPERTIES(mysql_client_test_embedded PROPERTIES HAS_CXX TRUE) SET_TARGET_PROPERTIES(mariadb-client-test-embedded PROPERTIES HAS_CXX TRUE)
ENDIF() ENDIF()
TARGET_LINK_LIBRARIES(mysql_client_test_embedded mysqlserver) TARGET_LINK_LIBRARIES(mariadb-client-test-embedded mysqlserver)
IF(UNIX) IF(UNIX)
SET_TARGET_PROPERTIES(mysql_embedded PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mariadb-embedded PROPERTIES ENABLE_EXPORTS TRUE)
SET_TARGET_PROPERTIES(mysqltest_embedded PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mariadb-test-embedded PROPERTIES ENABLE_EXPORTS TRUE)
SET_TARGET_PROPERTIES(mysql_client_test_embedded PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mariadb-client-test-embedded PROPERTIES ENABLE_EXPORTS TRUE)
ENDIF() ENDIF()
...@@ -46,11 +46,11 @@ INSTALL(FILES ${MAN1_DEVEL} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPage ...@@ -46,11 +46,11 @@ INSTALL(FILES ${MAN1_DEVEL} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPage
INSTALL(FILES ${MAN1_TEST} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesTest) INSTALL(FILES ${MAN1_TEST} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesTest)
macro(MARIADB_SYMLINK_MANPAGE) macro(MARIADB_SYMLINK_MANPAGE)
list(LENGTH MARIADB_SYMLINK_FROMS _len) list(LENGTH MARIADB_SYMLINK_TOS _len)
math(EXPR _listlen "${_len}-1") math(EXPR _listlen "${_len}-1")
foreach(_index RANGE ${_listlen}) foreach(_index RANGE ${_listlen})
list(GET MARIADB_SYMLINK_FROMS ${_index} _name) list(GET MARIADB_SYMLINK_TOS ${_index} _name)
set(_manname "${_name}") set(_manname "${_name}")
list(FIND MAN1_SERVER ${_manname}.1 _iman1server) list(FIND MAN1_SERVER ${_manname}.1 _iman1server)
...@@ -78,7 +78,7 @@ macro(MARIADB_SYMLINK_MANPAGE) ...@@ -78,7 +78,7 @@ macro(MARIADB_SYMLINK_MANPAGE)
endmacro(MARIADB_SYMLINK_MANPAGE) endmacro(MARIADB_SYMLINK_MANPAGE)
macro(MARIADB_SYMLINK_MANPAGE_CREATE mysqlname index mannr dir comp) macro(MARIADB_SYMLINK_MANPAGE_CREATE mysqlname index mannr dir comp)
LIST(GET MARIADB_SYMLINK_TOS ${index} _mariadbname) LIST(GET MARIADB_SYMLINK_FROMS ${index} _mariadbname)
SET(dest "${CMAKE_CURRENT_BINARY_DIR}/${_mariadbname}.${mannr}") SET(dest "${CMAKE_CURRENT_BINARY_DIR}/${_mariadbname}.${mannr}")
FILE(WRITE ${dest} ".so ${dir}/${mysqlname}.${mannr}") FILE(WRITE ${dest} ".so ${dir}/${mysqlname}.${mannr}")
INSTALL(FILES ${dest} DESTINATION ${INSTALL_MANDIR}/${dir} COMPONENT ${comp}) INSTALL(FILES ${dest} DESTINATION ${INSTALL_MANDIR}/${dir} COMPONENT ${comp})
......
...@@ -15,13 +15,25 @@ ...@@ -15,13 +15,25 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
# Build comp_sql - used for embedding SQL in C or C++ programs # Build comp_sql - used for embedding SQL in C or C++ programs
MACRO(INSTALL_LINK old new destination component)
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E create_symlink ${old} ${new}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
INSTALL(
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${new}
DESTINATION ${destination}
COMPONENT ${component}
)
ENDMACRO()
IF(NOT CMAKE_CROSSCOMPILING) IF(NOT CMAKE_CROSSCOMPILING)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_EXECUTABLE(comp_sql comp_sql.c) ADD_EXECUTABLE(comp_sql comp_sql.c)
TARGET_LINK_LIBRARIES(comp_sql) TARGET_LINK_LIBRARIES(comp_sql)
ENDIF() ENDIF()
# Build mysql_fix_privilege_tables.sql (concatenate 3 sql scripts) # Build mysql_fix_privilege_tables.sql (concatenate 3 sql scripts)
IF(NOT WIN32 OR CMAKE_CROSSCOMPILING) IF(NOT WIN32 OR CMAKE_CROSSCOMPILING)
FIND_PROGRAM(CAT_EXECUTABLE cat DOC "path to the executable") FIND_PROGRAM(CAT_EXECUTABLE cat DOC "path to the executable")
...@@ -120,7 +132,6 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja") ...@@ -120,7 +132,6 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
SET (PERL_PATH "/usr/local/bin/perl") SET (PERL_PATH "/usr/local/bin/perl")
ELSE() ELSE()
...@@ -195,18 +206,19 @@ SET(mysqld_locations "$basedir/${INSTALL_SBINDIR} $basedir/libexec $basedir/sbin ...@@ -195,18 +206,19 @@ SET(mysqld_locations "$basedir/${INSTALL_SBINDIR} $basedir/libexec $basedir/sbin
SET(errmsg_locations "$basedir/${INSTALL_MYSQLSHAREDIR}/english $basedir/share/english $basedir/share/mysql/english") SET(errmsg_locations "$basedir/${INSTALL_MYSQLSHAREDIR}/english $basedir/share/english $basedir/share/mysql/english")
SET(pkgdata_locations "$basedir/${INSTALL_MYSQLSHAREDIR} $basedir/share $basedir/share/mysql") SET(pkgdata_locations "$basedir/${INSTALL_MYSQLSHAREDIR} $basedir/share $basedir/share/mysql")
# install mysql_install_db.sh at this point since it needs
# different values for the above variables that will change
# afterwards
IF(UNIX) IF(UNIX)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/mariadb-install-db ESCAPE_QUOTES @ONLY)
EXECUTE_PROCESS(
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db
)
INSTALL_SCRIPT( INSTALL_SCRIPT(
"${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db" "${CMAKE_CURRENT_BINARY_DIR}/mariadb-install-db"
DESTINATION ${INSTALL_SCRIPTDIR} DESTINATION ${INSTALL_SCRIPTDIR}
COMPONENT Server COMPONENT Server)
)
INSTALL_LINK(mariadb-install-db mysql_install_db ${INSTALL_SCRIPTDIR} Server)
ENDIF() ENDIF()
SET(prefix "${CMAKE_INSTALL_PREFIX}") SET(prefix "${CMAKE_INSTALL_PREFIX}")
...@@ -284,10 +296,10 @@ ELSE() ...@@ -284,10 +296,10 @@ ELSE()
ENDIF() ENDIF()
IF (NOT WITHOUT_SERVER) IF (NOT WITHOUT_SERVER)
SET(SERVER_SCRIPTS SET(SERVER_SCRIPTS
mysql_fix_extensions mariadb-fix-extensions
mysqld_multi mariadbd-multi
mysqld_safe mariadbd-safe
mysqldumpslow mariadb-dumpslow
) )
ENDIF() ENDIF()
# Configure this one, for testing, but do not install it. # Configure this one, for testing, but do not install it.
...@@ -296,33 +308,37 @@ ELSE() ...@@ -296,33 +308,37 @@ ELSE()
# On Unix, most of the files end up in the bin directory # On Unix, most of the files end up in the bin directory
SET(BIN_SCRIPTS SET(BIN_SCRIPTS
msql2mysql msql2mysql
mysql_config mariadb-setpermission
mysql_setpermission mariadb-secure-installation
mysql_secure_installation mariadb-access
mysqlaccess mariadb-convert-table-format
mysql_convert_table_format mariadb-find-rows
mysql_find_rows
mytop mytop
mysqlhotcopy mariadb-hotcopy
${SERVER_SCRIPTS} ${SERVER_SCRIPTS}
${WSREP_SCRIPTS} ${WSREP_SCRIPTS}
${SYSTEMD_SCRIPTS} ${SYSTEMD_SCRIPTS}
) )
FOREACH(file ${BIN_SCRIPTS}) FOREACH(file ${BIN_SCRIPTS})
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh) # set name of executable
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh GET_SYMLINK(${file} binname)
if("${binname}" STREQUAL "")
set(binname ${file})
endif()
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${binname}.sh)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${binname}.sh
${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${binname})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${binname}
${CMAKE_CURRENT_BINARY_DIR}/${file} COPYONLY) ${CMAKE_CURRENT_BINARY_DIR}/${file} COPYONLY)
ELSE() ELSE()
MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file} in " MESSAGE(FATAL_ERROR "Can not find ${binname}.sh or ${binname} in "
"${CMAKE_CURRENT_SOURCE_DIR}" ) "${CMAKE_CURRENT_SOURCE_DIR}" )
ENDIF() ENDIF()
# TODO: The following EXECUTE could be redundant as INSTALL_SCRIPT
# macro does an INSTALL(PROGRAMS ..) that automatically sets +x on
# the executable.
EXECUTE_PROCESS(COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/${file})
IF(NOT ${file}_COMPONENT) IF(NOT ${file}_COMPONENT)
SET(${file}_COMPONENT Server) SET(${file}_COMPONENT Server)
ENDIF() ENDIF()
...@@ -331,25 +347,14 @@ ELSE() ...@@ -331,25 +347,14 @@ ELSE()
DESTINATION ${INSTALL_BINDIR} DESTINATION ${INSTALL_BINDIR}
COMPONENT ${${file}_COMPONENT} COMPONENT ${${file}_COMPONENT}
) )
ENDFOREACH()
SET (wsrep_sst_rsync_wan ${CMAKE_CURRENT_BINARY_DIR}/wsrep_sst_rsync_wan) # Create symlink
ADD_CUSTOM_COMMAND( IF (NOT ${binname} STREQUAL ${file})
OUTPUT ${wsrep_sst_rsync_wan} INSTALL_LINK(${file} ${binname} ${INSTALL_BINDIR} ${${file}_COMPONENT})
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink ENDIF()
wsrep_sst_rsync ENDFOREACH()
wsrep_sst_rsync_wan
)
ADD_CUSTOM_TARGET(symlink_wsrep_sst_rsync
ALL
DEPENDS ${wsrep_sst_rsync_wan}
)
INSTALL(
FILES ${wsrep_sst_rsync_wan}
DESTINATION ${INSTALL_BINDIR}
COMPONENT Server
)
INSTALL_LINK(wsrep_sst_rsync wsrep_sst_rsync_wan ${INSTALL_BINDIR} Server)
FOREACH(file ${WSREP_SOURCE}) FOREACH(file ${WSREP_SOURCE})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
......
...@@ -293,56 +293,56 @@ ENDIF() ...@@ -293,56 +293,56 @@ ENDIF()
ADD_LIBRARY(sql_builtins STATIC ${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc) ADD_LIBRARY(sql_builtins STATIC ${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc)
TARGET_LINK_LIBRARIES(sql_builtins ${MYSQLD_STATIC_PLUGIN_LIBS}) TARGET_LINK_LIBRARIES(sql_builtins ${MYSQLD_STATIC_PLUGIN_LIBS})
MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server) MYSQL_ADD_EXECUTABLE(mariadbd ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server)
IF(APPLE) IF(APPLE)
# Add CoreServices framework since some dloadable plugins may need it # Add CoreServices framework since some dloadable plugins may need it
FIND_LIBRARY(CORESERVICES NAMES CoreServices) FIND_LIBRARY(CORESERVICES NAMES CoreServices)
IF(CORESERVICES) IF(CORESERVICES)
TARGET_LINK_LIBRARIES(mysqld LINK_PRIVATE ${CORESERVICES}) TARGET_LINK_LIBRARIES(mariadbd LINK_PRIVATE ${CORESERVICES})
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(NOT WITHOUT_DYNAMIC_PLUGINS) IF(NOT WITHOUT_DYNAMIC_PLUGINS)
IF(NOT MSVC) IF(NOT MSVC)
SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mariadbd PROPERTIES ENABLE_EXPORTS TRUE)
ENDIF() ENDIF()
GET_TARGET_PROPERTY(mysqld_link_flags mysqld LINK_FLAGS) GET_TARGET_PROPERTY(mysqld_link_flags mariadbd LINK_FLAGS)
IF(NOT mysqld_link_flags) IF(NOT mysqld_link_flags)
SET(mysqld_link_flags) SET(mysqld_link_flags)
ENDIF() ENDIF()
IF (MINGW OR CYGWIN) IF (MINGW OR CYGWIN)
SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} -Wl,--export-all-symbols") SET_TARGET_PROPERTIES(mariadbd PROPERTIES LINK_FLAGS "${mysqld_link_flags} -Wl,--export-all-symbols")
ENDIF() ENDIF()
IF(MSVC) IF(MSVC)
SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} \"${MYSQLD_EXP}\"") SET_TARGET_PROPERTIES(mariadbd PROPERTIES LINK_FLAGS "${mysqld_link_flags} \"${MYSQLD_EXP}\"")
ADD_DEPENDENCIES(mysqld gen_mysqld_lib) ADD_DEPENDENCIES(mariadbd gen_mysqld_lib)
ENDIF() ENDIF()
ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS) ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS)
TARGET_LINK_LIBRARIES(mysqld LINK_PRIVATE sql sql_builtins) TARGET_LINK_LIBRARIES(mariadbd LINK_PRIVATE sql sql_builtins)
# Provide plugins with minimal set of libraries # Provide plugins with minimal set of libraries
SET(INTERFACE_LIBS ${LIBRT}) SET(INTERFACE_LIBS ${LIBRT})
IF(INTERFACE_LIBS) IF(INTERFACE_LIBS)
TARGET_LINK_LIBRARIES(mysqld LINK_PUBLIC ${INTERFACE_LIBS}) TARGET_LINK_LIBRARIES(mariadbd LINK_PUBLIC ${INTERFACE_LIBS})
ENDIF() ENDIF()
# On Solaris, some extra effort is required in order to get dtrace probes # On Solaris, some extra effort is required in order to get dtrace probes
# from static libraries # from static libraries
DTRACE_INSTRUMENT_STATIC_LIBS(mysqld DTRACE_INSTRUMENT_STATIC_LIBS(mariadbd
"sql;mysys;mysys_ssl;${MYSQLD_STATIC_PLUGIN_LIBS}") "sql;mysys;mysys_ssl;${MYSQLD_STATIC_PLUGIN_LIBS}")
SET(WITH_MYSQLD_LDFLAGS "" CACHE STRING "Additional linker flags for mysqld") SET(WITH_MYSQLD_LDFLAGS "" CACHE STRING "Additional linker flags for mysqld")
MARK_AS_ADVANCED(WITH_MYSQLD_LDFLAGS) MARK_AS_ADVANCED(WITH_MYSQLD_LDFLAGS)
IF(WITH_MYSQLD_LDFLAGS) IF(WITH_MYSQLD_LDFLAGS)
GET_TARGET_PROPERTY(MYSQLD_LINK_FLAGS mysqld LINK_FLAGS) GET_TARGET_PROPERTY(MYSQLD_LINK_FLAGS mariadbd LINK_FLAGS)
IF(NOT MYSQLD_LINK_FLAGS) IF(NOT MYSQLD_LINK_FLAGS)
SET(MYSQLD_LINK_FLAGS) SET(MYSQLD_LINK_FLAGS)
ENDIF() ENDIF()
SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS SET_TARGET_PROPERTIES(mariadbd PROPERTIES LINK_FLAGS
"${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LDFLAGS}") "${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LDFLAGS}")
ENDIF() ENDIF()
...@@ -396,9 +396,9 @@ ADD_CUSTOM_COMMAND( ...@@ -396,9 +396,9 @@ ADD_CUSTOM_COMMAND(
DEPENDS gen_lex_hash DEPENDS gen_lex_hash
) )
MYSQL_ADD_EXECUTABLE(mysql_tzinfo_to_sql tztime.cc COMPONENT Server) MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc COMPONENT Server)
SET_TARGET_PROPERTIES(mysql_tzinfo_to_sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL")
TARGET_LINK_LIBRARIES(mysql_tzinfo_to_sql mysys mysys_ssl) TARGET_LINK_LIBRARIES(mariadb-tzinfo-to-sql mysys mysys_ssl)
ADD_CUSTOM_TARGET( ADD_CUSTOM_TARGET(
GenServerSource GenServerSource
...@@ -492,22 +492,22 @@ IF(WIN32) ...@@ -492,22 +492,22 @@ IF(WIN32)
DEPENDS comp_sql ${my_bootstrap_sql} DEPENDS comp_sql ${my_bootstrap_sql}
) )
MYSQL_ADD_EXECUTABLE(mysql_install_db MYSQL_ADD_EXECUTABLE(mariadb-install-db
mysql_install_db.cc mysql_install_db.cc
${CMAKE_CURRENT_BINARY_DIR}/mysql_bootstrap_sql.c ${CMAKE_CURRENT_BINARY_DIR}/mysql_bootstrap_sql.c
COMPONENT Server COMPONENT Server
) )
SET_TARGET_PROPERTIES(mysql_install_db PROPERTIES COMPILE_FLAGS -DINSTALL_PLUGINDIR=${INSTALL_PLUGINDIR}) SET_TARGET_PROPERTIES(mariadb-install-db PROPERTIES COMPILE_FLAGS -DINSTALL_PLUGINDIR=${INSTALL_PLUGINDIR})
TARGET_LINK_LIBRARIES(mysql_install_db mysys shlwapi) TARGET_LINK_LIBRARIES(mariadb-install-db mysys shlwapi)
ADD_LIBRARY(winservice STATIC winservice.c) ADD_LIBRARY(winservice STATIC winservice.c)
TARGET_LINK_LIBRARIES(winservice shell32) TARGET_LINK_LIBRARIES(winservice shell32)
MYSQL_ADD_EXECUTABLE(mysql_upgrade_service MYSQL_ADD_EXECUTABLE(mariadb-upgrade-service
mysql_upgrade_service.cc mysql_upgrade_service.cc
upgrade_conf_file.cc upgrade_conf_file.cc
COMPONENT Server) COMPONENT Server)
TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice) TARGET_LINK_LIBRARIES(mariadb-upgrade-service mysys winservice)
ENDIF(WIN32) ENDIF(WIN32)
INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development
......
...@@ -229,8 +229,8 @@ ADD_LIBRARY(rocksdb_tools STATIC ...@@ -229,8 +229,8 @@ ADD_LIBRARY(rocksdb_tools STATIC
MYSQL_ADD_EXECUTABLE(sst_dump rocksdb/tools/sst_dump.cc COMPONENT rocksdb-engine) MYSQL_ADD_EXECUTABLE(sst_dump rocksdb/tools/sst_dump.cc COMPONENT rocksdb-engine)
TARGET_LINK_LIBRARIES(sst_dump rocksdblib) TARGET_LINK_LIBRARIES(sst_dump rocksdblib)
MYSQL_ADD_EXECUTABLE(mysql_ldb tools/mysql_ldb.cc COMPONENT rocksdb-engine) MYSQL_ADD_EXECUTABLE(mariadb-ldb tools/mysql_ldb.cc COMPONENT rocksdb-engine)
TARGET_LINK_LIBRARIES(mysql_ldb rocksdb_tools rocksdb_aux_lib dbug) TARGET_LINK_LIBRARIES(mariadb-ldb rocksdb_tools rocksdb_aux_lib dbug)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/myrocks_hotbackup.py CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/myrocks_hotbackup.py
${CMAKE_CURRENT_BINARY_DIR}/myrocks_hotbackup @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/myrocks_hotbackup @ONLY)
...@@ -249,7 +249,7 @@ IF(MSVC) ...@@ -249,7 +249,7 @@ IF(MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
ENDIF() ENDIF()
ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET_TARGET_PROPERTIES(rocksdb_tools sst_dump mysql_ldb PROPERTIES COMPILE_FLAGS "-Wno-error") SET_TARGET_PROPERTIES(rocksdb_tools sst_dump mariadb-ldb PROPERTIES COMPILE_FLAGS "-Wno-error")
ENDIF() ENDIF()
# Enable ZSTD if available. Upstream rocksdb cmake will use WITH_ZSTD and set # Enable ZSTD if available. Upstream rocksdb cmake will use WITH_ZSTD and set
......
...@@ -22,11 +22,11 @@ INCLUDE_DIRECTORIES(BEFORE ...@@ -22,11 +22,11 @@ INCLUDE_DIRECTORIES(BEFORE
${CMAKE_BINARY_DIR}/libmariadb/include ${CMAKE_BINARY_DIR}/libmariadb/include
${CMAKE_SOURCE_DIR}/libmariadb/include) ${CMAKE_SOURCE_DIR}/libmariadb/include)
MYSQL_ADD_EXECUTABLE(mysql_client_test mysql_client_test.c COMPONENT Test) MYSQL_ADD_EXECUTABLE(mariadb-client-test mysql_client_test.c COMPONENT Test)
SET(CLIENT_LIB mariadbclient mysys) SET(CLIENT_LIB mariadbclient mysys)
TARGET_LINK_LIBRARIES(mysql_client_test ${CLIENT_LIB}) TARGET_LINK_LIBRARIES(mariadb-client-test ${CLIENT_LIB})
ADD_DEPENDENCIES(mysql_client_test GenError ${CLIENT_LIB}) ADD_DEPENDENCIES(mariadb-client-test GenError ${CLIENT_LIB})
IF(WITH_UNIT_TESTS) IF(WITH_UNIT_TESTS)
ADD_EXECUTABLE(bug25714 bug25714.c) ADD_EXECUTABLE(bug25714 bug25714.c)
......
...@@ -14,21 +14,10 @@ ...@@ -14,21 +14,10 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/${WIX_MSVC_SUFFIX}/inc) INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/${WIX_MSVC_SUFFIX}/inc)
SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def ${CMAKE_CURRENT_BINARY_DIR}/symlinks.cc) SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql ${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql ${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE(symlinks)
LIST(LENGTH MARIADB_SYMLINK_FROMS LEN)
MATH(EXPR max_index "${LEN}-1")
SET(ALL_SYMLINKS "")
FOREACH(i RANGE 0 ${max_index})
LIST(GET MARIADB_SYMLINK_FROMS ${i} src)
LIST(GET MARIADB_SYMLINK_TOS ${i} dst)
STRING(APPEND ALL_SYMLINKS "{L\"${src}\",L\"${dst}\"},\n")
ENDFOREACH()
CONFIGURE_FILE(symlinks.cc.in symlinks.cc)
# Custom action should not depend on C runtime, since we do not know if CRT is installed. # Custom action should not depend on C runtime, since we do not know if CRT is installed.
FORCE_STATIC_CRT() FORCE_STATIC_CRT()
ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES) ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES)
......
...@@ -1013,268 +1013,3 @@ extern "C" BOOL WINAPI DllMain( ...@@ -1013,268 +1013,3 @@ extern "C" BOOL WINAPI DllMain(
return TRUE; return TRUE;
} }
static wstring MakeExePath(const wchar_t *installDir, const wchar_t *basename)
{
wstring path(installDir);
if (path.back() != L'\\')
path.append(L"\\");
path.append(L"bin\\");
path.append(basename);
path.append(L".exe");
return path;
}
static wstring MakeExePath(const wchar_t *installDir, string basename)
{
wstring path(installDir);
if (path.back() != L'\\')
path.append(L"\\");
path.append(L"bin\\");
for (auto c : basename)
path+= c;
path.append(L".exe");
return path;
}
static wstring MakeFixSymlinksLogPath()
{
wchar_t buf[MAX_PATH];
if (GetTempPathW(MAX_PATH, buf))
return wstring(buf) + L"\\mariadb_msi_fix_symlinks.log";
return L"";
}
static string w2s(wstring w)
{
string s;
for (auto wc : w)
s += (char)wc;
return s;
}
/*
Remove symlinks if target file does not exist.
Create symlink if target exists, but symlink is not.
*/
static void fix_symlink(const wchar_t *file, const wchar_t *link,
const wchar_t *installdir,
vector<string> &rollback_actions)
{
WcaLog(LOGMSG_STANDARD, "fix_symlink %S=>%S", link, file);
auto tgt= MakeExePath(installdir, file);
auto lnk= MakeExePath(installdir, link);
auto target_path= tgt.c_str();
auto link_path= lnk.c_str();
auto target_attr= GetFileAttributesW(target_path);
auto link_attr= GetFileAttributesW(link_path);
WcaLog(LOGMSG_STANDARD, "%S %s", target_path,
target_attr == INVALID_FILE_ATTRIBUTES ? "does not exist" : "exists");
WcaLog(LOGMSG_STANDARD, "%S %s", link_path,
link_attr == INVALID_FILE_ATTRIBUTES ? "does not exist" : "exists");
if (link_attr != INVALID_FILE_ATTRIBUTES &&
((link_attr & FILE_ATTRIBUTE_REPARSE_POINT) == 0))
{
WcaLog(LOGMSG_STANDARD, "%S is not a symlink!", link_path);
return;
}
if (target_attr == INVALID_FILE_ATTRIBUTES)
{
if (link_attr == INVALID_FILE_ATTRIBUTES)
{
return;
}
auto ok= DeleteFileW(link_path);
WcaLog(LOGMSG_STANDARD, "DeleteFileW(L\"%S\") returned %s, last error %lu",
link_path, ok ? "success" : "error", GetLastError());
if (ok)
{
rollback_actions.push_back(string("create_symlink ") + w2s(link) + " " +
w2s(file));
}
return;
}
if (link_attr != INVALID_FILE_ATTRIBUTES)
return;
auto ok= CreateSymbolicLinkW(link_path, target_path, 0);
WcaLog(LOGMSG_STANDARD,
"CreateSymbolicLinkW(\"%S\",\"%S\", 0) returned %s, last error %d",
link_path, target_path, ok ? "success" : "error",
(int) GetLastError());
if (ok)
rollback_actions.push_back(string("delete ") + w2s(link));
}
static string rollback_info_path()
{
char tmppath[MAX_PATH];
if (!GetTempPathA(MAX_PATH, tmppath))
return "";
string filepath(tmppath);
filepath.append("\\mariadb_symlink_rollback_info.tmp");
return filepath;
}
static void save_symlink_rollback_info(vector<string> rollback_info)
{
std::ofstream ofs;
string path = rollback_info_path();
ofs.open(path, std::ofstream::out | std::ofstream::trunc);
if (!ofs.good())
return;
WcaLog(LOGMSG_STANDARD,
"Storing this rollback script for custom action in %s, in case installation rolls back",
path.c_str());
for (auto line : rollback_info)
{
WcaLog(LOGMSG_STANDARD, "%s", line.c_str());
ofs << line << "\n";
}
WcaLog(LOGMSG_STANDARD, "End of rollback script");
}
#include <symlinks.h>
/* MDEV-19781 MariaDB symlinks on Windows */
extern "C" UINT __stdcall FixSymlinksRollback(MSIHANDLE hInstall)
{
HRESULT hr= S_OK;
UINT er= ERROR_SUCCESS;
wchar_t targetdir[MAX_PATH];
DWORD len= MAX_PATH;
hr= WcaInitialize(hInstall, __FUNCTION__);
WcaLog(LOGMSG_STANDARD, "Initialized.");
std::ifstream ifs;
std::string command;
if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
ERROR_SUCCESS)
{
hr= HRESULT_FROM_WIN32(GetLastError());
ExitOnFailure(hr, "MsiGetPropertyW failed");
}
ifs.open(rollback_info_path(), std::ofstream::in);
if (!ifs.good())
goto LExit;
while (ifs >> command)
{
if (command == "create_symlink")
{
string link;
ifs >> link;
auto link_path= MakeExePath(targetdir, link);
string file;
ifs >> file;
auto target_path= MakeExePath(targetdir, file);
bool ok= CreateSymbolicLinkW(link_path.c_str(), target_path.c_str(), 0);
WcaLog(LOGMSG_STANDARD, "CreateSymbolicLinkW(%S,%S) %s, last error %lu",
link_path.c_str(), target_path.c_str(), ok ? "success" : "error",
GetLastError());
}
else if (command == "delete")
{
string link;
ifs >> link;
auto link_path= MakeExePath(targetdir, link);
auto link_attr= GetFileAttributesW(link_path.c_str());
if (link_attr != INVALID_FILE_ATTRIBUTES &&
(link_attr & FILE_ATTRIBUTE_REPARSE_POINT))
{
auto ok= DeleteFileW(link_path.c_str());
WcaLog(LOGMSG_STANDARD, "DeleteFile(%S) %s, last error %lu",
link_path.c_str(), ok ? "success" : "error", GetLastError());
}
}
else
{
WcaLog(LOGMSG_STANDARD, "Unknown command '%s' in rollback script ",
command.c_str());
goto LExit;
}
}
LExit:
return WcaFinalize(er);
}
extern "C" UINT __stdcall SymlinksUninstall(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
wchar_t targetdir[MAX_PATH];
DWORD len = MAX_PATH;
int i;
hr = WcaInitialize(hInstall, __FUNCTION__);
WcaLog(LOGMSG_STANDARD, "Initialized.");
if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
ERROR_SUCCESS)
{
hr = HRESULT_FROM_WIN32(GetLastError());
ExitOnFailure(hr, "MsiGetPropertyW failed");
}
for (i = 0; all_symlinks[i].file; i++)
{
auto link_path = MakeExePath(targetdir, all_symlinks[i].link);
auto link_attr = GetFileAttributesW(link_path.c_str());
auto filepath = link_path.c_str();
if (link_attr == INVALID_FILE_ATTRIBUTES)
{
WcaLog(LOGMSG_STANDARD, " %S does not exist",filepath);
continue;
}
if(!(link_attr & FILE_ATTRIBUTE_REPARSE_POINT))
{
WcaLog(LOGMSG_STANDARD, " %S is not a symbolic link!",filepath);
continue;
}
BOOL ok = DeleteFileW(filepath);
WcaLog(LOGMSG_STANDARD, "DeleteFile(%S) %s, last error %lu",
filepath, ok? "succeeded":"failed", GetLastError());
}
LExit:
return WcaFinalize(er);
}
/* MDEV-19781 MariaDB symlinks on Windows */
extern "C" UINT __stdcall FixSymlinks(MSIHANDLE hInstall)
{
HRESULT hr= S_OK;
UINT er= ERROR_SUCCESS;
wchar_t targetdir[MAX_PATH];
vector<string> rollback_actions;
DWORD len= MAX_PATH;
int i;
hr= WcaInitialize(hInstall, __FUNCTION__);
WcaLog(LOGMSG_STANDARD, "Initialized.");
if (MsiGetPropertyW(hInstall, L"CustomActionData", targetdir, &len) !=
ERROR_SUCCESS)
{
hr= HRESULT_FROM_WIN32(GetLastError());
ExitOnFailure(hr, "MsiGetPropertyW failed");
}
for (i= 0; all_symlinks[i].file; i++)
fix_symlink(all_symlinks[i].file, all_symlinks[i].link, targetdir,
rollback_actions);
save_symlink_rollback_info(rollback_actions);
LExit:
return WcaFinalize(er);
}
...@@ -8,6 +8,3 @@ CheckDatabaseProperties ...@@ -8,6 +8,3 @@ CheckDatabaseProperties
CheckDataDirectoryEmpty CheckDataDirectoryEmpty
CheckDBInUse CheckDBInUse
CheckServiceUpgrades CheckServiceUpgrades
FixSymlinks
FixSymlinksRollback
SymlinksUninstall
#include "symlinks.h"
symlink all_symlinks[]=
{
@ALL_SYMLINKS@
{nullptr, nullptr}
};
#pragma once
struct symlink
{
const wchar_t *file;
const wchar_t *link;
};
extern symlink all_symlinks[];
...@@ -311,9 +311,11 @@ ENDFUNCTION() ...@@ -311,9 +311,11 @@ ENDFUNCTION()
SET(CPACK_WIX_COMPONENTS) SET(CPACK_WIX_COMPONENTS)
SET(CPACK_WIX_COMPONENT_GROUPS) SET(CPACK_WIX_COMPONENT_GROUPS)
GET_FILENAME_COMPONENT(abs . ABSOLUTE) GET_FILENAME_COMPONENT(abs . ABSOLUTE)
FOREACH(d ${DIRS}) FOREACH(d ${DIRS})
GET_FILENAME_COMPONENT(d ${d} ABSOLUTE) GET_FILENAME_COMPONENT(d ${d} ABSOLUTE)
GET_FILENAME_COMPONENT(d_name ${d} NAME) GET_FILENAME_COMPONENT(d_name ${d} NAME)
MAKE_WIX_IDENTIFIER("${d_name}" d_name) MAKE_WIX_IDENTIFIER("${d_name}" d_name)
FILE(WRITE ${abs}/${d_name}_component_group.wxs FILE(WRITE ${abs}/${d_name}_component_group.wxs
"<ComponentGroup Id='componentgroup.${d_name}'>") "<ComponentGroup Id='componentgroup.${d_name}'>")
......
...@@ -597,21 +597,6 @@ ...@@ -597,21 +597,6 @@
<?endif ?> <?endif ?>
<!-- Custom action, create symlinks -->
<CustomAction Id="Symlinks.SetProperty" Return="check" Property="Symlinks" Value="[INSTALLDIR]" />
<CustomAction Id="Symlinks" BinaryKey="wixca.dll" DllEntry="FixSymlinks" Execute="deferred" Impersonate="no" Return="ignore"/>
<CustomAction Id="SymlinksRollback.SetProperty" Return="check" Property="SymlinksRollback" Value="[INSTALLDIR]" />
<CustomAction Id="SymlinksRollback" BinaryKey="wixca.dll" DllEntry="FixSymlinksRollback" Execute="rollback" Impersonate="no" Return="ignore"/>
<CustomAction Id="SymlinksUninstall.SetProperty" Return="check" Property="SymlinksUninstall" Value="[INSTALLDIR]" />
<CustomAction Id="SymlinksUninstall" BinaryKey="wixca.dll" DllEntry="SymlinksUninstall" Execute="deferred" Impersonate="no" Return="ignore"/>
<InstallExecuteSequence>
<Custom Action="Symlinks.SetProperty" Before="Symlinks">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
<Custom Action="Symlinks" After="SymlinksRollback">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
<Custom Action="SymlinksRollback.SetProperty" Before="SymlinksRollback">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
<Custom Action="SymlinksRollback" After="InstallFiles">NOT Installed OR UPGRADINGPRODUCTCODE</Custom>
<Custom Action="SymlinksUninstall.SetProperty" Before="SymlinksUninstall">Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
<Custom Action="SymlinksUninstall" Before="RemoveFiles">Installed AND NOT UPGRADINGPRODUCTCODE</Custom>
</InstallExecuteSequence>
<!-- Custom action, call mysql_install_db --> <!-- Custom action, call mysql_install_db -->
<SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="SKIPNETWORKING" Value="--skip-networking" >SKIPNETWORKING</SetProperty> <SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="SKIPNETWORKING" Value="--skip-networking" >SKIPNETWORKING</SetProperty>
...@@ -633,7 +618,7 @@ ...@@ -633,7 +618,7 @@
<CustomAction Id="CreateDatabaseRollback" BinaryKey="wixca.dll" DllEntry="CreateDatabaseRollback" <CustomAction Id="CreateDatabaseRollback" BinaryKey="wixca.dll" DllEntry="CreateDatabaseRollback"
Execute="rollback" Return="check" Impersonate="no"/> Execute="rollback" Return="check" Impersonate="no"/>
<UI> <UI>
<ProgressText Action="CreateDatabase">Running mysql_install_db.exe</ProgressText> <ProgressText Action="CreateDatabase">Running mariadb-install-db.exe</ProgressText>
</UI> </UI>
<!-- Error injection script activated by TEST_FAIL=1 passed to msiexec (to see how good custom action rollback works) --> <!-- Error injection script activated by TEST_FAIL=1 passed to msiexec (to see how good custom action rollback works) -->
......
...@@ -40,20 +40,20 @@ SET(CMAKE_MFC_FLAG 1) ...@@ -40,20 +40,20 @@ SET(CMAKE_MFC_FLAG 1)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc -DNO_WARN_MBCS_MFC_DEPRECATION") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc -DNO_WARN_MBCS_MFC_DEPRECATION")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
MYSQL_ADD_EXECUTABLE(mysql_upgrade_wizard MYSQL_ADD_EXECUTABLE(mariadb-upgrade-wizard
upgrade.cpp upgradeDlg.cpp upgrade.rc ${UPGRADE_WIZARD_SOURCES} upgrade.cpp upgradeDlg.cpp upgrade.rc ${UPGRADE_WIZARD_SOURCES}
COMPONENT Server) COMPONENT Server)
TARGET_LINK_LIBRARIES(mysql_upgrade_wizard ${UPGRADE_WIZARD_LINK_LIBRARIES}) TARGET_LINK_LIBRARIES(mariadb-upgrade-wizard ${UPGRADE_WIZARD_LINK_LIBRARIES})
# upgrade_wizard is Windows executable, set WIN32_EXECUTABLE so it does not # upgrade_wizard is Windows executable, set WIN32_EXECUTABLE so it does not
# create a console. # create a console.
SET_TARGET_PROPERTIES(mysql_upgrade_wizard PROPERTIES WIN32_EXECUTABLE 1) SET_TARGET_PROPERTIES(mariadb-upgrade-wizard PROPERTIES WIN32_EXECUTABLE 1)
# Embed Vista "admin" manifest, since upgrade_wizard needs admin privileges # Embed Vista "admin" manifest, since upgrade_wizard needs admin privileges
# to change service configuration. Due to a CMake bug http://www.vtk.org/Bug/view.php?id=11171 # to change service configuration. Due to a CMake bug http://www.vtk.org/Bug/view.php?id=11171
# it is not possible currenly to do it with linker flags. Work around is to use # it is not possible currenly to do it with linker flags. Work around is to use
# manifest tool mt.exe and embed the manifest post-build. # manifest tool mt.exe and embed the manifest post-build.
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
TARGET mysql_upgrade_wizard POST_BUILD TARGET mariadb-upgrade-wizard POST_BUILD
COMMAND mt.exe -manifest ${CMAKE_CURRENT_SOURCE_DIR}/upgrade_wizard.exe.manifest COMMAND mt.exe -manifest ${CMAKE_CURRENT_SOURCE_DIR}/upgrade_wizard.exe.manifest
"-outputresource:$<TARGET_FILE:mysql_upgrade_wizard>;#1" "-outputresource:$<TARGET_FILE:mariadb-upgrade-wizard>;#1"
) )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment