[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SRM] Please review apache2 2.2.3-4+etch1 for s-p-u



Hi,

I have prepared an apache2 update for etch r1. It fixes two RC bugs 
and adds some missing documentation. Here is the changelog:

apache2 (2.2.3-4+etch1) stable; urgency=low

  * Comment out CacheEnable by default, to prevent filling up /var.
    Document the problem in README.Debian and NEWS.Debian, point to
    htcacheclean and give a warning when doing a2enmod disk_cache
    (Closes: #423653).
  * Re-add README.Debian and describe
    - how to change "restart" to "reload" in the logrotate script
      when using SSL keys with passwords
    - the config dir layout (closes: #419552)
    - which files are ignored by Include
  * When doing a restart, wait for the server to die before trying
    to start it again. Together with the README.Debian, this
    closes: #298689 and friends.
  * Ship apache2(8) manpage

The diff is attached.

Cheers,
Stefan
diff -u apache2-2.2.3/debian/apache2.2-common.init.d apache2-2.2.3/debian/apache2.2-common.init.d
--- apache2-2.2.3/debian/apache2.2-common.init.d
+++ apache2-2.2.3/debian/apache2.2-common.init.d
@@ -89,6 +89,34 @@
 	fi
 }
 
+apache_sync_stop() {
+	# running ?
+	PIDTMP=$(pidof_apache)
+	if $(kill -0 "${PIDTMP:-}" 2> /dev/null); then
+	    PID=$PIDTMP
+	fi
+
+	apache_stop
+
+	# wait until really stopped
+	if [ -n "${PID:-}" ]; then
+		i=0
+		while $(kill -0 "${PID:-}" 2> /dev/null);  do
+        		if [[ $i == '30' ]]; then
+        			break;
+        	 	else
+        			if [[ $i == '0' ]]; then
+                			echo -n " waiting "
+        			else
+                	      		echo -n "."
+        		 	fi
+        			i=$(($i+1))
+        			sleep 2
+        	      fi
+		 done
+	fi
+}
+
 # Stupid hack to keep lintian happy. (Warrk! Stupidhack!).
 case $1 in
 	start)
@@ -129,10 +157,9 @@
 	;;
 	restart | force-reload)
 		log_begin_msg "Forcing reload of web server (apache2)..."
-		if ! apache_stop; then
+		if ! apache_sync_stop; then
                         log_end_msg 1
                 fi
-		sleep 10
 		if $APACHE2CTL start; then
                         log_end_msg 0
                 else
diff -u apache2-2.2.3/debian/a2-scripts/a2enmod apache2-2.2.3/debian/a2-scripts/a2enmod
--- apache2-2.2.3/debian/a2-scripts/a2enmod
+++ apache2-2.2.3/debian/a2-scripts/a2enmod
@@ -39,7 +39,16 @@
                 /usr/sbin/a2enmod "$i";
         done
 fi
-        
+
+if [ -e $SYSCONFDIR/mods-available/$MODNAME.conf ] ; then
+	if grep -qE '^# a2enmod-note:.*needs-configuration' \
+			$SYSCONFDIR/mods-available/$MODNAME.conf ; then
+		echo "mod_$MODNAME needs configuration before being able to work."
+		echo "See the comments in $SYSCONFDIR/mods-available/$MODNAME.conf"
+		echo "for details."
+	fi
+fi
+
 for i in conf load; do 
         if [ -e $SYSCONFDIR/mods-available/$MODNAME.$i -a ! -e $SYSCONFDIR/mods-enabled/$MODNAME.$i ]; then
         cd $SYSCONFDIR/mods-enabled;
diff -u apache2-2.2.3/debian/apache2.2-common.manpages apache2-2.2.3/debian/apache2.2-common.manpages
--- apache2-2.2.3/debian/apache2.2-common.manpages
+++ apache2-2.2.3/debian/apache2.2-common.manpages
@@ -2,0 +3 @@
+debian/apache2.8
diff -u apache2-2.2.3/debian/rules apache2-2.2.3/debian/rules
--- apache2-2.2.3/debian/rules
+++ apache2-2.2.3/debian/rules
@@ -214,6 +214,7 @@
 	dh_testroot -i 
 	dh_installdirs -i
 	dh_installdocs -i
