From: Philip M. Gollucci Date: Fri, 7 May 2010 20:43:34 +0000 (+0000) Subject: - Backports r942209 X-Git-Tag: 2.0.64~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f63f31756006018dc3393bbe92efc006b1ca500e;p=thirdparty%2Fapache%2Fhttpd.git - Backports r942209 ix 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) As previously discussed with wrowe, treast this the same way roy treats mime.types git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@942211 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 9b33b1ffb41..0f486965fad 100644 --- a/CHANGES +++ b/CHANGES @@ -25,6 +25,9 @@ Changes with Apache 2.0.64 *) Add Set-Cookie and Set-Cookie2 to the list of headers allowed to pass through on a 304 response. [Nick Kew] + *) apxs: Fix -A and -a options to ignore whitespace in httpd.conf + [Philip M. Gollucci] + Changes with Apache 2.0.63 *) winnt_mpm: Resolve modperl issues by redirecting console mode stdout diff --git a/support/apxs.in b/support/apxs.in index 16f71b1cf04..135544cc2a7 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -548,7 +548,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 , so that the new LoadModule # directive always appears *outside* of an . @@ -611,7 +614,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]");