From 4b6ef03dcda608109f0455732ab9ed65f32b06bb Mon Sep 17 00:00:00 2001 From: Alexey Bychko Date: Fri, 27 Aug 2021 12:54:42 +0700 Subject: MDEV-26438 cmake < 3.6.0 produced RPMs with invalid names replaced CPACK_RPM_PACKAGE_VERSION with SERVER_VERSION. CPACK_* variables are empty and can't be used until INCLUDE(CPack) is called. SERVER_VERSION is the safest option because other variables may be overwritten from submodules --- cmake/cpack_rpm.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 60470779d1f..583bb81dafd 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -35,7 +35,7 @@ SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) SET(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) IF(CMAKE_VERSION VERSION_LESS "3.6.0") - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}") + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${SERVER_VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}") ELSE() SET(CPACK_RPM_FILE_NAME "RPM-DEFAULT") OPTION(CPACK_RPM_DEBUGINFO_PACKAGE "" ON) -- cgit v1.2.1