Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-apache/mod_security: ChangeLog mod_security-2.5.12.ebuild mod_security-2.5.11-r1.ebuild mod_security-2.5.9.ebuild
Date: Tue, 09 Feb 2010 17:48:47
Message-Id: E1NeuCZ-0006WR-KN@stork.gentoo.org
1 flameeyes 10/02/09 17:48:43
2
3 Modified: ChangeLog
4 Added: mod_security-2.5.12.ebuild
5 Removed: mod_security-2.5.11-r1.ebuild
6 mod_security-2.5.9.ebuild
7 Log:
8 Version bump, this version fixes possible security problems. Keep an old version around though as the HTTP Parameter Pollution code changed drastically and might break Rails again.
9 (Portage version: 2.2_rc62/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.37 www-apache/mod_security/ChangeLog
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/ChangeLog?rev=1.37&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/ChangeLog?rev=1.37&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/ChangeLog?r1=1.36&r2=1.37
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v
21 retrieving revision 1.36
22 retrieving revision 1.37
23 diff -u -r1.36 -r1.37
24 --- ChangeLog 28 Dec 2009 18:18:13 -0000 1.36
25 +++ ChangeLog 9 Feb 2010 17:48:42 -0000 1.37
26 @@ -1,6 +1,15 @@
27 # ChangeLog for www-apache/mod_security
28 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.36 2009/12/28 18:18:13 armin76 Exp $
30 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
31 +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.37 2010/02/09 17:48:42 flameeyes Exp $
32 +
33 +*mod_security-2.5.12 (09 Feb 2010)
34 +
35 + 09 Feb 2010; Diego E. Pettenò <flameeyes@g.o>
36 + files/2.5.10/99_mod_security.conf, -mod_security-2.5.9.ebuild,
37 + -mod_security-2.5.11-r1.ebuild, +mod_security-2.5.12.ebuild:
38 + Version bump, this version fixes possible security problems. Keep an old
39 + version around though as the HTTP Parameter Pollution code changed
40 + drastically and might break Rails again.
41
42 28 Dec 2009; Raúl Porcel <armin76@g.o>
43 mod_security-2.5.9-r1.ebuild:
44
45
46
47 1.1 www-apache/mod_security/mod_security-2.5.12.ebuild
48
49 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/mod_security-2.5.12.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/mod_security-2.5.12.ebuild?rev=1.1&content-type=text/plain
51
52 Index: mod_security-2.5.12.ebuild
53 ===================================================================
54 # Copyright 1999-2010 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/mod_security-2.5.12.ebuild,v 1.1 2010/02/09 17:48:42 flameeyes Exp $
57
58 EAPI=2
59
60 inherit apache-module autotools
61
62 MY_P=${P/mod_security-/modsecurity-apache_}
63 MY_P=${MY_P/_rc/-rc}
64
65 DESCRIPTION="Web application firewall and Intrusion Detection System for Apache."
66 HOMEPAGE="http://www.modsecurity.org/"
67 SRC_URI="http://www.modsecurity.org/download/${MY_P}.tar.gz"
68
69 LICENSE="GPL-2"
70 SLOT="0"
71 KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86"
72 IUSE="lua perl vanilla"
73
74 DEPEND="dev-libs/libxml2
75 perl? ( dev-perl/libwww-perl )
76 lua? ( >=dev-lang/lua-5.1 )
77 www-servers/apache[apache2_modules_unique_id]"
78 RDEPEND="${DEPEND}"
79
80 S="${WORKDIR}/${MY_P}"
81
82 APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
83 APACHE2_MOD_CONF="2.5.10/99_mod_security"
84 APACHE2_MOD_DEFINE="SECURITY"
85
86 need_apache2
87
88 src_prepare() {
89 epatch "${FILESDIR}"/${PN}-2.5.10-as-needed.patch
90
91 cd apache2
92 eautoreconf
93 }
94
95 src_configure() {
96 cd apache2
97
98 econf --with-apxs="${APXS}" \
99 --without-curl \
100 $(use_with lua) \
101 || die "econf failed"
102 }
103
104 src_compile() {
105 cd apache2
106
107 APXS_FLAGS=
108 for flag in ${CFLAGS}; do
109 APXS_FLAGS="${APXS_FLAGS} -Wc,${flag}"
110 done
111
112 # Yes we need to prefix it _twice_
113 for flag in ${LDFLAGS}; do
114 APXS_FLAGS="${APXS_FLAGS} -Wl,${flag}"
115 done
116
117 emake \
118 APXS_CFLAGS="${CFLAGS}" \
119 APXS_LDFLAGS="${LDFLAGS}" \
120 APXS_EXTRA_CFLAGS="${APXS_FLAGS}" \
121 || die "emake failed"
122 }
123
124 src_test() {
125 cd apache2
126 emake test || die
127 }
128
129 src_install() {
130 apache-module_src_install
131
132 # install rules updater only if perl is enabled (optionally)
133 if use perl; then
134 newsbin tools/rules-updater.pl modsec-rules-updater || die
135 fi
136
137 # install documentation
138 dodoc CHANGES || die
139 newdoc rules/CHANGELOG CHANGES.crs || die
140 newdoc rules/README README.crs || die
141 dohtml -r doc/* || die
142
143 # Prepare the core ruleset
144 cd "${S}"/rules/
145
146 sed -i -e 's:logs/:/var/log/apache2/:g' *.conf || die
147
148 insinto ${APACHE_MODULES_CONFDIR}/mod_security/
149 doins *.conf base_rules/* || die
150
151 insinto ${APACHE_MODULES_CONFDIR}/mod_security/optional_rules
152 doins optional_rules/* || die
153
154 if ! use vanilla; then
155 mv "${D}"${APACHE_MODULES_CONFDIR}/mod_security/modsecurity_*{41_phpids,50_outbound}* \
156 "${D}"${APACHE_MODULES_CONFDIR}/mod_security/optional_rules || die
157 fi
158
159 keepdir /var/cache/mod_security || die
160 fowners apache:apache /var/cache/mod_security || die
161 fperms 0770 /var/cache/mod_security || die
162 }
163
164 pkg_postinst() {
165 if ! use vanilla; then
166 elog "Please note that the core rule set distributed with mod_security is quite"
167 elog "draconic; to make it more usable, the Gentoo distribution disables a few"
168 elog "rule set files, that are relevant for PHP-only websites or that would make it"
169 elog "kill a website that discussed of source code."
170 elog
171 elog "Furthermore we disable the 'HTTP Parameter Pollution' tests that disallow"
172 elog "multiple parameters with the same name, because that's common practice both"
173 elog "for Rails-based web-applications and Bugzilla."
174 if use perl; then
175 elog
176 elog "You want to install the Perl-based updater script for the Core Rule Set."
177 elog "Be warned that the script will update the rules iwth the original, draconic"
178 elog "rules, so you might end up with unusable web applications."
179 fi
180 else
181 elog "You decided to enable the original Core Rule Set from ModSecurity."
182 elog "Be warned that the original Core Rule Set is draconic and most likely will"
183 elog "render your web application unusable if you don't disable at leat some of"
184 elog "the rules."
185 fi
186 elog
187 elog "If you want to enable further rules, check the following directory:"
188 elog " ${APACHE_MODULES_CONFDIR}/mod_security/optional_rules"
189 }