Skip to content

Commit 56959e7

Browse files
author
Alexey Botchkov
committed
MDEV-11963 RPM Lint: script-without-shebang /usr/bin/wsrep_sst_common.
Don't set the +x on /bin/wsrep_sst_common when installing.
1 parent d1b3e42 commit 56959e7

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

scripts/CMakeLists.txt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,16 @@ ELSE()
291291
IF(WITH_WSREP)
292292
SET(WSREP_SCRIPTS
293293
wsrep_sst_mysqldump
294-
wsrep_sst_common
295294
wsrep_sst_rsync
296295
wsrep_sst_xtrabackup
297296
wsrep_sst_xtrabackup-v2
298297
wsrep_sst_mariabackup
299298
)
299+
# The following script is sourced from other SST scripts, so it should
300+
# not be made executable.
301+
SET(WSREP_SOURCE
302+
wsrep_sst_common
303+
)
300304
ENDIF()
301305
IF (NOT WITHOUT_SERVER)
302306
SET(SERVER_SCRIPTS
@@ -336,6 +340,9 @@ ELSE()
336340
MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file} in "
337341
"${CMAKE_CURRENT_SOURCE_DIR}" )
338342
ENDIF()
343+
# TODO: The following EXECUTE could be redundant as INSTALL_SCRIPT
344+
# macro does an INSTALL(PROGRAMS ..) that automatically sets +x on
345+
# the executable.
339346
EXECUTE_PROCESS(COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/${file})
340347
IF(NOT ${file}_COMPONENT)
341348
SET(${file}_COMPONENT Server)
@@ -346,6 +353,20 @@ ELSE()
346353
COMPONENT ${${file}_COMPONENT}
347354
)
348355
ENDFOREACH()
356+
357+
FOREACH(file ${WSREP_SOURCE})
358+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
359+
${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
360+
IF(NOT ${file}_COMPONENT)
361+
SET(${file}_COMPONENT Server)
362+
ENDIF()
363+
INSTALL(FILES
364+
${CMAKE_CURRENT_BINARY_DIR}/${file}
365+
DESTINATION ${INSTALL_BINDIR}
366+
COMPONENT ${${file}_COMPONENT}
367+
)
368+
ENDFOREACH()
369+
349370
ENDIF()
350371

351372
# Install libgcc as mylibgcc.a

0 commit comments

Comments
 (0)