Skip to content

Commit 9a4a30a

Browse files
grooverdanjanlindstrom
authored andcommitted
MDEV-37092 galera_new_cluster installed under WITH_WSREP=OFF
galera_new_cluster is a script intended solely for use with galera and shouldn't be installed unless WITH_WSREP=ON. In 11.6 the installation became part of scripts/CMakeList.txt and no-longer had a WITH_WSREP=ON condition around installing this file. The galera_new_cluster in systemd.cmake had no effect as the script is a generated file and not in the source directory. Changes: The scripts/CMakeList.txt has a condition WITH_WSREP=ON for installing the galera_new_cluster script. The legacy reference in cmake/systemd.cmake is removed. Thanks Michal Schorm for the bug report.
1 parent 311171c commit 9a4a30a

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

cmake/systemd.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ MACRO(CHECK_SYSTEMD)
4747
SET(HAVE_SYSTEMD TRUE)
4848
SET(SYSTEMD_SCRIPTS mariadb-service-convert)
4949
IF(WITH_WSREP)
50-
SET(SYSTEMD_SCRIPTS ${SYSTEMD_SCRIPTS} galera_new_cluster galera_recovery)
50+
SET(SYSTEMD_SCRIPTS ${SYSTEMD_SCRIPTS} galera_recovery)
5151
ENDIF()
5252
IF(DEB)
5353
SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=+/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld")

scripts/CMakeLists.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,19 @@ IF(UNIX AND NOT WITHOUT_SERVER)
227227

228228
INSTALL_LINK(mariadb-install-db mysql_install_db ${INSTALL_SCRIPTDIR} ServerSymlinks)
229229

230-
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/galera_new_cluster.sh
231-
${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster ESCAPE_QUOTES @ONLY)
232-
EXECUTE_PROCESS(
233-
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster
234-
)
230+
IF(WITH_WSREP)
231+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/galera_new_cluster.sh
232+
${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster ESCAPE_QUOTES @ONLY)
233+
EXECUTE_PROCESS(
234+
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster
235+
)
235236

236-
INSTALL_SCRIPT(
237-
"${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster"
238-
DESTINATION ${INSTALL_SCRIPTDIR}
239-
COMPONENT Server
240-
)
237+
INSTALL_SCRIPT(
238+
"${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster"
239+
DESTINATION ${INSTALL_SCRIPTDIR}
240+
COMPONENT Server
241+
)
242+
ENDIF()
241243
ENDIF()
242244

243245
SET(prefix "${CMAKE_INSTALL_PREFIX}")

0 commit comments

Comments
 (0)