summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Mózes <hydrapolic@gmail.com>2022-10-22 04:05:11 +0000
committerJoonas Niilola <juippis@gentoo.org>2022-11-21 11:21:05 +0200
commitd20bf8a1839f65630232bf3a43bbae464d94d3d4 (patch)
tree31caadfc73f56b6564fb6baaf8b265710dff6679 /www-apache/modsecurity-crs
parentwww-client/firefox: update patchset for 107.0 (diff)
downloadgentoo-d20bf8a1839f65630232bf3a43bbae464d94d3d4.tar.gz
gentoo-d20bf8a1839f65630232bf3a43bbae464d94d3d4.tar.bz2
gentoo-d20bf8a1839f65630232bf3a43bbae464d94d3d4.zip
www-apache/modsecurity-crs: add 3.3.4
Bug: https://bugs.gentoo.org/872077 Closes: https://bugs.gentoo.org/869737 Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/27886 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'www-apache/modsecurity-crs')
-rw-r--r--www-apache/modsecurity-crs/Manifest1
-rw-r--r--www-apache/modsecurity-crs/metadata.xml11
-rw-r--r--www-apache/modsecurity-crs/modsecurity-crs-3.3.4.ebuild42
3 files changed, 50 insertions, 4 deletions
diff --git a/www-apache/modsecurity-crs/Manifest b/www-apache/modsecurity-crs/Manifest
index 381e71176da6..d8a19b55b4fe 100644
--- a/www-apache/modsecurity-crs/Manifest
+++ b/www-apache/modsecurity-crs/Manifest
@@ -1 +1,2 @@
DIST modsecurity-crs-3.3.2.tar.gz 290450 BLAKE2B 2935b781af44a206eec881a2c06669db91da98a4d74936299651a77417a2eeaf6d4ab9a1566c08fc4bfb2a60d0b38e71d746d726578ce220b59c9c9cbd800190 SHA512 a5d96fb949da82120a1c4cda4dcf804b06aaae71f25cded5ee998d2c4e766ae2de88e42cd52fc9d63e204415e829af27d80614e58b55509e7bd7ffc20a26cfba
+DIST modsecurity-crs-3.3.4.tar.gz 301112 BLAKE2B 0df4b70c5ecc1852fe3cde74783494636c530cc8a2b8ddc0269da25703521532ee3ed6ba1e572b854fe6912f31d2ed1fe4c917b13dc22b37763dbe73ef8c7b72 SHA512 a8b8b210054a9a4e3f8e45a5a9428110bb4075e40430e3fc16f4717e363af141265b1fb5c173ff96abeff0ac61ef5eef667a4b9cb703f8edc15e48deb3342827
diff --git a/www-apache/modsecurity-crs/metadata.xml b/www-apache/modsecurity-crs/metadata.xml
index 425d958788a4..5ddb96e8e1a1 100644
--- a/www-apache/modsecurity-crs/metadata.xml
+++ b/www-apache/modsecurity-crs/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!--maintainer-needed-->
- <upstream>
- <remote-id type="github">coreruleset/coreruleset</remote-id>
- </upstream>
+ <!--maintainer-needed-->
+ <use>
+ <flag name="nginx">Adds support for nginx</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">coreruleset/coreruleset</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/www-apache/modsecurity-crs/modsecurity-crs-3.3.4.ebuild b/www-apache/modsecurity-crs/modsecurity-crs-3.3.4.ebuild
new file mode 100644
index 000000000000..abbbd1ec3c43
--- /dev/null
+++ b/www-apache/modsecurity-crs/modsecurity-crs-3.3.4.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+DESCRIPTION="OWASP ModSecurity Core Rule Set"
+HOMEPAGE="https://coreruleset.org/"
+SRC_URI="https://github.com/coreruleset/coreruleset/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/coreruleset-${PV}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+apache2 nginx"
+
+RDEPEND="
+ apache2? ( >=www-apache/mod_security-2.9.6 )
+ nginx? ( >=dev-libs/modsecurity-3.0.8 )
+"
+
+DOCS=( CHANGES CONTRIBUTORS.md crs-setup.conf.example KNOWN_BUGS README.md )
+
+src_install() {
+ insinto "/usr/share/${PN}"
+ doins -r rules
+
+ einstalldocs
+
+ if use apache2; then
+ # I don't think it's worth pulling in apache-module.eclass just for
+ # this path...
+ insinto /etc/apache2/modules.d
+ doins "${FILESDIR}/80_mod_security-crs.conf"
+ fi
+}
+
+pkg_postinst() {
+ if use apache2; then
+ einfo "The CRS configuration file has been installed to:"
+ einfo " ${ROOT}/etc/apache2/modules.d/80_mod_security-crs.conf"
+ fi
+}