[apache2] 01/01: Add a warning to ITK users of the current Debian Testing
Arno Töll
atoell-guest at moszumanska.debian.org
Mon Dec 23 12:57:03 UTC 2013
This is an automated email from the git hooks/post-receive script.
atoell-guest pushed a commit to branch master
in repository apache2.
commit 753adbaa359a38c472da27fbc43417538b4e744d
Author: Arno Töll <arno at debian.org>
Date: Mon Dec 23 13:56:57 2013 +0100
Add a warning to ITK users of the current Debian Testing
---
debian/apache2.postinst | 24 ++++++++++++++++++++++++
debian/apache2.preinst | 10 +++++++++-
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index 3704f77..d815389 100644
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -365,6 +365,26 @@ migrate_data()
fi
}
+warn_itk_users()
+{
+ # the function below only applies to Debian Testing users. Stable users are properly upgraded
+ if [ -n "$2" ] && dpkg --compare-versions "$2" 'lt' '2.4.7-1~' && dpkg --compare-versions "$2" 'ge' '2.4.1-1' ; then
+ local mpm=""
+ [ -e /etc/apache2/.apache2_mpm_selected ] && mpm=$(grep -v "^#" /etc/apache2/.apache2_mpm_selected | head -n1)
+ if [ "$mpm" = 'apache2-mpm-itk' ] ; then
+ echo "======================================================================="
+ echo "You appear to be using the ITK MPM. Starting with Apache2 2.4.7-1 this"
+ echo "is a separate package not bundled with Apache anymore. Moreover, it is"
+ echo "not a MPM anymore. This upgrade will switch your MPM to 'prefork'. If"
+ echo "you plan to use ITK in future, please do: "
+ echo ""
+ echo " apt-get install libapache2-mpm-itk"
+ echo ""
+ echo "======================================================================="
+ fi
+ fi
+}
+
#XXX: Deal with the sites-available/sites-enabled *.conf transition, e.g. rename
# all files which look like site configuration?
@@ -381,12 +401,14 @@ case "$1" in
install_default_site $@
move_httpd_conf $@
migrate_data $@
+ warn_itk_users $@
# post installation cleanup
if [ -e /etc/apache2/.apache2_mpm_selected ] ; then
rm -f /etc/apache2/.apache2_mpm_selected
fi
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
@@ -412,3 +434,5 @@ if [ "$1" = configure ] && we_are_upgrading_from_wheezy $@ ; then
fi
exit 0
+
+# vim: syntax=sh ts=4 sw=4 sts=4 sr noet
diff --git a/debian/apache2.preinst b/debian/apache2.preinst
index 255b1f3..6303873 100644
--- a/debian/apache2.preinst
+++ b/debian/apache2.preinst
@@ -113,8 +113,14 @@ case "$1" in
echo "$mpm" >> /etc/apache2/.apache2_mpm_selected
fi
fi
- fi
+ if [ -n "$2" ] && dpkg --compare-versions "$2" 'lt' '2.4.7-1~' && dpkg --compare-versions "$2" 'ge' '2.4.1-1' ; then
+ CUR_MPM=$(a2query -M) || exit 1
+ if [ "$CUR_MPM" == "itk" ] ; then
+ echo "apache2-mpm-itk" >> /etc/apache2/.apache2_mpm_selected
+ fi
+ fi
+ fi
# 2) an apache2.2-common conffiles exists or the 2.2 apache2 package is
# installed
if [ -n "$2" ] || obsolete_conffile_exists ; then
@@ -139,3 +145,5 @@ esac
#DEBHELPER#
exit 0
+
+# vim: syntax=sh ts=4 sw=4 sts=4 sr noet
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git
More information about the Pkg-apache-commits
mailing list