]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1729235, r1730079, r1801665 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 19 Sep 2017 10:15:00 +0000 (10:15 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 19 Sep 2017 10:15:00 +0000 (10:15 +0000)
Exclude MPM modules from automatic LoadModule
enabling when configure was called with
-enable-load-all-modules. The default MPM
should still get enabled automatically.

Use different variables to track normal
modules and MPMs during build.

Normal modules and MPMs follow different
rules in the config, e.g. we are only
allowed to have one active LoadModule
for an MPM in the config.

As a side effect, LoadModule for MPMs
will now come before LoadModule for
the normal modules.

Makefile.in: fix MPM_MODULES typo
Submitted by: rjung, jchampion
Reviewed by: jchampion, icing, ylavic

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1808854 13f79535-47bb-0310-9956-ffa450edef68

Makefile.in
STATUS
acinclude.m4
build/config_vars.sh.in

index 6d952b24a1eedce048235d2cffdc1a16a22100e9..6ded87eb0bc3481b186dd5ddc2372e8f986414be 100644 (file)
@@ -45,7 +45,7 @@ install-conf:
                if [ -f $$i ] ; then \
                ( \
                        n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
-                       if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
+                       if test $$n_lm -eq 0 -o "x$(MPM_MODULES)$(DSO_MODULES)" = "x"; then \
                                sed -e 's#@@ServerRoot@@#$(prefix)#g' \
                                        -e 's#@@Port@@#$(PORT)#g' \
                                        -e 's#@@SSLPort@@#$(SSLPORT)#g' \
@@ -68,28 +68,38 @@ install-conf:
                                else \
                                        have_cgid="0"; \
                                fi; \
-                               for j in $(DSO_MODULES) "^EOL^"; do \
+                               for j in $(MPM_MODULES) "^EOL^"; do \
                                        if test $$j != "^EOL^"; then \
-                                               if echo ",$(ENABLED_DSO_MODULES),"|$(EGREP) ",$$j," > /dev/null ; then \
+                                               if echo ",$(ENABLED_MPM_MODULE),"|$(EGREP) ",$$j," > /dev/null ; then \
                                                        loading_disabled=""; \
                                                else \
                                                        loading_disabled="#"; \
                                                fi; \
-                                               if test "$(LOAD_ALL_MODULES)" = "yes"; then \
+                                               echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+                                       fi; \
+                               done; \
+                               for j in $(DSO_MODULES) "^EOL^"; do \
+                                       if test $$j != "^EOL^"; then \
+                                               if echo ",$(ENABLED_DSO_MODULES),"|$(EGREP) ",$$j," > /dev/null ; then \
                                                        loading_disabled=""; \
+                                               else \
+                                                       loading_disabled="#"; \
+                                                       if test "$(LOAD_ALL_MODULES)" = "yes"; then \
+                                                               loading_disabled=""; \
+                                                       fi; \
                                                fi; \
-                                                       if test $$j = "cgid" -a "$$have_cgi" = "1"; then \
-                                                               echo "<IfModule !mpm_prefork_module>"; \
-                                                               echo "  $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
-                                                               echo "</IfModule>"; \
-                                                       elif test $$j = "cgi" -a "$$have_cgid" = "1"; then \
-                                                               echo "<IfModule mpm_prefork_module>"; \
-                                                               echo "  $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
-                                                               echo "</IfModule>"; \
-                                                       else \
-                                                               echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
-                                                       fi; \
+                                               if test $$j = "cgid" -a "$$have_cgi" = "1"; then \
+                                                       echo "<IfModule !mpm_prefork_module>"; \
+                                                       echo "  $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+                                                       echo "</IfModule>"; \
+                                               elif test $$j = "cgi" -a "$$have_cgid" = "1"; then \
+                                                       echo "<IfModule mpm_prefork_module>"; \
+                                                       echo "  $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+                                                       echo "</IfModule>"; \
+                                               else \
+                                                       echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
                                                fi; \
+                                       fi; \
                                done; \
                                sed -e '1,/@@LoadModule@@/d' \
                                        -e '/@@LoadModule@@/d' \
diff --git a/STATUS b/STATUS
index 0ebc8f525beff5c355b559ff3b4ae6197cff1bd9..5766e70a844fe348873feb7fbd1b7f14eb311f58 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -115,16 +115,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) Makefile: Use different variables to track normal modules and MPMs during
-               build. Only the enabled MPM is uncommented in the configuration
-               if multiple DSOs are built, and LoadModule for MPMs will now come
-               before LoadModule for the normal modules. Patch by rjung.
-     trunk patch: https://svn.apache.org/r1729235
-                  https://svn.apache.org/r1730079
-                  https://svn.apache.org/r1801665
-     2.4.x patch: svn merge -c1729235 -c1730079 -c1801665 ^/httpd/httpd/trunk .
-     +1: jchampion, icing, ylavic
-
   *) mod_proxy: Loadfactor can now be a decimal number (eg: 1.25)
      trunk patch: http://svn.apache.org/r1805188
                   http://svn.apache.org/r1805190
index 0fdf1d48e495b1419336f75dfd1e17abed5fa7d0..e547950e89e3acebc2185071148d7fa0db6c2a31 100644 (file)
@@ -90,6 +90,8 @@ AC_DEFUN([APACHE_GEN_CONFIG_VARS],[
   APACHE_SUBST(MK_IMPLIB)
   APACHE_SUBST(MKDEP)
   APACHE_SUBST(INSTALL_PROG_FLAGS)
+  APACHE_SUBST(MPM_MODULES)
+  APACHE_SUBST(ENABLED_MPM_MODULE)
   APACHE_SUBST(DSO_MODULES)
   APACHE_SUBST(ENABLED_DSO_MODULES)
   APACHE_SUBST(LOAD_ALL_MODULES)
@@ -262,10 +264,10 @@ DISTCLEAN_TARGETS = modules.mk
 static =
 shared = $libname
 EOF
-            DSO_MODULES="$DSO_MODULES mpm_$1"
+            MPM_MODULES="$MPM_MODULES mpm_$1"
             # add default MPM to LoadModule list
             if test $1 = $default_mpm; then
-                ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},mpm_$1"
+                ENABLED_MPM_MODULE="mpm_$1"
             fi
         fi
         $4
index cbb4a39decc1fee6215034324fb438b10c103aa6..6525a4ee4b91b2645a3b0d127d7734483a02e674 100644 (file)
@@ -46,6 +46,8 @@ exec sed "
 /MPM_LIB/d
 /APACHECTL_ULIMIT/d
 /[a-z]*_LTFLAGS/d
+/^MPM_MODULES/d
+/^ENABLED_MPM_MODULE/d
 /^DSO_MODULES/d
 /^MODULE_/d
 /^PORT/d