diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-02-12 08:55:17 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-02-12 08:55:17 +0100 |
commit | 4b087e175431895bd5a69cb298281f0c30a1d2a6 (patch) | |
tree | 17a5b0e8f4a678f46ff1e1b1faabcdfedacc5ffe /support-files | |
parent | fc2f2fa85306d80c317e76933264ba3d3675ed1c (diff) | |
parent | 646d1ec83a57d9a5b380079afc3612c1d9acadd5 (diff) | |
download | mariadb-git-4b087e175431895bd5a69cb298281f0c30a1d2a6.tar.gz |
Merge branch '10.4' into 10.5
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 863e72928d2..a9f1bf64da8 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -124,21 +124,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) @@ -165,6 +150,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) |