Commit d742f282 authored by Sergei Golubchik's avatar Sergei Golubchik

ColumnStore RPM packaging fixes

1. move columnstore-as-a-submodule RPM packaging away from the submodule
2. set REQUIRES correctly, appending to existing REQUIRES
3. same for USER_FILELIST and CONFLICTS
4. set all variables in the correct scope
5. skip columnstore correctly (not when RPM or DEB, but when
   a plugin target is not created)
parent 04df0bda
#set(PLUGIN_COLUMNSTORE "NO" CACHE STRING "Enable ColumnStore engine") #set(PLUGIN_COLUMNSTORE "NO" CACHE STRING "Enable ColumnStore engine")
if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}" OR NOT (RPM OR DEB)) if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}")
return() return()
endif() endif()
# this does everything, gets the var from the correct scope, appends new
# values, sets in the correct scope
macro(APPEND_FOR_CPACK V)
get_directory_property(var DIRECTORY columnstore DEFINITION ${V})
set(${V} "${var}${ARGN}" PARENT_SCOPE)
endmacro()
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "i386" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "i386" OR
...@@ -13,15 +20,15 @@ CMAKE_SYSTEM_PROCESSOR STREQUAL "i686") ...@@ -13,15 +20,15 @@ CMAKE_SYSTEM_PROCESSOR STREQUAL "i686")
IF(TARGET columnstore) IF(TARGET columnstore)
# Needed to bump the component changes up to the main scope # Needed to bump the component changes up to the main scope
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} PARENT_SCOPE) APPEND_FOR_CPACK(CPACK_COMPONENTS_ALL)
IF (RPM) IF (RPM)
SET(CPACK_RPM_columnstore-engine_USER_FILELIST ${CPACK_RPM_columnstore-engine_USER_FILELIST} PARENT_SCOPE) APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES " binutils net-tools python3")
# To untie the python mess across distributions MCS supports. APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_USER_FILELIST ";%ignore /var/lib;%ignore /var")
SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4, python3, binutils" PARENT_SCOPE) APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS " thrift MariaDB-columnstore-platform MariaDB-columnstore-libs")
SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE} PARENT_SCOPE) # these three don't have the list semantics, so no append here
SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE} PARENT_SCOPE) SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/preInstall_storage_engine.sh PARENT_SCOPE)
SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE} PARENT_SCOPE) SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/postInstall_storage_engine.sh PARENT_SCOPE)
SET(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS "thrift, MariaDB-columnstore-engine, MariaDB-columnstore-platform, MariaDB-columnstore-libs" PARENT_SCOPE) SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/preUn_storage_engine.sh PARENT_SCOPE)
ENDIF() ENDIF()
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore") INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore")
ENDIF() ENDIF()
......
Subproject commit 31df46168d2eb51e524a7f24386f557a809b78d6 Subproject commit d9a8f5fd3cad63d736ca9c900ce3e9d76c4c0947
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