[Buildroot] [PATCH] package/fail2ban: add python3 support

Peter Korsgaard peter at korsgaard.com
Mon Feb 3 17:09:17 UTC 2020


>>>>> "Pascal" == Pascal de Bruijn <p.debruijn at unilogic.nl> writes:

 > the fail2ban codebase is still native python2, but 2to3 is supported
 > Signed-off-by: Pascal de Bruijn <p.debruijn at unilogic.nl>
 > ---
 >  package/fail2ban/Config.in   | 2 +-
 >  package/fail2ban/fail2ban.mk | 7 +++++++
 >  2 files changed, 8 insertions(+), 1 deletion(-)

 > diff --git a/package/fail2ban/Config.in b/package/fail2ban/Config.in
 > index f05adbb..86e6233 100644
 > --- a/package/fail2ban/Config.in
 > +++ b/package/fail2ban/Config.in
 > @@ -1,6 +1,6 @@
 >  config BR2_PACKAGE_FAIL2BAN
 >  	bool "fail2ban"
 > -	depends on BR2_PACKAGE_PYTHON
 > +	depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
 >  	select BR2_PACKAGE_PYTHON_SYSTEMD if BR2_PACKAGE_SYSTEMD
 >  	help
 >  	  Fail2ban scans log files (e.g. /var/log/apache/error_log) and
 > diff --git a/package/fail2ban/fail2ban.mk b/package/fail2ban/fail2ban.mk
 > index 0a8f3c6..0c5de9a 100644
 > --- a/package/fail2ban/fail2ban.mk
 > +++ b/package/fail2ban/fail2ban.mk
 > @@ -10,6 +10,13 @@ FAIL2BAN_LICENSE = GPL-2.0+
 >  FAIL2BAN_LICENSE_FILES = COPYING
 >  FAIL2BAN_SETUP_TYPE = distutils
 
 > +define FAIL2BAN_PYTHON_2TO3
 > +	$(HOST_DIR)/bin/2to3 --write --nobackups --no-diffs $(@D)/bin/* $(@D)/fail2ban

I was going to say that this is horrible, but this is indeed apparently
how upstream expects you to use it (with the fail2ban-2to3 script).

Committed, thanks.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list