https://github.com/fail2ban/fail2ban/releases/tag/0.10.0 IPv6 support for fail2ban Thank you.
There are some problems running the new code with python3.4 so that needs to be resolved upstream before we can add the ebuild.
writing byte-compilation script '/home/jer/portage/net-analyzer/fail2ban-0.10.0/temp/tmpha_3qkx_.py' /usr/bin/python3.4 -OO /home/jer/portage/net-analyzer/fail2ban-0.10.0/temp/tmpha_3qkx_.py File "/usr/lib64/python3.4/site-packages/fail2ban/server/ipdns.py", line 272 mask = ~(0xFFFFFFFFL >> cidr) ^ SyntaxError: invalid syntax File "/usr/lib64/python3.4/site-packages/fail2ban/server/server.py", line 99 os.umask(0077) ^ SyntaxError: invalid token File "/usr/lib64/python3.4/site-packages/fail2ban/tests/filtertestcase.py", line 1385 % m for m in 53, 54, 57, 58]) ^ SyntaxError: invalid syntax File "/usr/lib64/python3.4/site-packages/fail2ban/tests/misctestcase.py", line 193 print deep_function(3) ^ SyntaxError: invalid syntax removing /home/jer/portage/net-analyzer/fail2ban-0.10.0/temp/tmpha_3qkx_.py
I don't think the code is supposed to be Python3-compatible since their travis build runs "./fail2ban-2to3" before setup.py for Python 3. If we run 2to3 during python_prepare_all, the build completes without any errors with Python 3.4, 3.5 and 3.6.
there are some enumeration that still use v2 naming (thus are different.) * Starting fail2ban ... Traceback (most recent call last): File "/usr/bin/fail2ban-client", line 34, in <module> from fail2ban.client.fail2banclient import exec_command_line, sys File "/usr/lib/python3.5/site-packages/fail2ban/client/fail2banclient.py", line 39, in <module> from ..server.utils import Utils File "/usr/lib/python3.5/site-packages/fail2ban/server/utils.py", line 54, in <module> for name, num in signal.__dict__.iteritems() if name.startswith("SIG")) AttributeError: 'dict' object has no attribute 'iteritems' * start-stop-daemon: failed to start `/usr/bin/fail2ban-client' * Failed to start fail2ban [ !! ] * ERROR: fail2ban failed to start fixing this ends with another ... .. fail2ban works when the following useflags are in effect: (all on one line in package.use) net-analyzer/fail2ban -python_single_target_python3_5 -python_single_target_python3_4 python_single_target_python2_7
renaming fail2ban-0.9.7.ebuild to fail2ban-0.10.ebuild fails here: old: python_install_all() { distutils-r1_python_install_all rm -rf "${D}"/usr/share/doc/${PN} "${D}"/run || die # not FILESDIR newconfd files/gentoo-confd ${PN} newinitd files/gentoo-initd ${PN} systemd_dounit files/${PN}.service #<--- fails here on non-systemd systemd_dotmpfilesd files/${PN}-tmpfiles.conf doman man/*.{1,5} # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 insinto /etc/logrotate.d newins files/${PN}-logrotate ${PN} } after change into: python_install_all() { distutils-r1_python_install_all rm -rf "${D}"/usr/share/doc/${PN} "${D}"/run || die # not FILESDIR newconfd files/gentoo-confd ${PN} newinitd files/gentoo-initd ${PN} if use systemd ; then systemd_dounit files/${PN}.service systemd_dotmpfilesd files/${PN}-tmpfiles.conf fi doman man/*.{1,5} # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 insinto /etc/logrotate.d newins files/${PN}-logrotate ${PN} } Does install (& work) on a non-systemd and is a LOT faster during shutdown and startup (difference of 30+ minutes wait during shutdown vs. a few seconds).
Curious, is `python_targets_python3_6` also in the cards here?
(In reply to Leho Kraav (:macmaN @lkraav) from comment #6) > Curious, is `python_targets_python3_6` also in the cards here? Sure, probably as soon as someone figures out how python eclasses are supposed to be used. Which is why NeedPatch and why python@ is CC'd.
(In reply to Jeroen Roovers from comment #7) I'll take a look. At a first glance, I can't determine why the fail2ban devs have reinvented the 2to3 functionality that ships with setuptools...
Created attachment 511676 [details, diff] Patch series Here's a patch series to resolve the obvious issues and to add python3_6. Also available as a PR on github.
> Which is why NeedPatch and why python@ is CC'd. The python mail alias gets a LOT of email; if you would like us to look at something, a ping in #gentoo-python is usually more effective.
(In reply to Mike Gilbert from comment #10) > > Which is why NeedPatch and why python@ is CC'd. Apparently doing this in a single submission isn't very visible: """ Jeroen Roovers 2017-09-11 00:15:17 CEST CC: python@gentoo.org Keywords: NeedPatch """ > The python mail alias gets a LOT of email; if you would like us to look at > something, a ping in #gentoo-python is usually more effective. I'm sorry about that.
Comment on attachment 511676 [details, diff] Patch series Thanks.
Fixed. Thanks everyone.