summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-www/mod_security/ChangeLog10
-rw-r--r--net-www/mod_security/Manifest39
-rw-r--r--net-www/mod_security/files/99_mod_security.conf123
-rw-r--r--net-www/mod_security/files/digest-mod_security-1.8.73
-rw-r--r--net-www/mod_security/files/digest-mod_security-1.9.43
-rw-r--r--net-www/mod_security/files/digest-mod_security-2.1.1-r13
-rw-r--r--net-www/mod_security/files/mod_security-2.1.1-request_interception.patch15
-rw-r--r--net-www/mod_security/mod_security-1.8.7.ebuild31
-rw-r--r--net-www/mod_security/mod_security-1.9.4.ebuild31
-rw-r--r--net-www/mod_security/mod_security-2.1.1-r1.ebuild56
10 files changed, 98 insertions, 216 deletions
diff --git a/net-www/mod_security/ChangeLog b/net-www/mod_security/ChangeLog
index 7632130eb202..f5c14fcc3a92 100644
--- a/net-www/mod_security/ChangeLog
+++ b/net-www/mod_security/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-www/mod_security
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mod_security/ChangeLog,v 1.25 2007/05/11 14:53:17 beandog Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_security/ChangeLog,v 1.26 2007/06/15 18:21:47 hollow Exp $
+
+*mod_security-2.1.1-r1 (15 Jun 2007)
+
+ 15 Jun 2007; Benedikt Böhm <hollow@gentoo.org>
+ +files/mod_security-2.1.1-request_interception.patch,
+ -files/99_mod_security.conf, -mod_security-1.8.7.ebuild,
+ -mod_security-1.9.4.ebuild, +mod_security-2.1.1-r1.ebuild:
+ remove apache-1 version; fix #180150
11 May 2007; Steve Dibb <beandog@gentoo.org> mod_security-2.1.1.ebuild:
amd64 stable, security bug 169778
diff --git a/net-www/mod_security/Manifest b/net-www/mod_security/Manifest
index e1523633ee76..3f1eb9782933 100644
--- a/net-www/mod_security/Manifest
+++ b/net-www/mod_security/Manifest
@@ -2,39 +2,30 @@ AUX 99_mod_security-2.1.1.conf 215 RMD160 e6fb99efc300f23f4ac63af79d8e58eb82ea57
MD5 f0ee830379ecb89b1005093bdef12242 files/99_mod_security-2.1.1.conf 215
RMD160 e6fb99efc300f23f4ac63af79d8e58eb82ea5770 files/99_mod_security-2.1.1.conf 215
SHA256 50e35b187f10c6a2f29450a4808b722e1e3c40b664b462afa4548f76d26ad3dc files/99_mod_security-2.1.1.conf 215
-AUX 99_mod_security.conf 3666 RMD160 91198642f19e9031b9edb0429c9e388736caa072 SHA1 c7cc9e6610c414c5aa4fef19622a5d9588f9b6b0 SHA256 7a564bbd901bd26147a4febb7372aa9d72491a46a722b8676e7618e842ca520b
-MD5 99189490f6840a16c1e14874719592cf files/99_mod_security.conf 3666
-RMD160 91198642f19e9031b9edb0429c9e388736caa072 files/99_mod_security.conf 3666
-SHA256 7a564bbd901bd26147a4febb7372aa9d72491a46a722b8676e7618e842ca520b files/99_mod_security.conf 3666
-DIST modsecurity-1.8.7.tar.gz 313004 RMD160 ee5e6566dda8c932e5e01833af290186f22af773 SHA1 59296d4c2776b0beb3ee65e4d5b7dc51f36142a5 SHA256 7314a0c6ebe50d8c71e44fcc520969a60d1d01a3c1a2e0a1d08b2b166eabf8ce
-DIST modsecurity-apache_1.9.4.tar.gz 496805 RMD160 2fd5e3f43fa94836a4845f106285bed68c704aef SHA1 8f34540a8dfa8374d9b2446cf9b17c4acc69e59f SHA256 9ca6e614c58783faec9b14f58f569a96de420b25ab23063387a1ab51ce3f5171
+AUX mod_security-2.1.1-request_interception.patch 695 RMD160 806b5241c4fcf356c605e36f89d9ea1fada82b17 SHA1 465ef6a470bb7fbda7a2b2a92df3b13492931c8d SHA256 4e3099c2e8714388abffd5117e8f68a40dea550cfb5cc49bda979da9e0a8007f
+MD5 c7605f93a10d52c1bd4369b8c7c3d4b3 files/mod_security-2.1.1-request_interception.patch 695
+RMD160 806b5241c4fcf356c605e36f89d9ea1fada82b17 files/mod_security-2.1.1-request_interception.patch 695
+SHA256 4e3099c2e8714388abffd5117e8f68a40dea550cfb5cc49bda979da9e0a8007f files/mod_security-2.1.1-request_interception.patch 695
DIST modsecurity-apache_2.1.1.tar.gz 650607 RMD160 17e94c19d51f7e9e09ef435f81d696ec638aad44 SHA1 06527f16271628b882d375b4a0ad188d13dc7291 SHA256 fadeb3b4ce5672c99c094611792b827d45fcd6b38c4c4fa81c4cfdc63c63b71a
-EBUILD mod_security-1.8.7.ebuild 959 RMD160 98e31f6a1b329a9333cd5ba2e91f84a671810ba7 SHA1 9a637bc8e607e3cf585b480d1f8097e109d749c8 SHA256 9f0f41875d9d289c10c0188ebafddfc2c7ff8db6c145f74dc6df7eb0df5b4489
-MD5 659744e396a4d23b449b1991ffe206e1 mod_security-1.8.7.ebuild 959
-RMD160 98e31f6a1b329a9333cd5ba2e91f84a671810ba7 mod_security-1.8.7.ebuild 959
-SHA256 9f0f41875d9d289c10c0188ebafddfc2c7ff8db6c145f74dc6df7eb0df5b4489 mod_security-1.8.7.ebuild 959
-EBUILD mod_security-1.9.4.ebuild 1046 RMD160 5c58eb6a37c89582cc52fb2c28444c8bfd0dc592 SHA1 312f95276429202fd8fb6029077dc7ace7d1db21 SHA256 c484056d4d2bcae2302e8e4bcb91e03e8ce02efbf53ba3556709d9e726d9bd5c
-MD5 7fc7972da2e17738e779a603b53b6d98 mod_security-1.9.4.ebuild 1046
-RMD160 5c58eb6a37c89582cc52fb2c28444c8bfd0dc592 mod_security-1.9.4.ebuild 1046
-SHA256 c484056d4d2bcae2302e8e4bcb91e03e8ce02efbf53ba3556709d9e726d9bd5c mod_security-1.9.4.ebuild 1046
+EBUILD mod_security-2.1.1-r1.ebuild 1545 RMD160 6712451bdb69911f7861bbdbb79b39207b171d7a SHA1 ba644c7aeaf8455e838d74d4c1cbc6bf5c0b3f41 SHA256 c0a79cbe580674c1ea277e126d3b1ee9edb202cf1bfdb266931e03c5bd675dc7
+MD5 b331ca7d78c19199ba128dba0de51f12 mod_security-2.1.1-r1.ebuild 1545
+RMD160 6712451bdb69911f7861bbdbb79b39207b171d7a mod_security-2.1.1-r1.ebuild 1545
+SHA256 c0a79cbe580674c1ea277e126d3b1ee9edb202cf1bfdb266931e03c5bd675dc7 mod_security-2.1.1-r1.ebuild 1545
EBUILD mod_security-2.1.1.ebuild 1440 RMD160 42b22324265b4bdf5043521f21af50ac0e00a4cd SHA1 5f8766b05c5afeb64af73ba5fb8c1c80cf90cbbd SHA256 e864c38fc67a997b7d8b40148bb41ca19db477111867b5d79c93ce6c07c26011
MD5 82abd7a62d73132e65799fe4657694dd mod_security-2.1.1.ebuild 1440
RMD160 42b22324265b4bdf5043521f21af50ac0e00a4cd mod_security-2.1.1.ebuild 1440
SHA256 e864c38fc67a997b7d8b40148bb41ca19db477111867b5d79c93ce6c07c26011 mod_security-2.1.1.ebuild 1440
-MISC ChangeLog 3620 RMD160 7d7b7325354be90507233bb48499e53cd39e5797 SHA1 8375ce76b7799673c36067df150ec1dddae2671c SHA256 08cd91dc31ba69bff0dd919079622c39ae7e9613c457a46f18d71ae3ba7bdedf
-MD5 c31312d165b6c802fd29e2e73113cf79 ChangeLog 3620
-RMD160 7d7b7325354be90507233bb48499e53cd39e5797 ChangeLog 3620
-SHA256 08cd91dc31ba69bff0dd919079622c39ae7e9613c457a46f18d71ae3ba7bdedf ChangeLog 3620
+MISC ChangeLog 3923 RMD160 d016c11fe9129c2402bbfa05a3073d7b1f98af0b SHA1 a3c01c077440036fac82ceeb22a9c1efdd63bbf6 SHA256 392773827d2e1d307400bc822f077f1b26be875aac0e0a70c670e4d80da699ea
+MD5 234d37f56c90a1a541a6fcd790c8c767 ChangeLog 3923
+RMD160 d016c11fe9129c2402bbfa05a3073d7b1f98af0b ChangeLog 3923
+SHA256 392773827d2e1d307400bc822f077f1b26be875aac0e0a70c670e4d80da699ea ChangeLog 3923
MISC metadata.xml 255 RMD160 a80959a97f317179745aa51dc813fc77fc12f431 SHA1 202b14b369f47c3f1f5b44384447c7769cc61755 SHA256 deef3dd2faff775a34529a8909b6e003cce31ee1a9858ace880da761f463ab65
MD5 351176c1ea97204ce6b3a7516ee9f889 metadata.xml 255
RMD160 a80959a97f317179745aa51dc813fc77fc12f431 metadata.xml 255
SHA256 deef3dd2faff775a34529a8909b6e003cce31ee1a9858ace880da761f463ab65 metadata.xml 255
-MD5 8c4e1e4e66aea15c00413b25ebfa5743 files/digest-mod_security-1.8.7 253
-RMD160 e47d4f2750e52352444e1bc1a7171fac532b5120 files/digest-mod_security-1.8.7 253
-SHA256 213963e27e0d3834b032c587f0045c3f75670f586d3e5f7bf3cc6bdc40b477a2 files/digest-mod_security-1.8.7 253
-MD5 97b7aedea9ae3e7a9f1860e686d24c3d files/digest-mod_security-1.9.4 274
-RMD160 d52e1a24b3277f8016f746bac6a3cdaea63b638a files/digest-mod_security-1.9.4 274
-SHA256 53acccec6f7f67ae628633bd127400295d38e1ce8b0e60173db7a5e6a5a1f022 files/digest-mod_security-1.9.4 274
MD5 48298cf2110a95571ba4db082207687a files/digest-mod_security-2.1.1 274
RMD160 3613b40a8ef2d2be14afc0b57e087be24e98e986 files/digest-mod_security-2.1.1 274
SHA256 7d542b268d220da9db5af73af411b8e8c6cc0669cae2588f9dc1ecafc77e2144 files/digest-mod_security-2.1.1 274
+MD5 48298cf2110a95571ba4db082207687a files/digest-mod_security-2.1.1-r1 274
+RMD160 3613b40a8ef2d2be14afc0b57e087be24e98e986 files/digest-mod_security-2.1.1-r1 274
+SHA256 7d542b268d220da9db5af73af411b8e8c6cc0669cae2588f9dc1ecafc77e2144 files/digest-mod_security-2.1.1-r1 274
diff --git a/net-www/mod_security/files/99_mod_security.conf b/net-www/mod_security/files/99_mod_security.conf
deleted file mode 100644
index 1269365021b4..000000000000
--- a/net-www/mod_security/files/99_mod_security.conf
+++ /dev/null
@@ -1,123 +0,0 @@
-<IfDefine SECURITY>
- <IfModule !mod_security.c>
- LoadModule security_module modules/mod_security.so
- </IfModule>
-</IfDefine>
-
-# Examples below are taken from the online documentation
-# Refer to:
-# http://www.modsecurity.org/documentation/quick-examples.html
-
-<IfModule mod_security.c>
-
- # Turn the filtering engine On or Off
- SecFilterEngine On
-
- # Make sure that URL encoding is valid
- SecFilterCheckURLEncoding On
-
- # Only allow bytes from this range
- SecFilterForceByteRange 32 126
-
- # The audit engine works independently and
- # can be turned On of Off on the per-server or
- # on the per-directory basis. "On" will log everything,
- # "DynamicOrRelevant" will log dynamic requests or violations,
- # and "RelevantOnly" will only log policy violations
- SecAuditEngine RelevantOnly
-
- # The name of the audit log file
- SecAuditLog logs/audit_log
-
- SecFilterDebugLog logs/modsec_debug_log
- SecFilterDebugLevel 0
-
- # Should mod_security inspect POST payloads
- SecFilterScanPOST On
-
- # Action to take by default
- SecFilterDefaultAction "deny,log,status:500"
-
- # Redirect user on filter match
- SecFilter xxx redirect:http://www.webkreator.com
-
- # Execute the external script on filter match
- SecFilter yyy log,exec:/home/users/ivanr/apache/bin/report-attack.pl
-
- # Simple filter
- SecFilter 111
-
- # Only check the QUERY_STRING variable
- SecFilterSelective QUERY_STRING 222
-
- # Only check the body of the POST request
- SecFilterSelective POST_PAYLOAD 333
-
- # Only check arguments (will work for GET and POST)
- SecFilterSelective ARGS 444
-
- # Test filter
- SecFilter "/cgi-bin/modsec-test.pl/keyword"
-
- # Another test filter, will be denied with 404 but not logged
- # action supplied as a parameter overrides the default action
- SecFilter 999 "deny,nolog,status:500"
-
- # Prevent OS specific keywords
- SecFilter /etc/passwd
-
- # Prevent path traversal (..) attacks
- SecFilter "\.\./"
-
- # Weaker XSS protection but allows common HTML tags
- SecFilter "<[[:space:]]*script"
-
- # Prevent XSS atacks (HTML/Javascript injection)
- SecFilter "<(.|\n)+>"
-
- # Very crude filters to prevent SQL injection attacks
- SecFilter "delete[[:space:]]+from"
- SecFilter "insert[[:space:]]+into"
- SecFilter "select.+from"
-
- # Require HTTP_USER_AGENT and HTTP_HOST headers
- SecFilterSelective "HTTP_USER_AGENT|HTTP_HOST" "^$"
-
- # Forbid file upload
- SecFilterSelective "HTTP_CONTENT_TYPE" multipart/form-data
-
- # Only watch argument p1
- SecFilterSelective "ARG_p1" 555
-
- # Watch all arguments except p1
- SecFilterSelective "ARGS|!ARG_p2" 666
-
- # Only allow our own test utility to send requests (or Mozilla)
- SecFilterSelective HTTP_USER_AGENT "!(mod_security|mozilla)"
-
- # Do not allow variables with this name
- SecFilterSelective ARGS_NAMES 777
-
- # Do now allow this variable value (names are ok)
- SecFilterSelective ARGS_VALUES 888
-
- # Test for a POST variable parsing bug, see test #41
- SecFilterSelective ARG_p2 AAA
-
- # Stop spamming through FormMail
- # note the exclamation mark at the beginning
- # of the filter - only requests that match this regex will
- # be allowed
- <Location /cgi-bin/FormMail>
- SecFilterSelective "ARG_recipient" "!@webkreator.com$"
- </Location>
-
- # when allowing upload, only allow images
- # note that this is not foolproof, a determined attacker
- # could get around this
- <Location /fileupload.php>
- SecFilterInheritance Off
- SecFilterSelective POST_PAYLOAD "!image/(jpeg|bmp|gif)"
- </Location>
-
-</IfModule>
diff --git a/net-www/mod_security/files/digest-mod_security-1.8.7 b/net-www/mod_security/files/digest-mod_security-1.8.7
deleted file mode 100644
index 372fb7623b46..000000000000
--- a/net-www/mod_security/files/digest-mod_security-1.8.7
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 0dd48656e451c711358c097dc80e0369 modsecurity-1.8.7.tar.gz 313004
-RMD160 ee5e6566dda8c932e5e01833af290186f22af773 modsecurity-1.8.7.tar.gz 313004
-SHA256 7314a0c6ebe50d8c71e44fcc520969a60d1d01a3c1a2e0a1d08b2b166eabf8ce modsecurity-1.8.7.tar.gz 313004
diff --git a/net-www/mod_security/files/digest-mod_security-1.9.4 b/net-www/mod_security/files/digest-mod_security-1.9.4
deleted file mode 100644
index 01390ffc6533..000000000000
--- a/net-www/mod_security/files/digest-mod_security-1.9.4
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 74d2317781bab619cd7b6b376b978107 modsecurity-apache_1.9.4.tar.gz 496805
-RMD160 2fd5e3f43fa94836a4845f106285bed68c704aef modsecurity-apache_1.9.4.tar.gz 496805
-SHA256 9ca6e614c58783faec9b14f58f569a96de420b25ab23063387a1ab51ce3f5171 modsecurity-apache_1.9.4.tar.gz 496805
diff --git a/net-www/mod_security/files/digest-mod_security-2.1.1-r1 b/net-www/mod_security/files/digest-mod_security-2.1.1-r1
new file mode 100644
index 000000000000..af3a5b2f6338
--- /dev/null
+++ b/net-www/mod_security/files/digest-mod_security-2.1.1-r1
@@ -0,0 +1,3 @@
+MD5 ab74ed5f320ffc4ed9f56487bf17c670 modsecurity-apache_2.1.1.tar.gz 650607
+RMD160 17e94c19d51f7e9e09ef435f81d696ec638aad44 modsecurity-apache_2.1.1.tar.gz 650607
+SHA256 fadeb3b4ce5672c99c094611792b827d45fcd6b38c4c4fa81c4cfdc63c63b71a modsecurity-apache_2.1.1.tar.gz 650607
diff --git a/net-www/mod_security/files/mod_security-2.1.1-request_interception.patch b/net-www/mod_security/files/mod_security-2.1.1-request_interception.patch
new file mode 100644
index 000000000000..5f38268e203d
--- /dev/null
+++ b/net-www/mod_security/files/mod_security-2.1.1-request_interception.patch
@@ -0,0 +1,15 @@
+Index: apache2/mod_security2.c
+===================================================================
+--- apache2/mod_security2.c (revision 266)
++++ apache2/mod_security2.c (working copy)
+@@ -558,6 +558,10 @@
+
+ /* Has this phase been completed already? */
+ if (msr->phase_request_body_complete) {
++ if (msr->was_intercepted) {
++ msr_log(msr, 4, "Phase REQUEST_BODY subrequest already intercepted with code %u.", msr->intercept_actionset->intercept_status);
++ return msr->intercept_actionset->intercept_status;
++ }
+ if (msr->txcfg->debuglog_level >= 4) {
+ msr_log(msr, 4, "Phase REQUEST_BODY already complete, skipping.");
+ }
diff --git a/net-www/mod_security/mod_security-1.8.7.ebuild b/net-www/mod_security/mod_security-1.8.7.ebuild
deleted file mode 100644
index 6d04a0a0e602..000000000000
--- a/net-www/mod_security/mod_security-1.8.7.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mod_security/mod_security-1.8.7.ebuild,v 1.7 2007/01/14 20:09:54 chtekk Exp $
-
-inherit apache-module
-
-KEYWORDS="amd64 ppc sparc x86"
-
-DESCRIPTION="Intrusion Detection System for Apache."
-HOMEPAGE="http://www.modsecurity.org/"
-SRC_URI="http://www.modsecurity.org/download/${P/_/}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="doc"
-
-S="${WORKDIR}/${P/_/}"
-
-APXS1_ARGS="-S LIBEXECDIR=${S} -c ${S}/apache1/mod_security.c"
-APACHE1_MOD_FILE="apache1/${PN}.so"
-APACHE1_MOD_CONF="99_mod_security"
-APACHE1_MOD_DEFINE="SECURITY"
-
-APXS2_ARGS="-S LIBEXECDIR=${S} -c ${S}/apache2/mod_security.c"
-APACHE2_MOD_FILE="apache2/.libs/${PN}.so"
-APACHE2_MOD_CONF="99_mod_security"
-APACHE2_MOD_DEFINE="SECURITY"
-
-DOCFILES="CHANGES httpd.conf.* INSTALL LICENSE README"
-use doc && DOCFILES="${DOCFILES} modsecurity-manual.pdf"
-
-need_apache
diff --git a/net-www/mod_security/mod_security-1.9.4.ebuild b/net-www/mod_security/mod_security-1.9.4.ebuild
deleted file mode 100644
index e86849e72990..000000000000
--- a/net-www/mod_security/mod_security-1.9.4.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mod_security/mod_security-1.9.4.ebuild,v 1.2 2007/01/14 20:09:54 chtekk Exp $
-
-inherit apache-module
-
-KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86"
-
-DESCRIPTION="Intrusion Detection System for Apache."
-HOMEPAGE="http://www.modsecurity.org/"
-SRC_URI="http://www.modsecurity.org/download/${P/mod_security-/modsecurity-apache_}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="doc"
-
-S="${WORKDIR}/${P/mod_security-/modsecurity-apache_}"
-
-APXS1_ARGS="-S LIBEXECDIR=${S} -c ${S}/apache1/mod_security.c"
-APACHE1_MOD_FILE="apache1/${PN}.so"
-APACHE1_MOD_CONF="99_mod_security"
-APACHE1_MOD_DEFINE="SECURITY"
-
-APXS2_ARGS="-S LIBEXECDIR=${S} -c ${S}/apache2/mod_security.c"
-APACHE2_MOD_FILE="apache2/.libs/${PN}.so"
-APACHE2_MOD_CONF="99_mod_security"
-APACHE2_MOD_DEFINE="SECURITY"
-
-DOCFILES="CHANGES httpd.conf.* INSTALL LICENSE README"
-use doc && DOCFILES="${DOCFILES} doc/modsecurity-apache-manual-1.9.pdf"
-
-need_apache
diff --git a/net-www/mod_security/mod_security-2.1.1-r1.ebuild b/net-www/mod_security/mod_security-2.1.1-r1.ebuild
new file mode 100644
index 000000000000..80849c61a3e3
--- /dev/null
+++ b/net-www/mod_security/mod_security-2.1.1-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_security/mod_security-2.1.1-r1.ebuild,v 1.1 2007/06/15 18:21:47 hollow Exp $
+
+inherit eutils apache-module
+
+KEYWORDS="amd64 ~mips ppc sparc x86"
+
+MY_P=${P/mod_security-/modsecurity-apache_}
+
+DESCRIPTION="Web application firewall and Intrusion Detection System for Apache."
+HOMEPAGE="http://www.modsecurity.org/"
+SRC_URI="http://www.modsecurity.org/download/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="doc"
+
+S="${WORKDIR}/${MY_P}"
+
+APXS2_ARGS="-S LIBEXECDIR=${S} -c -o ${PN}2.so ${S}/apache2/*.c"
+APACHE2_MOD_FILE=".libs/${PN}2.so"
+#APACHE2_MOD_CONF="99_mod_security"
+APACHE2_MOD_DEFINE="SECURITY"
+
+need_apache2
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-request_interception.patch
+}
+
+src_install() {
+ apache2_src_install
+
+ # install documentation
+ dodoc CHANGES
+ newdoc rules/CHANGELOG CHANGES.crs
+ newdoc rules/README README.crs
+ dohtml doc/*.html doc/*.gif doc/*.jpg doc/*.css doc/*.pdf
+ cp -r "${S}"/doc/html-multipage "${D}"/usr/share/doc/${P}/html/
+
+ # Once APACHE2_MOD_CONF is able to use newconfd (probably never), this line
+ # should go.
+ insinto ${APACHE2_MODULES_CONFDIR}
+ newins "${FILESDIR}"/99_mod_security-${PV}.conf 99_mod_security.conf
+
+ # Prepare the core ruleset
+ for i in $( ls "${S}"/rules/*.conf ); do
+ mv $i ${i/modsecurity_crs_/}
+ done
+
+ # Install core ruleset
+ insinto ${APACHE2_MODULES_CONFDIR}/mod_security/
+ doins "${S}"/rules/*.conf
+}