diff options
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2024-07-08 15:11:38 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2024-07-31 21:10:05 -0400 |
commit | a2ec4fc27530c3401d4c2ebeb9395e9830c1655c (patch) | |
tree | 1ef98180c7805ed2b3849fc816982272ac783286 /dynamic-layers/meta-python | |
parent | db91051c6a01c105846594e935494f16ab651f45 (diff) | |
download | meta-security-a2ec4fc27530c3401d4c2ebeb9395e9830c1655c.tar.gz |
fail2ban: update to 1.1.0+
Current 1.0.2 version does not work with scarthgap or later releases,
as the asynchat module has been removed (as scheduled) from python's
stdlib as of v3.12.
fail2ban 1.1.0 also does not work out-of-the-box, as the distutils
module which the pyinotify and systemd backends depend has also been
removed.
So update the recipe to point at commit ac62658c10f4, which fixes
those two backends to no longer depend on distutils.
Upstream's out-of-the-box ban action now uses the 'nft'
command. People can still override and customize that in
jail.conf/jail.local, but to make the recipe useful without
customizing things back to use iptables, change the dependency
iptables->nftables.
Since 1.1.0, fail2ban has been python3-only, so the recipe becomes
somewhat simpler since the whole do_compile preparation step can be
removed.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'dynamic-layers/meta-python')
-rw-r--r-- | dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb (renamed from dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_1.0.2.bb) | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_1.0.2.bb b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb index e284d82..52d35f8 100644 --- a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_1.0.2.bb +++ b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb | |||
@@ -11,12 +11,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecabc31e90311da843753ba772885d9f" | |||
11 | 11 | ||
12 | DEPENDS = "python3-native" | 12 | DEPENDS = "python3-native" |
13 | 13 | ||
14 | SRCREV = "e1d3006b0330e9777705a7baafe3989d442ed120" | 14 | SRCREV = "ac62658c10f492911f8a0037a0bcf97c8521cd78" |
15 | SRC_URI = "git://github.com/fail2ban/fail2ban.git;branch=master;protocol=https \ | 15 | SRC_URI = "git://github.com/fail2ban/fail2ban.git;branch=master;protocol=https \ |
16 | file://initd \ | 16 | file://initd \ |
17 | file://run-ptest \ | 17 | file://run-ptest \ |
18 | " | 18 | " |
19 | 19 | ||
20 | PV = "1.1.0+git" | ||
21 | |||
20 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" | 22 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" |
21 | 23 | ||
22 | inherit update-rc.d ptest setuptools3_legacy | 24 | inherit update-rc.d ptest setuptools3_legacy |
@@ -26,16 +28,6 @@ SYSTEMD_SERVICE:${PN} = "fail2ban.service" | |||
26 | 28 | ||
27 | S = "${UNPACKDIR}/git" | 29 | S = "${UNPACKDIR}/git" |
28 | 30 | ||
29 | do_compile () { | ||
30 | cd ${S} | ||
31 | |||
32 | #remove symlink to python3 | ||
33 | # otherwise 2to3 is run against it | ||
34 | rm -f bin/fail2ban-python | ||
35 | |||
36 | ./fail2ban-2to3 | ||
37 | } | ||
38 | |||
39 | do_install:append () { | 31 | do_install:append () { |
40 | rm -f ${D}/${bindir}/fail2ban-python | 32 | rm -f ${D}/${bindir}/fail2ban-python |
41 | install -d ${D}/${sysconfdir}/fail2ban | 33 | install -d ${D}/${sysconfdir}/fail2ban |
@@ -66,7 +58,7 @@ INITSCRIPT_PARAMS = "defaults 25" | |||
66 | 58 | ||
67 | INSANE_SKIP:${PN}:append = "already-stripped" | 59 | INSANE_SKIP:${PN}:append = "already-stripped" |
68 | 60 | ||
69 | RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog} iptables python3-core python3-pyinotify" | 61 | RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog} nftables python3-core python3-pyinotify" |
70 | RDEPENDS:${PN} += "python3-sqlite3" | 62 | RDEPENDS:${PN} += "python3-sqlite3" |
71 | RDEPENDS:${PN} += " python3-logging python3-fcntl python3-json" | 63 | RDEPENDS:${PN} += " python3-logging python3-fcntl python3-json" |
72 | RDEPENDS:${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban" | 64 | RDEPENDS:${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban" |