+	ln -s ../apache2.2-common/README.Debian debian/apache2/usr/share/doc/apache2/
 	dh_installchangelogs -i CHANGES -Napache2
 	dh_installchangelogs -papache2
 	dh_compress -i
diff -u apache2-2.2.3/debian/changelog apache2-2.2.3/debian/changelog
--- apache2-2.2.3/debian/changelog
+++ apache2-2.2.3/debian/changelog
@@ -1,3 +1,21 @@
+apache2 (2.2.3-4+etch1) stable; urgency=low
+
+  * Comment out CacheEnable by default, to prevent filling up /var.
+    Document the problem in README.Debian and NEWS.Debian, point to
+    htcacheclean and give a warning when doing a2enmod disk_cache
+    (Closes: #423653). 
+  * Re-add README.Debian and describe 
+    - how to change "restart" to "reload" in the logrotate script
+      when using SSL keys with passwords
+    - the config dir layout (closes: #419552)
+    - which files are ignored by Include
+  * When doing a restart, wait for the server to die before trying
+    to start it again. Together with the README.Debian, this
+    closes: #298689 and friends.
+  * Ship apache2(8) manpage
+
+ -- Stefan Fritsch <sf@debian.org>  Wed, 13 Jun 2007 18:27:31 +0200
+
 apache2 (2.2.3-4) unstable; urgency=high
 
   * High-urgency upload for RC bugfixes.
diff -u apache2-2.2.3/debian/config-dir/mods-available/disk_cache.conf apache2-2.2.3/debian/config-dir/mods-available/disk_cache.conf
--- apache2-2.2.3/debian/config-dir/mods-available/disk_cache.conf
+++ apache2-2.2.3/debian/config-dir/mods-available/disk_cache.conf
@@ -1,6 +1,17 @@
+# a2enmod-note: needs-configuration
+
 <IfModule mod_disk_cache.c>
         CacheRoot /var/cache/apache2/mod_disk_cache
-        CacheEnable disk /
+
+# If you enable disk caching, you need to use htcacheclean from the 
+# apache2-utils package to ensure that the cache does not grow indefinitely.
+# See the htcacheclean man page for details.
+
+# There is currently no mechanism in the Debian package to start htcacheclean
+# automatically, but it is planned to add such a mechanism in the future.
+
+#        CacheEnable disk /
+
         CacheDirLevels 5
         CacheDirLength 3
 </IfModule>
only in patch2:
unchanged:
--- apache2-2.2.3.orig/debian/NEWS
+++ apache2-2.2.3/debian/NEWS
@@ -0,0 +1,24 @@
+apache2 (2.2.3-4+etch1) unstable; urgency=low
+
+  Note to
+  - users of mod_disk_cache, and
+  - users of mod_proxy who have upgraded from apache2 2.0.x (as in Debian
+    "sarge" 3.1) to 2.2.3-4 (as in Debian "etch" 4.0r0). If you are directly
+    upgrading from 2.0.x to 2.2.3-4+etch1 (Debian "etch" 4.0r1), or doing a 
+    new installation, you are not affected.
+
+  If mod_proxy was enabled at the time of the upgrade from 2.0.x to 2.2.3-4,
+  mod_disk_cache was enabled and disk caching switched on. This could lead to
+  the /var partition being filled up by the indefinitely growing disk cache.
+
+  From version 2.2.3-4+etch1, disk caching is again switched off in the
+  default configuration of mod_disk_cache, as it was in 2.0.x. If you had
+  mod_proxy enabled during the upgrade from 2.0, you should check whether
+  /var/cache/apache2/mod_disk_cache contains files that you don't want to be
+  there.
+
+  Users of mod_disk_cache should read the comments in
+  /etc/apache2/mods-available/disk_cache.conf and check that their
+  configuration is correct.
+
+ -- Stefan Fritsch <sf@debian.org>  Wed, 13 Jun 2007 19:53:03 +0200
only in patch2:
unchanged:
--- apache2-2.2.3.orig/debian/README.Debian
+++ apache2-2.2.3/debian/README.Debian
@@ -0,0 +1,121 @@
+Contents
+========
+
+	Apache2 Configuration under Debian GNU/Linux
+		Files and Directories in /etc/apache2
+		Tools
+
+	Using mod_disk_cache
+	
+	Using SSL keys with passwords /	Restarting Apache during logrotate
+
+
+Apache2 Configuration under Debian GNU/Linux
+============================================
+
+Debian's default Apache2 installation attempts to make adding and
+removing modules, virtual hosts, and extra configuration directives as
+flexible is possible, in order to make automating the changes and
+administering the server as easy as possible.
+
+Files and Directories in /etc/apache2:
+-------------------------------------
+
+apache2.conf
+
+	This is the main configuration file.
+
+conf.d/
+
+	Files in this directory are included by this line in
+	apache2.conf:
+
+	# Include generic snippets of statements
+	Include /etc/apache2/conf.d
+
+	This is a good place to add additional configuration
+	directives.
+
+httpd.conf
+
+	Empty file.
+
+magic
+
+	Empty file.
+
+mods-available/
+
+	This directory contains a series of .load and .conf files.
+	The .load files contain the Apache configuration directive
+	necessary to load the module in question.  The respective
+	.conf files contain configuration directives necessary to
+	utilize the module in question.
+
+mods-enabled/
+
+	To actually enable a module for Apache2, it is necessary to
+	create a symlink in this directory to the .load (and .conf, if
+	it exists) files associated with the module in
+	mods-available/.  For example:
+
+	cgi.load -> /etc/apache2/mods-available/cgi.load
+
+ports.conf
+
+	Configuration directives for which ports and IP addresses to
+	listen to.
+
+sites-available/
+
+	Like mods-available/, except it contains configuration
+	directives for different virtual hosts that might be used with
+	apache2.  Note that the hostname doesn't have to correspond
+	exactly with the filename.  'default' is the default host.
+
+sites-enabled/
+
+	Similar in functionality to mods-enabled/, sites-enabled
+	contains symlinks to sites in sites-available/ that the
+	admnistrator wishes to enable.
+
+	Example:
+	dedasys -> /etc/apache2/sites-available/dedasys
+
+The Include directive ignores files with names that
+
+- do not begin with a letter or number
+- contain a character that is neither letter nor number nor _-.
+- contain .dpkg
+
+Tools
+-----
+
+a2enmod and a2dismod are available for enabling and disabling modules utilizing
+the above configuration system.
+
+a2ensite and a2dissite do essentially the same thing as the above tools, but
+for sites rather than modules.
+
+
+Using mod_disk_cache
+====================
+
+You need to enable caching in /etc/apache2/mods-enabled/disk_cache.conf . To
+prevent the disk cache to grow indefinitely, you have to use htcacheclean from
+the apache2-utils package. There is currently no mechanism in the Debian
+package to start htcacheclean automatically. See the htcacheclean man page for
+details.
+
+
+Using SSL keys with passwords / Restarting Apache during logrotate
+==================================================================
+
+Since a graceful reload (/etc/init.d/apache2 reload) does not work reliably in
+all situations, we use restart during logrotate. Since 2.2.3-5, we use 2.2's new
+graceful-stop feature, so that restart should work even if apache is slow to
+stop.
+
+However, "/etc/init.d/apache2 restart" will not work if you use a SSL key file
+with password. In this case you need to change the "restart" in
+/etc/logrotate.d/apache2 to "reload".

Attachment: pgp5e64QgIazo.pgp
Description: PGP signature


Reply to: