By default before setuid() and setguid() calls Apache with mpm-itk do not apply login class restrictions. Fix: Apply patch. It adds an extra patch that is based on extra-patch-suexec_rsrclimit and a new option knob to switch behaviour for only for www/apache22-itk-mpm port. Patch attached with submission follows: How-To-Repeat: Install Apache 2.2 from www/apache22-itk-mpm
Responsible Changed From-To: freebsd-ports-bugs->apache Fix synopsis and assign.
Responsible Changed From-To: apache->ohauer I'll takt it
Author: ohauer Date: Sun Sep 2 14:31:58 2012 New Revision: 303550 URL: http://svn.freebsd.org/changeset/ports/303550 Log: 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@ Added: head/www/apache22/files/extra-patch-server__config.c (contents, props changed) head/www/apache22/files/extra-patch-suexec_userdir (contents, props changed) head/www/apache22/files/mpm-itk-limits (contents, props changed) Deleted: head/devel/apr1/files/patch-apr_ldap_rebind.c Modified: head/Mk/bsd.apache.mk (contents, props changed) head/devel/apr1/Makefile (contents, props changed) head/devel/apr1/distinfo (contents, props changed) head/devel/apr1/files/patch-apr_hints.m4 (contents, props changed) head/devel/apr1/pkg-plist (contents, props changed) head/www/apache22-event-mpm/Makefile head/www/apache22-itk-mpm/Makefile head/www/apache22-peruser-mpm/Makefile head/www/apache22-worker-mpm/Makefile head/www/apache22/Makefile head/www/apache22/Makefile.doc (contents, props changed) head/www/apache22/Makefile.modules head/www/apache22/Makefile.options head/www/apache22/pkg-plist (contents, props changed) Modified: head/Mk/bsd.apache.mk ============================================================================== --- head/Mk/bsd.apache.mk Sun Sep 2 14:16:18 2012 (r303549) +++ head/Mk/bsd.apache.mk Sun Sep 2 14:31:58 2012 (r303550) @@ -116,14 +116,6 @@ IGNORE= ${_ERROR_MSG} Illegal use of USE # =============================================================== .if defined(AP_PORT_IS_SERVER) # MFC TODO: remove this check -# used only in apache22-peruser-mpm, remved in rev. 253708 -# http://svnweb.freebsd.org/ports?view=revision&revision=253708 -# For slave ports: -.if defined(SLAVE_DESIGNED_FOR) && ${PORTVERSION} != ${SLAVE_DESIGNED_FOR} -IGNORE= Sorry, ${SLAVENAME} and ${PORTNAME} versions are out of sync ${PORTVERSION} != ${SLAVE_DESIGNED_FOR} -.endif - -# MFC TODO: remove this check # used only by www/cakephp* ports .if defined(SLAVE_PORT_MODULES) DEFAULT_MODULES_CATEGORIES+= SLAVE_PORT @@ -139,23 +131,12 @@ DEFAULT_MODULES+= ${${category}_MODULE AVAILABLE_MODULES+= ${${category}_MODULES} .endfor -# == start convert param to UPPERCASE -# detect lowercase params in make.conf, users should them to UPPERCASE -# In near future we will throw an IGNORE message -#_ERROR_DLCM= ... detected (make.conf), please convert apache releated params to UPPERCASE -.if defined(WITH_MODULES) && ${WITH_MODULES:M[a-z]*} -#IGNNORE= lowercase WITH_MODULES= ${_ERROR_DLCM} -WITH_MODULES:=${WITH_MODULES:U} -.endif -.if defined(WITHOUT_MODULES) && ${WITHOUT_MODULES:M[a-z]*} -#IGNORE= lowercase WITHOUT_MODULES= ${_ERROR_DLCM} -WITHOUT_MODULES:=${WITHOUT_MODULES:U} -.endif +# detect invalid lowercase params in make.conf +# keep this check until end of 2012 .if defined(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M[a-z]*} -#IGNORE= lowercase WITH_STATIC_MODULES= ${_ERROR_DLCM} -WITH_STATIC_MODULES:=${WITH_STATIC_MODULES:U} +IGNORE= lowercase WITH_STATIC_MODULES="${WITH_STATIC_MODULES}"\ + detected (make.conf), they shoud be UPPERCASE .endif -# == end convert param to UPPERCASE # Setting "@comment " as default. .for module in ${AVAILABLE_MODULES:O} @@ -169,40 +150,38 @@ _DISABLE_MODULES+= --disable-${module:L CONFIGURE_ARGS+= ${_DISABLE_MODULES:O:u} .endif -.if ( defined(OPTIONS) || defined(OPTIONS_DEFINE) ) && !(make(make-options-list)) +# OPTIONS handling .for module in ${AVAILABLE_MODULES} -. if defined(WITH_${module}) +. if ${PORT_OPTIONS:M${module}} _APACHE_MODULES+= ${module} -. endif -. if defined(WITHOUT_${module}) +. else WITHOUT_MODULES+= ${module} . endif .endfor -.endif .if !defined(WITH_STATIC_APACHE) -. if ${USE_APACHE:Mcommon2*} != "" # FYI #DYNAMIC_MODULES= so CONFIGURE_ARGS+= --enable-so -. endif .else -. if ${USE_APACHE:Mcommon2*} != "" CONFIGURE_ARGS+= --disable-so -. endif WITH_ALL_STATIC_MODULES= yes .endif -.if defined(WITH_SUEXEC) || defined(WITH_SUEXEC_MODULES) -. if ${USE_APACHE:Mcommon2*} != "" +.if ${PORT_OPTIONS:MSUEXEC} _APACHE_MODULES+= ${SUEXEC_MODULES} SUEXEC_CONFARGS= with-suexec -. endif -# From now we're defaulting to apache 2.* +# SUEXEC_DOCROOT should exist SUEXEC_DOCROOT?= ${PREFIX}/www/data +#SUEXEC_DOCROOT?= ${WWWDIR} SUEXEC_USERDIR?= public_html +# avoid duplicate search paths +.if ${LOCALBASE} == ${PREFIX} +SUEXEC_SAFEPATH?= ${LOCALBASE}/bin:/usr/bin:/bin +.else SUEXEC_SAFEPATH?= ${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin +.endif SUEXEC_LOGFILE?= /var/log/httpd-suexec.log SUEXEC_UIDMIN?= 1000 SUEXEC_GIDMIN?= 1000 @@ -213,10 +192,8 @@ CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-c --${SUEXEC_CONFARGS}-userdir="${SUEXEC_USERDIR}" \ --${SUEXEC_CONFARGS}-docroot="${SUEXEC_DOCROOT}" \ --${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \ - --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" -. if ${USE_APACHE:Mcommon2*} != "" -CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec" -. endif + --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" \ + --${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec" . if defined(WITH_SUEXEC_UMASK) CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK} @@ -249,6 +226,8 @@ CONFIGURE_ARGS+= --enable-modules="${APA CONFIGURE_ARGS+= --enable-mods-shared="${APACHE_MODULES:O:L}" .endif +# ==================================== +# start pkg-plist adjustments .if defined(WITH_STATIC_MODULES) .for module in ${APACHE_MODULES} . if !${WITH_STATIC_MODULES:M${module}} @@ -268,6 +247,22 @@ ${module}_PLIST_SUB= "" .for module in ${AVAILABLE_MODULES:O:u} PLIST_SUB+= MOD_${module}=${${module}_PLIST_SUB} .endfor + +# pkg-plist workaround STATIC support +.if ${PORT_OPTIONS:MSUEXEC} +PLIST_SUB+= SUEXEC="" +.else +PLIST_SUB+= SUEXEC="@comment " +.endif + +.if ${PORT_OPTIONS:MLOG_FORENSIC} +PLIST_SUB+= FORENSIC="" +.else +PLIST_SUB+= FORENSIC="@comment " +.endif + +# end pkg-plist adjustments + #### End of AP_PORT_IS_SERVER #### # =============================================================== @@ -409,6 +404,10 @@ IGNORE= ${_ERROR_MSG} specify only one o IGNORE= ${_ERROR_MSG} use USE_APACHE instead of USE_APACHE_BUILD and USE_APACHE_RUN together .endif +.if defined(NO_BUILD) && defined(USE_APACHE) +IGNORE= If NO_BUILD is used, then USE_APACHE_RUN is sufficient. Please fix your Makefile +.endif + .if defined(AP_PORT_IS_SERVER) .if !target(print-closest-mirrors) print-closest-mirrors: @@ -422,14 +421,6 @@ print-closest-mirrors: ${ECHO_MSG} "No mirrors found!">&2 ; fi .endif -.if !target(show-categories) -show-categories: -.for category in ${ALL_MODULES_CATEGORIES} - @${ECHO_MSG} "${category} contains these modules:" - @${ECHO_MSG} " ${${category}_MODULES}" -.endfor -.endif - .if !target(show-modules) show-modules: .for module in ${AVAILABLE_MODULES} @@ -447,19 +438,6 @@ show-modules: .endfor .endif -# MFC TODO: remove this target it's useless with options NG -.if !target(make-options-list) -make-options-list: - @${ECHO_CMD} OPTIONS+= \\; -.for module in ${AVAILABLE_MODULES} -. if ${APACHE_MODULES:M${module}} - @${ECHO} -e "\t ${module} \"mod_${module:L}\" on \\" -. else - @${ECHO} -e "\t ${module} \"mod_${module:L}\" off \\" -. endif -.endfor -.endif - .elif defined(AP_PORT_IS_MODULE) .if defined(AP_FAST_BUILD) Modified: head/devel/apr1/Makefile ============================================================================== --- head/devel/apr1/Makefile Sun Sep 2 14:16:18 2012 (r303549) +++ head/devel/apr1/Makefile Sun Sep 2 14:31:58 2012 (r303550) @@ -31,8 +31,8 @@ NDBM_DESC= NDBM support .include <bsd.port.options.mk> -APR_VERSION= 1.4.5 -APU_VERSION= 1.3.12 +APR_VERSION= 1.4.6 +APU_VERSION= 1.4.1 USE_ICONV= yes USE_AUTOTOOLS= automake autoconf libtool:env @@ -49,7 +49,7 @@ APU_WRKDIR= ${WRKDIR}/apr-util-${APU_VER PLIST_SUB= SHLIB_APR_MAJOR="${SHLIB_APR_MAJOR}" SHLIB_APU_MAJOR="${SHLIB_APU_MAJOR}" SHLIB_APR_MAJOR= 4 -SHLIB_APU_MAJOR= 3 +SHLIB_APU_MAJOR= 4 APR_CONF_ARGS= --with-installbuilddir=${DATADIR}/build-1 APU_CONF_ARGS= --with-apr=${APR_WRKDIR} \ @@ -61,31 +61,16 @@ APU_CONF_ARGS= --with-apr=${APR_WRKDIR} APR_CONF_ARGS+= --enable-threads .else APR_CONF_ARGS+= --disable-threads -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-nothr -. else -PKGNAMESUFFIX= -nothr -. endif .endif .if ${PORT_OPTIONS:MIPV6} APR_CONF_ARGS+= --enable-ipv6 -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ipv6 -. else -PKGNAMESUFFIX= -ipv6 -. endif .else APR_CONF_ARGS+= --disable-ipv6 .endif .if ${PORT_OPTIONS:MDEVRANDOM} APR_CONF_ARGS+= --with-devrandom -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-devrandom -. else -PKGNAMESUFFIX= -devrandom -. endif .else APR_CONF_ARGS+= --without-devrandom .endif @@ -96,11 +81,6 @@ PLIST_SUB+= GDBM="" APU_EXTRAS= yes LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm APU_CONF_ARGS+= --with-gdbm=${LOCALBASE} -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gdbm -. else -PKGNAMESUFFIX= -gdbm -. endif .else PLIST_SUB+= GDBM="@comment " APU_CONF_ARGS+= --without-gdbm @@ -111,11 +91,6 @@ APU_EXTRAS= yes PLIST_SUB+= BDB="" USE_BDB= 42+ APU_CONF_ARGS+= --with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR} -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,} -. else -PKGNAMESUFFIX= -${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,} -. endif .else PLIST_SUB+= BDB="@comment " APU_CONF_ARGS+= --without-berkeley-db @@ -125,11 +100,6 @@ APU_CONF_ARGS+= --without-berkeley-db APU_EXTRAS= yes PLIST_SUB+= NDBM="" APU_CONF_ARGS+= --with-ndbm=/usr -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ndbm -. else -PKGNAMESUFFIX= -ndbm -. endif .else PLIST_SUB+= NDBM="@comment " APU_CONF_ARGS+= --without-ndbm @@ -141,11 +111,6 @@ PLIST_SUB+= LDAP="" USE_OPENLDAP= yes APU_CONF_ARGS+= --with-ldap-include=${LOCALBASE}/include \ --with-ldap-lib=${LOCALBASE}/lib --with-ldap=ldap -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ldap${OPENLDAP_VER} -. else -PKGNAMESUFFIX= -ldap -. endif .else PLIST_SUB+= LDAP="@comment " APU_CONF_ARGS+= --without-ldap @@ -159,11 +124,6 @@ APU_CONF_ARGS+= --with-mysql=${LOCALBASE CONFIGURE_ENV+= LIBS="${LIBS}" CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/mysql -DHAVE_MYSQL_H LDFLAGS+= -L${LOCALBASE}/lib/mysql -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-mysql${MYSQL_VER} -. else -PKGNAMESUFFIX= -mysql -. endif .else PLIST_SUB+= MYSQL="@comment " APU_CONF_ARGS+= --without-mysql @@ -175,11 +135,6 @@ PLIST_SUB+= PGSQL="" USE_PGSQL= YES APU_CONF_ARGS+= --with-pgsql=${LOCALBASE} CONFIGURE_ENV+= ac_cv_path_PGSQL_CONFIG="" -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-pgsql${PGSQL_VER} -. else -PKGNAMESUFFIX= -pgsql -. endif .else PLIST_SUB+= PGSQL="@comment " APU_CONF_ARGS+= --without-pgsql @@ -190,11 +145,6 @@ APU_EXTRAS= yes PLIST_SUB+= SQLITE3="" USE_SQLITE= YES APU_CONF_ARGS+= --with-sqlite3=${LOCALBASE} -. if defined(PKGNAMESUFFIX) -PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-sqlite3 -. else -PKGNAMESUFFIX= -sqlite3 -. endif .else APU_CONF_ARGS+= --without-sqlite3 PLIST_SUB+= SQLITE3="@comment " @@ -218,6 +168,9 @@ post-patch: ${APR_WRKDIR}/build/gen-build.py ${REINPLACE_CMD} -e 's/void main/int main/' ${APR_WRKDIR}/build/apr_network.m4 +# http://svn.apache.org/viewvc?view=revision&revision=1362895 + ${REINPLACE_CMD} -e 's|sql = apr_palloc|sql = apr_pcalloc|' ${APU_WRKDIR}/dbd/apr_dbd_freetds.c + run-autotools:: cd ${APR_WRKDIR} ; \ ${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf @@ -248,8 +201,8 @@ do-install: cd ${APU_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} test: build - @(cd ${APR_WRKDIR}; ${MAKE} test) - @(cd ${APU_WRKDIR}; ${MAKE} test) + -@(cd ${APR_WRKDIR}; ${MAKE} test) + -@(cd ${APU_WRKDIR}; ${MAKE} test) #regression-test: test Modified: head/devel/apr1/distinfo ============================================================================== --- head/devel/apr1/distinfo Sun Sep 2 14:16:18 2012 (r303549) +++ head/devel/apr1/distinfo Sun Sep 2 14:31:58 2012 (r303550) @@ -1,4 +1,4 @@ -SHA256 (apr-1.4.5.tar.gz) = 7323d5f72d6bddf7d1ecb63e4326df82a66210018bb2f1e8f6d97357e68302df -SIZE (apr-1.4.5.tar.gz) = 994320 -SHA256 (apr-util-1.3.12.tar.gz) = 815b6fc82950f61050a5e711a7f3c20fd9b6ffcc7a4cacfe9f291fb241210cd8 -SIZE (apr-util-1.3.12.tar.gz) = 769076 +SHA256 (apr-1.4.6.tar.gz) = 538d593d805c36985fc6d200d31bf6c1b5f90df2a50b917902743a13bbc10e05 +SIZE (apr-1.4.6.tar.gz) = 982243 +SHA256 (apr-util-1.4.1.tar.gz) = d636d9ef95c6e50e47fc338d532aa375edd11e5d7a3c30dee48beb38ddf4ab4c +SIZE (apr-util-1.4.1.tar.gz) = 774770 Modified: head/devel/apr1/files/patch-apr_hints.m4 ============================================================================== --- head/devel/apr1/files/patch-apr_hints.m4 Sun Sep 2 14:16:18 2012 (r303549) +++ head/devel/apr1/files/patch-apr_hints.m4 Sun Sep 2 14:31:58 2012 (r303550) @@ -1,5 +1,5 @@ ---- apr-1.4.5/build/apr_hints.m4.orig Wed Oct 27 11:12:28 2004 -+++ apr-1.4.5/build/apr_hints.m4 Wed Oct 27 11:25:32 2004 +--- apr-1.4.6/build/apr_hints.m4.orig Wed Oct 27 11:12:28 2004 ++++ apr-1.4.6/build/apr_hints.m4 Wed Oct 27 11:25:32 2004 @@ -159,11 +159,7 @@ ;; *-freebsd*) Modified: head/devel/apr1/pkg-plist ============================================================================== --- head/devel/apr1/pkg-plist Sun Sep 2 14:16:18 2012 (r303549) +++ head/devel/apr1/pkg-plist Sun Sep 2 14:31:58 2012 (r303550) @@ -6,6 +6,7 @@ include/apr-1/apr_anylock.h include/apr-1/apr_atomic.h include/apr-1/apr_base64.h include/apr-1/apr_buckets.h +include/apr-1/apr_crypto.h include/apr-1/apr_date.h include/apr-1/apr_dbd.h include/apr-1/apr_dbm.h @@ -65,6 +66,7 @@ include/apr-1/apr_want.h include/apr-1/apr_xlate.h include/apr-1/apr_xml.h include/apr-1/apu.h +include/apr-1/apu_errno.h include/apr-1/apu_version.h include/apr-1/apu_want.h %%MYSQL%%lib/apr-util-1/apr_dbd_mysql-1.so Modified: head/www/apache22-event-mpm/Makefile ============================================================================== --- head/www/apache22-event-mpm/Makefile Sun Sep 2 14:16:18 2012 (r303549) +++ head/www/apache22-event-mpm/Makefile Sun Sep 2 14:31:58 2012 (r303550) @@ -1,10 +1,4 @@ -# New ports collection makefile for: apache22-event-mpm -# Date created: 2010-11-5 -# Whom: Tom Judge <tom@tomjudge.com> -# # $FreeBSD$ -# - MASTERDIR= ${.CURDIR}/../apache22 @@ -12,7 +6,7 @@ MAINTAINER= apache@FreeBSD.org WITH_MPM= event -LATEST_LINK= apache22-${WITH_MPM:L}-mpm +LATEST_LINK= apache22-${WITH_MPM}-mpm DESCR= ${.CURDIR}/pkg-descr .include "${MASTERDIR}/Makefile" Modified: head/www/apache22-itk-mpm/Makefile ============================================================================== --- head/www/apache22-itk-mpm/Makefile Sun Sep 2 14:16:18 2012 (r303549) +++ head/www/apache22-itk-mpm/Makefile Sun Sep 2 14:31:58 2012 (r303550) @@ -1,12 +1,14 @@ -# New ports collection makefile for: apache22-itk-mpm -# Date created: 2010-11-5 -# Whom: Tom Judge <tom@tomjudge.com> -# # $FreeBSD$ # # To build this port with the additional mpm-itk-perdir-regex # patch use -DWITH_ITK_PERDIR_REGEX # +# To build this port with the additional mpm-itk-limits +# patch use -DWITH_ITK_LIMITS +# +# Note: +# It's not possible to use both patches together +#ยด # For a quick description take a look into the mpm-itk* patches # in the apache22/files directory @@ -16,7 +18,7 @@ MAINTAINER= apache@FreeBSD.org WITH_MPM= itk -LATEST_LINK= apache22-${WITH_MPM:L}-mpm +LATEST_LINK= apache22-${WITH_MPM}-mpm DESCR= ${.CURDIR}/pkg-descr .include "${MASTERDIR}/Makefile" Modified: head/www/apache22-peruser-mpm/Makefile ============================================================================== --- head/www/apache22-peruser-mpm/Makefile Sun Sep 2 14:16:18 2012 (r303549) +++ head/www/apache22-peruser-mpm/Makefile Sun Sep 2 14:31:58 2012 (r303550) @@ -1,13 +1,9 @@ -# New ports collection makefile for: apache22-peruser-mpm +# $FreeBSD$ +# # Apache 2.2.X with peruser mpm 0.3.0-dc3 -# Date created: 13 Sep 2008 -# Whom: Jille Timmermans <jille@quis.cx> # Peruser main url: http://telana.com/peruser.php # Peruser patches: http://source.kood.ee/ # This port contains the main patch, including the dc3 patch -# -# $FreeBSD$ -# MASTERDIR= ${.CURDIR}/../apache22 @@ -15,7 +11,7 @@ MAINTAINER= jille@quis.cx WITH_MPM= peruser -LATEST_LINK= apache22-${WITH_MPM:L}-mpm +LATEST_LINK= apache22-${WITH_MPM}-mpm DESCR= ${.CURDIR}/pkg-descr EXTRA_PATCHES+= ${.CURDIR}/files/httpd-2.2.3-peruser-0.3.0.patch Modified: head/www/apache22-worker-mpm/Makefile ============================================================================== --- head/www/apache22-worker-mpm/Makefile Sun Sep 2 14:16:18 2012 (r303549) +++ head/www/apache22-worker-mpm/Makefile Sun Sep 2 14:31:58 2012 (r303550) @@ -1,10 +1,4 @@ -# New ports collection makefile for: apache22-worker-mpm -# Date created: 2010-11-5 -# Whom: Tom Judge <tom@tomjudge.com> -# # $FreeBSD$ -# - MASTERDIR= ${.CURDIR}/../apache22 @@ -12,7 +6,7 @@ MAINTAINER= apache@FreeBSD.org WITH_MPM= worker -LATEST_LINK= apache22-${WITH_MPM:L}-mpm +LATEST_LINK= apache22-${WITH_MPM}-mpm DESCR= ${.CURDIR}/pkg-descr .include "${MASTERDIR}/Makefile" Modified: head/www/apache22/Makefile ============================================================================== --- head/www/apache22/Makefile Sun Sep 2 14:16:18 2012 (r303549) +++ head/www/apache22/Makefile Sun Sep 2 14:31:58 2012 (r303550) @@ -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/ 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_RELDES --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> Modified: head/www/apache22/Makefile.doc ============================================================================== --- head/www/apache22/Makefile.doc Sun Sep 2 14:16:18 2012 (r303549) +++ head/www/apache22/Makefile.doc Sun Sep 2 14:31:58 2012 (r303550) @@ -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 Modified: head/www/apache22/Makefile.modules ============================================================================== --- head/www/apache22/Makefile.modules Sun Sep 2 14:16:18 2012 (r303549) +++ head/www/apache22/Makefile.modules Sun Sep 2 14:31:58 2012 (r303550) @@ -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-mod 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 Modified: head/www/apache22/Makefile.options ============================================================================== --- head/www/apache22/Makefile.options Sun Sep 2 14:16:18 2012 (r303549) +++ head/www/apache22/Makefile.options Sun Sep 2 14:31:58 2012 (r303550) @@ -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_CA 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 \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed, Thanks!