16 Commits

Author SHA1 Message Date
Alexandru Ardelean
e0a12562b7 python3: merge python3-email into python3-urllib
As we're seeing in various test.sh scrip runs, importing 'email' fails
with not finding 'urllib' and vice-versa.

Then via a7e96ec91 ("python3-email: add python3-urllib as dependency")
I created a circular dependency.
So, might as well merge the two packages into one (named python3-urllib)
and updates all dependencies to pull python3-urllib.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-04-04 18:27:26 +03:00
Alexandru Ardelean
e85084314c fail2ban: drop python3-pkg-resources dependency
The python3-pkg-resources package does not exist in OpenWrt.
The only distutils/setuptools usage in fail2ban 1.1.0 is in
filterpyinotify.py and filtersystemd.py, both of which are
optional backends not available on OpenWrt. They are loaded
lazily via ImportError-guarded calls and the default auto
backend falls through to polling without them.

Also add test.sh with basic import and CLI smoke test.

Add me as maintainer.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-04-04 06:36:47 +03:00
dwardor
6b3c95cbd8 fail2ban: add host build deps to fix #28520
Adds the misssing build dependencies to remove the
"Cannot import 'setuptools.build_meta'" build error with 25.12.0-rc1 to 25.12.0-rc5

Signed-off-by: dwardor <benjamin.reveille@gmail.com>
2026-03-15 13:11:08 +02:00
Til Kaiser
0b6d2a2859 treewide: remove python3-distutils dependency
As the python3-distutils was dropped while bumping the version
to 3.13.9 via 97a92f2e7a, remove the
python3-distutils from all packages that are currently using it.

OpenWrt already uses recent enough releases of these packages
that have adapted to work without distutils, so the dependency
can be safely removed.

Signed-off-by: Til Kaiser <mail@tk154.de>
2025-12-10 10:49:08 +01:00
Andrey Zotikov
2a202b2091 fail2ban: bump to 1.1.0
fail2ban changes:
- nftables support (iptables dependency removed)
- python3 support (old package patches removed)
- Upstream patches backports:
  - filter.d/dropbear.conf: failregex extended to match different format of "Exit before auth" message
  - cherry-pick from debian: debian default banactions are nftables, systemd backend for sshd
- Removed unresponsive/unreachable maintainer.

Fixes: https://github.com/openwrt/packages/issues/23015 ("fail2ban: very old version")

Signed-off-by: Andrey Zotikov <andrey.zotikov@gmail.com>
2025-09-28 14:29:07 -03:00
Fabrice Fontaine
4d18c15388 net/fail2ban: assign PKG_CPE_ID
https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:fail2ban:fail2ban

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2024-01-29 15:59:42 -08:00
Jeffery To
0d9cc4aed2 fail2ban: Fix compatibility with Python 3.11
This backports 2 commits from upstream[1]; the other 3 are not strictly
necessary. One of the patches has been updated to remove a change to a
regex that does not exist in 0.11.2.

[1]: https://github.com/fail2ban/fail2ban/pull/3267

Fixes: https://github.com/openwrt/packages/issues/22736

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-11-30 13:04:58 +08:00
Jeffery To
4195e5c4a8 fail2ban: Override Build/Compile instead of Py3Build/Compile
This allows changes to the Python build system apply more easily to the
package.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-04-24 16:20:29 +08:00
Paul Fertser
0c10c224be treewide: remove AUTORELEASE
Automatically compute and substitute current values for all
$(AUTORELEASE) instances as this feature is deprecated and shouldn't be
used.

The following temporary change was made to the core:

diff --git a/rules.mk b/rules.mk
index 57d7995d4fa8..f16367de87a8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -429,7 +429,7 @@ endef
 abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1))))

 COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
+AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile))

 all:
 FORCE: ;

And this command used to fix affected packages:

for i in $(cd feeds/packages; git grep -l PKG_RELEASE:=.*AUTORELEASE | \
                              sed 's^.*/\([^/]*\)/Makefile^\1^';);
do
  make package/$i/download
done

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-04-21 22:46:58 +02:00
Michal Vasilek
4bd2169e73 fail2ban: fix patch for python 3.10
89d5d2e091 only patched importing
MutableMapping from collections, but importing Mapping has to be patched
too

Closes: #18681
Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2022-06-20 13:04:50 +02:00
Kerma Gérald
ad0e1a1c3c fail2ban: fix 2to3 error
Issue: 2to3 support has been removed in setuptools since version 58.0.0.

Fix: openwrt/packages#17311

Requirements: 2to3/host openwrt/packages#17429

Add upstream patch: 196c55e931

To install/build for python3 from source, it is necessary to convert to py3
codebase before setup (invoke 2to3 or ./fail2ban-2to3 firstly).
> ./fail2ban-2to3
> python3 setup.py build

Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2022-01-08 20:19:32 +01:00
Alexander Ryzhov
89d5d2e091 fail2ban: Python 10.0 compatibility
Signed-off-by: Alexander Ryzhov <github@ryzhov-al.ru>
2021-12-16 15:35:05 -08:00
Michal Vasilek
273a6d19c5 fail2ban: patch CVE-2021-32749
* switch to AUTORELEASE

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2021-09-16 23:33:37 +02:00
Vladislav Grigoryev
57aab9f1d1 fail2ban: fix hotplug when disabled
Avoid restarting fail2ban by hotplug when the service is disabled.
Related issue: https://github.com/openwrt/packages/issues/16601

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-09-10 11:23:17 -04:00
Kerma Gérald
a4f24a353e fail2ban: fix package for fail2ban v0.11.2
fail2ban v0.11.2 package version 2

Following PR #15098, add fixes to build fail2ban package:
- remove use of fail2ban-python (directly use python3 in script)
- remove link to python3 in /usr/bin (break the package build)
- remove python-tests (reduce the package size)

Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2021-09-07 15:12:59 +02:00
Kerma Gérald
e34396fd0e fail2ban: initial package of fail2ban version 0.11.2
python3-pyinotify: initial package version 0.9.6 of pyinotify for python3

Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2021-09-01 14:08:17 -07:00