[Piuparts-commits] [piuparts] 02/07: switch to default-mysql-server (aka mariadb) for selected packages
Holger Levsen
holger at layer-acht.org
Sun Feb 26 13:56:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 0aa6bac5e79dd2db5ef9c04ea64d4ec01ed0fe02
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Feb 26 00:25:29 2017 +0100
switch to default-mysql-server (aka mariadb) for selected packages
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
.../scripts/pre_distupgrade_zz_database-server | 54 +++++++++++++++++++++-
debian/changelog | 3 ++
2 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/custom-scripts/scripts/pre_distupgrade_zz_database-server b/custom-scripts/scripts/pre_distupgrade_zz_database-server
index ba686ad..3cf160c 100755
--- a/custom-scripts/scripts/pre_distupgrade_zz_database-server
+++ b/custom-scripts/scripts/pre_distupgrade_zz_database-server
@@ -16,7 +16,7 @@ if [ "$PIUPARTS_PHASE" = "" ]; then
exit 0
fi
-CANDIDATES=""
+CANDIDATES=
CANDIDATES="$CANDIDATES default-mysql-server"
CANDIDATES="$CANDIDATES postgresql"
CANDIDATES="$CANDIDATES postgresql-8.3"
@@ -40,7 +40,8 @@ case "$PIUPARTS_DISTRIBUTION_NEXT" in
;;
esac
-PACKAGES=""
+PACKAGES=
+SWITCH_TO_MARIADB=
# early upgrade runs into even more trouble for some packages ...
case ${PIUPARTS_OBJECTS%%=*} in
@@ -52,6 +53,46 @@ case ${PIUPARTS_OBJECTS%%=*} in
;;
esac
+if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "stretch" ]; then
+ # recommended/suggested/related package mysql-server gets removed during dist-upgrade
+ case ${PIUPARTS_OBJECTS%%=*} in
+ bacula-director-mysql|\
+ bacula-director-mysql-dbg)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ bareos-database-mysql)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ icinga2-ido-mysql)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ openstack-cloud-services)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ pdns-backend-mysql)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ phpmyadmin)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ pnopaste)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ redmine-mysql)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ tango-db|\
+ tango-db-dbg|\
+ tango-accesscontrol|\
+ tango-accesscontrol-dbg)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ yubikey-val)
+ SWITCH_TO_MARIADB=yes
+ ;;
+ esac
+fi
+
for pkg in $CANDIDATES
do
if is_installed "$pkg"
@@ -60,6 +101,13 @@ do
fi
done
+if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "stretch" ] && [ "$SWITCH_TO_MARIADB" = "yes" ]; then
+ if is_installed "mysql-server"
+ then
+ PACKAGES="$PACKAGES default-mysql-server mysql-server-"
+ fi
+fi
+
test ! -x /usr/bin/pg_lsclusters || pg_lsclusters
if [ -n "$PACKAGES" ]
@@ -81,12 +129,14 @@ upgrade_pg_cluster()
if ! is_installed postgresql-${to}
then
+ echo ""
echo "Installing postgresql-${to}"
apt-get -y install postgresql-${to}
fi
if is_installed postgresql-${from} && is_installed postgresql-${to}
then
+ echo ""
echo "Updating PostgreSQL Cluster from ${from} to ${to}"
pg_dropcluster ${to} main --stop
pg_upgradecluster -v ${to} ${from} main
diff --git a/debian/changelog b/debian/changelog
index d512700..01e6b7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ piuparts (0.76) UNRELEASED; urgency=medium
[ Andreas Beckmann ]
* Clean up leftover /etc/piuparts/scripts/post_setup_experimental.
(Closes: #854317)
+ * scripts/pre_distupgrade_zz_database-server: Switch from mysql-server to
+ default-mysql-server (aka mariadb-server) for selected packages on
+ upgrades to stretch, otherwise they will lose their database server.
* scripts/pre_remove_40_find_missing_md5sums: Correctly escape backslashes
in filenames.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list