You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Aaron Bannert <aa...@clove.org> on 2001/10/02 01:59:20 UTC

[PATCH] some STATUS info, volunteering

I've been fooling around with this for the last week or so and I have
some more clues:

- any module that is declared with APACHE_MODULE(.... most) while we have
  --enable-mods-shared=most is properly build into a DSO.

- if the module is declared with APACHE_MODULE(.... yes) then it doesn't
  ever get the chance to become a DSO. The current workaround is to
  explicitly declare --enable-foo=shared for each module that currently
  defaults to static.

I can't just take --enable-mods-shared=most and convert all
APACHE_MODULE(.... yes) decls into "most" or "shared", because there
are some modules that can not or should not be compiled as DSOs, like
mod_so and mod_http.

I'll try to come up with something in the next couple days.

-aaron


Index: STATUS
===================================================================
RCS file: /home/cvspublic/httpd-2.0/STATUS,v
retrieving revision 1.297
diff -u -r1.297 STATUS
--- STATUS	2001/09/28 17:53:02	1.297
+++ STATUS	2001/10/01 23:46:23
@@ -101,6 +101,10 @@
 
         This builds mod_headers as a DSO (good) but builds mod_mime
         as a compiled-in module (bad).
+        Status: Aaron says this happens because mod_headers defaults to
+                "most" while mod_mime defaults to "yes". All mods that
+                default to "yes" are being compiled-in, actually.
+                Aaron volunteers.
 
     * revamp the input filter semantics, per discussions since
       February (and especially at the hackathon last

Re: [PATCH] some STATUS info, volunteering

Posted by Ryan Bloom <rb...@covalent.net>.
On Monday 01 October 2001 05:42 pm, Aaron Bannert wrote:
> On Mon, Oct 01, 2001 at 05:31:48PM -0700, Roy Fielding wrote:
> > On Mon, Oct 01, 2001 at 04:59:20PM -0700, Aaron Bannert wrote:
> > > I've been fooling around with this for the last week or so and I have
> > > some more clues:
> > >
> > > - any module that is declared with APACHE_MODULE(.... most) while we
> > > have --enable-mods-shared=most is properly build into a DSO.
> > >
> > > - if the module is declared with APACHE_MODULE(.... yes) then it
> > > doesn't ever get the chance to become a DSO. The current workaround is
> > > to explicitly declare --enable-foo=shared for each module that
> > > currently defaults to static.
> >
> > I thought that was by design -- "yes" means it must always be
> > compiled-in.
>
> I don't know if it's really clearly defined anywhere, but I always took
> "yes" to mean enable it, and --enable-mods-shared=most/yes to mean
> "take all those enabled modules and make them shared".
>
> Would another setting of "static" be a good compromise? That
> way mod_mime and mod_http can default to static even if you do
> --enable-mods-shared=most/all, and then the others will become DSOs
> if that same parameter is set.

I would have no problem using static in that macro to denote that a module
must be compiled staticly.  I would suggest actually reviewing all of the options
to that macro.  I am willing to bet that some of them are redundant.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: [PATCH] fix --enable-mods-shared=most for compiled-in modules

Posted by Ryan Bloom <rb...@covalent.net>.
On Tuesday 02 October 2001 11:29 am, Aaron Bannert wrote:

Committed.

Thanks,

Ryan

> On Mon, Oct 01, 2001 at 09:20:41PM -0700, Ryan Bloom wrote:
> > We should fix the configure script so that it automatically adds the
> > LoadModule line, just like it did in 1.3.
>
> This patch fixes the problem described in the STATUS file whereby modules
> that are compiled-in by default would not be enabled as DSOs when the
> --enable-mods-shared=most parameter was passed to configure.
>
> A new enable state was invented: "static". This is specified as a param
> to the APACHE_MODULE() macro to specify that a particular module shall
> not be compiled as a DSO (unless specifically overridden by name). mod_so
> and mod_http have been set to "static" in this patch.
>
> This patch should not affect anyone who normally omits
> --enable-mods-shared from their configure parameters.
>
> I will follow up this patch in a few days with a patch to have configure
> properly build the LoadModule directives for httpd.conf at install time
> (as noted by Ryan above and in the STATUS diff below)...
>
> -aaron
>
>
> Index: STATUS
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/STATUS,v
> retrieving revision 1.297
> diff -u -r1.297 STATUS
> --- STATUS	2001/09/28 17:53:02	1.297
> +++ STATUS	2001/10/02 18:17:28
> @@ -95,12 +95,9 @@
>        to make it agree with the operation of the StartServers
>        directive.
>
> -    * configure --enable-mods-shared=most option has issues.  Example:
> -
> -      ./configure --enable-mods-shared=most
> -
> -        This builds mod_headers as a DSO (good) but builds mod_mime
> -        as a compiled-in module (bad).
> +    * Fix the configure script to add a LoadModule directive to
> +      the default httpd.conf for any module that was compiled
> +      as a DSO.
>
>      * revamp the input filter semantics, per discussions since
>        February (and especially at the hackathon last
> Index: acinclude.m4
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/acinclude.m4,v
> retrieving revision 1.101
> diff -u -r1.101 acinclude.m4
> --- acinclude.m4	2001/09/30 07:57:14	1.101
> +++ acinclude.m4	2001/10/02 18:17:29
> @@ -199,6 +199,7 @@
>  dnl   yes  -- enabled by default. user must explicitly disable.
>  dnl   no   -- disabled under default, most, all. user must explicitly
> enable. dnl   most -- disabled by default. enabled explicitly or with most
> or all. +dnl   static -- enabled as static by default, must be explicitly
> changed. dnl   ""   -- disabled under default, most. enabled explicitly or
> with all. dnl
>  dnl basically: yes/no is a hard setting. "most" means follow the "most"
> @@ -218,11 +219,16 @@
>    else
>      _apmod_error_fatal="yes"
>    fi
> -  if test "$enable_$1" = "most"; then
> +  if test "$enable_$1" = "static"; then
> +    enable_$1=yes
> +  elif test "$enable_$1" = "yes"; then
> +    enable_$1=$module_default
> +    _apmod_extra_msg=" ($module_selection)"
> +  elif test "$enable_$1" = "most"; then
>      if test "$module_selection" = "most" -o "$module_selection" = "all";
> then enable_$1=$module_default
>        _apmod_extra_msg=" ($module_selection)"
> -    else
> +    elif test "$enable_$1" != "yes"; then
>        enable_$1=no
>      fi
>    elif test "$enable_$1" = "maybe-all"; then
> Index: modules/http/config2.m4
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/modules/http/config2.m4,v
> retrieving revision 1.1
> diff -u -r1.1 config2.m4
> --- modules/http/config2.m4	2001/04/18 20:56:04	1.1
> +++ modules/http/config2.m4	2001/10/02 18:17:29
> @@ -4,7 +4,8 @@
>
>  http_objects="http_core.lo http_protocol.lo http_request.lo"
>
> -APACHE_MODULE(http, HTTP protocol handling, $http_objects, , yes)
> +dnl mod_http freaks out when built as a DSO
> +APACHE_MODULE(http, HTTP protocol handling, $http_objects, , static)
>  APACHE_MODULE(mime, mapping of file-extension to MIME, , , yes)
>
>  APACHE_MODPATH_FINISH
> Index: modules/mappers/config9.m4
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/modules/mappers/config9.m4,v
> retrieving revision 1.3
> diff -u -r1.3 config9.m4
> --- modules/mappers/config9.m4	2001/04/29 05:24:10	1.3
> +++ modules/mappers/config9.m4	2001/10/02 18:17:29
> @@ -23,7 +23,7 @@
>  dnl ### it here. we need to shift *this* config.m4 to be "last" or we
>  dnl ### need to find a different way to set up this default and module
> spec. if test "$sharedobjs" = "yes"; then
> -    APACHE_MODULE(so, DSO capability, , , yes)
> +    APACHE_MODULE(so, DSO capability, , , static)
>  else
>      APACHE_MODULE(so, DSO capability, , , no)
>  fi

-- 

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

[PATCH] fix --enable-mods-shared=most for compiled-in modules

Posted by Aaron Bannert <aa...@clove.org>.
On Mon, Oct 01, 2001 at 09:20:41PM -0700, Ryan Bloom wrote:
> We should fix the configure script so that it automatically adds the LoadModule
> line, just like it did in 1.3.


This patch fixes the problem described in the STATUS file whereby modules
that are compiled-in by default would not be enabled as DSOs when the
--enable-mods-shared=most parameter was passed to configure.

A new enable state was invented: "static". This is specified as a param
to the APACHE_MODULE() macro to specify that a particular module shall
not be compiled as a DSO (unless specifically overridden by name). mod_so
and mod_http have been set to "static" in this patch.

This patch should not affect anyone who normally omits
--enable-mods-shared from their configure parameters.

I will follow up this patch in a few days with a patch to have configure
properly build the LoadModule directives for httpd.conf at install time
(as noted by Ryan above and in the STATUS diff below)...

-aaron


Index: STATUS
===================================================================
RCS file: /home/cvspublic/httpd-2.0/STATUS,v
retrieving revision 1.297
diff -u -r1.297 STATUS
--- STATUS	2001/09/28 17:53:02	1.297
+++ STATUS	2001/10/02 18:17:28
@@ -95,12 +95,9 @@
       to make it agree with the operation of the StartServers
       directive.
 
-    * configure --enable-mods-shared=most option has issues.  Example: 
-
-      ./configure --enable-mods-shared=most
-
-        This builds mod_headers as a DSO (good) but builds mod_mime
-        as a compiled-in module (bad).
+    * Fix the configure script to add a LoadModule directive to
+      the default httpd.conf for any module that was compiled
+      as a DSO.
 
     * revamp the input filter semantics, per discussions since
       February (and especially at the hackathon last
Index: acinclude.m4
===================================================================
RCS file: /home/cvspublic/httpd-2.0/acinclude.m4,v
retrieving revision 1.101
diff -u -r1.101 acinclude.m4
--- acinclude.m4	2001/09/30 07:57:14	1.101
+++ acinclude.m4	2001/10/02 18:17:29
@@ -199,6 +199,7 @@
 dnl   yes  -- enabled by default. user must explicitly disable.
 dnl   no   -- disabled under default, most, all. user must explicitly enable.
 dnl   most -- disabled by default. enabled explicitly or with most or all.
+dnl   static -- enabled as static by default, must be explicitly changed.
 dnl   ""   -- disabled under default, most. enabled explicitly or with all.
 dnl
 dnl basically: yes/no is a hard setting. "most" means follow the "most"
@@ -218,11 +219,16 @@
   else
     _apmod_error_fatal="yes"
   fi
-  if test "$enable_$1" = "most"; then
+  if test "$enable_$1" = "static"; then
+    enable_$1=yes
+  elif test "$enable_$1" = "yes"; then
+    enable_$1=$module_default
+    _apmod_extra_msg=" ($module_selection)"
+  elif test "$enable_$1" = "most"; then
     if test "$module_selection" = "most" -o "$module_selection" = "all"; then
       enable_$1=$module_default
       _apmod_extra_msg=" ($module_selection)"
-    else
+    elif test "$enable_$1" != "yes"; then
       enable_$1=no
     fi
   elif test "$enable_$1" = "maybe-all"; then
Index: modules/http/config2.m4
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/http/config2.m4,v
retrieving revision 1.1
diff -u -r1.1 config2.m4
--- modules/http/config2.m4	2001/04/18 20:56:04	1.1
+++ modules/http/config2.m4	2001/10/02 18:17:29
@@ -4,7 +4,8 @@
 
 http_objects="http_core.lo http_protocol.lo http_request.lo"
 
-APACHE_MODULE(http, HTTP protocol handling, $http_objects, , yes)
+dnl mod_http freaks out when built as a DSO
+APACHE_MODULE(http, HTTP protocol handling, $http_objects, , static)
 APACHE_MODULE(mime, mapping of file-extension to MIME, , , yes)
 
 APACHE_MODPATH_FINISH
Index: modules/mappers/config9.m4
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/mappers/config9.m4,v
retrieving revision 1.3
diff -u -r1.3 config9.m4
--- modules/mappers/config9.m4	2001/04/29 05:24:10	1.3
+++ modules/mappers/config9.m4	2001/10/02 18:17:29
@@ -23,7 +23,7 @@
 dnl ### it here. we need to shift *this* config.m4 to be "last" or we
 dnl ### need to find a different way to set up this default and module spec.
 if test "$sharedobjs" = "yes"; then
-    APACHE_MODULE(so, DSO capability, , , yes)
+    APACHE_MODULE(so, DSO capability, , , static)
 else
     APACHE_MODULE(so, DSO capability, , , no)
 fi

Re: [PATCH] some STATUS info, volunteering

Posted by Ryan Bloom <rb...@covalent.net>.
On Monday 01 October 2001 06:16 pm, Aaron Bannert wrote:
> On Mon, Oct 01, 2001 at 05:42:13PM -0700, Aaron Bannert wrote:
> > > I thought that was by design -- "yes" means it must always be
> > > compiled-in.
> >
> > I don't know if it's really clearly defined anywhere, but I always took
> > "yes" to mean enable it, and --enable-mods-shared=most/yes to mean
> > "take all those enabled modules and make them shared".
> >
> > Would another setting of "static" be a good compromise? That
> > way mod_mime and mod_http can default to static even if you do
> > --enable-mods-shared=most/all, and then the others will become DSOs
> > if that same parameter is set.
>
> I have the fix in my tree now, but one thing still remains that is
> more to Roy's point: Now that some of these compiled-in modules are
> being built as modules, they aren't being loaded by default, and that
> means the default httpd.conf is failing. It's failing on thing like
> mod_access.
>
> Either we come up with a better httpd.conf (better detect default modules
> and add LoadModule lines) or we drop this patch altogether (meaning people
> will have to override the default set of static modules on a per-module
> basis with --enable-foo=shared).

We should fix the configure script so that it automatically adds the LoadModule
line, just like it did in 1.3.

Ryan
______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: [PATCH] some STATUS info, volunteering

Posted by Aaron Bannert <aa...@clove.org>.
On Mon, Oct 01, 2001 at 05:42:13PM -0700, Aaron Bannert wrote:
> > I thought that was by design -- "yes" means it must always be compiled-in.
> 
> I don't know if it's really clearly defined anywhere, but I always took
> "yes" to mean enable it, and --enable-mods-shared=most/yes to mean
> "take all those enabled modules and make them shared".
> 
> Would another setting of "static" be a good compromise? That
> way mod_mime and mod_http can default to static even if you do
> --enable-mods-shared=most/all, and then the others will become DSOs
> if that same parameter is set.

I have the fix in my tree now, but one thing still remains that is
more to Roy's point: Now that some of these compiled-in modules are
being built as modules, they aren't being loaded by default, and that
means the default httpd.conf is failing. It's failing on thing like
mod_access.

Either we come up with a better httpd.conf (better detect default modules
and add LoadModule lines) or we drop this patch altogether (meaning people
will have to override the default set of static modules on a per-module
basis with --enable-foo=shared).

Vote?

-aaron

Re: [PATCH] some STATUS info, volunteering

Posted by Aaron Bannert <aa...@clove.org>.
On Mon, Oct 01, 2001 at 05:31:48PM -0700, Roy Fielding wrote:
> On Mon, Oct 01, 2001 at 04:59:20PM -0700, Aaron Bannert wrote:
> > I've been fooling around with this for the last week or so and I have
> > some more clues:
> > 
> > - any module that is declared with APACHE_MODULE(.... most) while we have
> >   --enable-mods-shared=most is properly build into a DSO.
> > 
> > - if the module is declared with APACHE_MODULE(.... yes) then it doesn't
> >   ever get the chance to become a DSO. The current workaround is to
> >   explicitly declare --enable-foo=shared for each module that currently
> >   defaults to static.
> 
> I thought that was by design -- "yes" means it must always be compiled-in.

I don't know if it's really clearly defined anywhere, but I always took
"yes" to mean enable it, and --enable-mods-shared=most/yes to mean
"take all those enabled modules and make them shared".

Would another setting of "static" be a good compromise? That
way mod_mime and mod_http can default to static even if you do
--enable-mods-shared=most/all, and then the others will become DSOs
if that same parameter is set.

-aaron

Re: [PATCH] some STATUS info, volunteering

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
On Mon, Oct 01, 2001 at 04:59:20PM -0700, Aaron Bannert wrote:
> I've been fooling around with this for the last week or so and I have
> some more clues:
> 
> - any module that is declared with APACHE_MODULE(.... most) while we have
>   --enable-mods-shared=most is properly build into a DSO.
> 
> - if the module is declared with APACHE_MODULE(.... yes) then it doesn't
>   ever get the chance to become a DSO. The current workaround is to
>   explicitly declare --enable-foo=shared for each module that currently
>   defaults to static.

I thought that was by design -- "yes" means it must always be compiled-in.

....Roy