From f850aa2863c0c9b7dee07e6823d0ad2575e20a10 Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Wed, 23 Mar 2011 23:05:00 +0000 Subject: Version bump; don't force usage of CRS in the configuration file for the module; rename mod_security to modsecurity in it for consistency with upstream and future Debian. (Portage version: 2.2.0_alpha28/cvs/Linux x86_64) --- www-apache/mod_security/ChangeLog | 11 ++- .../files/2.5.13-r2/79_modsecurity.conf | 8 ++ .../mod_security/mod_security-2.5.12-r1.ebuild | 86 ------------------ .../mod_security/mod_security-2.5.13-r2.ebuild | 100 +++++++++++++++++++++ 4 files changed, 118 insertions(+), 87 deletions(-) create mode 100644 www-apache/mod_security/files/2.5.13-r2/79_modsecurity.conf delete mode 100644 www-apache/mod_security/mod_security-2.5.12-r1.ebuild create mode 100644 www-apache/mod_security/mod_security-2.5.13-r2.ebuild (limited to 'www-apache/mod_security') diff --git a/www-apache/mod_security/ChangeLog b/www-apache/mod_security/ChangeLog index b4c6cf6656d3..b8f2ccc51277 100644 --- a/www-apache/mod_security/ChangeLog +++ b/www-apache/mod_security/ChangeLog @@ -1,6 +1,15 @@ # 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.49 2011/02/26 14:44:27 xarthisius Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_security/ChangeLog,v 1.50 2011/03/23 23:05:00 flameeyes Exp $ + +*mod_security-2.5.13-r2 (23 Mar 2011) + + 23 Mar 2011; Diego E. Pettenò + +files/2.5.13-r2/79_modsecurity.conf, -mod_security-2.5.12-r1.ebuild, + +mod_security-2.5.13-r2.ebuild: + Version bump; don't force usage of CRS in the configuration file for the + module; rename mod_security to modsecurity in it for consistency with + upstream and future Debian. 26 Feb 2011; Kacper Kowalik mod_security-2.5.13-r1.ebuild: diff --git a/www-apache/mod_security/files/2.5.13-r2/79_modsecurity.conf b/www-apache/mod_security/files/2.5.13-r2/79_modsecurity.conf new file mode 100644 index 000000000000..77a42bab1920 --- /dev/null +++ b/www-apache/mod_security/files/2.5.13-r2/79_modsecurity.conf @@ -0,0 +1,8 @@ + +LoadModule security2_module modules/mod_security2.so + +SecDataDir /var/cache/modsecurity + + +# -*- apache -*- +# vim: ts=4 filetype=apache diff --git a/www-apache/mod_security/mod_security-2.5.12-r1.ebuild b/www-apache/mod_security/mod_security-2.5.12-r1.ebuild deleted file mode 100644 index c4a9f4c065df..000000000000 --- a/www-apache/mod_security/mod_security-2.5.12-r1.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2010 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.12-r1.ebuild,v 1.3 2010/10/24 17:45:04 armin76 Exp $ - -EAPI=2 - -inherit apache-module autotools - -MY_P=${P/mod_security-/modsecurity-apache_} -MY_P=${MY_P/_rc/-rc} - -DESCRIPTION="Web application firewall and Intrusion Detection System for Apache." -HOMEPAGE="http://www.modsecurity.org/" -SRC_URI="http://www.modsecurity.org/download/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~sparc ~x86" -IUSE="lua" - -DEPEND="dev-libs/libxml2 - lua? ( >=dev-lang/lua-5.1 ) - www-servers/apache[apache2_modules_unique_id]" -RDEPEND="${DEPEND}" -PDEPEND="www-apache/modsecurity-crs" - -S="${WORKDIR}/${MY_P}" - -APACHE2_MOD_FILE="apache2/.libs/${PN}2.so" -APACHE2_MOD_CONF="2.5.10/99_mod_security" -APACHE2_MOD_DEFINE="SECURITY" - -need_apache2 - -src_prepare() { - epatch "${FILESDIR}"/${PN}-2.5.10-as-needed.patch - - cd apache2 - eautoreconf -} - -src_configure() { - cd apache2 - - econf --with-apxs="${APXS}" \ - --without-curl \ - $(use_with lua) \ - || die "econf failed" -} - -src_compile() { - cd apache2 - - APXS_FLAGS= - for flag in ${CFLAGS}; do - APXS_FLAGS="${APXS_FLAGS} -Wc,${flag}" - done - - # Yes we need to prefix it _twice_ - for flag in ${LDFLAGS}; do - APXS_FLAGS="${APXS_FLAGS} -Wl,${flag}" - done - - emake \ - APXS_CFLAGS="${CFLAGS}" \ - APXS_LDFLAGS="${LDFLAGS}" \ - APXS_EXTRA_CFLAGS="${APXS_FLAGS}" \ - || die "emake failed" -} - -src_test() { - cd apache2 - emake test || die -} - -src_install() { - apache-module_src_install - - # install documentation - dodoc CHANGES || die - dohtml -r doc/* || die - - keepdir /var/cache/mod_security || die - fowners apache:apache /var/cache/mod_security || die - fperms 0770 /var/cache/mod_security || die -} diff --git a/www-apache/mod_security/mod_security-2.5.13-r2.ebuild b/www-apache/mod_security/mod_security-2.5.13-r2.ebuild new file mode 100644 index 000000000000..065f4e41bc67 --- /dev/null +++ b/www-apache/mod_security/mod_security-2.5.13-r2.ebuild @@ -0,0 +1,100 @@ +# 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 $ + +EAPI=2 + +inherit apache-module autotools + +MY_P=${P/mod_security-/modsecurity-apache_} +MY_P=${MY_P/_rc/-rc} + +DESCRIPTION="Web application firewall and Intrusion Detection System for Apache." +HOMEPAGE="http://www.modsecurity.org/" +SRC_URI="http://www.modsecurity.org/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="lua" + +DEPEND="dev-libs/libxml2 + lua? ( >=dev-lang/lua-5.1 ) + www-servers/apache[apache2_modules_unique_id]" +RDEPEND="${DEPEND}" +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() { + epatch "${FILESDIR}"/${PN}-2.5.10-as-needed.patch + + cd apache2 + eautoreconf +} + +src_configure() { + cd apache2 + + econf --with-apxs="${APXS}" \ + --without-curl \ + $(use_with lua) \ + || die "econf failed" +} + +src_compile() { + cd apache2 + + APXS_FLAGS= + for flag in ${CFLAGS}; do + APXS_FLAGS="${APXS_FLAGS} -Wc,${flag}" + done + + # Yes we need to prefix it _twice_ + for flag in ${LDFLAGS}; do + APXS_FLAGS="${APXS_FLAGS} -Wl,${flag}" + done + + emake \ + APXS_CFLAGS="${CFLAGS}" \ + APXS_LDFLAGS="${LDFLAGS}" \ + APXS_EXTRA_CFLAGS="${APXS_FLAGS}" \ + || die "emake failed" +} + +src_test() { + cd apache2 + emake test || die +} + +src_install() { + apache-module_src_install + + # install documentation + dodoc CHANGES || die + dohtml -r doc/* || die + + keepdir /var/cache/modsecurity || die + fowners apache:apache /var/cache/modsecurity || die + fperms 0770 /var/cache/modsecurity || die +} + +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 "" + fi + elog "The base configuration file has been renamed 79_modsecurity.conf" + elog "so that you can put your own configuration as 90_modsecurity_local.conf or" + elog "equivalent." + elog "" + elog "That would be the correct place for site-global security rules." + elog "Note: 80_modsecurity_crs.conf is used by www-apache/modsecurity-crs" +} -- cgit v1.2.3-65-gdbad