Skip to content

Commit 4b6ef03

Browse files
committed
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
1 parent 87ff4ba commit 4b6ef03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/cpack_rpm.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts
3535
SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
3636
SET(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
3737
IF(CMAKE_VERSION VERSION_LESS "3.6.0")
38-
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}")
38+
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${SERVER_VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}")
3939
ELSE()
4040
SET(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
4141
OPTION(CPACK_RPM_DEBUGINFO_PACKAGE "" ON)

0 commit comments

Comments
 (0)