From: Alexandru Ardelean Date: Fri, 3 Apr 2026 12:29:19 +0000 (+0300) Subject: fail2ban: drop python3-pkg-resources dependency X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=e85084314c0906613030b43eb1ff04643b18b62a;p=openwrt-packages.git 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 --- diff --git a/net/fail2ban/Makefile b/net/fail2ban/Makefile index 2565c5227..8af89b254 100644 --- a/net/fail2ban/Makefile +++ b/net/fail2ban/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fail2ban PKG_VERSION:=1.1.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/fail2ban/fail2ban/tar.gz/$(PKG_VERSION)? PKG_HASH:=474fcc25afdaf929c74329d1e4d24420caabeea1ef2e041a267ce19269570bae -PKG_MAINTAINER:= +PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:fail2ban:fail2ban @@ -37,8 +37,7 @@ define Package/fail2ban +python3-email \ +python3-logging \ +python3-sqlite3 \ - +python3-urllib \ - +python3-pkg-resources + +python3-urllib endef define Package/fail2ban/description diff --git a/net/fail2ban/test.sh b/net/fail2ban/test.sh new file mode 100755 index 000000000..3d9df8d16 --- /dev/null +++ b/net/fail2ban/test.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +[ "$1" = fail2ban ] || exit 0 + +# Verify fail2ban-client binary is present and functional +fail2ban-client --version 2>&1 | grep -qi "fail2ban" || \ + { echo "fail2ban-client --version did not produce expected output"; exit 1; } + +python3 - << 'EOF' +import fail2ban + +from fail2ban.version import version +assert version, "fail2ban version is empty" + +from fail2ban.helpers import formatExceptionInfo +from fail2ban.exceptions import UnknownJailException + +# Verify core exception class is accessible +try: + raise UnknownJailException("test") +except UnknownJailException: + pass +EOF