From e0cd4ec485b114c8be403d0352743aa171a7d061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 30 Mar 2020 17:52:33 +0300 Subject: [PATCH] MXS-2931: Use a preun, not a postun, script The script must be called before the package is removed on CentOS 6 to allow the process to be stopped correctly. --- cmake/package_rpm.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/package_rpm.cmake b/cmake/package_rpm.cmake index 32afd8c7b..bad8f91c0 100644 --- a/cmake/package_rpm.cmake +++ b/cmake/package_rpm.cmake @@ -39,7 +39,7 @@ set(CPACK_RPM_USER_FILELIST "${IGNORED_DIRS}") if(TARGET_COMPONENT STREQUAL "core" OR TARGET_COMPONENT STREQUAL "all") set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postinst) - set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postrm) + set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postrm) endif() if(EXTRA_PACKAGE_DEPENDENCIES)