1 |
commit: 28dc3dd2a92f5920653c2f0719cb697e4f7cbae1 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 4 20:41:23 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 4 20:45:06 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28dc3dd2 |
7 |
|
8 |
net-analyzer/fail2ban: sync live |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
net-analyzer/fail2ban/fail2ban-9999.ebuild | 27 +++++++++++++-------------- |
13 |
1 file changed, 13 insertions(+), 14 deletions(-) |
14 |
|
15 |
diff --git a/net-analyzer/fail2ban/fail2ban-9999.ebuild b/net-analyzer/fail2ban/fail2ban-9999.ebuild |
16 |
index 9d117cebef47..59203cfb4af6 100644 |
17 |
--- a/net-analyzer/fail2ban/fail2ban-9999.ebuild |
18 |
+++ b/net-analyzer/fail2ban/fail2ban-9999.ebuild |
19 |
@@ -1,9 +1,9 @@ |
20 |
-# Copyright 1999-2021 Gentoo Authors |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
EAPI=7 |
25 |
|
26 |
-PYTHON_COMPAT=( python3_{8,9} ) |
27 |
+PYTHON_COMPAT=( python3_{8..10} ) |
28 |
DISTUTILS_SINGLE_IMPL=1 |
29 |
|
30 |
inherit bash-completion-r1 distutils-r1 systemd tmpfiles |
31 |
@@ -31,8 +31,7 @@ RDEPEND=" |
32 |
|| ( |
33 |
dev-python/python-systemd[${PYTHON_USEDEP}] |
34 |
sys-apps/systemd[python(-),${PYTHON_USEDEP}] |
35 |
- ) |
36 |
- ' 'python*') |
37 |
+ )' 'python*' ) |
38 |
) |
39 |
" |
40 |
|
41 |
@@ -40,16 +39,15 @@ DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) |
42 |
|
43 |
PATCHES=( |
44 |
"${FILESDIR}"/${PN}-0.11.2-adjust-apache-logs-paths.patch |
45 |
+ "${FILESDIR}"/${PN}-0.11.2-upstream-openrc.patch |
46 |
) |
47 |
|
48 |
python_prepare_all() { |
49 |
+ distutils-r1_python_prepare_all |
50 |
+ |
51 |
# Replace /var/run with /run, but not in the top source directory |
52 |
find . -mindepth 2 -type f -exec \ |
53 |
sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + || die |
54 |
- |
55 |
- sed -i -e 's|runscript|openrc-run|g' files/gentoo-initd || die |
56 |
- |
57 |
- distutils-r1_python_prepare_all |
58 |
} |
59 |
|
60 |
python_compile() { |
61 |
@@ -69,12 +67,13 @@ python_install_all() { |
62 |
|
63 |
rm -rf "${ED}"/usr/share/doc/${PN} "${ED}"/run || die |
64 |
|
65 |
- # Not ${FILESDIR} |
66 |
- newconfd files/gentoo-confd ${PN} |
67 |
- newinitd files/gentoo-initd ${PN} |
68 |
+ newconfd files/fail2ban-openrc.conf ${PN} |
69 |
+ |
70 |
+ # These two are placed in the ${BUILD_DIR} after being "built" |
71 |
+ # in install_scripts(). |
72 |
+ newinitd "${BUILD_DIR}/fail2ban-openrc.init" "${PN}" |
73 |
+ systemd_dounit "${BUILD_DIR}/${PN}.service" |
74 |
|
75 |
- sed -e "s:@BINDIR@:${EPREFIX}/usr/bin:g" files/${PN}.service.in > "${T}"/${PN}.service || die |
76 |
- systemd_dounit "${T}"/${PN}.service |
77 |
dotmpfiles files/${PN}-tmpfiles.conf |
78 |
|
79 |
doman man/*.{1,5} |
80 |
@@ -98,7 +97,7 @@ pkg_preinst() { |
81 |
pkg_postinst() { |
82 |
tmpfiles_process ${PN}-tmpfiles.conf |
83 |
|
84 |
- if [[ ${previous_less_than_0_7} == 0 ]] ; then |
85 |
+ if [[ ${previous_less_than_0_7} = 0 ]] ; then |
86 |
elog |
87 |
elog "Configuration files are now in /etc/fail2ban/" |
88 |
elog "You probably have to manually update your configuration" |