Commit 99283ba4 authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-8974: boostrap systemd service for galera is confusing

Fix the conditions for systemd scripts with '@' in path.
parent 125cf485
...@@ -79,16 +79,23 @@ IF(UNIX) ...@@ -79,16 +79,23 @@ IF(UNIX)
IF(HAVE_SYSTEMD) IF(HAVE_SYSTEMD)
CONFIGURE_FILE(mariadb.service.in CONFIGURE_FILE(mariadb.service.in
${CMAKE_CURRENT_BINARY_DIR}/mariadb.service @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service @ONLY)
IF(NOT RPM) INSTALL(FILES use_galera_new_cluster.conf
${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
DESTINATION ${inst_location}/systemd COMPONENT SupportFiles)
# @ in directory name broken between CMake version 2.8.12.2 and 3.3
# http://public.kitware.com/Bug/view.php?id=14782
IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)
CONFIGURE_FILE(mariadb@.service.in CONFIGURE_FILE(mariadb@.service.in
${CMAKE_CURRENT_BINARY_DIR}/mariadb@.service @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/mariadb@.service @ONLY)
INSTALL(FILES use_galera_new_cluster.conf INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb@.service
${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
${CMAKE_CURRENT_BINARY_DIR}/mariadb@.service
DESTINATION ${inst_location}/systemd COMPONENT SupportFiles) DESTINATION ${inst_location}/systemd COMPONENT SupportFiles)
ENDIF() ENDIF()
IF(INSTALL_SYSTEMD_UNITDIR) IF(INSTALL_SYSTEMD_UNITDIR)
# @ in directory name broken between CMake version 2.8.12.2 and 3.3 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
DESTINATION ${INSTALL_SYSTEMD_UNITDIR} COMPONENT Server)
# http://public.kitware.com/Bug/view.php?id=14782 # http://public.kitware.com/Bug/view.php?id=14782
IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM) IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)
INSTALL(FILES use_galera_new_cluster.conf INSTALL(FILES use_galera_new_cluster.conf
...@@ -99,8 +106,6 @@ IF(UNIX) ...@@ -99,8 +106,6 @@ IF(UNIX)
DESTINATION ${INSTALL_SYSTEMD_UNITDIR} COMPONENT Server) DESTINATION ${INSTALL_SYSTEMD_UNITDIR} COMPONENT Server)
ENDIF() ENDIF()
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
DESTINATION ${INSTALL_SYSTEMD_UNITDIR} COMPONENT Server)
ENDIF() ENDIF()
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