[Pkg-apache-commits] r995 - in /trunk/apache2: apache2.2-common.postinst apache2.2-common.postrm apache2.2-common.preinst changelog

sf at alioth.debian.org sf at alioth.debian.org
Sat Jul 25 20:59:41 UTC 2009


Author: sf
Date: Sat Jul 25 20:59:40 2009
New Revision: 995

URL: http://svn.debian.org/wsvn/pkg-apache/?sc=1&rev=995
Log:
* Remove 2.0 -> 2.2 upgrade logic from maintainer scripts.
* Remove other_vhosts_access.log on package purge.

Modified:
    trunk/apache2/apache2.2-common.postinst
    trunk/apache2/apache2.2-common.postrm
    trunk/apache2/apache2.2-common.preinst
    trunk/apache2/changelog

Modified: trunk/apache2/apache2.2-common.postinst
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/apache2.2-common.postinst?rev=995&op=diff
==============================================================================
--- trunk/apache2/apache2.2-common.postinst (original)
+++ trunk/apache2/apache2.2-common.postinst Sat Jul 25 20:59:40 2009
@@ -4,34 +4,12 @@
         exit 0
 fi
 
-if [ -e /usr/sbin/apache2 ]; then
-    if [ "`dpkg-statoverride --list /usr/sbin/apache2`" = "" ]; then
-        chmod +x /usr/sbin/apache2
-    else
-        chmod `dpkg-statoverride --list /usr/sbin/apache2 | cut -f 3` /usr/sbin/apache2
-    fi
-fi
-
 mod_is_enabled() {
     test -L /etc/apache2/mods-enabled/$1.load
 }
 
-# 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.
-if [ -n "$2" ]; then
-	UPGRADE=from_2_2
-elif [ -e /etc/apache2/ports.conf.dpkg-apache2.2-common.existed ] ||
-     [ -n "$(ls /etc/apache2/sites-enabled/)" ]; then
-	UPGRADE=from_2_0
-else
-	UPGRADE=new_install
-fi
-
-
-
 #set up default site and dummy error and access logs
-if [ $UPGRADE = new_install ]; then
+if [ -z "$2" ]; then
         if [ ! -L /etc/apache2/sites-enabled/000-default -a \
              ! -f /etc/apache2/sites-enabled/000-default ]; then
                 a2ensite -q default
@@ -64,21 +42,6 @@
 	a2enmod -q authz_host
 
 fi
-if [ $UPGRADE = from_2_0 ]; then
-        # Module replacements from previous versions of apache2
-	if mod_is_enabled proxy; then
-		a2enmod -q proxy_http
-		a2enmod -q disk_cache
-	fi
-	if mod_is_enabled imap; then
-		a2dismod -q imap
-		a2enmod -q imagemap
-	fi
-	if mod_is_enabled auth_ldap; then
-		a2dismod -q auth_ldap
-		a2enmod -q authnz_ldap
-	fi
-fi
 
 if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.4-2; then
 	echo -n activating new config files ...
@@ -104,11 +67,9 @@
 	fi
 fi
 
-
 rm -f /etc/apache2/ports.conf.dpkg-apache2.2-common.old
 rm -f /etc/default/apache2.dpkg-apache2.2-common.old
 rm -f /etc/apache2/conf.d/charset.dpkg-apache2.2-common.old
-rm -f /etc/apache2/ports.conf.dpkg-apache2.2-common.existed
 
 [ -f /etc/apache2/httpd.conf ] || touch /etc/apache2/httpd.conf
 

Modified: trunk/apache2/apache2.2-common.postrm
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/apache2.2-common.postrm?rev=995&op=diff
==============================================================================
--- trunk/apache2/apache2.2-common.postrm (original)
+++ trunk/apache2/apache2.2-common.postrm Sat Jul 25 20:59:40 2009
@@ -4,9 +4,9 @@
 
 if [ "$1" = purge ] ; then
 	rm -f 	/etc/apache2/httpd.conf \
-		/etc/apache2/ports.conf.dpkg-apache2.2-common.existed \
 		/var/cache/apache2/reload \
 		/var/log/apache2/access.log* \
+		/var/log/apache2/other_vhosts_access.log* \
 		/var/log/apache2/error.log*
 	
 	rm -rf 	/var/cache/apache2/proxy \
@@ -41,7 +41,6 @@
 	restore_conffile /etc/default/apache2
 	restore_conffile /etc/apache2/ports.conf
 	restore_conffile /etc/apache2/conf.d/charset
-	rm -f /etc/apache2/ports.conf.dpkg-apache2.2-common.existed
 fi
 
 if [ "$1" = remove ] ; then

Modified: trunk/apache2/apache2.2-common.preinst
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/apache2.2-common.preinst?rev=995&op=diff
==============================================================================
--- trunk/apache2/apache2.2-common.preinst (original)
+++ trunk/apache2/apache2.2-common.preinst Sat Jul 25 20:59:40 2009
@@ -1,21 +1,4 @@
 #! /bin/sh -e
-
-# This is an evil hack around the fact that dpkg is unpacking in the
-# wrong order causing "stop" to fail.
-
-if [ -z "$2" ] && [ -e /usr/sbin/apache2 ]; then
-    if [ -x "/etc/init.d/apache2" ]; then
-        if [ -x /usr/sbin/invoke-rc.d ]; then
-                invoke-rc.d apache2 stop || true
-        else
-                /etc/init.d/apache2 stop || true
-        fi
-    fi
-    chmod -x /usr/sbin/apache2
-fi
-
-# YAY, MORE EVILNESS
-rm -f /var/lib/dpkg/info/apache2-common.postrm
 
 mv_conffile() {
 	if [ "`md5sum $1 2>/dev/null | cut -d ' ' -f 1`" = "$2" ] ; then
@@ -23,12 +6,6 @@
 		mv $1 $1.dpkg-apache2.2-common.old
 	fi
 }
-
-# we want to check in postinst whether /etc/apache2/ports.conf existed before
-# the install
-if [ -z "$2" ] && [ -e /etc/apache2/ports.conf ]; then
-	touch /etc/apache2/ports.conf.dpkg-apache2.2-common.existed
-fi
 
 if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.4-2; then
 	mv_conffile /etc/default/apache2 	9ac83f9132b78c3aa6dd4d7a583bf476

Modified: trunk/apache2/changelog
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/changelog?rev=995&op=diff
==============================================================================
--- trunk/apache2/changelog (original)
+++ trunk/apache2/changelog Sat Jul 25 20:59:40 2009
@@ -1,6 +1,8 @@
 apache2 (2.2.11-8) UNRELEASED; urgency=low
 
   * Enable hardening compile options.
+  * Remove 2.0 -> 2.2 upgrade logic from maintainer scripts.
+  * Remove other_vhosts_access.log on package purge.
 
  -- Stefan Fritsch <sf at debian.org>  Sat, 25 Jul 2009 22:27:59 +0200
 




More information about the Pkg-apache-commits mailing list