pkgsrc/www/apache2/Makefile
tron 97d23b0a13 Update "apr" package to version 0.9.12.2.0.58 and "apache" package
to version 2.0.58. Change since Apache relase 2.0.55:
- Legal: Restored original years in copyright notices.
- mod_cgid: run the get_suexec_identity hook within the request-handler
  instead of within cgid. Apache#36410.
- core: Prevent read of unitialized memory in ap_rgetline_core.
  Apache#39282.
- mod_proxy: Report the proxy server name correctly in the "Via:" header,
  when UseCanonicalName is Off. Apache#11971.
- mod_isapi: Various trivial code-fixes to permit mod_isapi to load and
  run on Unix.
- HTML-escape the Expect error message.  Not classed as security as
  an attacker has no way to influence the Expect header a victim will
  send to a target site.  Reported by Thiago Zaninotti
  <thiango nstalker.com>.
- SECURITY: CVE-2005-3357 (cve.mitre.org)
  mod_ssl: Fix a possible crash during access control checks if a
  non-SSL request is processed for an SSL vhost (such as the
  "HTTP request received on SSL port" error message when an 400
  ErrorDocument is configured, or if using "SSLEngine optional").
  Apache#37791.
- SECURITY: CVE-2005-3352 (cve.mitre.org)
  mod_imap: Escape untrusted referer header before outputting in HTML
  to avoid potential cross-site scripting.  Change also made to
  ap_escape_html so we escape quotes.  Reported by JPCERT.
- Add APR/APR-Util Compiled and Runtime Version numbers to the
  output of 'httpd -V'.
- Ensure that the proper status line is written to the client, fixing
  incorrect status lines caused by filters which modify r->status without
  resetting r->status_line, such as the built-in byterange filter.
- Default handler: Don't return output filter apr_status_t values.
  Apache#31759.
- mod_speling: Stop crashing with certain non-file requests.
- keep the Content-Length header for a HEAD with no response body.
  Apache#18757
- Modify apr[util] .h detection to avoid breakage on VPATH builds
  using Solaris make (amoung others) and avoid breakage in ./buildconf
  when srclib/apr[-util] are symlinks rather than directories proper.
- Avoid server-driven negotiation when a CGI script has emitted an
  explicit "Status:" header. Apache#38070.
- mod_log_config now logs all Set-Cookie headers if the %{Set-Cookie}o
  format is used. Apache#27787.
- mod_cache: Correctly handle responses with a 301 status. Apache#37347.
- mod_proxy_http: Prevent data corruption of POST request bodies when
  client accesses proxied resources with SSL. Apache#37145.
- Elimiated the NET_TIME filter, restructuring the timeout logic.
  This provides a working mod_echo on all platforms, and ensures any
  custom protocol module is at least given an initial timeout value
  based on the <VirtualHost > context's Timeout directive.
- mod_ssl: Correct issue where mod_ssl does not pick up the
  ssl-unclean-shutdown setting when configured. Apache#34452.
- Document the ReceiveBufferSize change done in r157583.
- mod_deflate: Merge the Vary header, instead of Setting it. Fixes
  applications that send the Vary Header themselves. Apache#37559.
- mod_dav: Fix a null pointer dereference in an error code path during the
  handling of MKCOL.
- mod_mime_magic: Handle CRLF-format magic files so that it works with
  the default installation on Windows.
- Write message to error log if AuthGroupFile cannot be opened.
  Apache#37566.
- Add ReceiveBufferSize directive to control the TCP receive buffer.
- mod_cache: Fix 'Vary: *' behavior to be RFC compliant. Apache#16125.
- Remove the base href tag from proxy_ftp, as it breaks relative
  links for clients not using an Authorization header.
- http_request.c: Add missing va_end call.
- Add httxt2dbm to support/ for creating RewriteMap DBM Files.
- support/check_forensic: Fix temp file usage
- Chunk filter: Fix chunk filter to create correct chunks in the case that
  a flush bucket is surrounded by data buckets.
- mod_cgi(d): Remove block on OPTIONS method so that scripts can
  respond to OPTIONS directly rather than via server default.
  Apache#15242
- Added new module mod_version, which provides version dependent
  configuration containers.
- Add core version query function (ap_get_server_revision) and
  accompanying ap_version_t structure (minor MMN bump).
2006-05-07 12:35:27 +00:00

238 lines
7.7 KiB
Makefile

