Skip to content

Commit d742f28

Browse files
committed
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)
1 parent 04df0bd commit d742f28

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

storage/columnstore/CMakeLists.txt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
#set(PLUGIN_COLUMNSTORE "NO" CACHE STRING "Enable ColumnStore engine")
22

3-
if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}" OR NOT (RPM OR DEB))
3+
if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}")
44
return()
55
endif()
66

7+
# this does everything, gets the var from the correct scope, appends new
8+
# values, sets in the correct scope
9+
macro(APPEND_FOR_CPACK V)
10+
get_directory_property(var DIRECTORY columnstore DEFINITION ${V})
11+
set(${V} "${var}${ARGN}" PARENT_SCOPE)
12+
endmacro()
13+
714
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
815
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR
916
CMAKE_SYSTEM_PROCESSOR STREQUAL "i386" OR
@@ -13,15 +20,15 @@ CMAKE_SYSTEM_PROCESSOR STREQUAL "i686")
1320

1421
IF(TARGET columnstore)
1522
# Needed to bump the component changes up to the main scope
16-
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} PARENT_SCOPE)
23+
APPEND_FOR_CPACK(CPACK_COMPONENTS_ALL)
1724
IF (RPM)
18-
SET(CPACK_RPM_columnstore-engine_USER_FILELIST ${CPACK_RPM_columnstore-engine_USER_FILELIST} PARENT_SCOPE)
19-
# To untie the python mess across distributions MCS supports.
20-
SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4, python3, binutils" PARENT_SCOPE)
21-
SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
22-
SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
23-
SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE} PARENT_SCOPE)
24-
SET(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS "thrift, MariaDB-columnstore-engine, MariaDB-columnstore-platform, MariaDB-columnstore-libs" PARENT_SCOPE)
25+
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES " binutils net-tools python3")
26+
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_USER_FILELIST ";%ignore /var/lib;%ignore /var")
27+
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS " thrift MariaDB-columnstore-platform MariaDB-columnstore-libs")
28+
# these three don't have the list semantics, so no append here
29+
SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/preInstall_storage_engine.sh PARENT_SCOPE)
30+
SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/postInstall_storage_engine.sh PARENT_SCOPE)
31+
SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/preUn_storage_engine.sh PARENT_SCOPE)
2532
ENDIF()
2633
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore")
2734
ENDIF()

0 commit comments

Comments
 (0)