Commit 4a98c405 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1750043 from trunk:

Replace the proxy_mods_enable logic, with its hazardous 'yes' value that
aborts the build on missing dependencies, with a local override of the
module_selection as 'most', and module_default of the same shared|static
model that was requested through --enable-proxy.

[For trunk, we need to reevaluate the 'most' condition of some of the more
esoteric modules, and simply drop the module_default override; where a user
wants to enable -only- mod_proxy, plus one proxy mechanism, the legacy 2.4.x
behavior retained by this patch is nuts. For one example,
  --enable-modules=few --enable-proxy-yes --enable-proxy_http
is a completely specific and legitimate syntax --- adding 10 other proxy
providers in response to this syntax is absurd.]


Submitted by: wrowe
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1750483 13f79535-47bb-0310-9956-ffa450edef68
parent 4cdde92c
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -117,17 +117,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]


  *) mod_proxy: Replace the logic for selecting proxy sub-modules, retaining
     the 2.4.x legacy behavior, by elevating the module selection to 'most'
     through all proxy_* sub-module configuration tests, and apply the same
     static or shared linkage of mod_proxy to each sub-module not otherwise
     explicitly marked static or shared. By dropping the default 'yes' toggle,
     this patch ensures we will no longer abort the configuration when failing
     to enable a module for missing dependencies.
     trunk patch: http://svn.apache.org/r1750043
     2.4.x: https://raw.githubusercontent.com/wrowe/patches/master/proxy-noforce-2.4.x.patch
     +1: wrowe, rpluem, ylavic

  *) Account for explicit enable- cases of 'shared', 'few', 'all', 'reallyall',
     ensure all unrecognized --enable-foo=values mean *no*.
     Backport: r1750335, r1750407, r1750420
+28 −26
Original line number Diff line number Diff line
@@ -2,16 +2,22 @@ dnl modules enabled in this directory by default

APACHE_MODPATH_INIT(proxy)

if test "$enable_proxy" = "shared"; then
  proxy_mods_enable=shared
elif test "$enable_proxy" = "yes"; then
  proxy_mods_enable=yes
else
  proxy_mods_enable=most
fi

proxy_objs="mod_proxy.lo proxy_util.lo"
APACHE_MODULE(proxy, Apache proxy module, $proxy_objs, , $proxy_mods_enable)
APACHE_MODULE(proxy, Apache proxy module, $proxy_objs, , most)

dnl set aside module selections and default, and set the module default to the
dnl same scope (shared|static) as selected for mod proxy, along with setting
dnl the default selection to "most" for remaining proxy modules, mirroring the
dnl behavior of 2.4.1 and later, but failing ./configure only if an explicitly
dnl enabled module is missing its prereqs
save_module_selection=$module_selection
save_module_default=$module_default
if test "$enable_proxy" != "no"; then
    module_selection=most
    if test "$enable_proxy" = "shared" -o "$enable_proxy" = "static"; then
        module_default=$enable_proxy
    fi
fi

proxy_connect_objs="mod_proxy_connect.lo"
proxy_ftp_objs="mod_proxy_ftp.lo"
@@ -39,11 +45,11 @@ case "$host" in
    ;;
esac

APACHE_MODULE(proxy_connect, Apache proxy CONNECT module.  Requires and is enabled by --enable-proxy., $proxy_connect_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_ftp, Apache proxy FTP module.  Requires and is enabled by --enable-proxy., $proxy_ftp_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_http, Apache proxy HTTP module.  Requires and is enabled by --enable-proxy., $proxy_http_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_fcgi, Apache proxy FastCGI module.  Requires and is enabled by --enable-proxy., $proxy_fcgi_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_scgi, Apache proxy SCGI module.  Requires and is enabled by --enable-proxy., $proxy_scgi_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_connect, Apache proxy CONNECT module.  Requires --enable-proxy., $proxy_connect_objs, , most, , proxy)
APACHE_MODULE(proxy_ftp, Apache proxy FTP module.  Requires --enable-proxy., $proxy_ftp_objs, , most, , proxy)
APACHE_MODULE(proxy_http, Apache proxy HTTP module.  Requires --enable-proxy., $proxy_http_objs, , most, , proxy)
APACHE_MODULE(proxy_fcgi, Apache proxy FastCGI module.  Requires --enable-proxy., $proxy_fcgi_objs, , most, , proxy)
APACHE_MODULE(proxy_scgi, Apache proxy SCGI module.  Requires --enable-proxy., $proxy_scgi_objs, , most, , proxy)
APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module.  Requires --enable-proxy., $proxy_fdpass_objs, , , [
  AC_CHECK_DECL(CMSG_DATA,,, [
    #include <sys/types.h>
@@ -54,21 +60,17 @@ APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module. Requires
    enable_proxy_fdpass=no
  fi
],proxy)
APACHE_MODULE(proxy_wstunnel, Apache proxy Websocket Tunnel module.  Requires and is enabled by --enable-proxy., $proxy_wstunnel_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_ajp, Apache proxy AJP module.  Requires and is enabled by --enable-proxy., $proxy_ajp_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module.  Requires and is enabled by --enable-proxy., $proxy_balancer_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_wstunnel, Apache proxy Websocket Tunnel module.  Requires --enable-proxy., $proxy_wstunnel_objs, , most, , proxy)
APACHE_MODULE(proxy_ajp, Apache proxy AJP module.  Requires --enable-proxy., $proxy_ajp_objs, , most, , proxy)
APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module.  Requires --enable-proxy., $proxy_balancer_objs, , most, , proxy)

APACHE_MODULE(proxy_express, mass reverse-proxy module. Requires --enable-proxy., , , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_hcheck, [reverse-proxy health-check module. Requires --enable-proxy and --enable-watchdog.], , ,[
  $proxy_mods_enable
  dnl Verify that both proxy_mods_enable above and watchdog below are enabled
  dnl when --enable-proxy-hcheck isn't explicitly elected
  if test "$enable_watchdog" = "no"; then
    enable_proxy_hcheck="";
  fi
], , [proxy,watchdog])
APACHE_MODULE(proxy_express, mass reverse-proxy module. Requires --enable-proxy., , , most, , proxy)
APACHE_MODULE(proxy_hcheck, [reverse-proxy health-check module. Requires --enable-proxy and --enable-watchdog.], , , most, , [proxy,watchdog])

APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])

module_selection=$save_module_selection
module_default=$save_module_default

APACHE_MODPATH_FINISH