# $NetBSD: Makefile,v 1.101 2006/05/07 12:35:27 tron Exp $
.include "Makefile.common"
PKGNAME= apache-${APACHE_VERSION}
CATEGORIES= www
HOMEPAGE= http://httpd.apache.org/
COMMENT= Apache HTTP (Web) server, version 2
CONFLICTS= apache-*ssl-[0-9]* apache-[0-9]* apache6-[0-9]*
BUILD_DEFS+= USE_INET6
USE_TOOLS+= perl:run pkg-config
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-layout=NetBSD
CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-port=80
CONFIGURE_ARGS+= --enable-so
CONFIGURE_ENV+= perlbin=${PERL5:Q}
# Apache Portable Runtime library configure options
CONFIGURE_ARGS+= --with-apr=${BUILDLINK_PREFIX.apr}
CONFIGURE_ARGS+= --with-apr-util=${BUILDLINK_PREFIX.apr}
BUILDLINK_API_DEPENDS.apr+= apr>=0.9.12.2.0.58
# the following must be set before bsd.prefs.mk in order to make += work
# in mk.conf; however, it isn't expanded until referenced, so we can
# define DFLT_APACHE_MODULES later
#
APACHE_MODULES?= ${DFLT_APACHE_MODULES}
.include "../../mk/bsd.prefs.mk"
.include "../../devel/apr/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
# Set the "Multi-Processing Model" used by Apache to handle requests.
# Valid values are:
# prefork non-threaded, pre-forking web server
# worker hybrid multi-threaded multi-process web server
#
APACHE_MPM?= prefork
CONFIGURE_ARGS+= --with-mpm=${APACHE_MPM:Q}
BUILD_DEFS+= APACHE_MPM
.for _mpm_ in prefork worker
PLIST_SUBST.${_mpm_}?= MPM_COMMENT.${_mpm_}="@comment "
PLIST_SUBST+= ${PLIST_SUBST.${_mpm_}}
.endfor
PLIST_SUBST.${APACHE_MPM}= MPM_COMMENT.${APACHE_MPM}=
CONFIGURE_ARGS+= --disable-access
CONFIGURE_ARGS+= --disable-auth
CONFIGURE_ARGS+= --disable-include
CONFIGURE_ARGS+= --disable-log-config
CONFIGURE_ARGS+= --disable-env
CONFIGURE_ARGS+= --disable-mime
CONFIGURE_ARGS+= --disable-setenvif
CONFIGURE_ARGS+= --disable-status
CONFIGURE_ARGS+= --disable-autoindex
CONFIGURE_ARGS+= --disable-asis
CONFIGURE_ARGS+= --disable-cgi
CONFIGURE_ARGS+= --disable-negotiation
CONFIGURE_ARGS+= --disable-dir
CONFIGURE_ARGS+= --disable-imap
CONFIGURE_ARGS+= --disable-actions
CONFIGURE_ARGS+= --disable-userdir
CONFIGURE_ARGS+= --disable-alias
DFLT_APACHE_MODULES= all
DFLT_APACHE_MODULES+= proxy proxy_connect proxy_ftp proxy_http
DFLT_APACHE_MODULES+= ssl deflate
DFLT_APACHE_MODULES+= access auth include log_config env mime setenvif
DFLT_APACHE_MODULES+= status autoindex asis cgi negotiation dir imap
DFLT_APACHE_MODULES+= actions userdir alias
# LDAP support
.if !empty(PKG_BUILD_OPTIONS.apr:Mldap)
DFLT_APACHE_MODULES+= ldap auth_ldap
.endif
# APACHE_MODULES are the modules that are linked statically into the
# apache httpd executable.
#
CONFIGURE_ARGS+= --enable-modules=${APACHE_MODULES:Q}
BUILD_DEFS+= APACHE_MODULES
APACHE_USER?= www
APACHE_GROUP?= www
PKG_GROUPS= ${APACHE_GROUP}
PKG_USERS= ${APACHE_USER}:${APACHE_GROUP}
PKG_SYSCONFVAR= apache
PKG_SYSCONFSUBDIR?= httpd
EGDIR= ${PREFIX}/share/examples/httpd
SBINDIR= ${PREFIX}/sbin
CONF_FILES= ${EGDIR}/httpd-std.conf ${PKG_SYSCONFDIR}/httpd.conf
CONF_FILES+= ${EGDIR}/ssl-std.conf ${PKG_SYSCONFDIR}/ssl.conf
CONF_FILES+= ${SBINDIR}/envvars-std ${SBINDIR}/envvars
CONF_FILES+= ${EGDIR}/magic ${PKG_SYSCONFDIR}/magic
CONF_FILES+= ${EGDIR}/mime.types ${PKG_SYSCONFDIR}/mime.types
RCD_SCRIPTS= apache
REQD_DIRS= ${PREFIX}/share/httpd
REQD_DIRS+= ${PREFIX}/share/httpd/htdocs
OWN_DIRS= ${VARBASE}/log/httpd
OWN_DIRS+= ${VARBASE}/db/httpd
OWN_DIRS_PERMS+= ${VARBASE}/db/httpd/proxy ${APACHE_USER} ${APACHE_GROUP} 0755
FIX_PERMS= apachectl apxs dbmmanage envvars-std mkcert
FIX_MAN_PERMS= man1/htdbm.1 man1/htpasswd.1 man1/htdigest.1
FIX_MAN_PERMS+= man1/dbmmanage.1 man8/httpd.8 man8/suexec.8
FIX_MAN_PERMS+= man8/rotatelogs.8 man8/logresolve.8 man8/apxs.8
FIX_MAN_PERMS+= man8/apachectl.8 man8/ab.8
# Fix paths in the apache manpages.
SUBST_CLASSES+= man
SUBST_STAGE.man= post-patch
SUBST_FILES.man= docs/man/*.1 docs/man/*.8
SUBST_SED.man= -e 's,/usr/local/etc/apache,${PKG_SYSCONFDIR},'
SUBST_SED.man+= -e 's,/path/to/apache/etc,${PKG_SYSCONFDIR},'
SUBST_SED.man+= -e 's,/usr/local/apache2,${PREFIX}/share/httpd/htdocs,'
SUBST_SED.man+= -e 's,/usr/web,${PREFIX}/share/httpd/htdocs,'
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
SUBST_FILES.paths= config.layout
SUBST_SED.paths= -e "s|@PREFIX@|${PREFIX}|g"
SUBST_MESSAGE.paths= Fixing paths.
SUBST_CLASSES+= apr-lt
SUBST_STAGE.apr-lt= post-configure
SUBST_FILES.apr-lt= build/config_vars.mk
SUBST_SED.apr-lt= -e "s|^\(LIBTOOL =\) [^ ]*|\1 \$$(SHELL) \$$(top_builddir)/libtool|g"
SUBST_MESSAGE.apr-lt= Fixing libtool references.
SUBST_CLASSES+= confs
SUBST_STAGE.confs= post-configure
SUBST_FILES.confs= docs/conf/highperformance-std.conf \
docs/conf/httpd-std.conf \
docs/conf/ssl-std.conf
SUBST_SED.confs= -e "s|${EGDIR}|${PKG_SYSCONFDIR}|g" \
-e "s|${PREFIX}/htdocs|${PREFIX}/share/httpd/htdocs|g" \
-e "s|${PREFIX}/conf|${PKG_SYSCONFDIR}|g" \
-e "s|logs/|${VARBASE}/log/httpd/|g" \
-e "s|/var/log/httpd/foo\.log|logs/foo.log/|g" \
-e "s|^\(User[ ]\).*|\1${APACHE_USER}|g" \
-e "s|^\(Group[ ]\).*|\1${APACHE_GROUP}|g"
SUBST_MESSAGE.confs= Fixing configuration files.
.include "options.mk"
# Add dependencies for the modules that will be built. For each module
# ap_mod listed in ${APACHE_MODULES}, _AP_DEPENDS.ap_mod is a whitespace
# separated list of dependencies or buildlink3.mk files needed to build
# ap_mod, and _AP_CFG_ARGS.ap_mod is a whitespace separated list of
# configure script options for ap_mod.
#
_AP_DEPENDS.ssl= ../../security/openssl/buildlink3.mk
_AP_DEPENDS.deflate= ../../devel/zlib/buildlink3.mk
_AP_CFG_ARGS.ssl= --with-ssl=${BUILDLINK_PREFIX.openssl}
_AP_CFG_ARGS.deflate= --with-z=${BUILDLINK_PREFIX.zlib}
.for _ap_mod in ${APACHE_MODULES}
. if defined(_AP_DEPENDS.${_ap_mod}) && !empty(_AP_DEPENDS.${_ap_mod})
. for _ap_depend in ${_AP_DEPENDS.${_ap_mod}}
. if exists(${_ap_depend})
. include "${_ap_depend}"
. else
DEPENDS+= ${_ap_depend}
. endif
. endfor
. endif
. if defined(_AP_CFG_ARGS.${_ap_mod}) && !empty(_AP_CFG_ARGS.${_ap_mod})
CONFIGURE_ARGS+= ${_AP_CFG_ARGS.${_ap_mod}}
. endif
.endfor
post-extract:
${TOUCH} ${WRKSRC}/libtool
post-build:
${SED} "s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g" \
< ${FILESDIR}/mkcert.sh > ${WRKDIR}/mkcert
pre-install:
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} install-conf sysconfdir="${EGDIR}"
post-install:
@${LN} -sf ${LOCALBASE}/libexec/apr/libtool ${PREFIX}/share/httpd/build
@cd ${EGDIR}; \
for file in \
highperformance-std.conf \
httpd-std.conf \
ssl-std.conf; \
do \
${CAT} $${file} | ${AWK} ' \
/^Listen[ ]*80/ { \
print; \
printf "%s", "Listen 0.0.0.0:80\n"; \
next; \
} \
/^Listen[ ]*443/ { \
print; \
printf "%s", "Listen 0.0.0.0:443\n"; \
next; \
} \
{ print; } \
' >> $${file}.new; \
${MV} -f $${file}.new $${file}; \
done
@${INSTALL_DATA_DIR} ${PREFIX}/share/httpd/manual
@cd ${WRKSRC}/docs/manual && ${PAX} -rw . ${PREFIX}/share/httpd/manual
@${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${PREFIX}/sbin
for file in ${FIX_PERMS}; do \
${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/sbin/$$file && \
${CHMOD} ${BINMODE} ${PREFIX}/sbin/$$file; \
done
@${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/share/httpd
@${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/include/httpd
@${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/lib/httpd
@${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/libexec/cgi-bin/test-cgi
@${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/libexec/cgi-bin/printenv
for file in ${FIX_MAN_PERMS}; do \
${CHOWN} ${MANOWN}:${MANGRP} ${PREFIX}/${PKGMANDIR}/$$file; \
done
.include "../../mk/bsd.pkg.mk"