Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Fail2ban accepts python >= 3.x, but gamin does not
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 621
Location: France

PostPosted: Mon Mar 30, 2015 10:05 am    Post subject: [SOLVED] Fail2ban accepts python >= 3.x, but gamin does n Reply with quote

Hello all,

When configuring fail2ban on my (old) firewall box, I saw it consumes a significant part of the few available resources on the machine. It seems the default backend, "polling", parses the log files every second, which is not the ideal mean for me. I read that pyinotify has bad interactions with logrotate, and probably performance problems, so I wanted to use gamin.

First problem, net-analyzer/fail2ban has not "pyinotify" nor "gamin" USE flag, so I had to install gamin myself. That doesn't really matter, I know how to use emerge :D. But...

Second problem, my PYTHON_TARGETS is set to "python2_7 python3_3". Fail2ban is able to run, so it builds, on both versions. And it is launched via python 3.3. Gamin, when "python" USE flag is enabled, does need python 2.7. So when I start fail2ban with the "backend = gamin" parameter set, it complains it fails to intialize the backend "gamin" because "No module named 'gamin'". Then I must launch fail2ban via python 2.7.

I guess it would be possible to avoid all these inconveniences via a "gamin" USE flag available, which would set the dependency with "app-admin/gamin", and would force the user to emerge fail2ban with python 2.7 enabled only. Wouldn't it ?


Last edited by Syl20 on Mon Nov 09, 2015 4:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
joshin
n00b
n00b


Joined: 09 Apr 2006
Posts: 14

PostPosted: Fri Oct 30, 2015 2:10 pm    Post subject: Reply with quote

If you haven't, you should file this as a bug at https://bugs.gentoo.org.
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 621
Location: France

PostPosted: Mon Nov 09, 2015 4:06 pm    Post subject: Reply with quote

A nearly similar bug is closed as WONTFIX...
But I can see DISTUTILS_SINGLE_IMPL=1 in fail2ban ebuilds. This directive seems to force PYTHON_SINGLE_TARGET="python2_7", so I don't need a custom script to launch fail2ban again. :D

What I don't understand is that line is present for several years in the ebuilds. So I should not had to open this subject seven mouths ago... Maybe the complete reinstall when I switched to amd64 arch resolved old configuration problems on my box... :roll:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum