commit:     9e5135b109c04b6e6335884cdb71c890c7d5e945
Author:     Louis Sautier <sautier.louis <AT> gmail <DOT> com>
AuthorDate: Wed Feb 24 13:01:40 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Mar  9 14:08:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e5135b1

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 <AT> gentoo.org>
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
Package-Manager: portage-2.2.27

 net-analyzer/fail2ban/fail2ban-99999999.ebuild | 40 +++++++++++---------------
 1 file changed, 17 insertions(+), 23 deletions(-)

diff --git a/net-analyzer/fail2ban/fail2ban-99999999.ebuild 
b/net-analyzer/fail2ban/fail2ban-99999999.ebuild
index ee2f56e..8372daa 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"

Reply via email to