[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] work towards porting davautocheck.sh for httpd trunk

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2006-03-02 20:22:19 CET

This is not at all a finished work, but sharing of a patch in
progress. Thought maxb or rooneg might be interested in the
interim...I'm not actively pursuing it ATM.

The wget request in davautocheck.sh which validates that httpd is
functional per the generated httpd.conf fails -- it downloads a zero
length file. I'm assuming that this is due to a mis-configuration of
httpd.conf. If you comment out the wget validation, the command-line
tests pass (all but one, last I checked).

[[[
Allow davautocheck.sh to work with httpd trunk (2.3.x) through 2.0.x.

* subversion/tests/cmdline/davautocheck.sh

  (cleanup): Renamed from trap_cleanup(), since we seem to need to
   call it explicitly from fail() too.

  (fail): Call cleanup() to assure the PID is reaped.

  (LOAD_MOD_*, ...): Find and load modules for latest revision of
   httpd's authn/authz implementation.

  (Directory $HTTP_ROOT): Add "Require all granted" directive.
]]]

Index: subversion/tests/cmdline/davautocheck.sh
===================================================================
--- subversion/tests/cmdline/davautocheck.sh (revision 18687)
+++ subversion/tests/cmdline/davautocheck.sh (working copy)
@@ -41,9 +41,9 @@
 SCRIPTDIR=$(dirname $0)
 SCRIPT=$(basename $0)
 
-trap trap_cleanup SIGHUP SIGTERM SIGINT
+trap cleanup SIGHUP SIGTERM SIGINT
 
-function trap_cleanup() {
+function cleanup() {
     [ -e "$HTTPD_PID" ] \
       && kill $(cat "$HTTPD_PID")
     exit 1
@@ -55,6 +55,7 @@
 
 function fail() {
   say $*
+ cleanup
   exit 1
 }
 
@@ -157,15 +158,25 @@
 LOAD_MOD_MIME=$(get_loadmodule_config mod_mime) \
   || fail "MIME module not found"
 
-# needed for Auth*
+# needed for Auth*, Require, etc.
 LOAD_MOD_AUTH=$(get_loadmodule_config mod_auth) \
   || {
 say "Monolithic Auth module not found. Assuming we run against Apache 2.1+"
 LOAD_MOD_AUTH="$(get_loadmodule_config mod_auth_basic)" \
     || fail "Auth_Basic module not found."
-LOAD_MOD_AUTHN="$(get_loadmodule_config mod_authn_file)" \
+LOAD_MOD_ACCESS_COMPAT="$(get_loadmodule_config mod_access_compat)" \
+ && {
+say "Found Auth modules for Apache 2.3.0+"
+LOAD_MOD_AUTHN_CORE="$(get_loadmodule_config mod_authn_core)" \
+ || fail "Authn_Core module not found."
+LOAD_MOD_AUTHZ_CORE="$(get_loadmodule_config mod_authz_core)" \
+ || fail "Authz_Core module not found."
+LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
+ || fail "Authz_Host module not found."
+}
+LOAD_MOD_AUTHN_FILE="$(get_loadmodule_config mod_authn_file)" \
     || fail "Authn_File module not found."
-LOAD_MOD_AUTHZ="$(get_loadmodule_config mod_authz_user)" \
+LOAD_MOD_AUTHZ_USER="$(get_loadmodule_config mod_authz_user)" \
     || fail "Authz_User module not found."
 }
 
@@ -195,8 +206,11 @@
 $LOAD_MOD_LOG_CONFIG
 $LOAD_MOD_MIME
 $LOAD_MOD_AUTH
-$LOAD_MOD_AUTHN
-$LOAD_MOD_AUTHZ
+$LOAD_MOD_AUTHN_CORE
+$LOAD_MOD_AUTHN_FILE
+$LOAD_MOD_AUTHZ_CORE
+$LOAD_MOD_AUTHZ_USER
+$LOAD_MOD_AUTHZ_HOST
 LockFile lock
 User $(whoami)
 Group $(groups | awk '{print $1}')
@@ -225,6 +239,7 @@
 </Directory>
 <Directory "$HTTPD_ROOT">
   AllowOverride none
+ Require all granted
 </Directory>
 
 <Location /svn-test-work/repositories>
@@ -256,7 +271,10 @@
 
 say "HTTPD started and listening on '$BASE_URL'..."
 
-# use wget to download configuration file through HTTPD and compare it to the original
+# Use wget to download configuration file through HTTPD and compare it
+# to the original.
+### No cfg file can be d/l'd with Apache 2.3 -- 500 ISE!
+### [Wed Feb 22 13:06:55 2006] [crit] [client 127.0.0.1] configuration error: couldn't check user: /cfg
 wget -q -O "$HTTPD_CFG-copy" "$BASE_URL/cfg"
 diff -q "$HTTPD_CFG" "$HTTPD_CFG-copy" \
   || fail "HTTPD doesn't operate according to the configuration"

  • application/pgp-signature attachment: stored
Received on Thu Mar 2 20:24:15 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.