Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apache/mod_security/
Date: Mon, 04 Mar 2019 01:36:07
Message-Id: 1551660980.7d32d9f13e0545d7cb004cb9b1c10c82b130f0c6.whissi@gentoo
1 commit: 7d32d9f13e0545d7cb004cb9b1c10c82b130f0c6
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Sat Feb 23 11:57:59 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 4 00:56:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d32d9f1
7
8 www-apache/mod_security: bump to 2.9.3
9
10 Signed-off-by: Tomas Mozes <hydrapolic <AT> gmail.com>
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 www-apache/mod_security/Manifest | 1 +
14 www-apache/mod_security/mod_security-2.9.3.ebuild | 115 ++++++++++++++++++++++
15 2 files changed, 116 insertions(+)
16
17 diff --git a/www-apache/mod_security/Manifest b/www-apache/mod_security/Manifest
18 index d53183b7567..77a67a32173 100644
19 --- a/www-apache/mod_security/Manifest
20 +++ b/www-apache/mod_security/Manifest
21 @@ -1 +1,2 @@
22 DIST modsecurity-2.9.1.tar.gz 4261212 BLAKE2B c47c7934d8da870e629c5733cc8c37452e4d90351269a14b99483188e8e3161891bd63bfd70e0723648c8daf51f1c33d900bd90ab0157332f826eab772f09f62 SHA512 374733cbfc26e53d95b78c8f268a4e465d838163e9893fc24e33a9d272b114f1b287147bab6d0289575074cbbd94f48983e23fa59832cbcb32950046cea59269
23 +DIST modsecurity-2.9.3.tar.gz 4307670 BLAKE2B 337ea15cc8805af7ab43aed8aecf4c72ccc586d0d7e9d9b91f036a61baa70d1ac8b4ad8045a2bb7a13515912a15fba7d3cdb9670ae6730de43b1e44ee90ded6d SHA512 4e1ea5dd8edadf8f630e4fe92a200d3a8e78963fce3128b5975a1e1ecd0e8bf9ceecd9905c95f8c508932ccd837f1d8ae8bb2ba423307718c3c6a4ae9b783ddd
24
25 diff --git a/www-apache/mod_security/mod_security-2.9.3.ebuild b/www-apache/mod_security/mod_security-2.9.3.ebuild
26 new file mode 100644
27 index 00000000000..41cfb5afbc1
28 --- /dev/null
29 +++ b/www-apache/mod_security/mod_security-2.9.3.ebuild
30 @@ -0,0 +1,115 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI="6"
35 +
36 +inherit apache-module
37 +
38 +MY_PN=modsecurity
39 +MY_P=${MY_PN}-${PV}
40 +
41 +DESCRIPTION="Application firewall and intrusion detection for Apache"
42 +HOMEPAGE="http://www.modsecurity.org/"
43 +SRC_URI="http://www.modsecurity.org/tarball/${PV}/${MY_P}.tar.gz"
44 +
45 +LICENSE="Apache-2.0"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +IUSE="doc fuzzyhash geoip jit json lua mlogc"
49 +
50 +COMMON_DEPEND="dev-libs/apr
51 + dev-libs/apr-util[openssl]
52 + dev-libs/libxml2
53 + dev-libs/libpcre[jit?]
54 + fuzzyhash? ( app-crypt/ssdeep )
55 + json? ( dev-libs/yajl )
56 + lua? ( dev-lang/lua:0 )
57 + mlogc? ( net-misc/curl )
58 + www-servers/apache[apache2_modules_unique_id]"
59 +DEPEND="${COMMON_DEPEND}
60 + doc? ( app-doc/doxygen )"
61 +RDEPEND="${COMMON_DEPEND}
62 + geoip? ( dev-libs/geoip )
63 + mlogc? ( dev-lang/perl )"
64 +PDEPEND=">=www-apache/modsecurity-crs-2.2.6-r1"
65 +
66 +S="${WORKDIR}/${MY_P}"
67 +
68 +APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
69 +APACHE2_MOD_CONF="79_${PN}"
70 +APACHE2_MOD_DEFINE="SECURITY"
71 +
72 +# Tests require symbols only defined within the Apache binary.
73 +RESTRICT=test
74 +
75 +need_apache2
76 +
77 +pkg_setup() {
78 + _init_apache2
79 + _init_apache2_late
80 +}
81 +
82 +src_configure() {
83 + local myconf=(
84 + --disable-static
85 + --enable-request-early
86 + --with-apxs="${APXS}"
87 + --with-pic
88 + $(use_with fuzzyhash ssdeep)
89 + $(use_with json yajl)
90 + $(use_enable mlogc)
91 + $(use_with lua)
92 + $(use_enable lua lua-cache)
93 + $(use_enable jit pcre-jit) )
94 +
95 + econf ${myconf[@]}
96 +}
97 +
98 +src_compile() {
99 + default
100 +
101 + # Building the docs is broken at the moment, see e.g.
102 + # https://github.com/SpiderLabs/ModSecurity/issues/1322
103 + if use doc; then
104 + doxygen doc/doxygen-apache.conf || die 'failed to build documentation'
105 + fi
106 +}
107 +
108 +src_install() {
109 + apache-module_src_install
110 +
111 + dodoc CHANGES README.md modsecurity.conf-recommended
112 +
113 + if use doc; then
114 + dodoc -r doc/apache/html
115 + fi
116 +
117 + if use mlogc; then
118 + insinto /etc/
119 + newins mlogc/mlogc-default.conf mlogc.conf
120 + dobin mlogc/mlogc
121 + dobin mlogc/mlogc-batch-load.pl
122 + newdoc mlogc/INSTALL INSTALL-mlogc
123 + fi
124 +
125 + # Use /var/lib instead of /var/cache. This stuff is "persistent,"
126 + # and isn't a cached copy of something that we can recreate.
127 + # Bug 605496.
128 + keepdir /var/lib/modsecurity
129 + fowners apache:apache /var/lib/modsecurity
130 + fperms 0750 /var/lib/modsecurity
131 + for dir in data tmp upload; do
132 + keepdir "/var/lib/modsecurity/${dir}"
133 + fowners apache:apache "/var/lib/modsecurity/${dir}"
134 + fperms 0750 "/var/lib/modsecurity/${dir}"
135 + done
136 +}
137 +
138 +pkg_postinst() {
139 + elog "The base configuration file has been renamed ${APACHE2_MOD_CONF}"
140 + elog "so that you can put your own configuration in (for example)"
141 + elog "90_modsecurity_local.conf."
142 + elog ""
143 + elog "That would be the correct place for site-global security rules."
144 + elog "Note: 80_modsecurity_crs.conf is used by www-apache/modsecurity-crs"
145 +}