httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r942209 - in /httpd/httpd/trunk: CHANGES support/apxs.in
Date Fri, 07 May 2010 20:36:15 GMT
Author: pgollucci
Date: Fri May  7 20:36:14 2010
New Revision: 942209

URL: http://svn.apache.org/viewvc?rev=942209&view=rev
Log:
Fix the following:
$> grep -e autoindex_ -e cgi_ httpd.conf
LoadModule autoindex_module libexec/apache22/mod_autoindex.so
LoadModule cgi_module libexec/apache22/mod_cgi.so


fire up the following commands

$> apxs -e -a -n autoindex mod_autoindex.so
[activating module `autoindex' in /usr/local/etc/apache22/httpd.conf]
$> apxs -e -a -n cgi mod_cgi.so
[activating module `cgi' in /usr/local/etc/apache22/httpd.conf]

This will result into the following httpd.conf

$> grep -e autoindex_ -e cgi_ httpd.conf
LoadModule autoindex_module libexec/apache22/mod_autoindex.so
LoadModule cgi_module libexec/apache22/mod_cgi.so
LoadModule autoindex_module libexec/apache22/mod_autoindex.so
LoadModule cgi_module libexec/apache22/mod_cgi.so


As you notice the modules are now loaded twice

Now try to deactivate for the loaded ssl module

$> grep ssl_ httpd.conf
LoadModule ssl_module libexec/apache22/mod_ssl.so

$> apxs -e -A -n ssl mod_ssl.so
[preparing module `ssl' in /usr/local/etc/apache22/httpd.conf]

$> grep ssl_ httpd.conf
LoadModule ssl_module libexec/apache22/mod_ssl.so
#LoadModule ssl_module libexec/apache22/mod_ssl.so

As reported in FreeBSD ports PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/133704
Previously discussed with: wrowe@

This b/c '$lmd' expects the amount of space to be a fixed amount.  Use \s+ to make
any valid httpd.conf syntax work (i.e. at least 1 space)


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/support/apxs.in

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=942209&r1=942208&r2=942209&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri May  7 20:36:14 2010
@@ -137,6 +137,9 @@ Changes with Apache 2.3.7
      by using HTTP CONNECT.  PR 19188.  
      [Philippe Dutrueux <lilas evidian.com>, Rainer Jung]
 
+  *) apxs: Fix -A and -a options to ignore whitespace in httpd.conf
+     [Philip M. Gollucci]
+
 Changes with Apache 2.3.6
 
   *) worker: Don't report server has reached MaxClients until it has.

Modified: httpd/httpd/trunk/support/apxs.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/apxs.in?rev=942209&r1=942208&r2=942209&view=diff
==============================================================================
--- httpd/httpd/trunk/support/apxs.in (original)
+++ httpd/httpd/trunk/support/apxs.in Fri May  7 20:36:14 2010
@@ -568,7 +568,10 @@ if ($opt_i or $opt_e) {
         $c = '#' if ($opt_A);
         foreach $lmd (@lmd) {
             my $what = $opt_A ? "preparing" : "activating";
-            if ($content !~ m|\n#?\s*$lmd|) {
+            my $lmd_re = $lmd;
+            $lmd_re =~ s/\s+/\\s+/g;
+
+            if ($content !~ m|\n#?\s*$lmd_re|) {
                 # check for open <containers>, so that the new LoadModule
                 # directive always appears *outside* of an <container>.
 
@@ -631,7 +634,7 @@ if ($opt_i or $opt_e) {
                 }
             } else {
                 # replace already existing LoadModule line
-                $content =~ s|^(.*\n)#?\s*$lmd[^\n]*\n|$1$c$lmd\n|s;
+                $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
             }
             $lmd =~ m|LoadModule\s+(.+?)_module.*|;
             notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");



Mime
View raw message