PKGBUILDs/extra/mariadb/0002-systemd-sysusers-tmpfiles.patch

66 lines
2.5 KiB
Diff
Raw Normal View History

2019-06-27 22:48:06 +00:00
From aef4f58adf90e9fee4348c1cf6484faeae159255 Mon Sep 17 00:00:00 2001
2019-02-24 21:19:41 +00:00
From: Christian Hesse <mail@eworm.de>
Date: Tue, 2 Jan 2018 14:32:21 +0100
2019-06-27 22:48:06 +00:00
Subject: [PATCH 1/2] Use descriptive file names for sysusers and tmpfiles
configuration
2019-02-24 21:19:41 +00:00
These files were installed to:
${INSTALL_SYSTEMD_SYSUSERSDIR}/sysusers.conf
${INSTALL_SYSTEMD_TMPFILESDIR}/tmpfiles.conf
Instead rename the files to more descriptive file names 'mariadb.conf'.
2019-06-27 22:48:06 +00:00
Signed-off-by: Christian Hesse <mail@eworm.de>
2019-02-24 21:19:41 +00:00
---
support-files/CMakeLists.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
2019-06-27 22:48:06 +00:00
index 3655c87b94e..63443245e6e 100644
2019-02-24 21:19:41 +00:00
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
2019-06-27 22:48:06 +00:00
@@ -118,7 +118,8 @@ IF(UNIX)
2019-02-24 21:19:41 +00:00
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)
+ DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR}
+ RENAME mariadb.conf COMPONENT Server)
ENDIF()
IF(INSTALL_SYSTEMD_TMPFILESDIR)
2019-06-27 22:48:06 +00:00
@@ -126,7 +127,8 @@ IF(UNIX)
2019-02-24 21:19:41 +00:00
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)
+ DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR}
+ RENAME mariadb.conf COMPONENT Server)
ENDIF()
# @ in directory name broken between CMake version 2.8.12.2 and 3.3
2019-06-27 22:48:06 +00:00
From 974bd397ff3492c57799e11a02cc3c07081bb1fc Mon Sep 17 00:00:00 2001
2019-02-24 21:19:41 +00:00
From: Christian Hesse <mail@eworm.de>
Date: Tue, 2 Jan 2018 14:36:49 +0100
2019-06-27 22:48:06 +00:00
Subject: [PATCH 2/2] Make systemd-tmpfiles create MYSQL_DATADIR
2019-02-24 21:19:41 +00:00
This is a no-op if the directory exists, but makes sure it is created by
systemd-tmpfiles with proper permissions otherwise.
This solves packaging issues when the user MYSQLD_USER is created by
systemd-sysusers and uid is not known in advance.
2019-06-27 22:48:06 +00:00
Signed-off-by: Christian Hesse <mail@eworm.de>
2019-02-24 21:19:41 +00:00
---
support-files/tmpfiles.conf.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/support-files/tmpfiles.conf.in b/support-files/tmpfiles.conf.in
index 03d66abc0c7..3c89cb258c9 100644
--- a/support-files/tmpfiles.conf.in
+++ b/support-files/tmpfiles.conf.in
@@ -1 +1,2 @@
d @MYSQL_UNIX_DIR@ 0755 @MYSQLD_USER@ @MYSQLD_USER@ -
+d @MYSQL_DATADIR@ 0700 @MYSQLD_USER@ @MYSQLD_USER@ -