kumquat-buildroot/package/apache/apache.mk

118 lines
3.1 KiB
Makefile
Raw Normal View History

################################################################################
#
# apache
#
################################################################################
package/apache: security bump to version 2.4.39 Fixes the following security vulnerabilities: *) SECURITY: CVE-2019-0197 (cve.mitre.org) mod_http2: fixes a possible crash when HTTP/2 was enabled for a http: host or H2Upgrade was enabled for h2 on a https: host. An Upgrade request from http/1.1 to http/2 that was not the first request on a connection could lead to a misconfiguration and crash. Servers that never enabled the h2 protocol or only enabled it for https: and did not set "H2Upgrade on" are unaffected by this issue. [Stefan Eissing] *) SECURITY: CVE-2019-0196 (cve.mitre.org) mod_http2: using fuzzed network input, the http/2 request handling could be made to access freed memory in string comparision when determining the method of a request and thus process the request incorrectly. [Stefan Eissing] *) SECURITY: CVE-2019-0211 (cve.mitre.org) MPMs unix: Fix a local priviledge escalation vulnerability by not maintaining each child's listener bucket number in the scoreboard, preventing unprivileged code like scripts run by/on the server (e.g. via mod_php) from modifying it persistently to abuse the priviledged main process. [Charles Fol <folcharles gmail.com>, Yann Ylavic] *) SECURITY: CVE-2019-0196 (cve.mitre.org) mod_http2: using fuzzed network input, the http/2 request handling could be made to access freed memory in string comparision when determining the method of a request and thus process the request incorrectly. [Stefan Eissing] *) SECURITY: CVE-2019-0217 (cve.mitre.org) mod_auth_digest: Fix a race condition checking user credentials which could allow a user with valid credentials to impersonate another, under a threaded MPM. PR 63124. [Simon Kappel <simon.kappel axis.com>] *) SECURITY: CVE-2019-0215 (cve.mitre.org) mod_ssl: Fix access control bypass for per-location/per-dir client certificate verification in TLSv1.3. *) SECURITY: CVE-2019-0220 (cve.mitre.org) Merge consecutive slashes in URL's. Opt-out with `MergeSlashes OFF`. [Eric Covener] For more details, see the CHANGES file: https://www.apache.org/dist/httpd/CHANGES_2.4.39 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-04-02 20:16:16 +02:00
APACHE_VERSION = 2.4.39
APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
APACHE_SITE = http://archive.apache.org/dist/httpd
APACHE_LICENSE = Apache-2.0
APACHE_LICENSE_FILES = LICENSE
# Needed for mod_php
APACHE_INSTALL_STAGING = YES
# We have a patch touching configure.in and Makefile.in,
# so we need to autoreconf:
APACHE_AUTORECONF = YES
APACHE_DEPENDENCIES = apr apr-util pcre
APACHE_CONF_ENV= \
ap_cv_void_ptr_lt_long=no \
PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config
ifeq ($(BR2_PACKAGE_APACHE_MPM_EVENT),y)
APACHE_MPM = event
else ifeq ($(BR2_PACKAGE_APACHE_MPM_PREFORK),y)
APACHE_MPM = prefork
else ifeq ($(BR2_PACKAGE_APACHE_MPM_WORKER),y)
APACHE_MPM = worker
endif
APACHE_CONF_OPTS = \
--sysconfdir=/etc/apache2 \
--with-apr=$(STAGING_DIR)/usr \
--with-apr-util=$(STAGING_DIR)/usr \
--with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \
--enable-http \
--enable-dbd \
--enable-proxy \
--enable-mime-magic \
--without-suexec-bin \
--enable-mods-shared=all \
--with-mpm=$(APACHE_MPM) \
--disable-luajit
ifeq ($(BR2_PACKAGE_LIBXML2),y)
APACHE_DEPENDENCIES += libxml2
# Apache wants the path to the header file, where it can find
# <libxml/parser.h>.
APACHE_CONF_OPTS += \
--enable-xml2enc \
--enable-proxy-html \
--with-libxml2=$(STAGING_DIR)/usr/include/libxml2
else
APACHE_CONF_OPTS += \
--disable-xml2enc \
--disable-proxy-html
endif
ifeq ($(BR2_PACKAGE_LUA),y)
APACHE_CONF_OPTS += --enable-lua
APACHE_DEPENDENCIES += lua
else
APACHE_CONF_OPTS += --disable-lua
endif
ifeq ($(BR2_PACKAGE_NGHTTP2),y)
APACHE_CONF_OPTS += \
--enable-http2 \
--with-nghttp2=$(STAGING_DIR)/usr
APACHE_DEPENDENCIES += nghttp2
else
APACHE_CONF_OPTS += --disable-http2
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
APACHE_DEPENDENCIES += openssl
APACHE_CONF_OPTS += \
--enable-ssl \
--with-ssl=$(STAGING_DIR)/usr
else
APACHE_CONF_OPTS += --disable-ssl
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
APACHE_DEPENDENCIES += zlib
APACHE_CONF_OPTS += \
--enable-deflate \
--with-z=$(STAGING_DIR)/usr
else
APACHE_CONF_OPTS += --disable-deflate
endif
define APACHE_FIX_STAGING_APACHE_CONFIG
$(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
$(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
endef
APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
define APACHE_CLEANUP_TARGET
$(RM) -rf $(TARGET_DIR)/usr/manual $(TARGET_DIR)/usr/build
endef
APACHE_POST_INSTALL_TARGET_HOOKS += APACHE_CLEANUP_TARGET
define APACHE_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/apache/S50apache \
$(TARGET_DIR)/etc/init.d/S50apache
endef
define APACHE_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/apache/apache.service \
$(TARGET_DIR)/usr/lib/systemd/system/apache.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf ../../../../usr/lib/systemd/system/apache.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/apache.service
endef
$(eval $(autotools-package))