[Midnightbsd-cvs] mports [20641] trunk/www/apache24: refactor apache port

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Nov 4 17:09:36 EST 2015


Revision: 20641
          http://svnweb.midnightbsd.org/mports/?rev=20641
Author:   laffer1
Date:     2015-11-04 17:09:35 -0500 (Wed, 04 Nov 2015)
Log Message:
-----------
refactor apache port

Modified Paths:
--------------
    trunk/www/apache24/Makefile
    trunk/www/apache24/Makefile.modules
    trunk/www/apache24/Makefile.options
    trunk/www/apache24/files/patch-Makefile.in
    trunk/www/apache24/pkg-help
    trunk/www/apache24/pkg-message
    trunk/www/apache24/pkg-plist

Added Paths:
-----------
    trunk/www/apache24/files/pkg-deinstall.in
    trunk/www/apache24/files/pkg-install.in

Modified: trunk/www/apache24/Makefile
===================================================================
--- trunk/www/apache24/Makefile	2015-11-04 21:24:04 UTC (rev 20640)
+++ trunk/www/apache24/Makefile	2015-11-04 22:09:35 UTC (rev 20641)
@@ -2,9 +2,9 @@
 
 PORTNAME=	apache24
 PORTVERSION=	2.4.17
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www ipv6
-MASTER_SITES=	${MASTER_SITE_APACHE_HTTPD}
+MASTER_SITES=	APACHE_HTTPD
 DISTNAME=	httpd-${PORTVERSION}
 DIST_SUBDIR=	apache24
 
@@ -17,7 +17,7 @@
 		libapr-1.so:${PORTSDIR}/devel/apr1 \
 		libpcre.so:${PORTSDIR}/devel/pcre
 
-CONFLICTS=	apache-*-2.2.* apache22-*
+CONFLICTS_INSTALL=	apache-*-2.2.* apache22-*
 
 SCRIPTS_ENV+=		LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} \
 			LIBTOOL_VERSION=${LIBTOOL_VERSION} AUTOCONF=${AUTOCONF} \
@@ -25,18 +25,27 @@
 			AUTOHEADER=${AUTOHEADER}
 
 USE_APACHE=	common24
-USES=		iconv tar:bzip2 cpe libtool
+USES=		cpe iconv libtool perl5 tar:bzip2
 USE_AUTOTOOLS=	autoconf
 USE_PERL5=	yes
 USE_PYTHON=	yes
 USE_RC_SUBR=	apache24 htcacheclean
 LIBTOOLFILES=	configure.in
+GNU_CONFIGURE=	yes
 
 CPE_VENDOR=	apache
 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
+PATCH_PATH_SEPARATOR=	__
+
+# Fallback MPM after switching from static to modular MPM
+SUB_LIST+=	MPMF="000_mpm_prefork_fallback.conf"
+
 USERS=		www
 GROUPS=		www
 
@@ -56,18 +65,22 @@
 AUTHNZ_LDAP_CONFIGURE_ON=	--enable-authnz-ldap
 
 # http://httpd.apache.org/docs/2.4/bind.html
-IPV4_MAPPED_CONFIGURE_OFF=	--disable-v4-mapped
-IPV4_MAPPED_CONFIGURE_ON=	--enable-v4-mapped
+IPV4_MAPPED_CONFIGURE_ENABLE=	v4-mapped
 
 LDAP_CONFIGURE_ON=		--enable-ldap=shared
 
-LUAJIT_LIB_DEPENDS=		luajit:${PORTSDIR}/lang/luajit
-LUA_CONFIGURE_OFF=		--without-lua
-LUA_CONFIGURE_ON=		--with-lua=${LOCALBASE}
+HTTP2_CONFIGURE_ON=		--with-nghttp2=${LOCALBASE}
+HTTP2_LIB_DEPENDS=		libnghttp2.so:${PORTSDIR}/www/nghttp2
+LUAJIT_LIB_DEPENDS=		libluajit-5.1.so:${PORTSDIR}/lang/luajit
+LUA_CONFIGURE_WITH=		lua
+LUA_USES=			lua
 
 SOCACHE_DC_CONFIGURE_ON=	--with-distcache=${LOCALBASE}
-SOCACHE_DC_LIB_DEPENDS=		distcache:${PORTSDIR}/security/distcache
+SOCACHE_DC_LIB_DEPENDS=		libdistcache.so:${PORTSDIR}/security/distcache
 
