diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-01-31 11:37:12 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-01-31 11:37:12 +0200 |
commit | 5ff66fb0b97fa3f8ecc453c48bac48ceae76bdea (patch) | |
tree | b33d1e67c5a03abd85abe023f078d0201b12adeb /support-files | |
parent | dbbe9961a53cad97544499c3187771df64f25b18 (diff) | |
parent | 256994ef7469fc4c62d5b271a6557ad729380f0e (diff) | |
download | mariadb-git-5ff66fb0b97fa3f8ecc453c48bac48ceae76bdea.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/CMakeLists.txt | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 9be3ed65095..6e1bbdee610 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -114,21 +114,6 @@ IF(UNIX) ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service DESTINATION ${inst_location}/systemd COMPONENT SupportFiles) - IF(INSTALL_SYSTEMD_SYSUSERSDIR) - CONFIGURE_FILE(sysusers.conf.in - ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf - DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} COMPONENT Server) - ENDIF() - - IF(INSTALL_SYSTEMD_TMPFILESDIR) - get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY) - CONFIGURE_FILE(tmpfiles.conf.in - ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf - DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} COMPONENT Server) - ENDIF() - # @ in directory name broken between CMake version 2.8.12.2 and 3.3 # http://public.kitware.com/Bug/view.php?id=14782 IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM) @@ -155,6 +140,26 @@ IF(UNIX) ENDIF() ENDIF() + # Allow installing sysusers and tmpusers without requiring SYSTEMD on the + # system. This is useful for distributions running other init systems to + # parse these files and create appropriate users & tmpfiles. + IF((HAVE_SYSTEMD OR INSTALL_SYSTEMD_SYSUSERS) AND INSTALL_SYSTEMD_SYSUSERSDIR) + CONFIGURE_FILE(sysusers.conf.in + ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf + DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} + RENAME mariadb.conf COMPONENT Server) + ENDIF() + + IF((HAVE_SYSTEMD OR INSTALL_SYSTEMD_TMPUSERS) AND INSTALL_SYSTEMD_TMPFILESDIR) + get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY) + CONFIGURE_FILE(tmpfiles.conf.in + ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf + DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} + RENAME mariadb.conf COMPONENT Server) + ENDIF() + IF (INSTALL_SYSCONFDIR) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysql-log-rotate DESTINATION ${INSTALL_SYSCONFDIR}/logrotate.d RENAME mysql COMPONENT SupportFiles) |