summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2016-02-24 14:01:40 +0100
committerPatrice Clement <monsieurp@gentoo.org>2016-03-09 14:08:21 +0000
commit9e5135b109c04b6e6335884cdb71c890c7d5e945 (patch)
treed3e64c03d6a5d5a0f129c9d22ce79555cbc971e9 /net-analyzer/fail2ban/fail2ban-99999999.ebuild
parentnet-analyzer/fail2ban: support freebsd-pf (diff)
downloadgentoo-9e5135b109c04b6e6335884cdb71c890c7d5e945.tar.gz
gentoo-9e5135b109c04b6e6335884cdb71c890c7d5e945.tar.bz2
gentoo-9e5135b109c04b6e6335884cdb71c890c7d5e945.zip
net-analyzer/fail2ban: update live ebuild, drop useless patches
Apply changes from the stable ebuild and drop the two patches since they are not needed any more, as per: https://github.com/fail2ban/fail2ban/commit/294a7790a9a32f98448e1e2a2d7a5cfdf741c35f https://github.com/fail2ban/fail2ban/commit/869d99dd377ff45efa5796bb3be2500e41f32dc3 Pull-Request: https://github.com/gentoo/gentoo/pull/832 Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Patrice Clement <monsieurp@gentoo.org> Package-Manager: portage-2.2.27
Diffstat (limited to 'net-analyzer/fail2ban/fail2ban-99999999.ebuild')
-rw-r--r--net-analyzer/fail2ban/fail2ban-99999999.ebuild40
1 files changed, 17 insertions, 23 deletions
diff --git a/net-analyzer/fail2ban/fail2ban-99999999.ebuild b/net-analyzer/fail2ban/fail2ban-99999999.ebuild
index ee2f56e3283f..8372daa6a927 100644
--- a/net-analyzer/fail2ban/fail2ban-99999999.ebuild
+++ b/net-analyzer/fail2ban/fail2ban-99999999.ebuild
@@ -1,24 +1,26 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
-PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} pypy )
DISTUTILS_SINGLE_IMPL=1
-inherit distutils-r1 eutils git-r3 systemd vcs-snapshot
+inherit distutils-r1 eutils systemd git-r3
DESCRIPTION="scans log files and bans IPs that show malicious signs"
HOMEPAGE="http://www.fail2ban.org/"
-EGIT_REPO_URI="https://github.com/${PN}/${PN}/"
+EGIT_REPO_URI="https://github.com/${PN}/${PN}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="selinux systemd"
+# TODO support ipfw and ipfilter
RDEPEND="
- net-firewall/iptables
+ kernel_linux? ( net-firewall/iptables )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-pf )
net-misc/whois
virtual/logger
virtual/mta
@@ -29,33 +31,26 @@ RDEPEND="
)' 'python*' ) )
"
-DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt )
+REQUIRED_USE="systemd? ( !python_single_target_pypy )"
-src_unpack() {
- git-r3_src_unpack
-}
+DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt )
-src_prepare() {
+python_prepare_all() {
# Replace /var/run with /run, but not in the top source directory
- sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die
+ find . -mindepth 2 -type f -exec \
+ sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + || die
- # Fix bashisms and do not direct useful output to /dev/null (bug #536320)
- # Remove global logrotate settings (bug #549856)
- epatch \
- "${FILESDIR}"/${PN}-0.9.2-initd.patch \
- "${FILESDIR}"/${PN}-0.9.2-logrotate.patch
-
- distutils-r1_src_prepare
+ distutils-r1_python_prepare_all
}
python_test() {
- ${EPYTHON} bin/${PN}-testcases
+ "${PYTHON}" "bin/${PN}-testcases" || die "tests failed with ${EPYTHON}"
}
-src_install() {
- distutils-r1_src_install
+python_install_all() {
+ distutils-r1_python_install_all
- rm -rf "${D}"/usr/share/doc/${PN}
+ rm -r "${D}"/usr/share/doc/${PN} "${D}"/run || die
# not FILESDIR
newconfd files/gentoo-confd ${PN}
@@ -98,7 +93,6 @@ pkg_postinst() {
elog "If you want to use ${PN}'s persistent database, then reinstall"
elog "dev-lang/python with USE=sqlite"
fi
-
if has_version sys-apps/systemd[-python]; then
elog "If you want to track logins through sys-apps/systemd's"
elog "journal backend, then reinstall sys-apps/systemd with USE=python"