+# Note:
+# OpenSSL version (base/ports) depends how devel/apr1 was build
+#  apu-1-config --(includes|ldflags) and apr_rules.mk
 SSL_CFLAGS=			-I${OPENSSLINC}
 SSL_CONFIGURE_ON=		--with-ssl=${OPENSSLBASE}
 SSL_LDFLAGS=			-L${OPENSSLLIB}
@@ -77,10 +90,6 @@
 
 ETC_SUBDIRS=		Includes envvars.d extra modules.d
 
-.if ! ${PORT_OPTIONS:MDOCS}
-MAKE_ENV+=	NOPORTDOCS=yes
-.endif
-
 APR_CONFIG?=		${LOCALBASE}/bin/apr-1-config
 APU_CONFIG?=		${LOCALBASE}/bin/apu-1-config
 
@@ -108,12 +117,12 @@
 		--with-apr=${APR_CONFIG} \
 		--with-apr-util=${APU_CONFIG}
 
-CONFIGURE_ENV=	CONFIG_SHELL="${SH}" \
-		LOCALBASE="${LOCALBASE}"
+CONFIGURE_ENV=	LOCALBASE="${LOCALBASE}" \
+		CONFIG_SHELL="${SH}"
 
 MAKE_ENV+=	EXPR_COMPAT=yes \
 		INSTALL_MAN="${INSTALL_MAN}" \
-		EXAMPLESDIR=${EXAMPLESDIR}
+		DATADIR=${DATADIR}
 
 #=====================================================
 # CONFIGURE_ARGS will be handled in Makefile.modules,
@@ -120,8 +129,8 @@
 # here we do only OPTIONS fixups
 
 .if ${PORT_OPTIONS:MLUA}
-USE_LUA=	5.1+
-LUA_COMPS=	lua
+CONFIGURE_ENV+=	LUA_CFLAGS="-I${LUA_INCDIR}" \
+		LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}"
 .endif
 
 .if ${PORT_OPTIONS:MPROXY_HTML} || ${PORT_OPTIONS:MXML2ENC}
@@ -131,37 +140,58 @@
 .include <bsd.port.pre.mk>
 .include "${APACHEDIR}/Makefile.modules"
 
-pre-configure::
-	@${ECHO_MSG}	""
-	@${ECHO_MSG}	"  You can check your modules configuration by using make show-modules"
-	@${ECHO_MSG}	""
-
 post-extract:
 # remove possible leftover .svn directories in the sources
 	@${FIND} ${WRKSRC} -type d -name .svn -print | ${XARGS} ${RM} -rf
 # limit grep results ...
-	@${FIND} ${WRKSRC} -type f \( -name 'NWGNU*' -o -name '*.ds?' -o -name '*.dep' -o -name '*.mak' -o -name '*.win' \) -delete
+	@${FIND} ${WRKSRC} -type f \( -name 'NWGNU*' -o -name '*.ds?' -o -name '*.dep' -o -name '*.mak' -o -name '*.win' -o -name '*.vbs' -o -name '*.wsf' \) -delete
+# make sure the configure script contains our patches, preserve the original script for comparsion
+	-${MV} -v ${WRKSRC}/configure ${WRKSRC}/configure.upstream
 
+# make stage-qa script happy, it complains on empty dirs even 'PORTDOCS=*' is set
+# use RMDIR in case upstream ever place some files into this directories
+.for d in xsl/util xsl lang
+	-${RMDIR} ${WRKSRC}/docs/manual/style/${d}
+.endfor
+
 post-patch:
