summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
Diffstat (limited to 'support-files')
-rw-r--r--support-files/CMakeLists.txt9
-rw-r--r--support-files/rpm/server-postin.sh2
2 files changed, 10 insertions, 1 deletions
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 3655c87b94e..c3ff1383f86 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -77,6 +77,15 @@ 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 RESULT_VARIABLE err)
+ IF (NOT err)
+ SET(CPACK_RPM_server_PACKAGE_REQUIRES
+ "${CPACK_RPM_server_PACKAGE_REQUIRES} libsepol >= ${LIBSEPOL_VERSION}"
+ PARENT_SCOPE)
+ ENDIF()
+ ENDIF()
ENDIF()
ENDIF()
diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh
index 2598e62dd77..ef40376127e 100644
--- a/support-files/rpm/server-postin.sh
+++ b/support-files/rpm/server-postin.sh
@@ -50,7 +50,7 @@ if [ $1 = 1 ] ; then
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
- chown -R %{mysqld_user}:%{mysqld_group} $datadir
+ chown -R -f %{mysqld_user}:%{mysqld_group} $datadir
if [ ! -e $datadir/mysql ]; then
# Create data directory