MDEV-11963 RPM Lint: script-without-shebang /usr/bin/wsrep_sst_common.

Don't set the +x on /bin/wsrep_sst_common when installing.
This commit is contained in:
Alexey Botchkov 2017-08-01 09:46:27 +04:00
parent d1b3e428d4
commit 56959e7b2c

View file

@ -291,12 +291,16 @@ ELSE()
IF(WITH_WSREP)
SET(WSREP_SCRIPTS
wsrep_sst_mysqldump
wsrep_sst_common
wsrep_sst_rsync
wsrep_sst_xtrabackup
wsrep_sst_xtrabackup-v2
wsrep_sst_mariabackup
)
# The following script is sourced from other SST scripts, so it should
# not be made executable.
SET(WSREP_SOURCE
wsrep_sst_common
)
ENDIF()
IF (NOT WITHOUT_SERVER)
SET(SERVER_SCRIPTS
@ -336,6 +340,9 @@ ELSE()
MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file} in "
"${CMAKE_CURRENT_SOURCE_DIR}" )
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)
SET(${file}_COMPONENT Server)
@ -346,6 +353,20 @@ ELSE()
COMPONENT ${${file}_COMPONENT}
)
ENDFOREACH()
FOREACH(file ${WSREP_SOURCE})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
IF(NOT ${file}_COMPONENT)
SET(${file}_COMPONENT Server)
ENDIF()
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${file}
DESTINATION ${INSTALL_BINDIR}
COMPONENT ${${file}_COMPONENT}
)
ENDFOREACH()
ENDIF()
# Install libgcc as mylibgcc.a