[Commits] 56959e7: MDEV-11963 RPM Lint: script-without-shebang /usr/bin/wsrep_sst_common.

Alexey Botchkov holyfoot at askmonty.org
Tue Aug 1 08:47:36 EEST 2017


revision-id: 56959e7b2ce621980bad1445a0a659c2b0fb4c83 (mariadb-10.1.25-12-g56959e7)
parent(s): d1b3e428d4843b83ef2ea7443ba61a9b7f6bf999
committer: Alexey Botchkov
timestamp: 2017-08-01 09:46:27 +0400
message:

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

        Don't set the +x on /bin/wsrep_sst_common when installing.

---
 scripts/CMakeLists.txt | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 17db2b0..e303855 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -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


More information about the commits mailing list