* [gentoo-commits] gentoo-x86 commit in www-apache/mod_security: metadata.xml ChangeLog mod_security-2.5.13-r2.ebuild mod_security-2.5.13-r1.ebuild
@ 2011-03-28 21:58 Diego Petteno (flameeyes)
0 siblings, 0 replies; only message in thread
From: Diego Petteno (flameeyes) @ 2011-03-28 21:58 UTC (permalink / raw
To: gentoo-commits
flameeyes 11/03/28 21:58:58
Modified: metadata.xml ChangeLog
mod_security-2.5.13-r2.ebuild
Removed: mod_security-2.5.13-r1.ebuild
Log:
Cleanup ebuild, port to EAPI=3; add geoip USE flag to bring in dev-libs/geoip and set it up.
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64)
Revision Changes Path
1.5 www-apache/mod_security/metadata.xml
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/metadata.xml?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/metadata.xml?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/metadata.xml?r1=1.4&r2=1.5
Index: metadata.xml
===================================================================
RCS file: /var/cvsroot/gentoo-x86/www-apache/mod_security/metadata.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- metadata.xml 2 Jun 2010 06:31:39 -0000 1.4
+++ metadata.xml 28 Mar 2011 21:58:58 -0000 1.5
@@ -20,5 +20,12 @@
applications, including Rails-based web applications and
Bugzilla.
</flag>
+
+ <flag name='geoip'>
+ Configure ModSecurity to query the GeoIP database from MaxMind,
+ provided by <pkg>dev-libs/geoip</pkg>. This flag only controls
+ the default configuration, as the GeoIP query code is part of
+ ModSecurity's source code.
+ </flag>
</use>
</pkgmetadata>
1.51 www-apache/mod_security/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/ChangeLog?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/ChangeLog?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/ChangeLog?r1=1.50&r2=1.51
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- ChangeLog 23 Mar 2011 23:05:00 -0000 1.50
+++ ChangeLog 28 Mar 2011 21:58:58 -0000 1.51
@@ -1,6 +1,13 @@
# ChangeLog for www-apache/mod_security
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.50 2011/03/23 23:05:00 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.51 2011/03/28 21:58:58 flameeyes Exp $
+
+ 28 Mar 2011; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/modsecurity.conf, -files/2.5.13-r2/79_modsecurity.conf,
+ -files/2.5.13/79_mod_security.conf, -mod_security-2.5.13-r1.ebuild,
+ mod_security-2.5.13-r2.ebuild, metadata.xml:
+ Cleanup ebuild, port to EAPI=3; add geoip USE flag to bring in dev-libs/geoip
+ and set it up.
*mod_security-2.5.13-r2 (23 Mar 2011)
1.2 www-apache/mod_security/mod_security-2.5.13-r2.ebuild
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/mod_security-2.5.13-r2.ebuild?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/mod_security-2.5.13-r2.ebuild?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_security/mod_security-2.5.13-r2.ebuild?r1=1.1&r2=1.2
Index: mod_security-2.5.13-r2.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/www-apache/mod_security/mod_security-2.5.13-r2.ebuild,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mod_security-2.5.13-r2.ebuild 23 Mar 2011 23:05:00 -0000 1.1
+++ mod_security-2.5.13-r2.ebuild 28 Mar 2011 21:58:58 -0000 1.2
@@ -1,13 +1,12 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/mod_security-2.5.13-r2.ebuild,v 1.1 2011/03/23 23:05:00 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/mod_security-2.5.13-r2.ebuild,v 1.2 2011/03/28 21:58:58 flameeyes Exp $
-EAPI=2
+EAPI=3
inherit apache-module autotools
-MY_P=${P/mod_security-/modsecurity-apache_}
-MY_P=${MY_P/_rc/-rc}
+MY_P=modsecurity-apache_${PV/_rc/-rc}
DESCRIPTION="Web application firewall and Intrusion Detection System for Apache."
HOMEPAGE="http://www.modsecurity.org/"
@@ -16,23 +15,25 @@
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="lua"
+IUSE="lua geoip"
DEPEND="dev-libs/libxml2
lua? ( >=dev-lang/lua-5.1 )
www-servers/apache[apache2_modules_unique_id]"
-RDEPEND="${DEPEND}"
+RDEPEND="${DEPEND}
+ geoip? ( dev-libs/geoip )"
PDEPEND="www-apache/modsecurity-crs"
S="${WORKDIR}/${MY_P}"
APACHE2_MOD_FILE="apache2/.libs/${PN}2.so"
-APACHE2_MOD_CONF="2.5.13-r2/79_modsecurity"
APACHE2_MOD_DEFINE="SECURITY"
need_apache2
src_prepare() {
+ cp "${FILESDIR}"/modsecurity.conf "${T}"/79_modsecurity.conf || die
+
epatch "${FILESDIR}"/${PN}-2.5.10-as-needed.patch
cd apache2
@@ -49,7 +50,10 @@
}
src_compile() {
- cd apache2
+ if ! use geoip; then
+ sed -i -e '/SecGeoLookupDb/s:^:#:' \
+ "${T}"/79_modsecurity.conf || die
+ fi
APXS_FLAGS=
for flag in ${CFLAGS}; do
@@ -61,7 +65,7 @@
APXS_FLAGS="${APXS_FLAGS} -Wl,${flag}"
done
- emake \
+ emake -C apache2 \
APXS_CFLAGS="${CFLAGS}" \
APXS_LDFLAGS="${LDFLAGS}" \
APXS_EXTRA_CFLAGS="${APXS_FLAGS}" \
@@ -69,16 +73,21 @@
}
src_test() {
- cd apache2
- emake test || die
+ emake -C apache2 test || die
}
src_install() {
apache-module_src_install
- # install documentation
- dodoc CHANGES || die
- dohtml -r doc/* || die
+ # install manually rather than by using the APACHE2_MOD_CONF
+ # variable since we have to edit it to set things up properly.
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${T}"/79_modsecurity.conf
+
+ # install documentation; don't install index.html as it references
+ # the PDF and split-pages versions of the same documentation.
+ dodoc CHANGES
+ dohtml "${S}"/doc/*.{css,gif,jpg} "${S}"/doc/modsecurity2*.html
keepdir /var/cache/modsecurity || die
fowners apache:apache /var/cache/modsecurity || die
@@ -88,7 +97,7 @@
pkg_postinst() {
if [[ -f "${ROOT}"/etc/apache/modules.d/99_mod_security.conf ]]; then
ewarn "You still have the configuration file 99_mod_security.conf."
- ewarn "Please make sure to remove that and keep only 79_mod_security.conf."
+ ewarn "Please make sure to remove that and keep only 79_modsecurity.conf."
ewarn ""
fi
elog "The base configuration file has been renamed 79_modsecurity.conf"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-28 21:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 21:58 [gentoo-commits] gentoo-x86 commit in www-apache/mod_security: metadata.xml ChangeLog mod_security-2.5.13-r2.ebuild mod_security-2.5.13-r1.ebuild Diego Petteno (flameeyes)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox