Commit 79b89017 authored by Rasmus Johansson's avatar Rasmus Johansson Committed by Sergei Golubchik

MDEV-22009 mysqlhotcopy tool and wsrep scripts not found

main.mysqlhotcopy_myisam cannot find mysqlhotcopy tool

wsrep scripts are not executable in CMAKE_CURRENT_BINARY_DIR
parent e4afd3c3
...@@ -212,7 +212,7 @@ SET(pkgdata_locations "$basedir/${INSTALL_MYSQLSHAREDIR} $basedir/share $basedir ...@@ -212,7 +212,7 @@ SET(pkgdata_locations "$basedir/${INSTALL_MYSQLSHAREDIR} $basedir/share $basedir
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}/mariadb-install-db ESCAPE_QUOTES @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/mariadb-install-db ESCAPE_QUOTES @ONLY)
EXECUTE_PROCESS(COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/mariadb-install-db)
INSTALL_SCRIPT( INSTALL_SCRIPT(
"${CMAKE_CURRENT_BINARY_DIR}/mariadb-install-db" "${CMAKE_CURRENT_BINARY_DIR}/mariadb-install-db"
DESTINATION ${INSTALL_SCRIPTDIR} DESTINATION ${INSTALL_SCRIPTDIR}
...@@ -336,19 +336,28 @@ ELSE() ...@@ -336,19 +336,28 @@ ELSE()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${binname} 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 ${binname}.sh or ${binname} in " MESSAGE(FATAL_ERROR "Cannot find ${binname}.sh or ${binname} in "
"${CMAKE_CURRENT_SOURCE_DIR}" ) "${CMAKE_CURRENT_SOURCE_DIR}" )
ENDIF() ENDIF()
IF(NOT ${file}_COMPONENT) IF(NOT ${file}_COMPONENT)
SET(${file}_COMPONENT Server) SET(${file}_COMPONENT Server)
ENDIF() ENDIF()
# install script
INSTALL_SCRIPT( INSTALL_SCRIPT(
${CMAKE_CURRENT_BINARY_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}/${file}
DESTINATION ${INSTALL_BINDIR} DESTINATION ${INSTALL_BINDIR}
COMPONENT ${${file}_COMPONENT} COMPONENT ${${file}_COMPONENT}
) )
# make scripts executable in build dir
IF(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${binname})
EXECUTE_PROCESS(COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/${binname})
ELSEIF(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${file})
EXECUTE_PROCESS(COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/${file})
ENDIF()
# Create symlink # Create symlink
IF (NOT ${binname} STREQUAL ${file}) IF (NOT ${binname} STREQUAL ${file})
INSTALL_LINK(${file} ${binname} ${INSTALL_BINDIR} ${${file}_COMPONENT}) INSTALL_LINK(${file} ${binname} ${INSTALL_BINDIR} ${${file}_COMPONENT})
...@@ -366,7 +375,7 @@ ELSE() ...@@ -366,7 +375,7 @@ ELSE()
${CMAKE_CURRENT_BINARY_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}/${file}
DESTINATION ${INSTALL_BINDIR} DESTINATION ${INSTALL_BINDIR}
COMPONENT ${${file}_COMPONENT} COMPONENT ${${file}_COMPONENT}
) )
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
......
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