diff options
author | Olli Hauer <ohauer@FreeBSD.org> | 2012-09-02 14:31:58 +0000 |
---|---|---|
committer | Olli Hauer <ohauer@FreeBSD.org> | 2012-09-02 14:31:58 +0000 |
commit | 2a91c25f5f9c524a55625711d917a8605204ebc8 (patch) | |
tree | 93b00e5cf197cb3974804f1482cea1b67d775f9f /www/apache22 | |
parent | - Fix 100% usage issue (diff) |
devel/apr1 [1]
- update APR to 1.4.6
- update APR-util to 1.4.1
- remove PKGNAMESUFFIX'es
www/apache-(event|itk|peruser|worker)-mpm
- adopt new Makefile header, adjust
PKGNAMESUFFIX in apache22 masterport
PKGNAME match now LATEST_LINK
www/apache22 [2]-[6]
- rewrite for options NG
- PORTNAME s|apache|apache22|
- remove APR APR-util specific otions,
will be checked now with help of apr/u-1-config
Mk/bsd.apache.mk
- rewrite for options NG
- remove no longer needet make targets
(show-categories, make-options-list)
[1]
PR: 165143
[2]-[6]
PR: 130479
PR: 153406
PR: 158565
PR: 168769
PR: 167965
with hat apache@
Notes
Notes:
svn path=/head/; revision=303550
Diffstat (limited to 'www/apache22')
-rw-r--r-- | www/apache22/Makefile | 102 | ||||
-rw-r--r-- | www/apache22/Makefile.doc | 37 | ||||
-rw-r--r-- | www/apache22/Makefile.modules | 154 | ||||
-rw-r--r-- | www/apache22/Makefile.options | 326 | ||||
-rw-r--r-- | www/apache22/files/extra-patch-server__config.c | 14 | ||||
-rw-r--r-- | www/apache22/files/extra-patch-suexec_userdir | 55 | ||||
-rw-r--r-- | www/apache22/files/mpm-itk-limits | 53 | ||||
-rw-r--r-- | www/apache22/pkg-plist | 27 |
8 files changed, 530 insertions, 238 deletions
diff --git a/www/apache22/Makefile b/www/apache22/Makefile index e486ec4ec1ee..f26b27f7c8ab 100644 --- a/www/apache22/Makefile +++ b/www/apache22/Makefile @@ -1,22 +1,15 @@ -# New ports collection makefile for: apache22 -# Date created: Dec 11 2004 -# Whom: Clement Laforet <clement@FreeBSD.org> -# # $FreeBSD$ -# -# For more information, please read Makefile.doc -# -PORTNAME= apache +PORTNAME= apache22 PORTVERSION= 2.2.22 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} DISTNAME= httpd-${PORTVERSION} DIST_SUBDIR= apache22 MAINTAINER?= apache@FreeBSD.org -COMMENT?= Version 2.2.x of Apache web server with ${WITH_MPM:L} MPM. +COMMENT?= Version 2.2.x of Apache web server with ${WITH_MPM} MPM. LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2 \ apr-1:${PORTSDIR}/devel/apr1 \ @@ -24,14 +17,11 @@ LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2 \ MAKE_JOBS_SAFE= yes -# to be removed if port is renamed to apache22 -ETCDIR= ${PREFIX}/etc/${PORTNAME}22 -WWWDIR= ${PREFIX}/www/${PORTNAME}22 LATEST_LINK?= apache22 CONFLICTS= caudium14-1.* \ apache-2.0.* apache-*-2.0.* \ - apache-*-2.2.* + apache-*-2.2.* apache22-*-2.2.* USE_APACHE= common22 USE_BZIP2= yes @@ -58,8 +48,17 @@ MPM_ITK_VERSION?= 20110321-01 .include "${APACHEDIR}/Makefile.options" .include <bsd.port.options.mk> +.include "${APACHEDIR}/Makefile.doc" + +APR_CONFIG?= ${LOCALBASE}/bin/apr-1-config +APU_CONFIG?= ${LOCALBASE}/bin/apu-1-config -APU_CONFIG?= ${LOCALBASE}/bin/apu-1-config +# APU modules used by AUTHN_DBD DBD +APU_DBD_MYSQL?= ${LOCALBASE}/lib/apr-util-1/apr_dbd_mysql.so +APU_DBD_PGSQL?= ${LOCALBASE}/lib/apr-util-1/apr_dbd_pgsql.so +APU_DBD_SQLITE3?= ${LOCALBASE}/lib/apr-util-1/apr_dbd_sqlite3.so +# APU module used by AUTHNZ_LDAP LDAP +APU_LDAP?= ${LOCALBASE}/lib/apr-util-1/apr_ldap.so CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ --enable-layout=FreeBSD \ @@ -69,7 +68,7 @@ CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ --with-iconv=${LOCALBASE} \ --enable-http \ --with-pcre=${LOCALBASE} \ - --with-apr=${LOCALBASE}/bin/apr-1-config \ + --with-apr=${APR_CONFIG} \ --with-apr-util=${APU_CONFIG} CONFIGURE_ENV= \ @@ -81,54 +80,36 @@ PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,} MAKE_ENV+= EXPR_COMPAT=yes \ INSTALL_MAN="${INSTALL_MAN}" -# ============================================= +#===================================================== # CONFIGURE_ARGS willl be handled in Makefile.modules, # here we do only OPTIONS fixups -.if defined(WITH_SUEXEC_RSRCLIMIT) -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-suexec_rsrclimit -.if !defined(WITH_SUEXEC) -IGNORE= suEXEC resource limit patch requires mod_suexec.\ - Please (re)run 'make config' and choose SUEXEC option also -.endif -.endif - -.if !defined(WITHOUT_SSL) +.if ${PORT_OPTIONS:MSSL} USE_OPENSSL= yes -WITH_MODULES+= SSL -.endif - -.if defined(WITH_AUTHNZ_LDAP) -WITH_LDAP= yes .endif -.if defined (WITH_LDAP) -USE_OPENLDAP= yes -WITH_AUTHNZ_LDAP=yes -.endif - -.if defined(WITH_MYSQL) -USE_MYSQL= yes -WITH_THREADS= yes -.endif - -.if defined(WITH_PGSQL) -USE_PGSQL= yes +.if ${PORT_OPTIONS:MSUEXEC_RSRCLIMIT} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-suexec_rsrclimit +. if empty(PORT_OPTIONS:MSUEXEC) +IGNORE= suEXEC resource limit patch requires mod_suexec.\ + Please (re)run 'make config' and choose SUEXEC option also +. endif .endif -.if defined(WITH_SQLITE) -USE_SQLITE= yes +.if ${PORT_OPTIONS:MSUEXEC_USERDIR} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-suexec_userdir +. if empty(PORT_OPTIONS:MSUEXEC) +IGNORE= suEXEC UserDir patch requires mod_suexec.\ + Please (re)run 'make config' and choose SUEXEC option also +. endif .endif -.include "${APACHEDIR}/Makefile.doc" .include <bsd.port.pre.mk> .include "${APACHEDIR}/Makefile.modules" -pre-everything:: +pre-configure:: @${ECHO_MSG} "" @${ECHO_MSG} " You can check your modules configuration by using make show-modules" - @${ECHO_MSG} " To see all available knobs, type make show-options" - @${ECHO_MSG} " To see all modules in different categories, type make show-categories" @${ECHO_MSG} "" show-options: @@ -146,19 +127,28 @@ post-configure: @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/support/envvars-std post-install: - @${MKDIR} ${PREFIX}/etc/apache22/envvars.d - @${MKDIR} ${PREFIX}/etc/apache22/Includes - @${INSTALL_DATA} ${FILESDIR}/no-accf.conf ${PREFIX}/etc/apache22/Includes + @${MKDIR} ${ETCDIR}/envvars.d + @${MKDIR} ${ETCDIR}/Includes + @${INSTALL_DATA} ${FILESDIR}/no-accf.conf ${ETCDIR}/Includes/ -.if defined(WITH_LOG_FORENSIC) +.if ${PORT_OPTIONS:MLOG_FORENSIC} @${INSTALL_SCRIPT} ${WRKSRC}/support/check_forensic ${PREFIX}/sbin .endif -.if !defined(NOPORTDOCS) -.for dir in style/lang style/xsl/util style/xsl +.if ${PORT_OPTIONS:MDOCS} +. for dir in style/lang style/xsl/util style/xsl @[ -d ${DOCSDIR}/${dir}/ ] && ${TOUCH} ${DOCSDIR}/${dir}/.keepme -.endfor +. endfor .endif @${CAT} ${PKGMESSAGE} +# maintainer only, check for new modules +modlist: extract + @${AWK} '/: checking whether to enable mod_/ \ + {printf "%%%%%s%%%%libexec/apache22/%s.so\n", \ + toupper($$8), $$8}' ${WRKSRC}/configure \ + | ${TR} -d '"' \ + | ${GREP} -E -v 'MOD_(ECHO|EXAMPLE|HTTP|IDENT|ISAPI|SO)' \ + | ${SORT} -u + .include <bsd.port.post.mk> diff --git a/www/apache22/Makefile.doc b/www/apache22/Makefile.doc index bc8f21402745..0dccb2f3c4a1 100644 --- a/www/apache22/Makefile.doc +++ b/www/apache22/Makefile.doc @@ -1,13 +1,7 @@ -# Makefile.doc -# Author: Clement Laforet <clement@FreeBSD.org> -# -# This files contains: -# - make options output -# - apache22 man/docs routines -# # $FreeBSD$ # - +# Author: Clement Laforet <clement@FreeBSD.org> +# ## ## By default, modules are compiled as dynamically loadable modules (DSO). ## @@ -21,11 +15,9 @@ ## event ## itk ## WITH_HTTP_PORT: default: 80 -## WITHOUT_V4MAPPED -## WITH_IPV6_V6ONLY: Don't allow IPv6 sockets to handle IPv4 -## connections +## ## WITH_STATIC_SUPPORT: Build statically linked support binaries -## WITH_STATIC_APACHE: Build a static version of httpd (implies +## WITH_STATIC_APACHE: Build a static version of httpd (implies ## WITH_STATIC_MODULES) ## WITH_ALL_STATIC_MODULES: All modules will be statically linked. ## WITH_STATIC_MODULES (*): List of modules to build modules statics @@ -34,25 +26,26 @@ ## WITH_MODULES or with default configuration ## use 'make show-modules', to check if they are ## enabled) -## WITH_SUEXEC: Enable suExec support -## SUEXEC_DOCROOT: SuExec root directory +## WITH_SUEXEC: Enable suEXEC support +## SUEXEC_DOCROOT: suEXEC root directory ## SUEXEC_USERDIR: User subdirectory (default public_html) ## SUEXEC_SAFEPATH: Set the safepath -## SUEXEC_LOGFILE: Set log file for suexec (default: /var/log/httpd-suexec.log) +## SUEXEC_LOGFILE: Set log file for suEXEC (default: /var/log/httpd-suexec.log) ## SUEXEC_UIDMIN: Minimal allowed UID (default 1000) ## SUEXEC_GIDMIN: Minimal allowed GID (default 1000) -## SUEXEC_CALLER: User allowed to call SuExec (default +## SUEXEC_CALLER: User allowed to call suEXEC (default ## ${WWWOWN} (www)) -## SUEXEC_UMASK: Defines umask for suexec'd process(default: +## SUEXEC_UMASK: Defines umask for suEXEC'd process(default: ## unset) -## WITH_DEBUG: Build a debug versoin of apache (set CFLAGS +## WITH_DEBUG: Build a debug version of apache (set CFLAGS ## to "-O0 -g -ggdb3" or ${DEBUG_FLAGS} and ## defines WITH_EXCEPTION_HOOK too) ## WITH_EXCEPTION_HOOK: Enable fatal exception hook ## -## Optional patches: +## Optional patches without option: ## WITH_ITK_PERDIR_REGEX Add the per-directory setting AssignUserFromPath for mpm-itk ## as described on http://www.pvv.ntnu.no/~knuta/mpm-itk/ +## WITH_ITK_LIMITS Add rlimits based on login class for mpm-itk ## ## Available make targets: ## config: open the configure dialog @@ -61,16 +54,14 @@ ## show-modules: prints list of available modules ## ## Examples (*): -## make WITH_STATIC_MODULES="SSL REWRITE INCLUDE" WITH_EXPERIMENTAL_MODULES=yes +## make WITH_STATIC_MODULES="SSL REWRITE INCLUDE" ## Note: If you define your custom options in /etc/make.conf, don't forget ## to do not use quotes. ## -DOCSDIR= ${PREFIX}/share/doc/apache22 -EXAMPLESDIR= ${PREFIX}/share/examples/apache22 MAKE_ENV+= EXAMPLESDIR=${EXAMPLESDIR} -.if defined(NOPORTDOCS) +.if empty(PORT_OPTIONS:MDOCS) MAKE_ENV+= NOPORTDOCS=yes .endif diff --git a/www/apache22/Makefile.modules b/www/apache22/Makefile.modules index 6762dbff705a..c642233ff195 100644 --- a/www/apache22/Makefile.modules +++ b/www/apache22/Makefile.modules @@ -1,61 +1,101 @@ -# Makefile.modules -# Author: Clement Laforet <clement@FreeBSD.org> -# -# This file is used to build modules list, DBM dependencies and MPM selection. -# I hope it can easily handle external modules (such as mod_perl) or MPMs, like -# muxmpm. +# $FreeBSD$ # -# Note to myself: (to generate PLIST_SUB entries for modules) +# Note by Clement Laforet: (to generate PLIST_SUB entries for modules) # gsed 's/^\(.*\)mod\(.*\)\.so/%%\MOD\U\2%%\L\1mod\2\.so/' pkg-plist > tmp # mv tmp pkg-plist # -# $FreeBSD$ -# + +# ============================================= +# Maintainer note for OPTION handling: +# To set additional option use +# PORT_OPTIONS+= +# To unset an OPTION, even the OPTION is set in OPTIONSFILE 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 +# them in bsd.apache.mk with help of WITHOUT_MODULES +# The other methode is to set IGNORE's and force the user to adjust OPTIONS .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} +. if !exists(${APU_LDAP}) +IGNORE= LDAP and AUTHNZ_LDAP requires APR-util to have LDAP support built in.\ + Please rebuild APR with LDAP support +. endif +. endif + +. 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 + # ============================================= # MPM's: prefork worker event itk peruser -.if ${WITH_MPM:L} == "prefork" +.if ${WITH_MPM} == "prefork" PLIST_SUB+= WORKER="@comment " EVENT="@comment " - -.elif ${WITH_MPM:L} == "worker" -PLIST_SUB+= WORKER="" EVENT="@comment " - -.elif ${WITH_MPM:L} == "event" +.elif ${WITH_MPM} == "worker" +PLIST_SUB+= WORKER="" EVENT="@comment " +.elif ${WITH_MPM} == "event" PLIST_SUB+= WORKER="@comment " EVENT="" - -.elif ${WITH_MPM:L} == "peruser" +.elif ${WITH_MPM} == "peruser" PLIST_SUB+= WORKER="@comment " EVENT="@comment " - -.elif ${WITH_MPM:L} == "itk" +.elif ${WITH_MPM} == "itk" PLIST_SUB+= WORKER="@comment " EVENT="@comment " EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-${MPM_ITK_VERSION} -. if defined (WITH_ITK_PERDIR_REGEX) -EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-perdir-regex -. endif - +. if defined (WITH_ITK_PERDIR_REGEX) && defined (WITH_ITK_LIMITS) +IGNORE= Use only one patch option not both (WITH_ITK_PERDIR_REGEX or WITH_ITK_LIMITS) +. endif +. if defined (WITH_ITK_PERDIR_REGEX) +EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-perdir-regex +. endif +. if defined (WITH_ITK_LIMITS) +EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-limits +. endif .else -IGNORE= "Unknown MPM: ${WITH_MPM}" +IGNORE= Unknown MPM: ${WITH_MPM} .endif # MPM prefork -.if ${WITH_MPM:L} != "prefork" -PKGNAMESUFFIX= -${WITH_MPM:L} -LATEST_LINK= apache22-${WITH_MPM:L}-mpm +.if ${WITH_MPM} != "prefork" +PKGNAMESUFFIX= -${WITH_MPM}-mpm +LATEST_LINK= apache22-${WITH_MPM}-mpm .endif -.if ${WITH_MPM:L} == "worker" || ${WITH_MPM:L} == "event" -WITH_THREADS= yes -WITH_MODULES+= CGID -WITHOUT_MODULES+= CGI +.if ${WITH_MPM} == "worker" || ${WITH_MPM} == "event" +PORT_OPTIONS+= CGID +.if ${PORT_OPTIONS:MCGI} +IGNORE= does not build with CGI. Please de-select CGI and select CGID instead +.endif +.if exists(${APR_CONFIG}) && !defined(APR_HAS_THREADS) +IGNORE= requires APR threads. Please rebuild APR with THREAD support +. endif .endif # ============================================= -# XXX WITH_STATIC_SUPPORT : make.conf, or command line parameter +# The next three params are not converted to an option, +# they should be used only for special builds. .if defined(WITH_STATIC_SUPPORT) CONFIGURE_ARGS+= --enable-static-support .endif -# XXX WITH_DEBUG : make.conf, or command line parameter # debug overrides CFLAGS .if defined(WITH_DEBUG) DEBUG_FLAGS?= -O0 -g -ggdb3 @@ -64,53 +104,57 @@ CONFIGURE_ARGS+= --enable-maintainer-mode WITH_EXCEPTION_HOOK= yes .endif -# WITH_EXCEPTION_HOOK: parameter for command line or make.conf .if defined(WITH_EXCEPTION_HOOK) CONFIGURE_ARGS+= --enable-exception-hook .endif -.if !defined(WITHOUT_SSL) +.if ${PORT_OPTIONS:MSSL} CFLAGS+= -I${OPENSSLINC} LDFLAGS+= -L${OPENSSLLIB} CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} .endif -.if defined (WITH_AUTHNZ_LDAP) +.if ${PORT_OPTIONS:MAUTHNZ_LDAP} CONFIGURE_ARGS+= --enable-authnz-ldap .endif -.if defined (WITH_LDAP) +.if ${PORT_OPTIONS:MLDAP} CONFIGURE_ARGS+= --enable-ldap=shared .endif -.if !defined(WITH_THREADS) -WITHOUT_MODULES+= MEM_CACHE -. if defined(WITH_MEM_CACHE) -IGNORE+= mod_mem_cache requires WITH_THREADS -. endif -.else -CFLAGS+= ${PTHREAD_CFLAGS} -LDFLAGS+= ${PTHREAD_LIBS} +.if ${PORT_OPTIONS:MAUTH_BASIC} || ${PORT_OPTIONS:MAUTH_DIGEST} +. if !${APACHE_MODULES:MAUTHN*} +IGNORE= AUTH_BASIC and AUTH_DIGEST need at last one AUTHN provider +. endif .endif -.if !defined(WITH_MYSQL) && !defined(WITH_PGSQL) && !defined(WITH_SQLITE) -WITHOUT_MODULES+= AUTHN_DBD DBD -. if defined(WITH_DBD) || defined(WITH_AUTHN_DBD) -IGNORE+= You need to enable at least one DBD backend -. endif +.if ${PORT_OPTIONS:MAUTH_BASIC} +. if !${APACHE_MODULES:MAUTHZ*} +IGNORE= AUTH_BASIC need at last one AUTHZ provider +. endif +.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 -.if defined(WITHOUT_IPV6) +.if empty(PORT_OPTIONS:MIPV6) CONFIGURE_ARGS+= --disable-ipv6 .else CATEGORIES+= ipv6 -. if defined(WITH_IPV6_V6ONLY) || defined(WITHOUT_V4MAPPED) +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-server__config.c +. if ${PORT_OPTIONS:MIPV6_V6ONLY} CONFIGURE_ARGS+= --disable-v4-mapped -. else +. else CONFIGURE_ARGS+= --enable-v4-mapped -. endif +. endif .endif -CONFIGURE_ARGS+= --with-mpm=${WITH_MPM:L} +CONFIGURE_ARGS+= --with-mpm=${WITH_MPM} .endif # _PREMKINCLUDED diff --git a/www/apache22/Makefile.options b/www/apache22/Makefile.options index 02f7e3d2b990..4f6b21f87244 100644 --- a/www/apache22/Makefile.options +++ b/www/apache22/Makefile.options @@ -1,7 +1,14 @@ # $FreeBSD$ -.if !defined(Module_inc) -Module_inc= done +# XXX The follwing params are used for special buils, +# they will be not converted to an OPTION. +# WITH_MPM # prefork worker event itk peruser +# WITH_STATIC_SUPPORT # used in make.conf +# WITH_DEBUG # used in make.conf or as build param +# WITH_EXCEPTION_HOOK # used in make.conf or as build param +# WITH_ITK_PERDIR_REGEX # => itk-mpm extra patch +# WITH_ITK_LIMITS # => itk-mpm extra patch +# AUTH_MODULES= AUTH_BASIC AUTH_DIGEST AUTHN_MODULES= AUTHN_FILE AUTHN_DBD AUTHN_DBM AUTHN_ANON AUTHN_DEFAULT \ @@ -12,108 +19,245 @@ CACHE_MODULES= CACHE DISK_CACHE FILE_CACHE MEM_CACHE DAV_MODULES= DAV DAV_FS EXPERIMENTAL_MODULES= BUCKETEER CASE_FILTER CASE_FILTER_IN EXT_FILTER \ LOG_FORENSIC OPTIONAL_HOOK_EXPORT OPTIONAL_HOOK_IMPORT \ - OPTIONAL_FN_IMPORT OPTIONAL_FN_EXPORT + OPTIONAL_FN_IMPORT OPTIONAL_FN_EXPORT LDAP_MODULES= LDAP AUTHNZ_LDAP -MISC_MODULES+= ACTIONS ALIAS ASIS AUTOINDEX CERN_META \ +MISC_MODULES= ACTIONS ALIAS ASIS AUTOINDEX CERN_META \ CGI CHARSET_LITE DBD DEFLATE DIR DUMPIO ENV EXPIRES \ HEADERS IMAGEMAP INCLUDE INFO LOG_CONFIG LOGIO MIME \ MIME_MAGIC NEGOTIATION REWRITE SETENVIF SPELING STATUS SUBSTITUTE \ UNIQUE_ID USERDIR USERTRACK VHOST_ALIAS FILTER VERSION REQTIMEOUT -PROXY_MODULES= PROXY PROXY_CONNECT PROXY_FTP PROXY_HTTP PROXY_AJP PROXY_BALANCER \ +MISC_OFF_MODULES= DAV_LOCK +PROXY_MODULES= PROXY PROXY_AJP PROXY_BALANCER PROXY_CONNECT PROXY_FTP PROXY_HTTP \ PROXY_SCGI SSL_MODULES= SSL SUEXEC_MODULES= SUEXEC THREADS_MODULES= CGID -DEFAULT_MODULES_CATEGORIES= \ +DEFAULT_MODULES_CATEGORIES= \ AUTH AUTHN AUTHZ DAV CACHE MISC ALL_MODULES_CATEGORIES= AUTH AUTHN AUTHZ CACHE DAV EXPERIMENTAL LDAP \ - MISC PROXY SSL SUEXEC THREADS -.endif + MISC MISC_OFF PROXY SSL SUEXEC THREADS -OPTIONS= \ - THREADS "apr was build with threads" off \ - MYSQL "apu was build with MySQL" off \ - PGSQL "apu was build with PgSQL" off \ - SQLITE "apu was build with SQLite" off \ - IPV6 "IPv6 support" on +NO_OPTIONS_SORT= yes -OPTIONS+= \ - AUTH_BASIC "mod_auth_basic" on \ - AUTH_DIGEST "mod_auth_digest" on \ - AUTHN_FILE "mod_authn_file" on \ - AUTHN_DBD "mod_authn_dbd" off \ - AUTHN_DBM "mod_authn_dbm" on \ - AUTHN_ANON "mod_authn_anon" on \ - AUTHN_DEFAULT "mod_authn_default" on \ - AUTHN_ALIAS "mod_authn_alias" on \ - AUTHZ_HOST "mod_authz_host" on \ - AUTHZ_GROUPFILE "mod_authz_groupfile" on \ - AUTHZ_USER "mod_authz_user" on \ - AUTHZ_DBM "mod_authz_dbm" on \ - AUTHZ_OWNER "mod_authz_owner" on \ - AUTHZ_DEFAULT "mod_authz_default" on \ - CACHE "mod_cache" on \ - DISK_CACHE "mod_disk_cache" on \ - FILE_CACHE "mod_file_cache" on \ - MEM_CACHE "mod_mem_cache" off \ - DAV "mod_dav" on \ - DAV_FS "mod_dav_fs" on \ - BUCKETEER "mod_bucketeer" off \ - CASE_FILTER "mod_case_filter" off \ - CASE_FILTER_IN "mod_case_filter_in" off \ - EXT_FILTER "mod_ext_filter" off \ - LOG_FORENSIC "mod_log_forensic" off \ - OPTIONAL_HOOK_EXPORT "mod_optional_hook_export" off \ - OPTIONAL_HOOK_IMPORT "mod_optional_hook_import" off \ - OPTIONAL_FN_IMPORT "mod_optional_fn_import" off \ - OPTIONAL_FN_EXPORT "mod_optional_fn_export" off \ - LDAP "mod_ldap" off \ - AUTHNZ_LDAP "mod_authnz_ldap" off \ - ACTIONS "mod_actions" on \ - ALIAS "mod_alias" on \ - ASIS "mod_asis" on \ - AUTOINDEX "mod_autoindex" on \ - CERN_META "mod_cern_meta" on \ - CGI "mod_cgi" on \ - CHARSET_LITE "mod_charset_lite" on \ - DBD "mod_dbd" off \ - DEFLATE "mod_deflate" on \ - DIR "mod_dir" on \ - DUMPIO "mod_dumpio" on \ - ENV "mod_env" on \ - EXPIRES "mod_expires" on \ - HEADERS "mod_headers" on \ - IMAGEMAP "mod_imagemap" on \ - INCLUDE "mod_include" on \ - INFO "mod_info" on \ - LOG_CONFIG "mod_log_config" on \ - LOGIO "mod_logio" on \ - MIME "mod_mime" on \ - MIME_MAGIC "mod_mime_magic" on \ - NEGOTIATION "mod_negotiation" on \ - REWRITE "mod_rewrite" on \ - SETENVIF "mod_setenvif" on \ - SPELING "mod_speling" on \ - STATUS "mod_status" on \ - UNIQUE_ID "mod_unique_id" on \ - USERDIR "mod_userdir" on \ - USERTRACK "mod_usertrack" on \ - VHOST_ALIAS "mod_vhost_alias" on \ - FILTER "mod_filter" on \ - SUBSTITUTE "mod_substitute" off \ - VERSION "mod_version" on \ - PROXY "mod_proxy" off \ - PROXY_CONNECT "mod_proxy_connect" off \ - PROXY_FTP "mod_proxy_ftp" off \ - PROXY_HTTP "mod_proxy_http" off \ - PROXY_AJP "mod_proxy_ajp" off \ - PROXY_BALANCER "mod_proxy_balancer" off \ - PROXY_SCGI "mod_proxy_scgi" off \ - SSL "mod_ssl" on \ - SUEXEC "mod_suexec" off \ - SUEXEC_RSRCLIMIT "SuEXEC rlimits based on login class" off \ - REQTIMEOUT "mod_reqtimeout" on \ - CGID "mod_cgid" off +OPTIONS_DEFINE= \ + AUTH_BASIC \ + AUTH_DIGEST \ + AUTHN_ALIAS \ + AUTHN_ANON \ + AUTHN_DBD \ + AUTHN_DBM \ + AUTHN_DEFAULT \ + AUTHN_FILE \ + AUTHZ_DBM \ + AUTHZ_DEFAULT \ + AUTHZ_GROUPFILE \ + AUTHZ_HOST \ + AUTHZ_OWNER \ + AUTHZ_USER \ + AUTHNZ_LDAP \ + LDAP \ + DBD \ + CACHE \ + DISK_CACHE \ + FILE_CACHE \ + MEM_CACHE \ + DAV \ + DAV_FS \ + DAV_LOCK \ + ACTIONS \ + ALIAS \ + ASIS \ + AUTOINDEX \ + CERN_META \ + CGI \ + CGID \ + CHARSET_LITE \ + DEFLATE \ + DIR \ + DUMPIO \ + ENV \ + EXPIRES \ + HEADERS \ + IMAGEMAP \ + INCLUDE \ + INFO \ + LOG_CONFIG \ + LOGIO \ + MIME \ + MIME_MAGIC \ + NEGOTIATION \ + REWRITE \ + SETENVIF \ + SPELING \ + STATUS \ + UNIQUE_ID \ + USERDIR \ + USERTRACK \ + VHOST_ALIAS \ + FILTER \ + SUBSTITUTE \ + VERSION \ + SSL \ + SUEXEC \ + SUEXEC_RSRCLIMIT \ + SUEXEC_USERDIR \ + REQTIMEOUT \ + PROXY \ + BUCKETEER \ + CASE_FILTER \ + CASE_FILTER_IN \ + EXT_FILTER \ + LOG_FORENSIC \ + OPTIONAL_HOOK_EXPORT \ + OPTIONAL_HOOK_IMPORT \ + OPTIONAL_FN_IMPORT \ + OPTIONAL_FN_EXPORT + +OPTIONS_SINGLE=INET +OPTIONS_SINGLE_INET=IPV6 IPV4_ONLY IPV6_ONLY + +OPTIONS_MULTI=PROXY +OPTIONS_MULTI_PROXY=PROXY_AJP PROXY_BALANCER PROXY_CONNECT PROXY_FTP PROXY_HTTP PROXY_SCGI + +# sort list alphanumeric +OPTIONS_DEFAULT= \ + ACTIONS \ + ALIAS \ + ASIS \ + AUTHN_ALIAS \ + AUTHN_ANON \ + AUTHN_DBM \ + AUTHN_DEFAULT \ + AUTHN_FILE \ + AUTHZ_DBM \ + AUTHZ_DEFAULT \ + AUTHZ_GROUPFILE \ + AUTHZ_HOST \ + AUTHZ_OWNER \ + AUTHZ_USER \ + AUTH_BASIC \ + AUTH_DIGEST \ + AUTOINDEX \ + CACHE \ + CERN_META \ + CGI \ + CHARSET_LITE \ + DAV \ + DAV_FS \ + DEFLATE \ + DIR \ + DISK_CACHE \ + DUMPIO \ + ENV \ + EXPIRES \ + FILE_CACHE \ + FILTER \ + HEADERS \ + IMAGEMAP \ + INCLUDE \ + INFO \ + IPV6 \ + LOGIO \ + LOG_CONFIG \ + MIME \ + MIME_MAGIC \ + NEGOTIATION \ + REQTIMEOUT \ + REWRITE \ + SETENVIF \ + SPELING \ + SSL \ + STATUS \ + UNIQUE_ID \ + USERDIR \ + USERTRACK \ + VERSION \ + VHOST_ALIAS + +# Overwrite Mk/bsd.options.desc.mk +IPV6_DESC= IPv6 support +IPV4_ONLY_DESC= IPv4 only +IPV6_ONLY_DESC= IPv6 only + +# sort list alphanumeric +ACTIONS_DESC= mod_actions +ALIAS_DESC= mod_alias +ASIS_DESC= mod_asis +AUTHNZ_LDAP_DESC= mod_authnz_ldap +AUTHN_ALIAS_DESC= mod_authn_alias +AUTHN_ANON_DESC= mod_authn_anon +AUTHN_DBD_DESC= mod_authn_dbd +AUTHN_DBM_DESC= mod_authn_dbm +AUTHN_DEFAULT_DESC= mod_authn_default +AUTHN_FILE_DESC= mod_authn_file +AUTHZ_DBM_DESC= mod_authz_dbm +AUTHZ_DEFAULT_DESC= mod_authz_default +AUTHZ_GROUPFILE_DESC= mod_authz_groupfile +AUTHZ_HOST_DESC= mod_authz_host +AUTHZ_OWNER_DESC= mod_authz_owner +AUTHZ_USER_DESC= mod_authz_user +AUTH_BASIC_DESC= mod_auth_basic +AUTH_DIGEST_DESC= mod_auth_digest +AUTOINDEX_DESC= mod_autoindex +BUCKETEER_DESC= mod_bucketeer +CACHE_DESC= mod_cache +CASE_FILTER_DESC= mod_case_filter +CASE_FILTER_IN_DESC= mod_case_filter_in +CERN_META_DESC= mod_cern_meta +CGI_DESC= mod_cgi +CGID_DESC= mod_cgid +CHARSET_LITE_DESC= mod_charset_lite +DAV_DESC= mod_dav +DAV_FS_DESC= mod_dav_fs +DAV_LOCK_DESC= mod_dav_lock +DBD_DESC= Manages SQL database connections +DEFLATE_DESC= mod_deflate +DIR_DESC= mod_dir +DISK_CACHE_DESC= mod_disk_cache +DUMPIO_DESC= mod_dumpio +ENV_DESC= mod_env +EXPIRES_DESC= mod_expires +EXT_FILTER_DESC= mod_ext_filter +FILE_CACHE_DESC= mod_file_cache +FILTER_DESC= mod_filter +HEADERS_DESC= mod_headers +IMAGEMAP_DESC= mod_imagemap +INCLUDE_DESC= mod_include +INFO_DESC= mod_info +LDAP_DESC= connection pooling, result caching +LOGIO_DESC= mod_logio +LOG_CONFIG_DESC= mod_log_config +LOG_FORENSIC_DESC= mod_log_forensic +MEM_CACHE_DESC= mod_mem_cache +MIME_DESC= mod_mime +MIME_MAGIC_DESC= mod_mime_magic +NEGOTIATION_DESC= mod_negotiation +OPTIONAL_FN_EXPORT_DESC= mod_optional_fn_export +OPTIONAL_FN_IMPORT_DESC= mod_optional_fn_import +OPTIONAL_HOOK_EXPORT_DESC= mod_optional_hook_export +OPTIONAL_HOOK_IMPORT_DESC= mod_optional_hook_import +PROXY_DESC= mod_proxy +PROXY_AJP_DESC= mod_proxy_ajp +PROXY_BALANCER_DESC= mod_proxy_balancer +PROXY_CONNECT_DESC= mod_proxy_connect +PROXY_FTP_DESC= mod_proxy_ftp +PROXY_HTTP_DESC= mod_proxy_http +PROXY_SCGI_DESC= mod_proxy_scgi +REQTIMEOUT_DESC= mod_reqtimeout +REWRITE_DESC= mod_rewrite +SETENVIF_DESC= mod_setenvif +SPELING_DESC= mod_speling +SSL_DESC= mod_ssl +STATUS_DESC= mod_status +SUBSTITUTE_DESC= mod_substitute +SUEXEC_DESC= mod_suexec +SUEXEC_RSRCLIMIT_DESC= suEXEC rlimits based on login class +SUEXEC_USERDIR_DESC= suEXEC UserDir support +UNIQUE_ID_DESC= mod_unique_id +USERDIR_DESC= mod_userdir +USERTRACK_DESC= mod_usertrack +VERSION_DESC= mod_version +VHOST_ALIAS_DESC= mod_vhost_alias diff --git a/www/apache22/files/extra-patch-server__config.c b/www/apache22/files/extra-patch-server__config.c new file mode 100644 index 000000000000..0c567e7517d5 --- /dev/null +++ b/www/apache22/files/extra-patch-server__config.c @@ -0,0 +1,14 @@ +--- ./server/config.c.orig 2012-08-13 21:15:02.000000000 +0200 ++++ ./server/config.c 2012-08-13 21:22:15.000000000 +0200 +@@ -1979,6 +1979,11 @@ + /* NOT virtual host; don't match any real network interface */ + rv = apr_sockaddr_info_get(&s->addrs->host_addr, + NULL, APR_INET, 0, 0, p); ++ /* Support for IPv6 only, reported by Curtis Villamizar <curtis@occnc.com> */ ++ /* http://lists.freebsd.org/pipermail/freebsd-apache/2012-August/002836.html */ ++ if (rv != APR_SUCCESS) ++ rv = apr_sockaddr_info_get(&s->addrs->host_addr, ++ NULL, APR_INET6, 0, 0, p); + ap_assert(rv == APR_SUCCESS); /* otherwise: bug or no storage */ + + s->addrs->host_port = 0; /* matches any port */ diff --git a/www/apache22/files/extra-patch-suexec_userdir b/www/apache22/files/extra-patch-suexec_userdir new file mode 100644 index 000000000000..623abe277b79 --- /dev/null +++ b/www/apache22/files/extra-patch-suexec_userdir @@ -0,0 +1,55 @@ +--- modules/generators/mod_suexec.c.orig 2006-07-11 22:38:44.000000000 -0500 ++++ modules/generators/mod_suexec.c 2010-02-05 23:22:23.000000000 -0600 +@@ -57,10 +57,11 @@ + } + + static const char *set_suexec_ugid(cmd_parms *cmd, void *mconfig, +- const char *uid, const char *gid) ++ const char *uid, const char *gid, ++ int userdir) + { + suexec_config_t *cfg = (suexec_config_t *) mconfig; +- const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT); ++ const char *err = ap_check_cmd_context(cmd, NOT_IN_LOCATION|NOT_IN_FILES|NOT_IN_LIMIT); + + if (err != NULL) { + return err; +@@ -68,7 +69,7 @@ + if (unixd_config.suexec_enabled) { + cfg->ugid.uid = ap_uname2id(uid); + cfg->ugid.gid = ap_gname2id(gid); +- cfg->ugid.userdir = 0; ++ cfg->ugid.userdir = userdir; + cfg->active = 1; + } + else { +@@ -78,6 +79,18 @@ + return NULL; + } + ++static const char *set_suexec_ugid_nouserdir(cmd_parms *cmd, void *mconfig, ++ const char *uid, const char *gid) ++{ ++ return set_suexec_ugid(cmd, mconfig, uid, gid, 0); ++} ++ ++static const char *set_suexec_ugid_userdir(cmd_parms *cmd, void *mconfig, ++ const char *uid, const char *gid) ++{ ++ return set_suexec_ugid(cmd, mconfig, uid, gid, 1); ++} ++ + static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r) + { + suexec_config_t *cfg = +@@ -115,7 +128,9 @@ + { + /* XXX - Another important reason not to allow this in .htaccess is that + * the ap_[ug]name2id() is not thread-safe */ +- AP_INIT_TAKE2("SuexecUserGroup", set_suexec_ugid, NULL, RSRC_CONF, ++ AP_INIT_TAKE2("SuexecUserGroup", set_suexec_ugid_nouserdir, NULL, RSRC_CONF|ACCESS_CONF, ++ "User and group for spawned processes"), ++ AP_INIT_TAKE2("SuexecUserdir", set_suexec_ugid_userdir, NULL, RSRC_CONF|ACCESS_CONF, + "User and group for spawned processes"), + { NULL } + }; diff --git a/www/apache22/files/mpm-itk-limits b/www/apache22/files/mpm-itk-limits new file mode 100644 index 000000000000..b8a8c5b85e38 --- /dev/null +++ b/www/apache22/files/mpm-itk-limits @@ -0,0 +1,53 @@ +--- server/mpm/experimental/itk/Makefile.in 2011-07-01 10:33:45.000000000 +0000 ++++ server/mpm/experimental/itk/Makefile.in 2011-07-01 10:33:57.000000000 +0000 +@@ -1,5 +1,6 @@ + + LTLIBRARY_NAME = libitk.la + LTLIBRARY_SOURCES = itk.c ++LTLIBRARY_LIBADD = -lutil + + include $(top_srcdir)/build/ltlib.mk +--- server/mpm/experimental/itk/itk.c 2011-07-01 10:04:40.000000000 +0000 ++++ server/mpm/experimental/itk/itk.c 2011-07-01 10:17:19.000000000 +0000 +@@ -41,6 +41,8 @@ + #if APR_HAVE_SYS_TYPES_H + #include <sys/types.h> + #endif ++#include <pwd.h> ++#include <login_cap.h> + + #define CORE_PRIVATE + +@@ -1438,6 +1440,8 @@ + gid_t wanted_gid; + const char *wanted_username; + int err = 0; ++ struct passwd *pw; ++ login_cap_t *lc; + + itk_server_conf *sconf = + (itk_server_conf *) ap_get_module_config(r->server->module_config, &mpm_itk_module); +@@ -1481,6 +1485,23 @@ + wanted_username = unixd_config.user_name; + } + ++ if ((pw = getpwuid(wanted_uid)) == NULL) { ++ _DBG("crit: invalid uid: (%ld)", wanted_uid, strerror(errno)); ++ err = 1; ++ } ++ ++ /* ++ * Apply user resource limits based on login class. ++ */ ++ if ((lc = login_getclassbyname(pw->pw_class, pw)) == NULL) { ++ _DBG("failed to login_getclassbyname()", strerror(errno)); ++ err = 1; ++ } ++ if ((setusercontext(lc, pw, wanted_uid, LOGIN_SETRESOURCES)) != 0) { ++ _DBG("failed to setusercontext()", strerror(errno)); ++ err = 1; ++ } ++ + if (!err && wanted_uid != -1 && wanted_gid != -1 && (getuid() != wanted_uid || getgid() != wanted_gid)) { + if (setgid(wanted_gid)) { + _DBG("setgid(%d): %s", wanted_gid, strerror(errno)); diff --git a/www/apache22/pkg-plist b/www/apache22/pkg-plist index b18eca86f9d1..98a0378a2b6f 100644 --- a/www/apache22/pkg-plist +++ b/www/apache22/pkg-plist @@ -125,6 +125,7 @@ libexec/apache22/httpd.exp %%MOD_CHARSET_LITE%%libexec/apache22/mod_charset_lite.so %%MOD_DAV%%libexec/apache22/mod_dav.so %%MOD_DAV_FS%%libexec/apache22/mod_dav_fs.so +%%MOD_DAV_LOCK%%libexec/apache22/mod_dav_lock.so %%MOD_DBD%%libexec/apache22/mod_dbd.so %%MOD_DEFLATE%%libexec/apache22/mod_deflate.so %%MOD_DIR%%libexec/apache22/mod_dir.so @@ -175,7 +176,7 @@ sbin/ab sbin/apachectl sbin/apxs sbin/checkgid -%%MOD_LOG_FORENSIC%%sbin/check_forensic +%%FORENSIC%%sbin/check_forensic sbin/dbmmanage sbin/envvars sbin/htcacheclean @@ -187,16 +188,16 @@ sbin/httxt2dbm sbin/logresolve sbin/rotatelogs sbin/split-logfile -%%MOD_SUEXEC%%sbin/suexec -share/apache22/build/config.nice -share/apache22/build/config_vars.mk -share/apache22/build/instdso.sh -share/apache22/build/library.mk -share/apache22/build/ltlib.mk -share/apache22/build/mkdir.sh -share/apache22/build/program.mk -share/apache22/build/rules.mk -share/apache22/build/special.mk +%%SUEXEC%%sbin/suexec +%%DATADIR%%/build/config.nice +%%DATADIR%%/build/config_vars.mk +%%DATADIR%%/build/instdso.sh +%%DATADIR%%/build/library.mk +%%DATADIR%%/build/ltlib.mk +%%DATADIR%%/build/mkdir.sh +%%DATADIR%%/build/program.mk +%%DATADIR%%/build/rules.mk +%%DATADIR%%/build/special.mk %%WWWDIR%%/cgi-bin/printenv %%WWWDIR%%/cgi-bin/test-cgi @unexec if cmp -s %D/%%WWWDIR%%/data/index.html %D/%%EXAMPLESDIR%%/index.html; then rm -f %D/%%WWWDIR%%/data/index.html; fi @@ -456,8 +457,8 @@ share/apache22/build/special.mk @dirrm %%EXAMPLESDIR%%/extra @dirrm %%EXAMPLESDIR%% @dirrmtry %%DOCSDIR%% -@dirrm share/apache22/build -@dirrm share/apache22 +@dirrm %%DATADIR%%/build +@dirrm %%DATADIR%% @dirrmtry libexec/apache22 @dirrmtry include/apache22 @unexec rm -f %D/%%ETCDIR%%/httpd.conf.bak 2> /dev/null || true |