* [Buildroot] [git commit] package/mariadb: add optional systemd dependency
@ 2023-07-28 19:29 Thomas Petazzoni via buildroot
0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni via buildroot @ 2023-07-28 19:29 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=1a9ad16ed8e5048a11d19dc411995137b154870a
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
If systemd is used we should enable support in mariadb and enable
"Type=notify" in the mysqld.service unit file
"Type=notify" stops systemd from starting services which depend on mariadb
until it has notified systemd that it has finished starting up, this helps
avoid startup race conditions
Signed-off-by: Danny Wood <danny@rotronics.co.uk>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/mariadb/mariadb.mk | 7 +++++++
package/mariadb/mysqld.service | 2 ++
2 files changed, 9 insertions(+)
diff --git a/package/mariadb/mariadb.mk b/package/mariadb/mariadb.mk
index a2701643e1..78e4703eee 100644
--- a/package/mariadb/mariadb.mk
+++ b/package/mariadb/mariadb.mk
@@ -72,6 +72,13 @@ MARIADB_CONF_OPTS += \
-DLIBRESSL_RESULT__TRYRUN_OUTPUT="LibreSSL $(LIBRESSL_VERSION)"
endif
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+MARIADB_DEPENDENCIES += systemd
+MARIADB_CONF_OPTS += -DWITH_SYSTEMD=yes
+else
+MARIADB_CONF_OPTS += -DWITH_SYSTEMD=no
+endif
+
ifeq ($(BR2_PACKAGE_MARIADB_SERVER),y)
ifeq ($(BR2_PACKAGE_MARIADB_SERVER_EMBEDDED),y)
MARIADB_CONF_OPTS += -DWITH_EMBEDDED_SERVER=ON
diff --git a/package/mariadb/mysqld.service b/package/mariadb/mysqld.service
index 537430e9a2..9433e14630 100644
--- a/package/mariadb/mysqld.service
+++ b/package/mariadb/mysqld.service
@@ -9,6 +9,8 @@ Restart=always
User=mysql
RuntimeDirectory=mysql
RuntimeDirectoryMode=0755
+Type=notify
+NotifyAccess=all
[Install]
WantedBy=multi-user.target
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-28 19:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 19:29 [Buildroot] [git commit] package/mariadb: add optional systemd dependency Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.