mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 23:47:14 -08:00
www-apache/mod_security: add 2.9.15
Bug: https://bugs.gentoo.org/986824 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST modsecurity-v2.9.12.tar.gz 4366282 BLAKE2B fc3665899b0ac52eab3d0d1c1b95ce34c5d416e4fd2640eab65791fcacaac048f9e3e310df4f2c59978784d5b6353c5a63542d8c807c27b6a6d370063aafffdd SHA512 1fce5fd3362a70271ce9255dc0ab51319ea84cbdbc508e4708a11e1699dbf61c2d85664c0cb015e3907cdfabb048aa334dc1ad73a9151bff75a22bd762a9d170
|
||||
DIST modsecurity-v2.9.14.tar.gz 6644472 BLAKE2B 5ad739fcbf33b9d64e5a6b94cf1ebea145ea35da5b6b6849b4e4fb5c74991b042b2613475639cedbd9fb1cfcbbb1823e40c0a21054c42d096cc5113d20ae9fd6 SHA512 788acc877295daa82d8e1aed7845e904194e54fda66ee5f6c24e57b2d9cf073feff124048942f1551ea1730e3d288818c57f6db27ea2b2c21d841267680535ff
|
||||
DIST modsecurity-v2.9.15.tar.gz 6533729 BLAKE2B 9c69b91fb6865b6954245d8f8904186e97ad8562c8877f5ce6a77ea9b0c385665fa5a248ec555275442a6c6b42c9b305cad550186b63e3d180723e625090c91a SHA512 ee8a36b1edfc248741bee555713aa776a70e8e33d39644b55cdc1d90071bbc726189c3a3f81139944017559f471ab6f32a3e3a5dde22aef015c4801ff3e41ddb
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LUA_COMPAT=( lua5-{1..3} )
|
||||
|
||||
inherit autotools apache-module lua-single
|
||||
|
||||
MY_PN=modsecurity
|
||||
MY_P=${MY_PN}-v${PV}
|
||||
|
||||
DESCRIPTION="Application firewall and intrusion detection for Apache"
|
||||
HOMEPAGE="https://github.com/owasp-modsecurity/ModSecurity"
|
||||
SRC_URI="https://github.com/owasp-modsecurity/ModSecurity/releases/download/v${PV}/${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc fuzzyhash geoip jit json lua mlogc"
|
||||
|
||||
REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/apr:1=
|
||||
dev-libs/apr-util:1[openssl]
|
||||
dev-libs/expat
|
||||
dev-libs/libxml2:=
|
||||
dev-libs/libpcre2[jit?]
|
||||
net-misc/curl
|
||||
sys-apps/util-linux
|
||||
sys-libs/gdbm:=
|
||||
virtual/libcrypt:=
|
||||
www-servers/apache[apache2_modules_unique_id]
|
||||
fuzzyhash? ( app-crypt/ssdeep )
|
||||
json? ( dev-libs/yajl:= )
|
||||
lua? ( ${LUA_DEPS} )
|
||||
mlogc? ( net-misc/curl )
|
||||
"
|
||||
BDEPEND="doc? ( app-text/doxygen )"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
geoip? ( dev-libs/geoip )
|
||||
mlogc? ( dev-lang/perl )
|
||||
"
|
||||
PDEPEND=">=www-apache/modsecurity-crs-3.3.10"
|
||||
|
||||
APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
|
||||
APACHE2_MOD_CONF="79_${PN}"
|
||||
APACHE2_MOD_DEFINE="SECURITY"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.9.14-autoconf_lua_package_name.patch
|
||||
)
|
||||
|
||||
need_apache2
|
||||
|
||||
pkg_setup() {
|
||||
_init_apache2
|
||||
_init_apache2_late
|
||||
use lua && lua-single_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--disable-static
|
||||
--enable-request-early
|
||||
--with-apxs="${APXS}"
|
||||
--with-pic
|
||||
--with-pcre2
|
||||
$(use_enable doc docs)
|
||||
$(use_enable jit pcre-jit)
|
||||
$(use_enable lua lua-cache)
|
||||
$(use_enable mlogc)
|
||||
$(use_with fuzzyhash ssdeep)
|
||||
$(use_with json yajl)
|
||||
$(use_with lua)
|
||||
)
|
||||
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
apache-module_src_install
|
||||
|
||||
dodoc CHANGES README.md modsecurity.conf-recommended unicode.mapping
|
||||
|
||||
if use doc; then
|
||||
dodoc -r doc/apache/html
|
||||
fi
|
||||
|
||||
if use mlogc; then
|
||||
insinto /etc/
|
||||
newins mlogc/mlogc-default.conf mlogc.conf
|
||||
dobin mlogc/mlogc
|
||||
dobin mlogc/mlogc-batch-load.pl
|
||||
newdoc mlogc/INSTALL INSTALL-mlogc
|
||||
fi
|
||||
|
||||
# Use /var/lib instead of /var/cache. This stuff is "persistent,"
|
||||
# and isn't a cached copy of something that we can recreate.
|
||||
# Bug 605496.
|
||||
keepdir /var/lib/modsecurity
|
||||
fowners apache:apache /var/lib/modsecurity
|
||||
fperms 0750 /var/lib/modsecurity
|
||||
for dir in data tmp upload; do
|
||||
keepdir "/var/lib/modsecurity/${dir}"
|
||||
fowners apache:apache "/var/lib/modsecurity/${dir}"
|
||||
fperms 0750 "/var/lib/modsecurity/${dir}"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "The base configuration file has been renamed ${APACHE2_MOD_CONF}"
|
||||
elog "so that you can put your own configuration in (for example)"
|
||||
elog "90_modsecurity_local.conf."
|
||||
elog ""
|
||||
elog "That would be the correct place for site-global security rules."
|
||||
elog "Note: 80_modsecurity_crs.conf is used by www-apache/modsecurity-crs"
|
||||
}
|
||||
Reference in New Issue
Block a user