Bug 210954 - www/apache24: Fails to build with proxy options unset
Summary: www/apache24: Fails to build with proxy options unset
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-apache (Nobody)
URL:
Keywords: needs-patch, needs-qa, regression
Depends on:
Blocks:
 
Reported: 2016-07-10 02:15 UTC by dewayne
Modified: 2016-07-10 06:56 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (apache)
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2016-07-10 02:15:23 UTC
FreeBSD 10.3 Stable and latest updates to /usr/ports prevents apache24 from building when all proxy options are unset.  Subsequent attempts resulting in unsetting WATCHDOG and STATUS.  After further research, PATCH_PROXY_CONNECT PATCH_PROXY were also unset.

make results in:

checking whether to enable mod_proxy... no
checking whether to enable mod_proxy_connect... no
checking whether to enable mod_proxy_ftp... no
checking whether to enable mod_proxy_http... no
checking whether to enable mod_proxy_fcgi... no
checking whether to enable mod_proxy_scgi... no
checking whether to enable mod_proxy_fdpass... no
checking whether to enable mod_proxy_wstunnel... no
checking whether to enable mod_proxy_ajp... no
checking whether to enable mod_proxy_balancer... no
checking whether to enable mod_proxy_express... no
checking whether to enable mod_proxy_hcheck... checking dependencies
configure: WARNING: "mod_proxy is disabled but required for mod_proxy_hcheck"
checking whether to enable mod_proxy_hcheck... configure: error: mod_proxy_hcheck has been requested but can not be built due to prerequisite failures

when using these options only:
# make -Vwww_apache24_SET
AUTH_BASIC AUTH_DIGEST AUTHN_DEFAULT AUTHN_FILE AUTHN_ALIAS AUTHZ_DEFAULT AUTHZ_GROUPFILE AUTHZ_HOST AUTHZ_OWNER AUTHZ_USER AUTHNZ_LDAP LDAP CACHE DISK_CACHE FILE_CACHE DAV DAV_FS ACTIONS ALIAS ASIS AUTOINDEX CERN_META CGI CHARSET_LITE DEFLATE DIR ENV EXPIRES HEADERS INCLUDE INFO LOG_CONFIG LOGIO MIME MIME_MAGIC NEGOTIATION REWRITE SETENVIF SESSION SESSION_COOKIE SESSION_CRYPTO USERDIR USERTRACK VHOST_ALIAS FILTER PATCH_PROXY_CONNECT REQTIMEOUT SSL 

The last successful build where an apache24 package was built was apache24-2.4.20_1.txz on 29th May '16
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-10 05:53:48 UTC
Thank yo Dewayne,

Can you confirm whether or not this is a regression in the latest update?
Comment 2 Olli Hauer freebsd_committer freebsd_triage 2016-07-10 05:59:36 UTC
The latest apache24 (2.4.23) has two additional modules
   mod_proxy_hcheck (default=on)
   mod_http2_proxy (experimental => default=off)

