[Pkg-apache-commits] r1177 - in /trunk/apache2: apache2.2-common.postinst apache2.2-common.preinst changelog config-dir/apache2.conf config-dir/conf.d/other-vhosts-access-log
sf at alioth.debian.org
sf at alioth.debian.org
Wed Apr 14 20:24:23 UTC 2010
Author: sf
Date: Wed Apr 14 20:24:22 2010
New Revision: 1177
URL: http://svn.debian.org/wsvn/pkg-apache/?sc=1&rev=1177
Log:
Move definition of other_vhosts_access.log to new config file
/etc/apache2/conf.d/other-vhosts-access-log, but disable it
if it has been disabled by the admin.
Added:
trunk/apache2/config-dir/conf.d/other-vhosts-access-log
Modified:
trunk/apache2/apache2.2-common.postinst
trunk/apache2/apache2.2-common.preinst
trunk/apache2/changelog
trunk/apache2/config-dir/apache2.conf
Modified: trunk/apache2/apache2.2-common.postinst
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/apache2.2-common.postinst?rev=1177&op=diff
==============================================================================
--- trunk/apache2/apache2.2-common.postinst (original)
+++ trunk/apache2/apache2.2-common.postinst Wed Apr 14 20:24:22 2010
@@ -77,6 +77,15 @@
a2enmod -q reqtimeout
fi
+# The definition of other_vhost_access.log has been moved.
+# Disable the new definition if the admin has changed the old
+# one (as determined by preinst).
+if [ -e /etc/apache2/disable-other-vhost-access-log.dpkg-apache2.2-common ] ; then
+ echo "Disabling /etc/apache2/conf.d/other-vhosts-access-log"
+ perl -p -i -e 's/^(CustomLog.*)$/#$1/' /etc/apache2/conf.d/other-vhosts-access-log
+ rm /etc/apache2/disable-other-vhost-access-log.dpkg-apache2.2-common
+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
Modified: trunk/apache2/apache2.2-common.preinst
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/apache2.2-common.preinst?rev=1177&op=diff
==============================================================================
--- trunk/apache2/apache2.2-common.preinst (original)
+++ trunk/apache2/apache2.2-common.preinst Wed Apr 14 20:24:22 2010
@@ -14,4 +14,15 @@
mv_conffile /etc/apache2/conf.d/charset 641239a7d2d172856cb1413a47d2e142
fi
+if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.15-4~ ; then
+ # The definition of other_vhosts_access.log has been moved from
+ # apache2.conf to conf.d/other-vhosts-access-log. If the admin has
+ # removed it from apache2.conf, mark it to be disabled in
+ # conf.d/other-vhosts-access-log in the postinst.
+ if !egrep '^ *CustomLog.*other_vhosts_access.log vhost_combined$' /etc/apache2/apache2.conf
+ then
+ touch /etc/apache2/disable-other-vhost-access-log.dpkg-apache2.2-common
+ fi
+fi
+
#DEBHELPER#
Modified: trunk/apache2/changelog
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/changelog?rev=1177&op=diff
==============================================================================
--- trunk/apache2/changelog (original)
+++ trunk/apache2/changelog Wed Apr 14 20:24:22 2010
@@ -1,5 +1,8 @@
apache2 (2.2.15-4) UNRELEASED; urgency=low
+ * Move definition of other_vhosts_access.log to new config file
+ /etc/apache2/conf.d/other-vhosts-access-log, but disable it
+ if it has been disabled by the admin. Closes: #576572. LP: #507616
* Simplify logrotate script. Closes: #576105
* Remove empty directory /usr/lib/debug/usr/sbin in mpm packages.
Closes: #576089
Modified: trunk/apache2/config-dir/apache2.conf
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/config-dir/apache2.conf?rev=1177&op=diff
==============================================================================
--- trunk/apache2/config-dir/apache2.conf (original)
+++ trunk/apache2/config-dir/apache2.conf Wed Apr 14 20:24:22 2010
@@ -220,11 +220,6 @@
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
-#
-# Define an access log for VirtualHosts that don't define their own logfile
-CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined
-
-
# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.
Added: trunk/apache2/config-dir/conf.d/other-vhosts-access-log
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/config-dir/conf.d/other-vhosts-access-log?rev=1177&op=file
==============================================================================
--- trunk/apache2/config-dir/conf.d/other-vhosts-access-log (added)
+++ trunk/apache2/config-dir/conf.d/other-vhosts-access-log Wed Apr 14 20:24:22 2010
@@ -1,0 +1,2 @@
+# Define an access log for VirtualHosts that don't define their own logfile
+CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined
More information about the Pkg-apache-commits
mailing list