Index: www/apache24/Makefile =================================================================== --- www/apache24/Makefile +++ www/apache24/Makefile @@ -28,7 +28,6 @@ CPE_PRODUCT= http_server PORTDOCS= * -SUB_FILES= pkg-install pkg-deinstall # XXX: before running makepatch please run the command # `$SED -e 's/PATCH_PATH_SEPARATOR=/PATCH_PATH_SEPARATOR?=/' Mk/bsd.port.mk @@ -186,8 +185,10 @@ ${WRKSRC}/docs/conf/httpd.conf ${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/support/envvars-std -post-install: +pre-install: @${MKDIR} ${ETC_SUBDIRS:S|^|${STAGEDIR}${ETCDIR}/|} + +post-install: ${INSTALL_DATA} ${FILESDIR}/no-accf.conf ${STAGEDIR}${ETCDIR}/Includes/ # place for 3rd party module configuration ${INSTALL_DATA} ${FILESDIR}/README_modules.d ${STAGEDIR}${ETCDIR}/modules.d/ @@ -195,6 +196,11 @@ -${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/* 2>/dev/null -${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* -${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/apache24/mod_*.so + @${MKDIR} ${STAGEDIR}${DATADIR}/modules.d + mv ${STAGEDIR}${ETCDIR}/modules.d/*.conf.sample ${STAGEDIR}${DATADIR}/modules.d + (cd ${STAGEDIR}${DATADIR}; \ + ${FIND} modules.d -name '*.sample' | \ + sed -e 's|\(.*\)\(.sample\)|@sample ${DATADIR_REL}/\1\2 ${ETCDIR_REL}/\1 |' >> ${TMPPLIST}) post-install-LOG_FORENSIC-on: ${INSTALL_SCRIPT} ${WRKSRC}/support/check_forensic ${STAGEDIR}${PREFIX}/sbin Index: www/apache24/files/patch-Makefile.in =================================================================== --- www/apache24/files/patch-Makefile.in +++ www/apache24/files/patch-Makefile.in @@ -14,7 +14,23 @@ done; \ for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \ cd $$j ; \ -@@ -98,15 +95,12 @@ install-conf: +@@ -78,6 +75,7 @@ install-conf: + if test "$(LOAD_ALL_MODULES)" = "yes"; then \ + loading_disabled=""; \ + fi; \ ++ ( \ + if test $$j = "cgid" -a "$$have_cgi" = "1"; then \ + echo ""; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ +@@ -89,6 +87,7 @@ install-conf: + else \ + echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + fi; \ ++ ) > $(DESTDIR)$(sysconfdir)/modules.d/$${j}.conf.sample; \ + fi; \ + done; \ + sed -e '1,/@@LoadModule@@/d' \ +@@ -98,15 +97,12 @@ install-conf: -e 's#@@SSLPort@@#$(SSLPORT)#g' \ < $$i; \ fi \ @@ -32,7 +48,7 @@ fi; \ done ; \ done ; \ -@@ -157,48 +151,25 @@ dox: +@@ -157,48 +153,25 @@ dox: doxygen $(top_srcdir)/docs/doxygen.conf install-htdocs: @@ -90,7 +106,7 @@ install-other: @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir) -@@ -252,12 +223,7 @@ install-man: +@@ -252,12 +225,7 @@ install-man: @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir) @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1 @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8 Index: www/apache24/files/patch-docs__conf__httpd.conf.in =================================================================== --- www/apache24/files/patch-docs__conf__httpd.conf.in +++ www/apache24/files/patch-docs__conf__httpd.conf.in @@ -1,16 +1,15 @@ --- docs/conf/httpd.conf.in.orig 2015-11-03 11:58:58 UTC +++ docs/conf/httpd.conf.in -@@ -65,6 +65,9 @@ Listen @@Port@@ +@@ -65,6 +65,8 @@ Listen @@Port@@ # @@LoadModule@@ -+# Third party modules -+IncludeOptional @rel_sysconfdir@/modules.d/[0-9][0-9][0-9]_*.conf ++IncludeOptional @rel_sysconfdir@/modules.d/*.conf + # # If you wish httpd to run as a different user or group, you must run -@@ -74,8 +77,8 @@ Listen @@Port@@ +@@ -74,8 +76,8 @@ Listen @@Port@@ # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # @@ -21,7 +20,7 @@ -@@ -181,7 +184,7 @@ DocumentRoot "@exp_htdocsdir@" +@@ -181,7 +183,7 @@ DocumentRoot "@exp_htdocsdir@" # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # @@ -30,7 +29,7 @@ # # LogLevel: Control the number of messages logged to the error_log. -@@ -210,13 +213,13 @@ LogLevel warn +@@ -210,13 +212,13 @@ LogLevel warn # define per- access logfiles, transactions will be # logged therein and *not* in this file. # @@ -46,7 +45,7 @@ -@@ -407,3 +410,5 @@ SSLRandomSeed startup builtin +@@ -407,3 +409,5 @@ SSLRandomSeed startup builtin SSLRandomSeed connect builtin Index: www/apache24/files/patch-httpoxy =================================================================== --- www/apache24/files/patch-httpoxy +++ www/apache24/files/patch-httpoxy @@ -44,9 +44,9 @@ ======= Patch to httpd sources 2.4.x and 2.2.x ======= ---- server/util_script.c (revision 1752426) -+++ server/util_script.c (working copy) -@@ -186,6 +186,14 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r +--- server/util_script.c.orig 2016-04-27 13:03:00 UTC ++++ server/util_script.c +@@ -186,6 +186,14 @@ AP_DECLARE(void) ap_add_common_vars(requ else if (!strcasecmp(hdrs[i].key, "Content-length")) { apr_table_addn(e, "CONTENT_LENGTH", hdrs[i].val); } Index: www/apache24/files/pkg-deinstall.in =================================================================== --- www/apache24/files/pkg-deinstall.in +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -MPM_FALLBACK="%%ETCDIR%%/modules.d/%%MPMF%%" - -_cleanup(){ - if [ -f ${MPM_FALLBACK} ]; then - echo -n "remove fallback MPM : " - /bin/rm -vf ${MPM_FALLBACK} - fi -} - -# run only if build with modular MPM -if [ "x$2" = "xDEINSTALL" ]; then - %%MPM_FALLBACK_CHECK%%_cleanup -fi - Index: www/apache24/files/pkg-install.in =================================================================== --- www/apache24/files/pkg-install.in +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# Note: -# We have to use grep or wc after awk, else -# there is no usable ret value that can be -# used for further processing - -HTTPD_CONF="%%ETCDIR%%/httpd.conf" -MPM_FALLBACK="%%ETCDIR%%/modules.d/%%MPMF%%" - -_log_msg(){ - /usr/bin/logger -p local0.notice -s -t apache24 "$1" -} - -_check_deprecated(){ -if [ -r ${HTTPD_CONF} ]; then - /usr/bin/awk '/^LoadModule[[:blank:]]+mpm_(event|prefork|worker)_module/ {print $2}' ${HTTPD_CONF} | /usr/bin/grep -q '^mpm_' - if [ $? -ne 0 ]; then - _log_msg "===================================================" - _log_msg "WARNING!" - _log_msg " No apache MPM module is activated in httpd.conf," - _log_msg " mpm_prefork will be activated as fall back" - _log_msg "" - _log_msg " Please follow the instructions in" - _log_msg " ${MPM_FALLBACK}" - _log_msg "===================================================" - -cat > ${MPM_FALLBACK} << _EOF -# ================================================================== -# Note: -# www/apache24 build changed from static MPM to modular MPM loading! -# -# This file was installed as fall back, since no activated MPM -# was detected in the existing httpd.conf. -# -# Please merge additions from httpd.conf.sample into your httpd.conf! -# -# After activating one of the mpm_modules in httpd.conf it is save -# to deactivate the "LoadModule" line in this file. -# -# In case mod_(php|perl|python|...) modules from the official FreeBSD -# package repo are installed please use the mpm_prefork module, else -# feel free to test mpm_event (preferred) or mpm_worker. -# -# For more information see: -# http://httpd.apache.org/docs/2.4/mod/ -# ================================================================== - -LoadModule mpm_prefork_module libexec/apache24/mod_mpm_prefork.so -_EOF - - fi # $? -ne 0 -else - echo ${HTTPD_CONF} not readable -fi -} - -# run only if build with modular MPM -if [ "$2" = "POST-INSTALL" ]; then - %%MPM_FALLBACK_CHECK%%_check_deprecated -fi -