Bug#865093: stretch-pu: package mariadb-10.1/10.1.25-0+deb9u1
Package: release.debian.org
Tags: stretch
Followup-For: Bug #865093
User: release.debian.org@packages.debian.org
Usertags: pu
Hi,
there has been another upstream release 10.1.26, so I am updating the
issue here.
I have also pulled one more fix. While fixing the #864593 I have
introduced regression that prevented mysqld to be started when used
with systemd (tracked as #865870). This has now been fixed and the
patch is attached to this message.
I would really appreciate if somebody could push this a little bit
forward as there's a security update pending depending on this.
Cheers,
Ondrej
-- System Information:
Debian Release: 9.1
APT prefers stable
APT policy: (990, 'stable'), (500, 'unstable-debug'), (500, 'stable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.4.0-83-generic (SMP w/8 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8), LANGUAGE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
>From 9f49e4b494f3dad8c403972996f7a1ebceb4b34f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@debian.org>
Date: Sat, 29 Jul 2017 22:20:28 +0200
Subject: [PATCH] Explicitly add dh_systemd_start snippets to
mariadb-server-10.1 because it's all messed up with different name for
sysvinit ('mysql') and systemd ('mariadb') (Closes: #865870)
---
debian/mariadb-server-10.1.postinst | 8 ++++++--
debian/mariadb-server-10.1.postrm | 5 +++++
debian/mariadb-server-10.1.prerm | 5 ++++-
debian/rules | 5 ++++-
4 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/debian/mariadb-server-10.1.postinst b/debian/mariadb-server-10.1.postinst
index 7edb0f3a..43eed58e 100644
--- a/debian/mariadb-server-10.1.postinst
+++ b/debian/mariadb-server-10.1.postinst
@@ -167,9 +167,13 @@ fi
#DEBHELPER#
+# Modified dh_systemd_start snippet that's not added automatically due /etc/init.d/mysql
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+ deb-systemd-invoke start mariadb.service >/dev/null || true
# Modified dh_installinit snippet to only run with sysvinit
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
- if [ ! -e /run/systemd/system ] && [ -x "/etc/init.d/mysql" ]; then
+elif [ -x "/etc/init.d/mysql" ]; then
+ if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
invoke-rc.d mysql start || exit $?
fi
fi
diff --git a/debian/mariadb-server-10.1.postrm b/debian/mariadb-server-10.1.postrm
index 81072b3c..3c822d39 100644
--- a/debian/mariadb-server-10.1.postrm
+++ b/debian/mariadb-server-10.1.postrm
@@ -47,4 +47,9 @@ if [ "$1" = "purge" ] && [ -f "/var/lib/mysql/debian-10.1.flag" ]; then
fi
+# Modified dh_systemd_start snippet that's not added automatically due /etc/init.d/mysql
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+fi
+
exit 0
diff --git a/debian/mariadb-server-10.1.prerm b/debian/mariadb-server-10.1.prerm
index 8a96c186..23eb7d43 100644
--- a/debian/mariadb-server-10.1.prerm
+++ b/debian/mariadb-server-10.1.prerm
@@ -3,8 +3,11 @@ set -e
#DEBHELPER#
+# Modified dh_systemd_start snippet that's not added automatically due /etc/init.d/mysql
+if [ -d /run/systemd/system ]; then
+ deb-systemd-invoke stop mariadb.service >/dev/null
# Modified dh_installinit snippet to only run with sysvinit
-if [ ! -e /run/systemd/system ] && [ -x "/etc/init.d/mysql" ]; then
+elif [ -x "/etc/init.d/mysql" ]; then
invoke-rc.d mysql stop || exit $?
fi
diff --git a/debian/rules b/debian/rules
index ef026c8b..5bce6ca7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -137,11 +137,14 @@ override_dh_systemd_enable:
dh_systemd_enable --name=mariadb
dh_systemd_enable --no-enable --name=mariadb@
+# Disable dh_systemd_start due /etc/init.d/mysql messing with the automatic snippets
+override_dh_systemd_start:
+ :
+
# Start mysql at sequence number 19 before 20 where apache, proftpd etc gets
# started which might depend on a running database server.
override_dh_installinit-arch:
dh_installinit --name=mysql --no-start -- defaults 19 21
- dh_systemd_start --no-restart-after-upgrade
override_dh_installcron-arch:
dh_installcron --name mysql-server
--
2.11.0
Reply to: