Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/fail2ban/
Date: Fri, 06 Apr 2018 05:25:32
Message-Id: 1522992324.1a1e127f72290287b6157d18f4125b7d27cf96a4.jer@gentoo
1 commit: 1a1e127f72290287b6157d18f4125b7d27cf96a4
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 6 05:13:50 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 6 05:25:24 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a1e127f
7
8 net-analyzer/fail2ban: Version 0.10.3.
9
10 Package-Manager: Portage-2.3.28, Repoman-2.3.9
11
12 net-analyzer/fail2ban/Manifest | 1 +
13 net-analyzer/fail2ban/fail2ban-0.10.3.ebuild | 113 +++++++++++++++++++++++++++
14 2 files changed, 114 insertions(+)
15
16 diff --git a/net-analyzer/fail2ban/Manifest b/net-analyzer/fail2ban/Manifest
17 index 135b7a4dd73..6ebe7e4b176 100644
18 --- a/net-analyzer/fail2ban/Manifest
19 +++ b/net-analyzer/fail2ban/Manifest
20 @@ -1,3 +1,4 @@
21 DIST fail2ban-0.10.1.tar.gz 465197 BLAKE2B 1e9ed7d07f4565f49e6ebec9ba1ebbbb9835d2eab69d786672addbdf32b2d350a582927cf56722eea91c1420e2d0d7d7564c2739d412c33f639551fa83a7d4ad SHA512 80170082903b7d92732a7accd8ec5188f4b08b57ce46c2df9bc014771ab50602df2065abe87ccb890cfba41699f5441ebfe4648090ffcedb83e0374e509002f2
22 DIST fail2ban-0.10.2.tar.gz 474675 BLAKE2B 569599eec3c7b786933af332507ca148f49d38688f7467d3d9bb811353402646136fb28351e593fad0c95de4ece4ac4967d8215430827e8f5a2a52a6ea61a3ca SHA512 1c16682b3cbf26b5aed1bace4c09ed911e487fbd01f8e8355f2427dae85b86d1d28e7a18948ad66488393115c1439e9daf634f2edb8c3ce7ce8639aa53e35503
23 +DIST fail2ban-0.10.3.tar.gz 485520 BLAKE2B 0c4cc389fd57f53b0de143b66bb9b0ae45c088ea8a6cecf8c1e10f85d3fcfe2cec27f28201cad220648cec215195673c00c35701c2d91fe1a83da93858f0aca6 SHA512 5ea2fa76b46a8135b87feffaa95ed19ea426adf0f9ca4f7b3e6c4725629e1a5ddb78147103104cdd52b9777c8372ca9db1ebbba3b5457c6238c91fec5ad9841f
24 DIST fail2ban-0.9.6.tar.gz 352145 BLAKE2B a529a7a1c78f29f457abc26215da015f7624f6d777571e96725775557725b6cbbfda5068e77520f1b3c20efcff07c11f210c5cca3ed47cf86c6f5e87c503052f SHA512 c09778d39741dc38d1073495a9f491012717d5ed04d28722f2ae6755104bdcc472baf06d33f500fed592b04c05277ba5cf74e527f1c0ed751108f4f1be22fa7e
25
26 diff --git a/net-analyzer/fail2ban/fail2ban-0.10.3.ebuild b/net-analyzer/fail2ban/fail2ban-0.10.3.ebuild
27 new file mode 100644
28 index 00000000000..1efe5233391
29 --- /dev/null
30 +++ b/net-analyzer/fail2ban/fail2ban-0.10.3.ebuild
31 @@ -0,0 +1,113 @@
32 +# Copyright 1999-2018 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
37 +DISTUTILS_SINGLE_IMPL=1
38 +
39 +inherit distutils-r1 eutils systemd vcs-snapshot
40 +
41 +DESCRIPTION="scans log files and bans IPs that show malicious signs"
42 +HOMEPAGE="http://www.fail2ban.org/"
43 +SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
48 +IUSE="selinux systemd"
49 +
50 +# TODO support ipfw and ipfilter
51 +RDEPEND="
52 + kernel_linux? ( net-firewall/iptables )
53 + kernel_FreeBSD? ( sys-freebsd/freebsd-pf )
54 + net-misc/whois
55 + virtual/logger
56 + virtual/mta
57 + selinux? ( sec-policy/selinux-fail2ban )
58 + systemd? ( $(python_gen_cond_dep '|| (
59 + dev-python/python-systemd[${PYTHON_USEDEP}]
60 + sys-apps/systemd[python(-),${PYTHON_USEDEP}]
61 + )' 'python*' ) )
62 +"
63 +
64 +REQUIRED_USE="systemd? ( !python_single_target_pypy )"
65 +
66 +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt )
67 +
68 +python_prepare_all() {
69 + eapply_user
70 +
71 + # Replace /var/run with /run, but not in the top source directory
72 + find . -mindepth 2 -type f -exec \
73 + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + || die
74 +
75 + sed -i -e 's|runscript|openrc-run|g' files/gentoo-initd || die
76 +
77 + distutils-r1_python_prepare_all
78 +}
79 +
80 +python_compile() {
81 + if python_is_python3; then
82 + ./fail2ban-2to3 || die
83 + fi
84 + distutils-r1_python_compile
85 +}
86 +
87 +python_test() {
88 + "${PYTHON}" "bin/${PN}-testcases" || die "tests failed with ${EPYTHON}"
89 +}
90 +
91 +python_install_all() {
92 + distutils-r1_python_install_all
93 +
94 + rm -rf "${D}"/usr/share/doc/${PN} "${D}"/run || die
95 +
96 + # not FILESDIR
97 + newconfd files/gentoo-confd ${PN}
98 + newinitd files/gentoo-initd ${PN}
99 + sed -e "s:@BINDIR@:${EPREFIX}/usr/bin:g" files/${PN}.service.in > "${T}/${PN}.service" || die
100 + systemd_dounit "${T}/${PN}.service"
101 + systemd_dotmpfilesd files/${PN}-tmpfiles.conf
102 + doman man/*.{1,5}
103 +
104 + # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d.
105 + # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675
106 + insinto /etc/logrotate.d
107 + newins files/${PN}-logrotate ${PN}
108 +}
109 +
110 +pkg_preinst() {
111 + has_version "<${CATEGORY}/${PN}-0.7"
112 + previous_less_than_0_7=$?
113 +}
114 +
115 +pkg_postinst() {
116 + if [[ $previous_less_than_0_7 = 0 ]] ; then
117 + elog
118 + elog "Configuration files are now in /etc/fail2ban/"
119 + elog "You probably have to manually update your configuration"
120 + elog "files before restarting Fail2ban!"
121 + elog
122 + elog "Fail2ban is not installed under /usr/lib anymore. The"
123 + elog "new location is under /usr/share."
124 + elog
125 + elog "You are upgrading from version 0.6.x, please see:"
126 + elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8"
127 + fi
128 +
129 + if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then
130 + elog "For most jail.conf configurations, it is recommended you install either"
131 + elog "dev-python/pyinotify or app-admin/gamin (in order of preference)"
132 + elog "to control how log file modifications are detected"
133 + fi
134 +
135 + if ! has_version dev-lang/python[sqlite]; then
136 + elog "If you want to use ${PN}'s persistent database, then reinstall"
137 + elog "dev-lang/python with USE=sqlite"
138 + fi
139 +
140 + if has_version sys-apps/systemd[-python]; then
141 + elog "If you want to track logins through sys-apps/systemd's"
142 + elog "journal backend, then reinstall sys-apps/systemd with USE=python"
143 + fi
144 +}