Skip to content

Commit

Permalink
MDEV-15543: tmpfile.d not for datadir
Browse files Browse the repository at this point in the history
With the default datadir path of /var/lib/mysql the same
as the path of the unix socket, this tmpfiles.d file
was generated to "create" a datadir. This wasn't intended.

In this case we comment out the entry and explain why.

Add extra ideas on other temporary directories that
may be specified in this file.
  • Loading branch information
grooverdan committed Nov 28, 2023
1 parent a119c5f commit 6b2287f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions support-files/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ IF(UNIX AND NOT WITHOUT_SERVER)

IF((HAVE_SYSTEMD OR INSTALL_SYSTEMD_TMPUSERS) AND INSTALL_SYSTEMD_TMPFILESDIR)
get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY)
IF(MYSQL_DATADIR STREQUAL MYSQL_UNIX_DIR)
SET(DISABLE_TMP "#")
ENDIF()
CONFIGURE_FILE(tmpfiles.conf.in
${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf
Expand Down
12 changes: 11 additions & 1 deletion support-files/tmpfiles.conf.in
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
d @MYSQL_UNIX_DIR@ 0755 @MYSQLD_USER@ @MYSQLD_USER@ -
# This is the directory where the unix socket
# of MariaDB is created.
# Other temporary directories can be created here like:
# * tmpdir
# * innodb_tmpdir
# * innodb_temp_data_file_path
# * rocksdb_tmpdir
# etc.
# It shouldn't be used for datadir which is why it
# may be disabled.
@DISABLE_TMP@d @MYSQL_UNIX_DIR@ 0755 @MYSQLD_USER@ @MYSQLD_USER@ -

0 comments on commit 6b2287f

Please sign in to comment.