My understanding for using $cat_$port_(UN)SET is that they are used to pre-select options in the config dialog, so "make config" should run once to save the options in /var/ports/www_apache24/options
Comment 3 dewayne 2016-07-10 06:05:48 UTC
(In reply to Kubilay Kocak from comment #1)
Yes it does appear so.  I am able to successfully build the apache24 package, iff I make the following changes.  

# svnlite diff /usr/ports/www/apache24
Index: /usr/ports/www/apache24/Makefile
===================================================================
--- /usr/ports/www/apache24/Makefile    (revision 418298)
+++ /usr/ports/www/apache24/Makefile    (working copy)
@@ -61,7 +61,7 @@
 HEARTBEAT_IMPLIES=             WATCHDOG STATUS
 HEARTMONITOR_IMPLIES=          WATCHDOG STATUS
 LBMETHOD_HEARTBEAT_IMPLIES=    WATCHDOG STATUS HEARTMONITOR
-PROXY_HCHECK_IMPLIES=          WATCHDOG
+# 20160710 PROXY_HCHECK_IMPLIES=               WATCHDOG

 # MPM
 MPM_PREFORK_CONFIGURE_ON=      --with-mpm=prefork
Index: /usr/ports/www/apache24/Makefile.options
===================================================================
--- /usr/ports/www/apache24/Makefile.options    (revision 418298)
+++ /usr/ports/www/apache24/Makefile.options    (working copy)
@@ -12,7 +12,8 @@
 # mod_proxy_html and xml2enc depending on libxml2
 PROXY_ENABLED_MODULES= \
        PROXY_AJP PROXY_BALANCER PROXY_CONNECT PROXY_EXPRESS PROXY_FCGI \
-       PROXY_FDPASS PROXY_FTP PROXY_HCHECK PROXY_HTML PROXY_HTTP PROXY_SCGI PROXY_WSTUNNEL
+       PROXY_FDPASS PROXY_FTP PROXY_HTML PROXY_HTTP PROXY_SCGI PROXY_WSTUNNEL
+#      PROXY_FDPASS PROXY_FTP PROXY_HCHECK PROXY_HTML PROXY_HTTP PROXY_SCGI PROXY_WSTUNNEL

 PROXY_DISABLED_MODULES=        \
        PROXY_HTTP2
Index: /usr/ports/www/apache24/pkg-plist
===================================================================
--- /usr/ports/www/apache24/pkg-plist   (revision 418298)
+++ /usr/ports/www/apache24/pkg-plist   (working copy)
@@ -175,7 +175,6 @@
 %%MOD_PROXY_FDPASS%%libexec/apache24/mod_proxy_fdpass.so
 %%MOD_PROXY_FTP%%libexec/apache24/mod_proxy_ftp.so
 %%MOD_PROXY_HTML%%libexec/apache24/mod_proxy_html.so
-%%MOD_PROXY_HCHECK%%libexec/apache24/mod_proxy_hcheck.so
 %%MOD_PROXY_HTTP%%libexec/apache24/mod_proxy_http.so
 %%MOD_PROXY_HTTP2%%libexec/apache24/mod_proxy_http2.so
 %%MOD_PROXY_SCGI%%libexec/apache24/mod_proxy_scgi.so


This isn't a fix by any means, just a very rough workaround to get the kit build for our testing cycle before updating the production services.   I hope that this provides a clue to a fix.
Comment 4 Olli Hauer freebsd_committer freebsd_triage 2016-07-10 06:13:17 UTC
Ah, no please don't patch it this way.

From Mk/bsd.options.mk

# These variables can be used in make.conf to configure options.  They are
# processed in the order listed below, i.e. later variables override the effects
# of previous variables.  Options saved using the options dialog are processed
# right before OPTIONS_SET_FORCE.  When building a port a dialog to configure
# options will only appear if there are new options, i.e. options which have not
# been configured before either using the option dialog in a previous build or
# using the variables below.  You can force the dialog to appear by running
# "make config".
#
# OPTIONS_SET                   - List of options to enable for all ports.
# OPTIONS_UNSET                 - List of options to disable for all ports.
# ${OPTIONS_NAME}_SET           - List of options to enable for a specific port.
# ${OPTIONS_NAME}_UNSET         - List of options to disable for a specific port.
#
# OPTIONS_SET_FORCE             - List of options to enable for all ports.
# OPTIONS_UNSET_FORCE           - List of options to disable for all ports.
# ${OPTIONS_NAME}_SET_FORCE     - List of options to enable for a specific port.
# ${OPTIONS_NAME}_UNSET_FORCE   - List of options to disable for a specific port.

Since mod_proxy_hcheck is a new module in 2.4.23 (defaults to ON) make config should run once again.
Alternative it should work if "www_apache24_UNSET_FORCE=PROXY is set, you can cross check this with
# make -V SELECTED_OPTIONS
# make -V DESELECTED_OPTIONS
Comment 5 dewayne 2016-07-10 06:21:54 UTC
(In reply to Olli Hauer from comment #2)
Olli, you're understanding is correct.  However we had built all ports (since 2003) using ports.conf (via ports-mgmt/portconf) or more recently changes to the make.conf file.  This implies that we do use "make -DBATCH" for consistent application of the required options.

In this case, we weren't able to effect a change via tweeking the options.  Unfortunately the ports system is complicated and I couldn't see how to make the required changes.  For clarity this is what we have passed to apache24 (but it doesn't seem to honour the request)

www_apache24_SET=AUTH_BASIC AUTH_DIGEST AUTHN_DEFAULT AUTHN_FILE AUTHN_ALIAS AUTHZ_DEFAULT AUTHZ_GROUPFILE AUTHZ_HOST AUTHZ_OWNER AUTHZ_USER AUTHNZ_LDAP LDAP CACHE DISK_CACHE FILE_CACHE DAV DAV_FS ACTIONS ALIAS ASIS AUTOINDEX CERN_META CGI CHARSET_LITE DEFLATE DIR ENV EXPIRES HEADERS INCLUDE INFO LOG_CONFIG LOGIO MIME MIME_MAGIC NEGOTIATION REWRITE SETENVIF SESSION SESSION_COOKIE SESSION_CRYPTO USERDIR USERTRACK VHOST_ALIAS FILTER PATCH_PROXY_CONNECT REQTIMEOUT SSL

www_apache24_UNSET=STATUS VERSION AUTHN_ANON AUTHN_DBD AUTHN_DBM AUTHN_SOCACHE AUTHZ_DBD AUTHZ_DBM AUTH_FORM CACHE CACHE_DISK CACHE_SOCACHE DBD DIALUP DUMPIO EXT_FILTER FILE_CACHE HEARTBEAT HEARTMONITOR LBMETHOD_HEARTBEAT REFLECTOR REMOTEIP REQUEST SED SOCACHE_DBM SOCACHE_MEMCACHE SOCACHE_SHMCB SUBSTITUTE LBMETHOD_BYBUSYNESS LBMETHOD_BYREQUESTS LBMETHOD_BYTRAFFIC PROXY PROXY_AJP PROXY_BALANCER PROXY_CONNECT PROXY_EXPRESS PROXY_FCGI PROXY_FDPASS PROXY_FTP PROXY_HTTP PROXY_SCGI PROXY_WSTUNNEL SESSION_DBD SLOTMEM_PLAIN SLOTMEM_SHM SPELING UNIQUE_ID WATCHDOG ACCESS_COMPAT CHARSET_LITE PATCH_PROXY_CONNECT PATCH_PROXY INFO

Previously we did have WATCHDOG and STATUS set to "on".
Comment 6 Olli Hauer freebsd_committer freebsd_triage 2016-07-10 06:47:21 UTC
Yes, some parts are tricky ...

Perhaps the following will help to understand what is happening.

By setting www_apache24_(UN)SET the OPTIONS are pre-configured for the OPTIONS dialog, if a new OPTION is added to the port and 'make config' is not run the default setting for that OPTION is used.

Since the new option is not saved down to the 
/var/ports/www_apache24/options
file the default setting is given to the logic of the port (in this case ON).

Using the ..._FORCE_(UN)SET can switch the option to ON or OFF regardless if they are on or off in the dialog.

After the framework has processed and calculated if the OPTION is ON or OFF Mk/bsd.apache.mk can calculate if the module should be build or not, in this case it means build the module since it is ON.

I suspect there is a /var/ports/www_apache24/options file on your system, but because of building -DBATCH no options dialog is presented and the framework is taking the defaults for the new module
Comment 7 dewayne 2016-07-10 06:56:16 UTC
Please close.  I have reverted my copy of www/apache24 to original, modified our port's settings and then run the other processes to convert option settings.  (I guess its an indication of how infrequently the ports options are changed that I'd missed a step)

Thankyou for your prompt attention to this matter.  My sincere apologies for the noise.