summaryrefslogtreecommitdiff
path: root/support-files/CMakeLists.txt
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-06-26 11:46:59 +0200
committerSergei Golubchik <serg@mariadb.org>2019-07-10 09:02:10 +0200
commit578e822985a8d7096261f0ad2e6e140cd3d10380 (patch)
tree5ea31ca7ec3a1dccd0b91caf02d093fe44d98651 /support-files/CMakeLists.txt
parentab3a6ca67032f22c763c8a1b97d644d4a8701334 (diff)
downloadmariadb-git-578e822985a8d7096261f0ad2e6e140cd3d10380.tar.gz
bugfix: RPM installation complains about policy files, mariadb.service is not installed
add a versioned libsepol dependency to the server rpm
Diffstat (limited to 'support-files/CMakeLists.txt')
-rw-r--r--support-files/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 36d4c0949ed..83f8bdb740d 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -86,6 +86,14 @@ IF(UNIX)
ADD_CUSTOM_TARGET(${pol}-pp ALL DEPENDS ${out})
INSTALL(FILES ${out} DESTINATION ${inst_location}/policy/selinux COMPONENT SupportFiles)
ENDFOREACH()
+ IF(RPM)
+ EXECUTE_PROCESS(COMMAND rpm -q --qf "%{VERSION}-%{RELEASE}" libsepol OUTPUT_VARIABLE LIBSEPOL_VERSION)
+ IF (LIBSEPOL_VERSION)
+ SET(CPACK_RPM_server_PACKAGE_REQUIRES
+ "${CPACK_RPM_server_PACKAGE_REQUIRES} libsepol >= ${LIBSEPOL_VERSION}"
+ PARENT_SCOPE)
+ ENDIF()
+ ENDIF()
ENDIF()
ENDIF()