-	@${REINPLACE_CMD} -e 's," PLATFORM ",MidnightBSD,' ${WRKSRC}/server/core.c
-# IPv4_mapping fix: https://issues.apache.org/bugzilla/show_bug.cgi?id=53824
-	@${REINPLACE_CMD} -e 's|freebsd5|freebsd|' ${WRKSRC}/configure.in ${WRKSRC}/configure
-	@${RM} -f ${WRKSRC}/docs/docroot/*.bak
-	@${INSTALL_DATA} ${WRKSRC}/NOTICE ${WRKSRC}/docs/manual
+	${REINPLACE_CMD} -e 's," PLATFORM ",MidnightBSD,' ${WRKSRC}/server/core.c
+	${REINPLACE_CMD} -e 's|logs/error_log|/var/log/httpd-error.log|' \
+		${WRKSRC}/include/httpd.h
+	${REINPLACE_CMD} -e 's|perlbin=.*|perlbin=${PERL}|' \
+		${WRKSRC}/configure.in
+	${RM} -f ${WRKSRC}/docs/docroot/*.bak
+	${INSTALL_DATA} ${WRKSRC}/NOTICE ${WRKSRC}/docs/manual
 
+pre-configure::
+	@${ECHO_MSG}	""
+	@${ECHO_MSG}	"  You can check your modules configuration by using make show-modules"
+	@${ECHO_MSG}	""
+# silence autotools
+	-${MV} -v ${WRKSRC}/configure.in ${WRKSRC}/configure.ac
+
 post-configure:
 	@FTPUSERS=`${EGREP} -v '^#' /etc/ftpusers| ${TR} -s "\n" " "` ;\
-	${REINPLACE_CMD} -e "s,%%FTPUSERS%%,$${FTPUSERS}," ${WRKSRC}/docs/conf/extra/httpd-userdir.conf
-	@${REINPLACE_CMD} -e "s,%%WWWOWN%%,${WWWOWN}," -e "s,%%WWWGRP%%,${WWWGRP}," ${WRKSRC}/docs/conf/httpd.conf
-	@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/support/envvars-std
+		${REINPLACE_CMD} -e "s,%%FTPUSERS%%,$${FTPUSERS}," \
+			${WRKSRC}/docs/conf/extra/httpd-userdir.conf
+	${REINPLACE_CMD} -e "s,%%WWWOWN%%,${WWWOWN}," -e "s,%%WWWGRP%%,${WWWGRP}," \
+		${WRKSRC}/docs/conf/httpd.conf
+	${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/support/envvars-std
 
 post-install:
 	${MKDIR} ${ETCDIR}/Includes
 	${MKDIR} ${ETCDIR}/modules.d
 	${INSTALL_DATA} ${FILESDIR}/no-accf.conf ${ETCDIR}/Includes/
+	${INSTALL_DATA} ${FILESDIR}/README_modules.d ${ETCDIR}/modules.d
 
+
+# strip returns an error for non binary files, but we have a big mix
+	-${STRIP_CMD} ${PREFIX}/sbin/* 2>/dev/null
+	-${STRIP_CMD} ${PREFIX}/bin/*
+	-${STRIP_CMD} ${PREFIX}/libexec/apache24/mod_*.so
+
 .if ${PORT_OPTIONS:MLOG_FORENSIC}
-	@${INSTALL_SCRIPT} ${WRKSRC}/support/check_forensic ${PREFIX}/sbin
+	${INSTALL_SCRIPT} ${WRKSRC}/support/check_forensic ${PREFIX}/sbin
 .endif
 
 # maintainer only, check for new modules

Modified: trunk/www/apache24/Makefile.modules
===================================================================
--- trunk/www/apache24/Makefile.modules	2015-11-04 21:24:04 UTC (rev 20640)
+++ trunk/www/apache24/Makefile.modules	2015-11-04 22:09:35 UTC (rev 20641)
@@ -10,7 +10,7 @@
 # Maintainer note for OPTION handling:
 # To set additional option use
 #    PORT_OPTIONS+=
-# To unset an OPTION, even the OPTION is set in OPTIONSFILE use
+# To unset an OPTION, even the OPTION is set in OPTIONS_FILE use
 #    WITHOUT_MODULES+=
 #  Using OPTIONS_EXCLUDE and OPTIONS_OVERRIDE do not work as expected
 #  if the OPTION is enabled by the user, therefore we calculate
@@ -19,19 +19,6 @@
 
 .if defined(_PREMKINCLUDED)
 
-# check if APR was build with thread support
-.if exists(${APR_CONFIG})
-APR_LIBS!=	${SH} ${APR_CONFIG} --libs | ${SED} -e 's/-//g'
-.  if defined(APR_LIBS) && !empty(APR_LIBS)
-_T=pthread
-.    for lib in ${APR_LIBS}
-. 	if ${_T:M${lib}}
-APR_HAS_THREADS=	yes
-.	endif
-.    endfor
-.  endif
-.endif	# exists APR_CONFIG
-
 # check if APR-util module exists
 .if exists(${APU_CONFIG})
 .  if ${PORT_OPTIONS:MLDAP} || ${PORT_OPTIONS:MAUTHNZ_LDAP}
@@ -48,15 +35,6 @@
 .    endif
 .  endif
 
-# XXX apache24 needs only the apu-header
-#     perhaps we get in future the possibility to package dedicated APU modules
-#
-#.  if ${PORT_OPTIONS:MDBD} || ${PORT_OPTIONS:MAUTHN_DBD}
-#.    if !exists(${APU_DBD_MYSQL}) && !exists(${APU_DBD_PGSQL}) && !exists(${APU_DBD_SQLITE3})
-#IGNORE=	AUTHN_DBD and DBD requires APR-util to have DBD support build in.\
-#	Please rebuild APR at last with one DBD backend
-#.    endif
-#.  endif
 .endif	# exists APU_CONFIG
 
 # =============================================
@@ -63,12 +41,14 @@
 # if build with shared MPM the last module will be activated
 # see apache issue 53882
 
-# XXX in case we use OPTIONS for MPM 
+# XXX in case we use OPTIONS for MPM
 # we do not have a WITH_MPM variable
 .if ${PORT_OPTIONS:MMPM_SHARED}
+SUB_LIST+=		MPM_FALLBACK_CHECK=""
 PLIST_SUB+=		MPM_SHARED=""
 CONFIGURE_ARGS+=	--enable-mpms-shared=all
 .else
+SUB_LIST+=		MPM_FALLBACK_CHECK="\#"
 PLIST_SUB+=		MPM_SHARED="@comment "
 .endif
 
@@ -81,12 +61,6 @@
 .else
 IGNORE=	Unknown MPM:
 .endif
-
-.if ${PORT_OPTIONS:MMPM_WORKER} || ${PORT_OPTIONS:MMPM_EVENT}
-.  if exists(${APR_CONFIG}) && !defined(APR_HAS_THREADS)
-IGNORE=	requires APR threads. Please rebuild APR with THREAD support
-.  endif
-.endif
 # =============================================
 
 # build develop/example modules only with additional confirmation
@@ -153,13 +127,4 @@
 CONFIGURE_ARGS+=	--without-libxml2
 .endif
 
-.if defined(APR_HAS_THREADS)
-CFLAGS+=	${PTHREAD_CFLAGS}
-LDFLAGS+=	${PTHREAD_LIBS}
-.else
-.  if exists(${APR_CONFIG}) && ${PORT_OPTIONS:MMEM_CACHE}
-IGNORE=	MEM_CACHE requires APR threads. Please rebuild APR with THREAD support
-.  endif
-.endif
-
 .endif	# _PREMKINCLUDED

Modified: trunk/www/apache24/Makefile.options
===================================================================
--- trunk/www/apache24/Makefile.options	2015-11-04 21:24:04 UTC (rev 20640)
+++ trunk/www/apache24/Makefile.options	2015-11-04 22:09:35 UTC (rev 20641)
@@ -1,9 +1,9 @@
-# $MidnightBSD$
+# $FreeBSD: head/www/apache24/Makefile.options 399207 2015-10-13 18:17:28Z ohauer $
 
 # ===========================================================
-# The list of modules are no longer classified in CATEGORIES.
-# We use for enabled/disabled now the resulting modules from
-# configure --enable-modules=most
+# Only the most important modules are enabled per default in 
+# httpd.conf, therfore build all modules not depending on other
+# ports, marked as example or developer module.
 #
 # Required modules without OPTION:
 #   UNIXD LOG_CONFIG

Modified: trunk/www/apache24/files/patch-Makefile.in
===================================================================
--- trunk/www/apache24/files/patch-Makefile.in	2015-11-04 21:24:04 UTC (rev 20640)
+++ trunk/www/apache24/files/patch-Makefile.in	2015-11-04 22:09:35 UTC (rev 20641)
@@ -1,36 +1,38 @@
---- ./Makefile.in.orig	2012-12-17 12:50:41.000000000 +0100
-+++ ./Makefile.in	2013-03-24 16:01:58.000000000 +0100
-@@ -32,9 +32,10 @@
+--- Makefile.in.orig	2015-04-15 18:06:04 UTC
++++ Makefile.in
+@@ -32,12 +32,9 @@ include $(top_srcdir)/build/program.mk
  install-conf:
  	@echo Installing configuration files
  	@$(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(sysconfdir)/extra
 -	@$(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir)/original/extra
-+	@$(MKINSTALLDIRS) $(DESTDIR)$(EXAMPLESDIR) $(DESTDIR)$(EXAMPLESDIR)/extra
  	@cd $(top_srcdir)/docs/conf; \
  	for i in mime.types magic; do \
-+	    $(INSTALL_DATA) $$i $(DESTDIR)$(EXAMPLESDIR); \
- 	    if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
- 	        $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
- 	    fi; \
-@@ -78,14 +79,14 @@
+-	    if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
+-	        $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
+-	    fi; \
++	    $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir)/$${i}.sample; \
+ 	done; \
+ 	for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
+ 	    cd $$j ; \
+@@ -98,15 +95,12 @@ install-conf:
  	    				-e 's#@@SSLPort@@#$(SSLPORT)#g' \
  	    				< $$i; \
  	    		fi \
 -	    	) > $(DESTDIR)$(sysconfdir)/original/$$i; \
 -	    	chmod 0644 $(DESTDIR)$(sysconfdir)/original/$$i; \
-+	    	) > $(DESTDIR)$(EXAMPLESDIR)/$$i; \
-+	    	chmod 0644 $(DESTDIR)$(EXAMPLESDIR)/$$i; \
++	    	) > $(DESTDIR)$(sysconfdir)/$${i}.sample; \
++	    	chmod 0644 $(DESTDIR)$(sysconfdir)/$${i}.sample; \
  	    	file=$$i; \
  	    	if [ "$$i" = "httpd.conf" ]; then \
  	    		file=`echo $$i|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
  	    	fi; \
- 	    	if test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
+-	    	if test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
 -	    		$(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/original/$$i $(DESTDIR)$(sysconfdir)/$$file; \
-+	    		$(INSTALL_DATA) $(DESTDIR)$(EXAMPLESDIR)/$$i $(DESTDIR)$(sysconfdir)/$$file; \
+-	    	fi; \
  	    	fi; \
- 	    	fi; \
  	    done ; \
-@@ -137,48 +138,26 @@
+ 	done ; \
+@@ -157,48 +151,25 @@ dox:
  	doxygen $(top_srcdir)/docs/doxygen.conf
  
  install-htdocs:
@@ -47,9 +49,8 @@
 -		cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
 -	    fi; \
 -	fi
-+	    $(MKINSTALLDIRS) $(DESTDIR)$(EXAMPLESDIR) ; \
-+		test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp index.html $(DESTDIR)$(EXAMPLESDIR)) && \
-+		( [ ! -f $(DESTDIR)$(htdocsdir)/index.html ] && cp -p $(DESTDIR)$(EXAMPLESDIR)/index.html $(DESTDIR)$(htdocsdir)/index.html) || true
++	    $(MKINSTALLDIRS) $(DESTDIR)$(DATADIR)/misc ; \
++		test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp index.html $(DESTDIR)$(DATADIR)/misc) || true
  
  install-error:
 -	- at if [ -d $(DESTDIR)$(errordir) ]; then \
@@ -89,12 +90,10 @@
  
  install-other:
  	@test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
-@@ -229,14 +208,15 @@
- 	@test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
- 	@test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
+@@ -251,12 +222,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
+ 	@cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
+ 	@cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
 -	@if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
 -	  $(RSYNC) --exclude .svn -rlpt --numeric-ids $(top_srcdir)/docs/manual/ $(DESTDIR)$(manualdir)/; \
 -	else \
@@ -101,15 +100,7 @@
 -	  cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir); \
 -	  cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
 -	fi
-+	for i in ab.1 apxs.1 dbmmanage.1 htdbm.1 htdigest.1 htpasswd.1 httxt2dbm.1 logresolve.1 ; do \
-+	 ${INSTALL_MAN} $(top_srcdir)/docs/man/$$i $(DESTDIR)$(mandir)/man1; \
-+	done
-+	for i in apachectl.8 fcgistarter.8 htcacheclean.8 httpd.8 rotatelogs.8 suexec.8 ; do \
-+	 ${INSTALL_MAN} $(top_srcdir)/docs/man/$$i $(DESTDIR)$(mandir)/man8; \
-+	done
-+.if !defined(NOPORTDOCS)
-+	  cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir);
-+.endif
++	cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir)
  
  install-suexec:
  	@if test -f $(builddir)/support/suexec; then \

Added: trunk/www/apache24/files/pkg-deinstall.in
===================================================================
--- trunk/www/apache24/files/pkg-deinstall.in	                        (rev 0)
+++ trunk/www/apache24/files/pkg-deinstall.in	2015-11-04 22:09:35 UTC (rev 20641)
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# $MidnightBSD$
+
+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
+


Property changes on: trunk/www/apache24/files/pkg-deinstall.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/apache24/files/pkg-install.in
===================================================================
--- trunk/www/apache24/files/pkg-install.in	                        (rev 0)
+++ trunk/www/apache24/files/pkg-install.in	2015-11-04 22:09:35 UTC (rev 20641)
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# $MidnightBSD$
+
+# 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
+


Property changes on: trunk/www/apache24/files/pkg-install.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/www/apache24/pkg-help
===================================================================
--- trunk/www/apache24/pkg-help	2015-11-04 21:24:04 UTC (rev 20640)
+++ trunk/www/apache24/pkg-help	2015-11-04 22:09:35 UTC (rev 20641)
@@ -1,25 +1,21 @@
 Hints:
 
-- only a subset from the selected modules are enabled by default in
-  httpd.conf.
+  - only a subset from the selected modules are activated by default in
+    httpd.conf.
 
-- by default apache24 builds with static prefork MPM
+  - by default apache24 builds mpm_prefork, mpm_event and mpm_worker
+    as dynamically loadable module.  Even mpm_event is the preferred
+    MPM, mpm_prefork will be activated to keep compatibility with 
+    pre-build php/perl/python/... modules (used by apache22/apache24).
 
-- if MPM_SHARED is selected then all MPM modules will be build, but
-  only the selected DEFAULT MPM module will be registered and enabled 
-  in httpd.conf. For more information see:
-  https://issues.apache.org/bugzilla/show_bug.cgi?id=53882
 
 Note:
-  Shared MPM loading is at the moment not supported by most additional
-  modules (php/perl/python) because they need to know the apache
-  threading model during build time
 
   To build the develop/example modules specify additional the parameter
-  -DIAMADEVELOPER (I am a developer)
+    -DIAMADEVELOPER (I am a developer)
 
-For detailed module description visit
-  http://httpd.apache.org/docs/2.4/mod/
+  For detailed module description visit
+    http://httpd.apache.org/docs/2.4/mod/
 
-and for the develop/example modules
-  http://httpd.apache.org/docs/2.2/programs/configure.html
+  and for the develop/example modules
+    http://httpd.apache.org/docs/2.2/programs/configure.html#developermodules

Modified: trunk/www/apache24/pkg-message
===================================================================
--- trunk/www/apache24/pkg-message	2015-11-04 21:24:04 UTC (rev 20640)
+++ trunk/www/apache24/pkg-message	2015-11-04 22:09:35 UTC (rev 20641)
@@ -4,3 +4,20 @@
 Your hostname must be resolvable using at least 1 mechanism in
 /etc/nsswitch.conf typically DNS or /etc/hosts or apache might
 have issues starting depending on the modules you are using.
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+- apache24 default build changed from static MPM to modular MPM
+- more modules are now enabled per default in the port
+- icons and error pages moved from WWWDIR to DATADIR
+
+   If build with modular MPM and no MPM is activated in 
+   httpd.conf, then mpm_prefork will be activated as default
+   MPM in etc/apache24/modules.d to keep compatibility with 
+   existing php/perl/python modules!
+
+Please compare the existing httpd.conf with httpd.conf.sample
+and merge missing modules/instructions into httpd.conf!
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+

Modified: trunk/www/apache24/pkg-plist
===================================================================
--- trunk/www/apache24/pkg-plist	2015-11-04 21:24:04 UTC (rev 20640)
+++ trunk/www/apache24/pkg-plist	2015-11-04 22:09:35 UTC (rev 20641)
@@ -20,6 +20,7 @@
 @sample %%ETCDIR%%/httpd.conf.sample
 @sample %%ETCDIR%%/magic.sample
 @sample %%ETCDIR%%/mime.types.sample
+%%ETCDIR%%/modules.d/README_modules.d
 include/apache24/ap_compat.h
 include/apache24/ap_config.h
 include/apache24/ap_config_auto.h
@@ -73,6 +74,7 @@
 include/apache24/util_charset.h
 include/apache24/util_cookies.h
 include/apache24/util_ebcdic.h
+include/apache24/util_fcgi.h
 include/apache24/util_filter.h
 include/apache24/util_ldap.h
 include/apache24/util_md5.h
@@ -87,6 +89,7 @@
 %%MOD_ALIAS%%libexec/apache24/mod_alias.so
 %%MOD_ALLOWMETHODS%%libexec/apache24/mod_allowmethods.so
 %%MOD_ASIS%%libexec/apache24/mod_asis.so
+%%MOD_AUTHNZ_FCGI%%libexec/apache24/mod_authnz_fcgi.so
 %%MOD_AUTHNZ_LDAP%%libexec/apache24/mod_authnz_ldap.so
 %%MOD_AUTHN_ANON%%libexec/apache24/mod_authn_anon.so
 %%MOD_AUTHN_CORE%%libexec/apache24/mod_authn_core.so
@@ -154,7 +157,7 @@
 %%MOD_MACRO%%libexec/apache24/mod_macro.so
 %%MOD_MIME%%libexec/apache24/mod_mime.so
 %%MOD_MIME_MAGIC%%libexec/apache24/mod_mime_magic.so
- at comment %%MPM_SHARED%%libexec/apache24/mod_mpm_event.so
+%%MPM_SHARED%%libexec/apache24/mod_mpm_event.so
 %%MPM_SHARED%%libexec/apache24/mod_mpm_prefork.so
 %%MPM_SHARED%%libexec/apache24/mod_mpm_worker.so
 %%MOD_NEGOTIATION%%libexec/apache24/mod_negotiation.so
@@ -230,7 +233,7 @@
 sbin/httpd
 sbin/rotatelogs
 sbin/split-logfile
-%%SUEXEC%%sbin/suexec
+%%SUEXEC%%@(,,4755) sbin/suexec
 %%DATADIR%%/build/config.nice
 %%DATADIR%%/build/config_vars.mk
 %%DATADIR%%/build/instdso.sh
@@ -240,57 +243,11 @@
 %%DATADIR%%/build/program.mk
 %%DATADIR%%/build/rules.mk
 %%DATADIR%%/build/special.mk
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-autoindex.conf %D/%%EXAMPLESDIR%%/extra/httpd-autoindex.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-autoindex.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-autoindex.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-autoindex.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-autoindex.conf %D/%%ETCDIR%%/extra/httpd-autoindex.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-dav.conf %D/%%EXAMPLESDIR%%/extra/httpd-dav.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-dav.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-dav.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-dav.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-dav.conf %D/%%ETCDIR%%/extra/httpd-dav.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-default.conf %D/%%EXAMPLESDIR%%/extra/httpd-default.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-default.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-default.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-default.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-default.conf %D/%%ETCDIR%%/extra/httpd-default.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-info.conf %D/%%EXAMPLESDIR%%/extra/httpd-info.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-info.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-info.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-info.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-info.conf %D/%%ETCDIR%%/extra/httpd-info.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-languages.conf %D/%%EXAMPLESDIR%%/extra/httpd-languages.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-languages.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-languages.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-languages.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-languages.conf %D/%%ETCDIR%%/extra/httpd-languages.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-manual.conf %D/%%EXAMPLESDIR%%/extra/httpd-manual.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-manual.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-manual.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-manual.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-manual.conf %D/%%ETCDIR%%/extra/httpd-manual.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-mpm.conf %D/%%EXAMPLESDIR%%/extra/httpd-mpm.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-mpm.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-mpm.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-mpm.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-mpm.conf %D/%%ETCDIR%%/extra/httpd-mpm.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-multilang-errordoc.conf %D/%%EXAMPLESDIR%%/extra/httpd-multilang-errordoc.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-multilang-errordoc.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-multilang-errordoc.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-multilang-errordoc.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-multilang-errordoc.conf %D/%%ETCDIR%%/extra/httpd-multilang-errordoc.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-ssl.conf %D/%%EXAMPLESDIR%%/extra/httpd-ssl.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-ssl.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-ssl.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-ssl.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-ssl.conf %D/%%ETCDIR%%/extra/httpd-ssl.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-userdir.conf %D/%%EXAMPLESDIR%%/extra/httpd-userdir.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-userdir.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-userdir.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-userdir.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-userdir.conf %D/%%ETCDIR%%/extra/httpd-userdir.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/httpd-vhosts.conf %D/%%EXAMPLESDIR%%/extra/httpd-vhosts.conf; then rm -f %D/%%ETCDIR%%/extra/httpd-vhosts.conf; fi
-%%EXAMPLESDIR%%/extra/httpd-vhosts.conf
- at exec [ -f %D/%%ETCDIR%%/extra/httpd-vhosts.conf ] || cp %D/%%EXAMPLESDIR%%/extra/httpd-vhosts.conf %D/%%ETCDIR%%/extra/httpd-vhosts.conf
- at unexec if cmp -s %D/%%ETCDIR%%/extra/proxy-html.conf %D/%%EXAMPLESDIR%%/extra/proxy-html.conf; then rm -f %D/%%ETCDIR%%/extra/proxy-html.conf; fi
-%%EXAMPLESDIR%%/extra/proxy-html.conf
- at exec [ -f %D/%%ETCDIR%%/extra/proxy-html.conf ] || cp %D/%%EXAMPLESDIR%%/extra/proxy-html.conf %D/%%ETCDIR%%/extra/proxy-html.conf
- at unexec if cmp %D/%%ETCDIR%%/httpd.conf %D/%%EXAMPLESDIR%%/httpd.conf; then rm -vf %D/%%ETCDIR%%/httpd.conf; fi
-%%EXAMPLESDIR%%/httpd.conf
- at exec [ -f %D/%%ETCDIR%%/httpd.conf ] || cp -v %D/%%EXAMPLESDIR%%/httpd.conf %D/%%ETCDIR%%/httpd.conf
- at unexec if cmp -s %D/%%WWWDIR%%/data/index.html %D/%%EXAMPLESDIR%%/index.html; then rm -f %D/%%WWWDIR%%/data/index.html; fi
-%%EXAMPLESDIR%%/index.html
- at exec [ -d %D/%%WWWDIR%%/data ] || mkdir -p %D/%%WWWDIR%%/data
- at exec [ -f %D/%%WWWDIR%%/data/index.html ] || cp %D/%%EXAMPLESDIR%%/index.html %D/%%WWWDIR%%/data/index.html
- at unexec if cmp -s %D/%%ETCDIR%%/magic %D/%%EXAMPLESDIR%%/magic; then rm -f %D/%%ETCDIR%%/magic; fi
-%%EXAMPLESDIR%%/magic
- at exec [ -f %D/%%ETCDIR%%/magic ] || cp %D/%%EXAMPLESDIR%%/magic %D/%%ETCDIR%%/magic
- at unexec if cmp -s %D/%%ETCDIR%%/mime.types %D/%%EXAMPLESDIR%%/mime.types; then rm -f %D/%%ETCDIR%%/mime.types; fi
-%%EXAMPLESDIR%%/mime.types
- at exec [ -f %D/%%ETCDIR%%/mime.types ] || cp %D/%%EXAMPLESDIR%%/mime.types %D/%%ETCDIR%%/mime.types
-%%WWWDIR%%/cgi-bin/printenv
-%%WWWDIR%%/cgi-bin/test-cgi
+ at unexec if cmp -s %D/%%WWWDIR%%/data/index.html %D/%%DATADIR%%/misc/index.html; then rm -f %D/%%WWWDIR%%/data/index.html; fi
+%%DATADIR%%/misc/index.html
+ at exec [ -f %D/%%WWWDIR%%/data/index.html ] || cp %D/%%DATADIR%%/misc/index.html %D/%%WWWDIR%%/data/index.html
+@(,,0400) %%WWWDIR%%/cgi-bin/printenv
+@(,,0400) %%WWWDIR%%/cgi-bin/test-cgi
 %%WWWDIR%%/error/HTTP_BAD_GATEWAY.html.var
 %%WWWDIR%%/error/HTTP_BAD_REQUEST.html.var
 %%WWWDIR%%/error/HTTP_FORBIDDEN.html.var
@@ -553,22 +510,6 @@
 %%WWWDIR%%/icons/world2.gif
 %%WWWDIR%%/icons/world2.png
 %%WWWDIR%%/icons/xml.png
- at dirrm %%WWWDIR%%/icons/small
- at dirrm %%WWWDIR%%/icons
- at dirrm %%WWWDIR%%/error/include
- at dirrm %%WWWDIR%%/error
- at dirrmtry %%WWWDIR%%/data
- at dirrmtry %%WWWDIR%%/cgi-bin
- at dirrmtry %%WWWDIR%%
- at dirrm %%EXAMPLESDIR%%/extra
- at dirrm %%EXAMPLESDIR%%
- at dirrm %%DATADIR%%/build
- at dirrm %%DATADIR%%
- at dirrmtry libexec/apache24
- at dirrmtry include/apache24
 @unexec rm -f %D/%%ETCDIR%%/httpd.conf.bak 2> /dev/null || true
- at dirrmtry %%ETCDIR%%/modules.d
- at dirrmtry %%ETCDIR%%/extra
- at dirrmtry %%ETCDIR%%/envvars.d
- at dirrmtry %%ETCDIR%%/Includes
- at dirrmtry %%ETCDIR%%
+ at dir %%ETCDIR%%/envvars.d
+ at dir %%WWWDIR%%/data



More information about the Midnightbsd-cvs mailing list