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: mod_security-2.5.10.ebuild ChangeLog
Date: Thu, 01 Oct 2009 22:07:40
Message-Id: E1MtToH-0008BB-Tq@stork.gentoo.org
1 flameeyes 09/10/01 22:07:37
2
3 Modified: ChangeLog
4 Added: mod_security-2.5.10.ebuild
5 Log:
6 Version bump.
7 (Portage version: 2.2_rc42/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.28 www-apache/mod_security/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/ChangeLog?rev=1.28&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/ChangeLog?rev=1.28&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/ChangeLog?r1=1.27&r2=1.28
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v
19 retrieving revision 1.27
20 retrieving revision 1.28
21 diff -u -r1.27 -r1.28
22 --- ChangeLog 27 Jul 2009 16:42:44 -0000 1.27
23 +++ ChangeLog 1 Oct 2009 22:07:37 -0000 1.28
24 @@ -1,6 +1,12 @@
25 # ChangeLog for www-apache/mod_security
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.27 2009/07/27 16:42:44 flameeyes Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.28 2009/10/01 22:07:37 flameeyes Exp $
29 +
30 +*mod_security-2.5.10 (01 Oct 2009)
31 +
32 + 01 Oct 2009; Diego E. Pettenò <flameeyes@g.o>
33 + +mod_security-2.5.10.ebuild, +files/mod_security-2.5.10-as-needed.patch:
34 + Version bump.
35
36 27 Jul 2009; Diego E. Pettenò <flameeyes@g.o>
37 mod_security-2.5.9-r1.ebuild:
38
39
40
41 1.1 www-apache/mod_security/mod_security-2.5.10.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/mod_security-2.5.10.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-apache/mod_security/mod_security-2.5.10.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mod_security-2.5.10.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/mod_security-2.5.10.ebuild,v 1.1 2009/10/01 22:07:37 flameeyes Exp $
51
52 inherit apache-module autotools
53
54 MY_P=${P/mod_security-/modsecurity-apache_}
55 MY_P=${MY_P/_rc/-rc}
56
57 DESCRIPTION="Web application firewall and Intrusion Detection System for Apache."
58 HOMEPAGE="http://www.modsecurity.org/"
59 SRC_URI="http://www.modsecurity.org/download/${MY_P}.tar.gz"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86"
64 IUSE="lua perl"
65
66 DEPEND="dev-libs/libxml2
67 perl? ( dev-perl/libwww-perl )
68 lua? ( >=dev-lang/lua-5.1 )"
69 RDEPEND="${DEPEND}"
70
71 S="${WORKDIR}/${MY_P}"
72
73 APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
74 APACHE2_MOD_CONF="2.1.2/99_mod_security"
75 APACHE2_MOD_DEFINE="SECURITY"
76
77 need_apache2
78
79 src_unpack() {
80 unpack ${A}
81
82 cd "${S}"/apache2
83
84 epatch "${FILESDIR}"/${P}-as-needed.patch
85
86 eautoreconf
87 }
88
89 src_compile() {
90 cd apache2
91
92 econf --with-apxs="${APXS}" \
93 --without-curl \
94 $(use_with lua) \
95 || die "econf failed"
96
97 APXS_FLAGS=
98 for flag in ${CFLAGS}; do
99 APXS_FLAGS="${APXS_FLAGS} -Wc,${flag}"
100 done
101
102 # Yes we need to prefix it _twice_
103 for flag in ${LDFLAGS}; do
104 APXS_FLAGS="${APXS_FLAGS} -Wl,${flag}"
105 done
106
107 emake \
108 APXS_CFLAGS="${CFLAGS}" \
109 APXS_LDFLAGS="${LDFLAGS}" \
110 APXS_EXTRA_CFLAGS="${APXS_FLAGS}" \
111 || die "emake failed"
112 }
113
114 src_test() {
115 cd apache2
116 make test || die
117 }
118
119 src_install() {
120 apache-module_src_install
121
122 # install rules updater only if perl is enabled (optionally)
123 if use perl; then
124 newsbin tools/rules-updater.pl modsec-rules-updater || die
125 fi
126
127 # install documentation
128 dodoc CHANGES || die
129 newdoc rules/CHANGELOG CHANGES.crs || die
130 newdoc rules/README README.crs || die
131 dohtml -r doc/* || die
132
133 # Prepare the core ruleset
134 cd "${S}"/rules/
135
136 sed -i -e 's:logs/:/var/log/apache2/:g' *.conf || die
137
138 insinto ${APACHE_MODULES_CONFDIR}/mod_security/
139 for i in *.conf; do
140 newins ${i} ${i/modsecurity_crs_/} || die
141 done
142 }
143
144 pkg_postinst() {
145 elog "Please note that the core rule set distributed with mod_security is quite"
146 elog "draconic. If you're using this on a blog, a forum or another user-submitted"
147 elog "web application where you might talk about standard Unix paths (such as /etc"
148 elog "or /bin), you might want to disable at least rules 950005 and 950907"
149 elog "(command injection) if you're sure it might not be a security risk."
150 elog " "
151 elog "To do that on the most limited case you might want to use something like"
152 elog "the following code (this comes from a Typo weblog instance):"
153 elog " "
154 elog " <Location /comments>"
155 elog " SecRuleRemoveById 950005 950907"
156 elog " </Location>"
157 elog " "
158 }