summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Samuelson <peter@p12n.org>2007-03-22 16:42:57 +0000
committerStefan Fritsch <sf@sfritsch.de>2012-01-02 10:36:39 +0100
commit3d40069100d8fe018dbcdadc6485ba57c57000ae (patch)
treecc367620911ab591f8b426c7206e2648783ab37f
parent542438095e49ec539be771518269fabf87c19196 (diff)
downloadapache2-3d40069100d8fe018dbcdadc6485ba57c57000ae.tar.gz
Attempt to fix #396782, #415775, #407171 by fixing sarge upgrade
detection in the -common postinst. This will target etch, which means reverting to the latest NMU for a minimal diff ... but I've run out of time today, I'll continue tomorrow or the next day. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/apache2@296 01b336ce-410b-0410-9a02-a0e7f243c266
-rw-r--r--debian/apache2.2-common.postinst24
-rw-r--r--debian/changelog6
2 files changed, 28 insertions, 2 deletions
diff --git a/debian/apache2.2-common.postinst b/debian/apache2.2-common.postinst
index 7548d944..1545d957 100644
--- a/debian/apache2.2-common.postinst
+++ b/debian/apache2.2-common.postinst
@@ -14,6 +14,19 @@ if [ -e /usr/sbin/apache2 ]; then
fi
fi
+# Detect whether this is a new install or an upgrade.
+# Ordinarily one just checks $2, but since we renamed apache2-common to
+# apache2.2-common, we have to be more devious.
+IS_NEW_INSTALL=1
+IS_UPGRADE_FROM_SARGE=
+if [ -e /etc/apache2/ports.conf ] ||
+ [ -n "$(ls /etc/apache2/sites-enabled/)" ]; then
+ IS_NEW_INSTALL=
+elif [ -z "$2" ]; then
+ IS_UPGRADE_FROM_SARGE=1
+fi
+
+
if [ ! -f /etc/apache2/ports.conf ]; then
echo "# 0 = start on boot; 1 = don't start on boot" > /etc/default/apache2
NO_AF_INET=`$NETSTAT -lnt 2>&1 | grep 'no support for .AF INET (tcp)'` || true
@@ -34,7 +47,7 @@ fi
#set up default site and dummy error and access logs
-if [ "$2" = "<unknown>" -o -z "$2" ]; then
+if [ "$IS_NEW_INSTALL" ]; then
if [ ! -L /etc/apache2/sites-enabled/000-default -a \
! -f /etc/apache2/sites-enabled/000-default ]; then
ln -s /etc/apache2/sites-available/default /etc/apache2/sites-enabled/000-default
@@ -47,7 +60,7 @@ if [ "$2" = "<unknown>" -o -z "$2" ]; then
fi
fi
-if [ "$2" = "<unknown>" -o -z "$2" ] || dpkg --compare-versions "$2" lt 2.2.3-4; then
+if [ "$IS_NEW_INSTALL" ] || dpkg --compare-versions "$2" lt 2.2.3-4; then
a2enmod alias
a2enmod autoindex
a2enmod dir
@@ -67,6 +80,13 @@ if [ "$2" = "<unknown>" -o -z "$2" ] || dpkg --compare-versions "$2" lt 2.2.3-4;
a2enmod authz_host
fi
+if [ "$IS_UPGRADE_FROM_SARGE" ]; then
+ if [ -l /etc/apache2/mods-enabled/proxy.load ]; then
+ a2enmod proxy_http
+ a2enmod disk_cache
+ fi
+fi
+
if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.0; then
if [ -L /etc/apache2/mods-enabled/imap.load ]; then
a2dismod imap
diff --git a/debian/changelog b/debian/changelog
index eec54bd2..c014d651 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,12 @@ apache2 (2.2.3-4) UNRELEASED; urgency=medium
* Rearrange init script so that 'force-reload' is the same as 'reload'.
(Closes: #401053)
* Add Build-Depends: mawk. (Closes: #403682)
+ * Refactor apache2.2-common.postinst slightly, to account for sarge
+ upgrades (since it's a new package name, rather than an upgrade).
+ (Closes: #396782, #415775)
+ * If mod_proxy was configured in sarge, add proxy_http and
+ disk_cache modules, which used to be included in the mod_proxy config.
+ (Closes: #407171)
-- Tollef Fog Heen <tfheen@debian.org> Sun, 29 Oct 2006 22:55:03 +0100