Skip to content

Commit

Permalink
MCOL-5595: Wrong metadata in CMAPI packages.
Browse files Browse the repository at this point in the history
[fix] cmapi packages metadata version format for debian systems and version + release in RHEL systems
  • Loading branch information
mariadb-AlanMologorsky committed Oct 27, 2023
1 parent eb744ea commit 7aa6e4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmapi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ IF(RPM)
# but it's doesn't work because of some CPACK versions don't add definitions
# to the spec file using CPACK_RPM_SPEC_MORE_DEFINE

SET(CPACK_RPM_PACKAGE_VERSION ${CMAPI_PACKAGE_VERSION})
SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME})

SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
Expand Down Expand Up @@ -139,13 +138,15 @@ IF(RPM)
SET(CPACK_RPM_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${SERVER_VERSION}_${CMAPI_PACKAGE_VERSION}-${CMAPI_VERSION_RELEASE}.${OS_VERSION}.${CMAKE_HOST_SYSTEM_PROCESSOR}")
MESSAGE(STATUS "CPACK_RPM_PACKAGE_FILE_NAME ${CPACK_RPM_PACKAGE_FILE_NAME}")
SET(CPACK_PACKAGE_FILE_NAME ${CPACK_RPM_PACKAGE_FILE_NAME})
# version and release the same as in Columnstore engine package
SET(CPACK_RPM_PACKAGE_VERSION "${SERVER_VERSION}_${CMAPI_PACKAGE_VERSION}")
SET(CPACK_RPM_PACKAGE_RELEASE "${CMAPI_VERSION_RELEASE}.${OS_VERSION}")
ENDIF()

OPTION(DEB "Build a DEB" OFF)
IF(DEB)
SET(CPACK_GENERATOR "DEB")

SET(CPACK_DEBIAN_PACKAGE_VERSION ${CMAPI_PACKAGE_VERSION})
# TODO: different names in deb and rpm packages, fix it in next releases.
STRING(TOLOWER ${CPACK_PACKAGE_NAME} CPACK_DEBIAN_PACKAGE_NAME)
STRING(TOLOWER ${CPACK_PACKAGE_NAME} CPACK_PACKAGE_NAME)
Expand All @@ -172,6 +173,9 @@ IF(DEB)
SET(CPACK_DEBIAN_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${SERVER_VERSION}-${CMAPI_PACKAGE_VERSION}${PATCHLEVEL}~${LSBID}${LSBVERSION}_${ARCHITECTURE}")
MESSAGE(STATUS "CPACK_DEBIAN_PACKAGE_FILE_NAME ${CPACK_DEBIAN_PACKAGE_FILE_NAME}")
SET(CPACK_PACKAGE_FILE_NAME ${CPACK_DEBIAN_PACKAGE_FILE_NAME})
# making possible to store several cmapi packages in one repo (same version as in
# Columnstore engine package)
SET(CPACK_DEBIAN_PACKAGE_VERSION "${SERVER_VERSION}-${CMAPI_PACKAGE_VERSION}${PATCHLEVEL}~${LSBID}${LSBVERSION}")
ENDIF()

INCLUDE (CPack)

0 comments on commit 7aa6e4c

Please sign in to comment.