[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. 9ec48db0b5d22d0a589e3b13eb011d1ecc1a1d56

Arno Töll arno at debian.org
Thu Apr 26 23:01:12 UTC 2012


The following commit has been merged in the next branch:
commit 204187b5043151a18d151e7e1d9f9d7265e37a35
Author: Arno Töll <arno at debian.org>
Date:   Thu Apr 26 01:36:50 2012 +0200

    Move state files to /var/run/apache2 (leave /run for Wheezy+1)
    Smallish updates in the init script

diff --git a/debian/apache2.init b/debian/apache2.init
index c3f4985..b102ba1 100644
--- a/debian/apache2.init
+++ b/debian/apache2.init
@@ -13,6 +13,11 @@
 
 set -e
 
+if [ ! -x "/usr/sbin/apache2" ] ; then
+	exit 0
+fi
+
+
 SCRIPTNAME="${0##*/}"
 SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}"
 if [ -n "$APACHE_CONFDIR" ] ; then
@@ -50,15 +55,6 @@ HTCACHECLEAN_DAEMON_INTERVAL=120
 HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_cache_disk
 HTCACHECLEAN_OPTIONS=""
 
-APACHE_HTTPD=$(. $APACHE_ENVVARS && echo $APACHE_HTTPD)
-if [ -z "$APACHE_HTTPD" ] ; then
-	APACHE_HTTPD=/usr/sbin/apache2
-fi
-if [ ! -x $APACHE_HTTPD ] ; then
-	echo "No apache MPM package installed"
-	exit 0
-fi
-
 . /lib/lsb/init-functions
 
 test -f /etc/default/rcS && . /etc/default/rcS
@@ -72,12 +68,13 @@ fi
 APACHE2CTL="$ENV /usr/sbin/apache2ctl"
 HTCACHECLEAN="$ENV /usr/sbin/htcacheclean"
 
-PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE)
+PIDFILE=$(. $APACHE_ENVVARS && echo ${APACHE_PID_FILE})
+RUNUSER=$(. $APACHE_ENVVARS && echo ${APACHE_RUN_USER:-www-data})
 if [ -z "$PIDFILE" ] ; then
 	echo ERROR: APACHE_PID_FILE needs to be defined in $APACHE_ENVVARS >&2
 	exit 2
 fi
-
+[ ! -d `dirname "$PIDFILE"` ] && install -d -o "$RUNUSER" `dirname "$PIDFILE"`
 
 check_htcacheclean() {
 	[ "$HTCACHECLEAN_MODE" = "daemon" ] || return 1
@@ -88,7 +85,7 @@ check_htcacheclean() {
 	[ "$HTCACHECLEAN_RUN"  = "auto" \
 	  -a -e ${MODSDIR:-$APACHE_CONFDIR/mods-enabled}/cache_disk.load ] && \
 		return 0
-	
+
 	return 1
 }
 
@@ -96,7 +93,7 @@ start_htcacheclean() {
 	if [ ! -d "$HTCACHECLEAN_PATH" ] ; then
 		echo "... directory $HTCACHECLEAN_PATH does not exist!" >&2
 		return 1
-	fi	
+	fi
 	$HTCACHECLEAN $HTCACHECLEAN_OPTIONS -d$HTCACHECLEAN_DAEMON_INTERVAL \
 			-i -p$HTCACHECLEAN_PATH -l$HTCACHECLEAN_SIZE
 }
diff --git a/debian/changelog b/debian/changelog
index a5749c2..29b9372 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ apache2 (2.4.2-2) experimental; urgency=low
 
   * UNRELEASED
 
-  [ Stefan Fritsc ]
+  [ Stefan Fritsch ]
   * Explicitly enable mod_authz_core on upgrades. It can happen that it is
     not pulled in by any of the enabled modules, but we need it in any case
     for apache2.conf. Closes: #669876
@@ -16,8 +16,11 @@ apache2 (2.4.2-2) experimental; urgency=low
   * Formulate several clarifications in PACKAGING, start versioning this document
     and add normative read hints. Moreover, document the -m switch for a2enmod.
   * Merge spelling and grammar fixes provided by Justin B Rye. Much appreciated!
+  * Change various state and run directories used by Apache from
+    /var/run/<basename> to /var/run/apache2/<basename>. This might change again
+    for Wheezy+1 to adopt /run.
 
- -- Arno Töll <arno at debian.org>  Tue, 24 Apr 2012 19:42:00 +0200
+ -- Arno Töll <arno at debian.org>  Thu, 26 Apr 2012 00:51:22 +0200
 
 apache2 (2.4.2-1) experimental; urgency=low
 
diff --git a/debian/config-dir/envvars b/debian/config-dir/envvars
index 0a4cc94..ff6703d 100644
--- a/debian/config-dir/envvars
+++ b/debian/config-dir/envvars
@@ -15,9 +15,10 @@ fi
 # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
 export APACHE_RUN_USER=www-data
 export APACHE_RUN_GROUP=www-data
-export APACHE_PID_FILE=/var/run/apache2$SUFFIX.pid
-export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
-export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
+# temporary state file location. This might be changed to /run in Wheezy+1
+export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
+export APACHE_RUN_DIR=/var/run/apache2/$SUFFIX
+export APACHE_LOCK_DIR=/var/lock/apache2/$SUFFIX
 # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
 export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
 

-- 
Debian packaging for apache2 (Apache HTTPD 2.x)



More information about the Pkg-apache-commits mailing list