httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Merz" <mm...@gmx.de>
Subject Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h
Date Sat, 26 Sep 2009 06:33:51 GMT
Bill,

"William A. Rowe, Jr." <wrowe@rowe-clan.net> schrieb im Newsbeitrag 
news:4ABD5A7A.90601@rowe-clan.net...
> Ruediger Pluem wrote:
>>
...

>>>> # apxs2-prefork -c fcgid_proc_unix.c
>>>> /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic
>>>> -march=i586 -mtune=i686 -fmessage-length=0 -Wall-D_FORTIFY_SOURCE=2
>>>> -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
>>>> -DLDAP_DEPRECATED  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
>>>> -D_LARGEFILE64_SOURCE -pthread -I/usr/include/apache2-prefork
>>
>> Here it sets the correct one: -I/usr/include/apache2-prefork
>>
>> No idea why. Just an observation.
>
> A diff between httpd stock apxs.in and apxs-prefork shipped by suse might 
> explain a lot.
>
> Guessing they have hacked apxs rather than hacking config_vars.mk (a 
> mistake on their
> part).
>
>

I just did a ':/usr/local/src # wget 
http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/support/apxs.in ' 
and compared it against my /usr/sbin/apxs2-prefork (which i copied to 
/usr/local/src):

:/usr/local/src # diff -u apxs.in apxs2-prefork
--- apxs.in     2007-05-23 15:33:04.000000000 +0200
+++ apxs2-prefork       2009-09-26 08:25:02.000000000 +0200
@@ -1,4 +1,4 @@
-#!@perlbin@ -w
+#!/usr/bin/perl -w
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -25,8 +25,9 @@

 my %config_vars = ();

-my $installbuilddir = "@exp_installbuilddir@";
-get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
+my $mpm_suffix = "-prefork";
+my $installbuilddir = "/usr/share/apache2/build";
+get_config_vars("$installbuilddir/config_vars.mk$mpm_suffix",\%config_vars);

 # read the configuration variables once

@@ -527,105 +528,14 @@

     #   activate module via LoadModule/AddModule directive
     if ($opt_a or $opt_A) {
-        if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
-            error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not 
found");
-            exit(1);
-        }
-
-        open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
-        my $content = join('', <FP>);
-        close(FP);
-
-        if ($content !~ m|\n#?\s*LoadModule\s+|) {
-            error("Activation failed for custom 
$CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
-            error("At least one `LoadModule' directive already has to 
exist.");
-            exit(1);
-        }

         my $lmd;
         my $c = '';
         $c = '#' if ($opt_A);
         foreach $lmd (@lmd) {
-            my $what = $opt_A ? "preparing" : "activating";
-            if ($content !~ m|\n#?\s*$lmd|) {
-                # check for open <containers>, so that the new LoadModule
-                # directive always appears *outside* of an <container>.
-
-                my $before = ($content =~ 
m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0];
-
-                # the '()=' trick forces list context and the scalar
-                # assignment counts the number of list members (aka number
-                # of matches) then
-                my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg);
-                my $cntclose = () = ($before =~ m|^\s*</.*$|mg);
-
-                if ($cntopen == $cntclose) {
-                    # fine. Last LoadModule is contextless.
-                    $content =~ 
s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|s;
-                }
-                elsif ($cntopen < $cntclose) {
-                    error('Configuration file is not valid. There are 
sections'
-                          . ' closed before opened.');
-                    exit(1);
-                }
-                else {
-                    # put our cmd after the section containing the last
-                    # LoadModule.
-                    my $found =
-                    $content =~ s!\A (               # string and capture 
start
-                                  (?:(?:
-                                    ^\s*             # start of conf line 
with a
-                                    (?:[^<]|<[^/])   # directive which does 
not
-                                                     # start with '</'
-
-                                    .*(?:$)\n        # rest of the line.
-                                                     # the '$' is in 
parentheses
-                                                     # to avoid 
misinterpreting
-                                                     # the string "$\" as
-                                                     # perl variable.
-
-                                    )*               # catch as much as 
possible
-                                                     # of such lines. 
(including
-                                                     # zero)
-
-                                    ^\s*</.*(?:$)\n? # after the above, we
-                                                     # expect a config line 
with
-                                                     # a closing container 
(</)
-
-                                  ) {$cntopen}       # the whole pattern 
(bunch
-                                                     # of lines that end up 
with
-                                                     # a closing directive) 
must
-                                                     # be repeated $cntopen
-                                                     # times. That's it.
-                                                     # Simple, eh? ;-)
-
-                                  )                  # capture end
-                                 !$1$c$lmd\n!mx;
-
-                    unless ($found) {
-                        error('Configuration file is not valid. There are '
-                              . 'sections opened and not closed.');
-                        exit(1);
-                    }
-                }
-            } else {
-                # replace already existing LoadModule line
-                $content =~ s|^(.*\n)#?\s*$lmd[^\n]*\n|$1$c$lmd\n|s;
-            }
-            $lmd =~ m|LoadModule\s+(.+?)_module.*|;
-            notice("[$what module `$1' in 
$CFG_SYSCONFDIR/$CFG_TARGET.conf]");
+           print "activating " . $name . "\n";
+           system("a2enmod " . $name);
         }
-        if (@lmd) {
-            if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
-                print FP $content;
-                close(FP);
-                system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf 
$CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
-                       "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new 
$CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
-                       "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
-            } else {
-                notice("unable to open configuration file");
-            }
-       }
     }
 }






Mime
View raw message